@kvass/widgets 1.9.51 → 1.9.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import{O as M2,G as M_,q as Dn,e as In,o as ur,b as Hr,c as Cn,y as Dd,r as Qo,E as yT,w as vd,z as cD,d as en,a as sl,g as fs,j as W_,v as An,C as vT,t as Pc,A as uD,m as hD,f as xT,n as cg,s as I2,i as dD,D as pD}from"./_plugin-vue_export-helper.js";var C2={},Do=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bT(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}function fD(h){if(h.__esModule)return h;var d=h.default;if(typeof d=="function"){var m=function x(){return this instanceof x?Reflect.construct(d,arguments,this.constructor):d.apply(this,arguments)};m.prototype=d.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(h).forEach(function(x){var T=Object.getOwnPropertyDescriptor(h,x);Object.defineProperty(m,x,T.get?T:{enumerable:!0,get:function(){return h[x]}})}),m}var wT={exports:{}};(function(h,d){(function(m,x){h.exports=x()})(Do,function(){var m,x,T;function I(R,C){if(!m)m=C;else if(!x)x=C;else{var Z="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+m+")(sharedChunk); ("+x+")(sharedChunk); self.onerror = null;",ee={};m(ee),T=C(ee),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(T.workerUrl=window.URL.createObjectURL(new Blob([Z],{type:"text/javascript"})))}}I(["exports"],function(R){var C=typeof self<"u"?self:{},Z="3.1.2";let ee;const ne={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(ee==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{ee=C2.API_URL_REGEX!=null?new RegExp(C2.API_URL_REGEX):t}catch{ee=t}}return ee},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!ne.API_URL)return null;try{const t=new URL(ne.API_URL);return t.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":t.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},Te={supported:!1,testSupport:function(t){!ve&&ke&&(Xe?ut(t):Me=t)}};let Me,ke,ve=!1,Xe=!1;function ut(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,ke),t.isContextLost())return;Te.supported=!0}catch{}t.deleteTexture(e),ve=!0}C.document&&(ke=C.document.createElement("img"),ke.onload=function(){Me&&ut(Me),Me=null,Xe=!0},ke.onerror=function(){ve=!0,Me=null},ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const tt="01";function yt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _t=st;function st(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=r}st.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,r=0;r<8;r++){var o=this.sampleCurveX(i)-t;if(Math.abs(o)<e)return i;var n=this.sampleCurveDerivativeX(i);if(Math.abs(n)<1e-6)break;i-=o/n}var s=0,a=1;for(i=t,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-t)<e));r++)t>o?s=i:a=i,i=.5*(a-s)+s;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var qe=yt(_t),$t=pi;function pi(t,e){this.x=t,this.y=e}pi.prototype={clone:function(){return new pi(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),i=Math.sin(t),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},pi.convert=function(t){return t instanceof pi?t:Array.isArray(t)?new pi(t[0],t[1]):t};var X=yt($t);function lt(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!lt(t[i],e[i]))return!1;return!0}if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object"||Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(!lt(t[i],e[i]))return!1;return!0}return t===e}const Rn=Math.PI/180,hr=180/Math.PI;function it(t){return t*Rn}function wi(t){return t*hr}const no=[[0,0],[1,0],[1,1],[0,1]];function Cr(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function on(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return{min:new X(e,i),max:new X(r,o)}}function nn(t,e,i=0,r=!0){const o=new X(i,i),n=t.sub(o),s=e.add(o),a=[n,new X(s.x,n.y),s,new X(n.x,s.y)];return r&&a.push(n.clone()),a}function zo(t,e,i,r){const o=new qe(t,e,i,r);return function(n){return o.solve(n)}}const kr=zo(.25,.1,.25,1);function je(t,e,i){return Math.min(i,Math.max(e,t))}function Ro(t,e,i){return(i=je((i-t)/(e-t),0,1))*i*(3-2*i)}function Lo(t,e,i){const r=i-e,o=((t-e)%r+r)%r+e;return o===e?i:o}function xs(t,e,i){if(!t.length)return i(null,[]);let r=t.length;const o=new Array(t.length);let n=null;t.forEach((s,a)=>{e(s,(l,c)=>{l&&(n=l),o[a]=c,--r==0&&i(n,o)})})}function bs(t){const e=[];for(const i in t)e.push(t[i]);return e}function Be(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Pr(t,e){const i={};for(let r=0;r<e.length;r++){const o=e[r];o in t&&(i[o]=t[o])}return i}let jd=1;function na(){return jd++}function Fc(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function Nc(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function jc(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function Yi(t,e){t.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function sa(t,e){return t.indexOf(e,t.length-e.length)!==-1}function aa(t,e,i){const r={};for(const o in t)r[o]=e.call(this,t[o],o,t);return r}function xe(t,e,i){const r={};for(const o in t)e.call(this,t[o],o,t)&&(r[o]=t[o]);return r}function N(t){return Array.isArray(t)?t.map(N):typeof t=="object"&&t?aa(t,N):t}const U={};function H(t){U[t]||(typeof console<"u"&&console.warn(t),U[t]=!0)}function de(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function fe(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function Le([t,e,i]){const r=it(e+90),o=it(i);return{x:t*Math.cos(r)*Math.sin(o),y:t*Math.sin(r)*Math.sin(o),z:t*Math.cos(o),azimuthal:e,polar:i}}function Ge(t,e,i){const r=Math.sqrt(t*t+e*e+i*i),o=r>0?Math.acos(i/r)*hr:0;let n=t!==0||e!==0?Math.atan2(-e,-t)*hr+90:0;return n<0&&(n+=360),[r,n,o]}function me(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function We(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,r,o,n)=>{const s=o||n;return e[r]=!s||s.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let ht=null;function at(){return!!C.document.fullscreenElement||!!C.document.webkitFullscreenElement}function si(t){try{const e=C[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function Ti(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function rr(t,e,i){t[4*e+0]=i[0],t[4*e+1]=i[1],t[4*e+2]=i[2],t[4*e+3]=i[3]}function Ei(t,e){return[Math.pow(t[0],2.2)*e,Math.pow(t[1],2.2)*e,Math.pow(t[2],2.2)*e]}function zi(t){return[Math.pow(t[0],1/2.2),Math.pow(t[1],1/2.2),Math.pow(t[2],1/2.2)]}const ui="mapbox-tiles";let dr=500,br=50,wr,xo;function la(){try{return C.caches}catch{}}function Dr(){la()&&!wr&&(wr=C.caches.open(ui))}function sn(t){const e=t.indexOf("?");if(e<0)return t;const i=function(o){const n=o.indexOf("?");return n>0?o.slice(n+1).split("&"):[]}(t),r=i.filter(o=>{const n=o.split("=");return n[0]==="language"||n[0]==="worldview"});return r.length?`${t.slice(0,e)}?${r.join("&")}`:t.slice(0,e)}let Ln=1/0;function ca(t){Ln++,Ln>br&&(t.getActor().send("enforceCacheSizeLimit",dr),Ln=0)}const le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(le);class ue extends Error{constructor(e,i,r){i===401&&Si(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const ge=me()?()=>self.worker&&self.worker.referrer:()=>(C.location.protocol==="blob:"?C.parent:C).location.href,be=function(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(ge())&&!/^\w+:/.test(i))){if(C.fetch&&C.Request&&C.AbortController&&C.Request.prototype.hasOwnProperty("signal"))return function(r,o){const n=new C.AbortController,s=new C.Request(r.url,{method:r.method||"GET",body:r.body,credentials:r.credentials,headers:r.headers,referrer:ge(),referrerPolicy:r.referrerPolicy,signal:n.signal});let a=!1,l=!1;const c=(u=s.url).indexOf("sku=")>0&&Si(u);var u;r.type==="json"&&s.headers.set("Accept","application/json");const p=(_,g,y)=>{if(l)return;if(_&&_.message!=="SecurityError"&&H(_.toString()),g&&y)return f(g);const v=Date.now();C.fetch(s).then(b=>{if(b.ok){const w=c?b.clone():null;return f(b,w,v)}return o(new ue(b.statusText,b.status,r.url))}).catch(b=>{b.name!=="AbortError"&&o(new Error(`${b.message} ${r.url}`))})},f=(_,g,y)=>{(r.type==="arrayBuffer"?_.arrayBuffer():r.type==="json"?_.json():_.text()).then(v=>{l||(g&&y&&function(b,w,S){if(Dr(),!wr)return;const A={status:w.status,statusText:w.statusText,headers:new C.Headers};w.headers.forEach((k,D)=>A.headers.set(D,k));const E=We(w.headers.get("Cache-Control")||"");if(E["no-store"])return;E["max-age"]&&A.headers.set("Expires",new Date(S+1e3*E["max-age"]).toUTCString());const M=A.headers.get("Expires");M&&(new Date(M).getTime()-S<42e4||function(k,D){if(xo===void 0)try{new Response(new ReadableStream),xo=!0}catch{xo=!1}xo?D(k.body):k.blob().then(D)}(w,k=>{const D=new C.Response(k,A);Dr(),wr&&wr.then(z=>z.put(sn(b.url),D)).catch(z=>H(z.message))}))}(s,g,y),a=!0,o(null,v,_.headers.get("Cache-Control"),_.headers.get("Expires")))}).catch(v=>{l||o(new Error(v.message))})};return c?function(_,g){if(Dr(),!wr)return g(null);const y=sn(_.url);wr.then(v=>{v.match(y).then(b=>{const w=function(S){if(!S)return!1;const A=new Date(S.headers.get("Expires")||0),E=We(S.headers.get("Cache-Control")||"");return A>Date.now()&&!E["no-cache"]}(b);v.delete(y),w&&v.put(y,b.clone()),g(null,b,w)}).catch(g)}).catch(g)}(s,p):p(null,null),{cancel:()=>{l=!0,a||n.abort()}}}(t,e);if(me()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(r,o){const n=new C.XMLHttpRequest;n.open(r.method||"GET",r.url,!0),r.type==="arrayBuffer"&&(n.responseType="arraybuffer");for(const s in r.headers)n.setRequestHeader(s,r.headers[s]);return r.type==="json"&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials=r.credentials==="include",n.onerror=()=>{o(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(r.type==="json")try{s=JSON.parse(n.response)}catch(a){return o(a)}o(null,s,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else o(new ue(n.statusText,n.status,r.url))},n.send(r.body),{cancel:()=>n.abort()}}(t,e)},we=function(t,e){return be(Be(t,{type:"json"}),e)},Ie=function(t,e){return be(Be(t,{type:"arrayBuffer"}),e)};function Pe(t){const e=C.document.createElement("a");return e.href=t,e.protocol===C.document.location.protocol&&e.host===C.document.location.host}const Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Ne,Ce;Ne=[],Ce=0;const vt=function(t,e){if(Te.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ce>=ne.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Ne.push(n),n}Ce++;let i=!1;const r=()=>{if(!i)for(i=!0,Ce--;Ne.length&&Ce<ne.MAX_PARALLEL_IMAGE_REQUESTS;){const n=Ne.shift(),{requestParameters:s,callback:a,cancelled:l}=n;l||(n.cancel=vt(s,a).cancel)}},o=Ie(t,(n,s,a,l)=>{r(),n?e(n):s&&(C.createImageBitmap?function(c,u){const p=new C.Blob([new Uint8Array(c)],{type:"image/png"});C.createImageBitmap(p).then(f=>{u(null,f)}).catch(f=>{u(new Error(`Could not load image because of ${f.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(s,(c,u)=>e(c,u,a,l)):function(c,u){const p=new C.Image,f=C.URL;p.onload=()=>{u(null,p),f.revokeObjectURL(p.src),p.onload=null,C.requestAnimationFrame(()=>{p.src=Ee})},p.onerror=()=>u(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const _=new C.Blob([new Uint8Array(c)],{type:"image/png"});p.src=c.byteLength?f.createObjectURL(_):Ee}(s,(c,u)=>e(c,u,a,l)))});return{cancel:()=>{o.cancel(),r()}}},ei="NO_ACCESS_TOKEN";class Ye{constructor(e,i,r){this._transformRequestFn=e,this._customAccessToken=i,this._silenceAuthErrors=!!r,this._createSkuToken()}_createSkuToken(){const e=function(){let i="";for(let r=0;r<10;r++)i+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",tt,i].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}normalizeStyleURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.params.push(`sdk=js-${Z}`),r.path=`/styles/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeGlyphsURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeModelURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/models/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeSourceURL(e,i,r,o){if(!Xt(e))return e;const n=Ki(e);return n.path=`/v4/${n.authority}.json`,n.params.push("secure"),r&&n.params.push(`language=${r}`),o&&n.params.push(`worldview=${o}`),this._makeAPIURL(n,this._customAccessToken||i)}normalizeSpriteURL(e,i,r,o){const n=Ki(e);return Xt(e)?(n.path=`/styles/v1${n.path}/sprite${i}${r}`,this._makeAPIURL(n,this._customAccessToken||o)):(n.path+=`${i}${r}`,Tr(n))}normalizeTileURL(e,i,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Xt(e))return e;const o=Ki(e);o.path=o.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${i||r&&o.authority!=="raster"&&r===512?"@2x":""}${Te.supported?".webp":"$1"}`),o.authority==="raster"?o.path=`/${ne.RASTER_URL_PREFIX}${o.path}`:(o.path=o.path.replace(/^.+\/v4\//,"/"),o.path=`/${ne.TILE_URL_VERSION}${o.path}`);const n=this._customAccessToken||function(s){for(const a of s){const l=a.match(/^access_token=(.*)$/);if(l)return l[1]}return null}(o.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&n&&this._skuToken&&o.params.push(`sku=${this._skuToken}`),this._makeAPIURL(o,n)}canonicalizeTileURL(e,i){const r=Ki(e);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(/\.[\w]+$/))return e;let o="mapbox://";r.path.match(/^\/raster\/v1\//)?o+=`raster/${r.path.replace(`/${ne.RASTER_URL_PREFIX}/`,"")}`:o+=`tiles/${r.path.replace(`/${ne.TILE_URL_VERSION}/`,"")}`;let n=r.params;return i&&(n=n.filter(s=>!s.match(/^access_token=/))),n.length&&(o+=`?${n.join("&")}`),o}canonicalizeTileset(e,i){const r=!!i&&Xt(i),o=[];for(const n of e.tiles||[])Si(n)?o.push(this.canonicalizeTileURL(n,r)):o.push(n);return o}_makeAPIURL(e,i){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",o=Ki(ne.API_URL);if(e.protocol=o.protocol,e.authority=o.authority,e.protocol==="http"){const n=e.params.indexOf("secure");n>=0&&e.params.splice(n,1)}if(o.path!=="/"&&(e.path=`${o.path}${e.path}`),!ne.REQUIRE_ACCESS_TOKEN)return Tr(e);if(i=i||ne.ACCESS_TOKEN,!this._silenceAuthErrors){if(!i)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if(i[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return e.params=e.params.filter(n=>n.indexOf("access_token")===-1),e.params.push(`access_token=${i||""}`),Tr(e)}}function Xt(t){return t.indexOf("mapbox:")===0}function Si(t){return ne.API_URL_REGEX.test(t)}function Ri(t){return ne.API_CDN_URL_REGEX.test(t)}function qi(t){return ne.API_STYLE_REGEX.test(t)&&!pr(t)}function pr(t){return ne.API_SPRITE_REGEX.test(t)}const so=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ki(t){const e=t.match(so);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Tr(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}const fr="mapbox.eventData";function ua(t){if(!t)return null;const e=t.split(".");if(!e||e.length!==3)return null;try{return JSON.parse(decodeURIComponent(C.atob(e[1]).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class On{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=ua(ne.ACCESS_TOKEN);let r="";return r=i&&i.u?C.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(o,n)=>String.fromCharCode(+("0x"+n)))):ne.ACCESS_TOKEN||"",e?`${fr}.${e}:${r}`:`${fr}:${r}`}fetchEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{const o=C.localStorage.getItem(i);o&&(this.eventData=JSON.parse(o));const n=C.localStorage.getItem(r);n&&(this.anonId=n)}catch{H("Unable to read from LocalStorage")}}saveEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{C.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&C.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{H("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,r,o){if(!ne.EVENTS_URL)return;const n=Ki(ne.EVENTS_URL);n.params.push(`access_token=${o||ne.ACCESS_TOKEN||""}`);const s={event:this.type,created:new Date(e).toISOString()},a=i?Be(s,i):s,l={url:Tr(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=function(c,u){return be(Be(c,{method:"POST"}),u)}(l,c=>{this.pendingRequest=null,r(c),this.saveEventData(),this.processRequests(o)})}queueRequest(e,i){this.queue.push(e),this.processRequests(i)}}const ha=new class extends On{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>Xt(i)||Si(i))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=ua(ne.ACCESS_TOKEN),i=e?e.u:ne.ACCESS_TOKEN;let r=i!==this.eventData.tokenU;jc(this.anonId)||(this.anonId=Fc(),r=!0);const o=this.queue.shift();if(this.eventData.lastSuccess){const n=new Date(this.eventData.lastSuccess),s=new Date(o),a=(o-this.eventData.lastSuccess)/864e5;r=r||a>=1||a<-1||n.getDate()!==s.getDate()}else r=!0;r?this.postEvent(o,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,"enabled.telemetry":!1,userId:this.anonId},n=>{n||(this.eventData.lastSuccess=o,this.eventData.tokenU=i)},t):this.processRequests()}},Vd=ha.postTurnstileEvent.bind(ha),Mg=new class extends On{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.EVENTS_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),jc(this.anonId)||(this.anonId=Fc()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,skuToken:this.skuToken,userId:this.anonId},r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t))}},GE=Mg.postMapLoadEvent.bind(Mg),Ig=new class extends On{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){ne.EVENTS_URL&&(t||ne.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:e,performanceData:i}=this.queue.shift(),r=function(o){const n=C.performance.getEntriesByType("resource"),s=C.performance.getEntriesByType("mark"),a=function(f){const _={};if(f){for(const g in f)if(g!=="other")for(const y of f[g]){const v=`${g}ResolveRangeMin`,b=`${g}ResolveRangeMax`,w=`${g}RequestCount`,S=`${g}RequestCachedCount`;_[v]=Math.min(_[v]||1/0,y.startTime),_[b]=Math.max(_[b]||-1/0,y.responseEnd);const A=E=>{_[E]===void 0&&(_[E]=0),++_[E]};y.transferSize!==void 0&&y.transferSize===0&&A(S),A(w)}}return _}(function(f,_){const g={};if(f)for(const y of f){const v=_(y);g[v]===void 0&&(g[v]=[]),g[v].push(y)}return g}(n,HE)),l=C.devicePixelRatio,c=C.navigator.connection||C.navigator.mozConnection||C.navigator.webkitConnection,u={counters:[],metadata:[],attributes:[]},p=(f,_,g)=>{g!=null&&f.push({name:_,value:g.toString()})};for(const f in a)p(u.counters,f,a[f]);if(o.interactionRange[0]!==1/0&&o.interactionRange[1]!==-1/0&&(p(u.counters,"interactionRangeMin",o.interactionRange[0]),p(u.counters,"interactionRangeMax",o.interactionRange[1])),s)for(const f of Object.keys(Uc)){const _=Uc[f],g=s.find(y=>y.name===_);g&&p(u.counters,_,g.startTime)}return p(u.counters,"visibilityHidden",o.visibilityHidden),p(u.attributes,"style",function(f){if(f)for(const _ of f){const g=_.name.split("?")[0];if(qi(g)){const y=g.split("/").slice(-2);if(y.length===2)return`mapbox://styles/${y[0]}/${y[1]}`}}}(n)),p(u.attributes,"terrainEnabled",o.terrainEnabled?"true":"false"),p(u.attributes,"fogEnabled",o.fogEnabled?"true":"false"),p(u.attributes,"projection",o.projection),p(u.attributes,"zoom",o.zoom),p(u.metadata,"devicePixelRatio",l),p(u.metadata,"connectionEffectiveType",c?c.effectiveType:void 0),p(u.metadata,"navigatorUserAgent",C.navigator.userAgent),p(u.metadata,"screenWidth",C.screen.width),p(u.metadata,"screenHeight",C.screen.height),p(u.metadata,"windowWidth",C.innerWidth),p(u.metadata,"windowHeight",C.innerHeight),p(u.metadata,"mapWidth",o.width/l),p(u.metadata,"mapHeight",o.height/l),p(u.metadata,"webglRenderer",o.renderer),p(u.metadata,"webglVendor",o.vendor),p(u.metadata,"sdkVersion",Z),p(u.metadata,"sdkIdentifier","mapbox-gl-js"),u}(i);for(const o of r.metadata);for(const o of r.counters);for(const o of r.attributes);this.postEvent(e,r,()=>{},t)}},$E=Ig.postPerformanceEvent.bind(Ig),Cg=new class extends On{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,r){if(!ne.API_URL||!ne.SESSION_PATH)return;const o=Ki(ne.API_URL+ne.SESSION_PATH);o.params.push(`sku=${e||""}`),o.params.push(`access_token=${r||ne.ACCESS_TOKEN||""}`);const n={url:Tr(o),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(s,a){return be(Be(s,{method:"GET"}),a)}(n,s=>{this.pendingRequest=null,i(s),this.saveEventData(),this.processRequests(r)})}getSessionAPI(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.SESSION_PATH&&ne.API_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t)}},WE=Cg.getSessionAPI.bind(Cg),Vc=new Set;function kg(t,e){e?Vc.add(t):Vc.delete(t)}const Uc={create:"create",load:"load",fullLoad:"fullLoad"},Pg={mark(t){C.performance.mark(t)},measure(t,e,i){C.performance.measure(t,e,i)}};function HE(t){const e=t.name.split("?")[0];return Ri(e)&&e.includes("mapbox-gl.js")?"javascript":Ri(e)&&e.includes("mapbox-gl.css")?"css":function(i){return ne.API_FONTS_REGEX.test(i)}(e)?"fontRange":pr(e)?"sprite":qi(e)?"style":function(i){return ne.API_TILEJSON_REGEX.test(i)}(e)?"tilejson":"other"}const ZE=C.performance;function Dg(t){const e=t?t.url.toString():void 0;return ZE.getEntriesByName(e)}var zg=Ud;function Ud(t){return!function(e){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var r,o,n=new Blob([""],{type:"text/javascript"}),s=URL.createObjectURL(n);try{o=new Worker(s),r=!0}catch{r=!1}return o&&o.terminate(),URL.revokeObjectURL(s),r}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var r=document.createElement("canvas");r.width=r.height=1;var o=r.getContext("2d");if(!o)return!1;var n=o.getImageData(0,0,1,1);return n&&n.width===r.width}()?(qd[i=e&&e.failIfMajorPerformanceCaveat]===void 0&&(qd[i]=function(r){var o,n=function(s){var a=document.createElement("canvas"),l=Object.create(Ud.webGLContextAttributes);return l.failIfMajorPerformanceCaveat=s,a.getContext("webgl",l)||a.getContext("experimental-webgl",l)}(r);if(!n)return!1;try{o=n.createShader(n.VERTEX_SHADER)}catch{return!1}return!(!o||n.isContextLost())&&(n.shaderSource(o,"void main() {}"),n.compileShader(o),n.getShaderParameter(o,n.COMPILE_STATUS)===!0)}(i)),qd[i]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var i}(t)}var qd={};let Gd,qc,$d,Gc,ws;function Rg(){return Gd==null&&(Gd=C.OffscreenCanvas&&new C.OffscreenCanvas(1,1).getContext("2d")&&typeof C.createImageBitmap=="function"),Gd}Ud.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const ct={now:()=>Gc!==void 0?Gc:C.performance.now(),setNow(t){Gc=t},restoreNow(){Gc=void 0},frame(t){const e=C.requestAnimationFrame(t);return{cancel:()=>C.cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:i,height:r}=t;ws||(ws=C.document.createElement("canvas"));const o=ws.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return(i>ws.width||r>ws.height)&&(ws.width=i,ws.height=r),o.clearRect(-e,-e,i+2*e,r+2*e),o.drawImage(t,0,0,i,r),o.getImageData(-e,-e,i+2*e,r+2*e)},resolveURL:t=>(qc||(qc=C.document.createElement("a")),qc.href=t,qc.href),get devicePixelRatio(){return C.devicePixelRatio},get prefersReducedMotion(){return!!C.matchMedia&&($d==null&&($d=C.matchMedia("(prefers-reduced-motion: reduce)")),$d.matches)},hasCanvasFingerprintNoise(){if(!Rg())return!1;const t=new C.OffscreenCanvas(85,1),e=t.getContext("2d",{willReadFrequently:!0});let i=0;for(let o=0;o<t.width;++o)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(o,0,1,1);const r=e.getImageData(0,0,t.width,t.height);i=0;for(let o=0;o<r.data.length;++o)if(o%4!=3&&i++!==r.data[o])return!0;return!1}};function ni(t,e,i){const r=C.document.createElement(t);return e!==void 0&&(r.className=e),i&&i.appendChild(r),r}function an(t,e,i){const r=C.document.createElementNS("http://www.w3.org/2000/svg",t);for(const o of Object.keys(e))r.setAttributeNS(null,o,e[o]);return i&&i.appendChild(r),r}const Ts=C.document&&C.document.documentElement.style,fl=Ts&&Ts.userSelect!==void 0?"userSelect":"WebkitUserSelect";let Lg;function Og(){Ts&&fl&&(Lg=Ts[fl],Ts[fl]="none")}function Bg(){Ts&&fl&&(Ts[fl]=Lg)}function Wd(t){t.preventDefault(),t.stopPropagation(),C.removeEventListener("click",Wd,!0)}function Hd(){C.addEventListener("click",Wd,!0),C.setTimeout(()=>{C.removeEventListener("click",Wd,!0)},0)}function ml(t,e){const i=t.getBoundingClientRect();return Ng(t,i,e)}function $c(t,e){const i=t.getBoundingClientRect(),r=[];for(let o=0;o<e.length;o++)r.push(Ng(t,i,e[o]));return r}function Fg(t){return C.InstallTrigger!==void 0&&t.button===2&&t.ctrlKey&&C.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button}function Ng(t,e,i){const r=t.offsetWidth===e.width?1:t.offsetWidth/e.width;return new X((i.clientX-e.left)*r,(i.clientY-e.top)*r)}function jg(t,e,i){i[t]&&i[t].indexOf(e)!==-1||(i[t]=i[t]||[],i[t].push(e))}function Zd(t,e,i){if(i&&i[t]){const r=i[t].indexOf(e);r!==-1&&i[t].splice(r,1)}}class ye{constructor(e,i={}){Be(this,i),this.type=e}}class nt extends ye{constructor(e,i={}){super("error",Be({error:e},i))}}class Fi{on(e,i){return this._listeners=this._listeners||{},jg(e,i,this._listeners),this}off(e,i){return Zd(e,i,this._listeners),Zd(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},jg(e,i,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,i){typeof e=="string"&&(e=new ye(e,i||{}));const r=e.type;if(this.listens(r)){e.target=this;const o=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const a of o)a.call(this,e);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const a of n)Zd(r,a,this._oneTimeListeners),a.call(this,e);const s=this._eventedParent;s&&(Be(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),s.fire(e))}else e instanceof nt&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var J=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"required":false,"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"camera":{"type":"camera"},"imports":{"type":"array","value":"import"},"schema":{"type":"schema"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"},"models":{"type":"models"}},"model":{"type":"string","required":true},"import":{"id":{"type":"string","required":true},"url":{"type":"string","required":true},"config":{"type":"config"},"data":{"type":"$root"}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","required":true},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string","required":true},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false,"expression":{},"property-type":"data-constant"},"shadow-intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":1}},"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":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":1}},"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},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":1}},"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},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"required":true,"type":"enum","values":{"raster-array":1}},"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},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":1}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":1}},"url":{"required":false,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"required":true,"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","default":[0,1],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');class Oe{constructor(e,i,r,o){this.message=(e?`${e}: `:"")+r,o&&(this.identifier=o),i!=null&&i.__line__&&(this.line=i.__line__)}}class Es extends Oe{}function ln(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Gi(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function cn(t){if(Array.isArray(t))return t.map(cn);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=cn(t[i]);return e}return Gi(t)}class XE extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Oo=XE;class Xd{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[r,o]of i)this.bindings[r]=o}concat(e){return new Xd(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var YE=Xd;const da={kind:"null"},ze={kind:"number"},Ft={kind:"string"},Ut={kind:"boolean"},ao={kind:"color"},pa={kind:"object"},jt={kind:"value"},Wc={kind:"collator"},_l={kind:"formatted"},gl={kind:"resolvedImage"};function zr(t,e){return{kind:"array",itemType:t,N:e}}function Ni(t){if(t.kind==="array"){const e=Ni(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const KE=[da,ze,Ft,Ut,ao,_l,pa,zr(jt),gl];function yl(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!yl(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const i of KE)if(!yl(i,e))return null}}return`Expected ${Ni(t)} but found ${Ni(e)} instead.`}function Yd(t,e){return e.some(i=>i.kind===t.kind)}function vl(t,e){return e.some(i=>i==="null"?t===null:i==="array"?Array.isArray(t):i==="object"?t&&!Array.isArray(t)&&typeof t=="object":i===typeof t)}var Kd,Vg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Hc(t){return(t=Math.round(t))<0?0:t>255?255:t}function Jd(t){return Hc(t[t.length-1]==="%"?parseFloat(t)/100*255:parseInt(t))}function Zc(t){return(e=t[t.length-1]==="%"?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Qd(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{Kd={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in Vg)return Vg[i].slice();if(i[0]==="#")return i.length===4?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:i.length===7&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var r=i.indexOf("("),o=i.indexOf(")");if(r!==-1&&o+1===i.length){var n=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),a=1;switch(n){case"rgba":if(s.length!==4)return null;a=Zc(s.pop());case"rgb":return s.length!==3?null:[Jd(s[0]),Jd(s[1]),Jd(s[2]),a];case"hsla":if(s.length!==4)return null;a=Zc(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,c=Zc(s[1]),u=Zc(s[2]),p=u<=.5?u*(c+1):u+c-u*c,f=2*u-p;return[Hc(255*Qd(f,p,l+1/3)),Hc(255*Qd(f,p,l)),Hc(255*Qd(f,p,l-1/3)),a];default:return null}}return null}}catch{}class Rr{constructor(e,i,r,o=1){this.r=e,this.g=i,this.b=r,this.a=o}static parse(e){if(!e)return;if(e instanceof Rr)return e;if(typeof e!="string")return;const i=Kd(e);return i?new Rr(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toString(){const[e,i,r,o]=this.toArray();return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(r)},${o})`}toArray(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[255*e/o,255*i/o,255*r/o,o]}toArray01(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[e/o,i/o,r/o,o]}toArray01Scaled(e){const{r:i,g:r,b:o,a:n}=this;return n===0?[0,0,0]:[i/n*e,r/n*e,o/n*e]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:r,a:o}=this;return[e,i,r,o]}toArray01Linear(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[Math.pow(e/o,2.2),Math.pow(i/o,2.2),Math.pow(r/o,2.2),o]}}Rr.black=new Rr(0,0,0,1),Rr.white=new Rr(1,1,1,1),Rr.transparent=new Rr(0,0,0,0),Rr.red=new Rr(1,0,0,1),Rr.blue=new Rr(0,0,1,1);var bt=Rr;class ep{constructor(e,i,r){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class tp{constructor(e,i,r,o,n){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=r,this.fontStack=o,this.textColor=n}}class Lr{constructor(e){this.sections=e}static fromString(e){return new Lr([new tp(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.namePrimary.length!==0)}static factory(e){return e instanceof Lr?e:Lr.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){e.push(["image",i.image.namePrimary]);continue}e.push(i.text);const r={};i.fontStack&&(r["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(r["font-scale"]=i.scale),i.textColor&&(r["text-color"]=["rgba"].concat(i.textColor.toArray())),e.push(r)}return e}}class lo{constructor(e){this.namePrimary=e.namePrimary,e.nameSecondary&&(this.nameSecondary=e.nameSecondary),this.available=e.available}toString(){return this.nameSecondary?`[${this.namePrimary},${this.nameSecondary}]`:this.namePrimary}static fromString(e,i){return e?new lo({namePrimary:e,nameSecondary:i,available:!1}):null}serialize(){return this.nameSecondary?["image",this.namePrimary,this.nameSecondary]:["image",this.namePrimary]}}function Ug(t,e,i,r){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?r===void 0||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[t,e,i,r]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function fa(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof bt||t instanceof ep||t instanceof Lr||t instanceof lo)return!0;if(Array.isArray(t)){for(const e of t)if(!fa(e))return!1;return!0}if(typeof t=="object"){for(const e in t)if(!fa(t[e]))return!1;return!0}return!1}function Ji(t){if(t===null)return da;if(typeof t=="string")return Ft;if(typeof t=="boolean")return Ut;if(typeof t=="number")return ze;if(t instanceof bt)return ao;if(t instanceof ep)return Wc;if(t instanceof Lr)return _l;if(t instanceof lo)return gl;if(Array.isArray(t)){const e=t.length;let i;for(const r of t){const o=Ji(r);if(i){if(i===o)continue;i=jt;break}i=o}return zr(i||jt,e)}return pa}function xl(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof bt||t instanceof Lr||t instanceof lo?t.toString():JSON.stringify(t)}class ip{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!fa(e[1]))return i.error("invalid value");const r=e[1];let o=Ji(r);const n=i.expectedType;return o.kind!=="array"||o.N!==0||!n||n.kind!=="array"||typeof n.N=="number"&&n.N!==0||(o=n),new ip(o,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof bt?["rgba"].concat(this.value.toArray()):this.value instanceof Lr?this.value.serialize():this.value}}var bl=ip,or=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const rp={string:Ft,number:ze,boolean:Ut,object:pa};class op{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let r,o=1;const n=e[0];if(n==="array"){let a,l;if(e.length>2){const c=e[1];if(typeof c!="string"||!(c in rp)||c==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);a=rp[c],o++}else a=jt;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);l=e[2],o++}r=zr(a,l)}else r=rp[n];const s=[];for(;o<e.length;o++){const a=i.parse(e[o],o,jt);if(!a)return null;s.push(a)}return new op(r,s)}evaluate(e){for(let i=0;i<this.args.length;i++){const r=this.args[i].evaluate(e);if(!yl(this.type,Ji(r)))return r;if(i===this.args.length-1)throw new or(`Expected value to be of type ${Ni(this.type)}, but found ${Ni(Ji(r))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){i.push(r.kind);const o=e.N;(typeof o=="number"||this.args.length>1)&&i.push(o)}}return i.concat(this.args.map(r=>r.serialize()))}}var un=op;class wl{constructor(e){this.type=_l,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return i.error("First argument must be an image or text section.");const o=[];let n=!1;for(let s=1;s<=e.length-1;++s){const a=e[s];if(n&&typeof a=="object"&&!Array.isArray(a)){n=!1;let l=null;if(a["font-scale"]&&(l=i.parse(a["font-scale"],1,ze),!l))return null;let c=null;if(a["text-font"]&&(c=i.parse(a["text-font"],1,zr(Ft)),!c))return null;let u=null;if(a["text-color"]&&(u=i.parse(a["text-color"],1,ao),!u))return null;const p=o[o.length-1];p.scale=l,p.font=c,p.textColor=u}else{const l=i.parse(e[s],1,jt);if(!l)return null;const c=l.type.kind;if(c!=="string"&&c!=="value"&&c!=="null"&&c!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,o.push({content:l,scale:null,font:null,textColor:null})}}return new wl(o)}evaluate(e){return new Lr(this.sections.map(i=>{const r=i.content.evaluate(e);return Ji(r)===gl?new tp("",r,null,null,null):new tp(xl(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const r={};i.scale&&(r["font-scale"]=i.scale.serialize()),i.font&&(r["text-font"]=i.font.serialize()),i.textColor&&(r["text-color"]=i.textColor.serialize()),e.push(r)}return e}}class Tl{constructor(e,i){this.type=gl,this.inputPrimary=e,this.inputSecondary=i}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");const r=i.parse(e[1],1,Ft);if(!r)return i.error("No image name provided.");if(e.length===2)return new Tl(r);const o=i.parse(e[2],1,Ft);return o?new Tl(r,o):i.error("Secondary image variant is not a string.")}evaluate(e){const i=lo.fromString(this.inputPrimary.evaluate(e),this.inputSecondary?this.inputSecondary.evaluate(e):void 0);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(i.namePrimary)>-1,i.nameSecondary&&i.available&&e.availableImages&&(i.available=e.availableImages.indexOf(i.nameSecondary)>-1)),i}eachChild(e){e(this.inputPrimary),this.inputSecondary&&e(this.inputSecondary)}outputDefined(){return!1}serialize(){return this.inputSecondary?["image",this.inputPrimary.serialize(),this.inputSecondary.serialize()]:["image",this.inputPrimary.serialize()]}}function Yt(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}const JE={"to-boolean":Ut,"to-color":ao,"to-number":ze,"to-string":Ft};class np{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[0],o=[];let n=da;if(r==="to-array"){if(!Array.isArray(e[1]))return null;const s=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);n=zr(i.expectedType.itemType,s)}else{if(!(s>0&&fa(e[1][0])))return null;n=zr(Ji(e[1][0]),s)}for(let a=0;a<s;a++){const l=e[1][a];let c;if(Yt(l)==="array")c=i.parse(l,void 0,n.itemType);else{const u=Yt(l);if(u!==n.itemType.kind)return i.error(`Expected ${n.itemType.kind} but found ${u}.`);c=i.registry.literal.parse(["literal",l===void 0?null:l],i)}if(!c)return null;o.push(c)}}else{if((r==="to-boolean"||r==="to-string")&&e.length!==2)return i.error("Expected one argument.");n=JE[r];for(let s=1;s<e.length;s++){const a=i.parse(e[s],s,jt);if(!a)return null;o.push(a)}}return new np(n,o)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,r;for(const o of this.args){if(i=o.evaluate(e),r=null,i instanceof bt)return i;if(typeof i=="string"){const n=e.parseColor(i);if(n)return n}else if(Array.isArray(i)&&(r=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ug(i[0],i[1],i[2],i[3]),!r))return new bt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new or(r||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const r of this.args){if(i=r.evaluate(e),i===null)return 0;const o=Number(i);if(!isNaN(o))return o}throw new or(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?Lr.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?lo.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map(i=>i.evaluate(e)):xl(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new wl([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Tl(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}var Ss=np;const QE=["Unknown","Point","LineString","Polygon"];var qg=class{constructor(t){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.options=t}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?QE[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}measureLight(t){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(i*e-t[0])+this.featureDistanceData.bearing[1]*(r*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=bt.parse(t)),e}getConfig(t){return this.options?this.options.get(t):null}};class As{constructor(e,i,r,o,n){this.name=e,this.type=i,this._evaluate=r,this.args=o,this._overloadIndex=n}evaluate(e){if(!this._evaluate){const i=As.definitions[this.name];this._evaluate=Array.isArray(i)?i[2]:i.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const r=e[0],o=As.definitions[r];if(!o)return i.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(o)?o[0]:o.type,s=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,a=[];let l=null,c=-1;for(const[u,p]of s){if(Array.isArray(u)&&u.length!==e.length-1)continue;a.push(u),c++,l=new sy(i.registry,i.path,null,i.scope,void 0,i.options);const f=[];let _=!1;for(let g=1;g<e.length;g++){const y=e[g],v=Array.isArray(u)?u[g-1]:u.type,b=l.parse(y,1+f.length,v);if(!b){_=!0;break}f.push(b)}if(!_)if(Array.isArray(u)&&u.length!==f.length)l.error(`Expected ${u.length} arguments, but found ${f.length} instead.`);else{for(let g=0;g<f.length;g++){const y=Array.isArray(u)?u[g]:u.type,v=f[g];l.concat(g+1).checkSubtype(y,v.type)}if(l.errors.length===0)return new As(r,n,p,f,c)}}if(a.length===1)i.errors.push(...l.errors);else{const u=(a.length?a:s.map(([f])=>f)).map(eS).join(" | "),p=[];for(let f=1;f<e.length;f++){const _=i.parse(e[f],1+p.length);if(!_)return null;p.push(Ni(_.type))}i.error(`Expected arguments of type ${u}, but found (${p.join(", ")}) instead.`)}return null}static register(e,i){As.definitions=i;for(const r in i)e[r]=As}}function eS(t){return Array.isArray(t)?`(${t.map(Ni).join(", ")})`:`(${Ni(t.type)}...)`}var Bo=As;class Xc{constructor(e,i,r){this.type=Wc,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return i.error("Collator options argument must be an object.");const o=i.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,Ut);if(!o)return null;const n=i.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,Ut);if(!n)return null;let s=null;return r.locale&&(s=i.parse(r.locale,1,Ft),!s)?null:new Xc(o,n,s)}evaluate(e){return new ep(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}var Gg={exports:{}};Gg.exports=function(){function t(r,o,n,s,a){for(;s>n;){if(s-n>600){var l=s-n+1,c=o-n+1,u=Math.log(l),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(l-p)/l)*(c-l/2<0?-1:1);t(r,o,Math.max(n,Math.floor(o-c*p/l+f)),Math.min(s,Math.floor(o+(l-c)*p/l+f)),a)}var _=r[o],g=n,y=s;for(e(r,n,o),a(r[s],_)>0&&e(r,n,s);g<y;){for(e(r,g,y),g++,y--;a(r[g],_)<0;)g++;for(;a(r[y],_)>0;)y--}a(r[n],_)===0?e(r,n,y):e(r,++y,s),y<=o&&(n=y+1),o<=y&&(s=y-1)}}function e(r,o,n){var s=r[o];r[o]=r[n],r[n]=s}function i(r,o){return r<o?-1:r>o?1:0}return function(r,o,n,s,a){t(r,o,n||0,s||r.length-1,a||i)}}();var tS=yt(Gg.exports);function iS(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function El(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Sl(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function rS(t,e,i){const r=t[0]-e[0],o=t[1]-e[1],n=t[0]-i[0],s=t[1]-i[1];return r*s-n*o==0&&r*n<=0&&o*s<=0}function ma(t,e,i=!1){let r=!1;for(let a=0,l=e.length;a<l;a++){const c=e[a];for(let u=0,p=c.length,f=p-1;u<p;f=u++){const _=c[f],g=c[u];if(rS(t,_,g))return i;(n=_)[1]>(o=t)[1]!=(s=g)[1]>o[1]&&o[0]<(s[0]-n[0])*(o[1]-n[1])/(s[1]-n[1])+n[0]&&(r=!r)}}var o,n,s;return r}function $g(t,e,i,r){const o=r[0]-i[0],n=r[1]-i[1],s=(t[0]-i[0])*n-o*(t[1]-i[1]),a=(e[0]-i[0])*n-o*(e[1]-i[1]);return s>0&&a<0||s<0&&a>0}function Yc(t,e,i,r){return(o=[r[0]-i[0],r[1]-i[1]])[0]*(n=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*n[0]!=0&&!(!$g(t,e,i,r)||!$g(i,r,t,e));var o,n}const Bn=8192;function oS(t,e){const i=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*Bn),Math.round(r*o*Bn)]}function nS(t,e){for(let i=0;i<e.length;i++)if(ma(t,e[i]))return!0;return!1}function sS(t,e,i){for(const r of i)for(let o=0,n=r.length,s=n-1;o<n;s=o++)if(Yc(t,e,r[s],r[o]))return!0;return!1}function Wg(t,e){for(let i=0;i<t.length;++i)if(!ma(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(sS(t[i],t[i+1],e))return!1;return!0}function aS(t,e){for(let i=0;i<e.length;i++)if(Wg(t,e[i]))return!0;return!1}function sp(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=[];for(let s=0;s<t[o].length;s++){const a=oS(t[o][s],i);El(e,a),n.push(a)}r.push(n)}return r}function Hg(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=sp(t[o],e,i);r.push(n)}return r}function Zg(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){const o=.5*r;let n=t[0]-i[0]>o?-r:i[0]-t[0]>o?r:0;n===0&&(n=t[0]-i[2]>o?-r:i[2]-t[0]>o?r:0),t[0]+=n}El(e,t)}function Xg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const a of t)for(const l of a){const c=[l.x+n[0],l.y+n[1]];Zg(c,e,i,o),s.push(c)}return s}function Yg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const l of t){const c=[];for(const u of l){const p=[u.x+n[0],u.y+n[1]];El(e,p),c.push(p)}s.push(c)}if(e[2]-e[0]<=o/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const l of s)for(const c of l)Zg(c,e,i,o)}var a;return s}class Al{constructor(e,i){this.type=Ut,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection")for(let o=0;o<r.features.length;++o){const n=r.features[o].geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new Al(r,r.features[o].geometry)}else if(r.type==="Feature"){const o=r.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new Al(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new Al(r,r)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!ma(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!nS(c,a))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!Wg(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!aS(c,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var ap=Al,Kg={exports:{}};Kg.exports=function(){var t={kilometers:1,miles:.621371192237334,nauticalmiles:.5399568034557235,meters:1e3,metres:1e3,yards:1093.6132983377079,feet:3280.839895013123,inches:39370.078740157485},e=1/298.257223563,i=e*(2-e),r=Math.PI/180,o=function(c,u){if(c===void 0)throw new Error("No latitude given.");if(u&&!t[u])throw new Error("Unknown unit "+u+". Use one of: "+Object.keys(t).join(", "));var p=6378.137*r*(u?t[u]:1),f=Math.cos(c*r),_=1/(1-i*(1-f*f)),g=Math.sqrt(_);this.kx=p*g*f,this.ky=p*g*_*(1-i)},n={units:{configurable:!0}};function s(c,u){return c[0]===u[0]&&c[1]===u[1]}function a(c,u,p){var f=l(u[0]-c[0]);return[c[0]+f*p,c[1]+(u[1]-c[1])*p]}function l(c){for(;c<-180;)c+=360;for(;c>180;)c-=360;return c}return o.fromTile=function(c,u,p){var f=Math.PI*(1-2*(c+.5)/Math.pow(2,u)),_=Math.atan(.5*(Math.exp(f)-Math.exp(-f)))/r;return new o(_,p)},n.units.get=function(){return t},o.prototype.distance=function(c,u){var p=l(c[0]-u[0])*this.kx,f=(c[1]-u[1])*this.ky;return Math.sqrt(p*p+f*f)},o.prototype.bearing=function(c,u){var p=l(u[0]-c[0])*this.kx;return Math.atan2(p,(u[1]-c[1])*this.ky)/r},o.prototype.destination=function(c,u,p){var f=p*r;return this.offset(c,Math.sin(f)*u,Math.cos(f)*u)},o.prototype.offset=function(c,u,p){return[c[0]+u/this.kx,c[1]+p/this.ky]},o.prototype.lineDistance=function(c){for(var u=0,p=0;p<c.length-1;p++)u+=this.distance(c[p],c[p+1]);return u},o.prototype.area=function(c){for(var u=0,p=0;p<c.length;p++)for(var f=c[p],_=0,g=f.length,y=g-1;_<g;y=_++)u+=l(f[_][0]-f[y][0])*(f[_][1]+f[y][1])*(p?-1:1);return Math.abs(u)/2*this.kx*this.ky},o.prototype.along=function(c,u){var p=0;if(u<=0)return c[0];for(var f=0;f<c.length-1;f++){var _=c[f],g=c[f+1],y=this.distance(_,g);if((p+=y)>u)return a(_,g,(u-(p-y))/y)}return c[c.length-1]},o.prototype.pointToSegmentDistance=function(c,u,p){var f=u[0],_=u[1],g=l(p[0]-f)*this.kx,y=(p[1]-_)*this.ky,v=0;return g===0&&y===0||((v=(l(c[0]-f)*this.kx*g+(c[1]-_)*this.ky*y)/(g*g+y*y))>1?(f=p[0],_=p[1]):v>0&&(f+=g/this.kx*v,_+=y/this.ky*v)),g=l(c[0]-f)*this.kx,y=(c[1]-_)*this.ky,Math.sqrt(g*g+y*y)},o.prototype.pointOnLine=function(c,u){for(var p,f,_,g,y=1/0,v=0;v<c.length-1;v++){var b=c[v][0],w=c[v][1],S=l(c[v+1][0]-b)*this.kx,A=(c[v+1][1]-w)*this.ky,E=0;S===0&&A===0||((E=(l(u[0]-b)*this.kx*S+(u[1]-w)*this.ky*A)/(S*S+A*A))>1?(b=c[v+1][0],w=c[v+1][1]):E>0&&(b+=S/this.kx*E,w+=A/this.ky*E));var M=(S=l(u[0]-b)*this.kx)*S+(A=(u[1]-w)*this.ky)*A;M<y&&(y=M,p=b,f=w,_=v,g=E)}return{point:[p,f],index:_,t:Math.max(0,Math.min(1,g))}},o.prototype.lineSlice=function(c,u,p){var f=this.pointOnLine(p,c),_=this.pointOnLine(p,u);if(f.index>_.index||f.index===_.index&&f.t>_.t){var g=f;f=_,_=g}var y=[f.point],v=f.index+1,b=_.index;!s(p[v],y[0])&&v<=b&&y.push(p[v]);for(var w=v+1;w<=b;w++)y.push(p[w]);return s(p[b],_.point)||y.push(_.point),y},o.prototype.lineSliceAlong=function(c,u,p){for(var f=0,_=[],g=0;g<p.length-1;g++){var y=p[g],v=p[g+1],b=this.distance(y,v);if((f+=b)>c&&_.length===0&&_.push(a(y,v,(c-(f-b))/b)),f>=u)return _.push(a(y,v,(u-(f-b))/b)),_;f>c&&_.push(v)}return _},o.prototype.bufferPoint=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[0]+f,c[1]+p]},o.prototype.bufferBBox=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[2]+f,c[3]+p]},o.prototype.insideBBox=function(c,u){return l(c[0]-u[0])>=0&&l(c[0]-u[2])<=0&&c[1]>=u[1]&&c[1]<=u[3]},Object.defineProperties(o,n),o}();var lp=yt(Kg.exports),Jg={exports:{}};Jg.exports=function(){var t=function(i,r){if(i===void 0&&(i=[]),r===void 0&&(r=e),this.data=i,this.length=this.data.length,this.compare=r,this.length>0)for(var o=(this.length>>1)-1;o>=0;o--)this._down(o)};function e(i,r){return i<r?-1:i>r?1:0}return t.prototype.push=function(i){this.data.push(i),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(this.length!==0){var i=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),i}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(i){for(var r=this.data,o=this.compare,n=r[i];i>0;){var s=i-1>>1,a=r[s];if(o(n,a)>=0)break;r[i]=a,i=s}r[i]=n},t.prototype._down=function(i){for(var r=this.data,o=this.compare,n=this.length>>1,s=r[i];i<n;){var a=1+(i<<1),l=r[a],c=a+1;if(c<this.length&&o(r[c],l)<0&&(a=c,l=r[c]),o(l,s)>=0)break;r[i]=l,i=a}r[i]=s},t}();var cp=yt(Jg.exports),oe=8192;function Qg(t,e){return e.dist-t.dist}const up=100,hp=50;function ey(t){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Kc(t){return t[1]-t[0]+1}function hn(t,e){const i=t[1]>=t[0]&&t[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function dp(t,e){if(t[0]>t[1])return[null,null];const i=Kc(t);if(e){if(i===2)return[t,null];const r=Math.floor(i/2);return[[t[0],t[0]+r],[t[0]+r,t[1]]]}{if(i===1)return[t,null];const r=Math.floor(i/2)-1;return[[t[0],t[0]+r],[t[0]+r+1,t[1]]]}}function Ms(t,e){const i=[1/0,1/0,-1/0,-1/0];if(!hn(e,t.length))return i;for(let r=e[0];r<=e[1];++r)El(i,t[r]);return i}function Jc(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<t.length;++i)for(let r=0;r<t[i].length;++r)El(e,t[i][r]);return e}function _a(t,e,i){if(ey(t)||ey(e))return NaN;let r=0,o=0;return t[2]<e[0]&&(r=e[0]-t[2]),t[0]>e[2]&&(r=t[0]-e[2]),t[1]>e[3]&&(o=t[1]-e[3]),t[3]<e[1]&&(o=e[1]-t[3]),i.distance([0,0],[r,o])}function pp(t,e){const i=Math.pow(2,e.z);return[(o=(t.x/oe+e.x)/i,360*o-180),(r=(t.y/oe+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90)];var r,o}function lS(t,e){const i=[];for(let r=0;r<t.length;++r)i.push(pp(t[r],e));return i}function ty(t,e,i){const r=i.pointOnLine(e,t).point;return i.distance(t,r)}function iy(t,e,i,r,o){const n=i.slice(r[0],r[1]+1);let s=1/0;for(let a=e[0];a<=e[1];++a)if((s=Math.min(s,ty(t[a],n,o)))===0)return 0;return s}function fp(t,e,i,r,o){const n=Math.min(o.pointToSegmentDistance(t,i,r),o.pointToSegmentDistance(e,i,r)),s=Math.min(o.pointToSegmentDistance(i,t,e),o.pointToSegmentDistance(r,t,e));return Math.min(n,s)}function cS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<e[1];++s)for(let a=r[0];a<r[1];++a){if(Yc(t[s],t[s+1],i[a],i[a+1]))return 0;n=Math.min(n,fp(t[s],t[s+1],i[a],i[a+1],o))}return n}function uS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<=e[1];++s)for(let a=r[0];a<=r[1];++a)if((n=Math.min(n,o.distance(t[s],i[a])))===0)return n;return n}function hS(t,e,i){if(ma(t,e,!0))return 0;let r=1/0;for(const o of e){const n=o.length;if(n<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(o[0]!==o[n-1]&&(r=Math.min(r,i.pointToSegmentDistance(t,o[n-1],o[0])))===0||(r=Math.min(r,ty(t,o,i)))===0)return r}return r}function dS(t,e,i,r){if(!hn(e,t.length))return NaN;for(let n=e[0];n<=e[1];++n)if(ma(t[n],i,!0))return 0;let o=1/0;for(let n=e[0];n<e[1];++n)for(const s of i)for(let a=0,l=s.length,c=l-1;a<l;c=a++){if(Yc(t[n],t[n+1],s[c],s[a]))return 0;o=Math.min(o,fp(t[n],t[n+1],s[c],s[a],r))}return o}function ry(t,e){for(const i of t)for(let r=0;r<=i.length-1;++r)if(ma(i[r],e,!0))return!0;return!1}function pS(t,e,i,r=1/0){const o=Jc(t),n=Jc(e);if(r!==1/0&&_a(o,n,i)>=r)return r;if(Sl(o,n)){if(ry(t,e))return 0}else if(ry(e,t))return 0;let s=r;for(const a of t)for(let l=0,c=a.length,u=c-1;l<c;u=l++)for(const p of e)for(let f=0,_=p.length,g=_-1;f<_;g=f++){if(Yc(a[u],a[l],p[g],p[f]))return 0;s=Math.min(s,fp(a[u],a[l],p[g],p[f],i))}return s}function Qc(t,e,i,r,o,n,s){if(n===null||s===null)return;const a=_a(Ms(r,n),Ms(o,s),i);a<e&&t.push({dist:a,range1:n,range2:s})}function fS(t,e,i,r,o=1/0){let n=Math.min(r.distance(t[0],i[0][0]),o);if(n===0)return n;const s=new cp([{dist:0,range1:[0,t.length-1],range2:[0,0]}],Qg),a=e?hp:up,l=Jc(i);for(;s.length;){const c=s.pop();if(c.dist>=n)continue;const u=c.range1;if(Kc(u)<=a){if(!hn(u,t.length))return NaN;if(e){const p=dS(t,u,i,r);if((n=Math.min(n,p))===0)return n}else for(let p=u[0];p<=u[1];++p){const f=hS(t[p],i,r);if((n=Math.min(n,f))===0)return n}}else{const p=dp(u,e);if(p[0]!==null){const f=_a(Ms(t,p[0]),l,r);f<n&&s.push({dist:f,range1:p[0],range2:[0,0]})}if(p[1]!==null){const f=_a(Ms(t,p[1]),l,r);f<n&&s.push({dist:f,range1:p[1],range2:[0,0]})}}}return n}function oy(t,e,i,r,o,n=1/0){let s=Math.min(n,o.distance(t[0],i[0]));if(s===0)return s;const a=new cp([{dist:0,range1:[0,t.length-1],range2:[0,i.length-1]}],Qg),l=e?hp:up,c=r?hp:up;for(;a.length;){const u=a.pop();if(u.dist>=s)continue;const p=u.range1,f=u.range2;if(Kc(p)<=l&&Kc(f)<=c){if(!hn(p,t.length)||!hn(f,i.length))return NaN;if(e&&r?s=Math.min(s,cS(t,p,i,f,o)):e||r?e&&!r?s=Math.min(s,iy(i,f,t,p,o)):!e&&r&&(s=Math.min(s,iy(t,p,i,f,o))):s=Math.min(s,uS(t,p,i,f,o)),s===0)return s}else{const _=dp(p,e),g=dp(f,r);Qc(a,s,o,t,i,_[0],g[0]),Qc(a,s,o,t,i,_[0],g[1]),Qc(a,s,o,t,i,_[1],g[0]),Qc(a,s,o,t,i,_[1],g[1])}}return s}function mp(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i)if(!(n!==1/0&&_a(s,Ms(a,[0,a.length-1]),r)>=n)&&(n=Math.min(n,oy(t,e,a,!0,r,n)),n===0))return n;return n}function eu(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i){if(n!==1/0&&_a(s,Jc(a),r)>=n)continue;const l=fS(t,e,a,r,n);if(isNaN(l))return l;if((n=Math.min(n,l))===0)return n}return n}function _p(t){return t==="Point"||t==="MultiPoint"||t==="LineString"||t==="MultiLineString"||t==="Polygon"||t==="MultiPolygon"}class Ml{constructor(e,i){this.type=ze,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection"){for(let o=0;o<r.features.length;++o)if(_p(r.features[o].geometry.type))return new Ml(r,r.features[o].geometry)}else if(r.type==="Feature"){if(_p(r.geometry.type))return new Ml(r,r.geometry)}else if(_p(r.type))return new Ml(r,r)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),r=e.canonicalID();if(i!=null&&r!=null){if(e.geometryType()==="Point")return function(o,n,s){const a=[];for(const c of o)for(const u of c)a.push(pp(u,n));const l=new lp(a[0][1],"meters");return s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString"?oy(a,!1,s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",l):s.type==="MultiLineString"?mp(a,!1,s.coordinates,l):s.type==="Polygon"||s.type==="MultiPolygon"?eu(a,!1,s.type==="Polygon"?[s.coordinates]:s.coordinates,l):null}(i,r,this.geometries);if(e.geometryType()==="LineString")return function(o,n,s){const a=[];for(const c of o){const u=[];for(const p of c)u.push(pp(p,n));a.push(u)}const l=new lp(a[0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return mp(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=mp(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}if(s.type==="Polygon"||s.type==="MultiPolygon"){let c=1/0;for(let u=0;u<a.length;u++){const p=eu(a[u],!0,s.type==="Polygon"?[s.coordinates]:s.coordinates,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return null}(i,r,this.geometries);if(e.geometryType()==="Polygon")return function(o,n,s){const a=[];for(const c of function(u,p){const f=u.length;if(f<=1)return[u];const _=[];let g,y;for(let v=0;v<f;v++){const b=iS(u[v]);b!==0&&(u[v].area=Math.abs(b),y===void 0&&(y=b<0),y===b<0?(g&&_.push(g),g=[u[v]]):g.push(u[v]))}return g&&_.push(g),_}(o)){const u=[];for(let p=0;p<c.length;++p)u.push(lS(c[p],n));a.push(u)}const l=new lp(a[0][0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return eu(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=eu(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return s.type==="Polygon"||s.type==="MultiPolygon"?function(c,u,p){let f=1/0;for(const _ of c)for(const g of u){const y=pS(_,g,p,f);if(isNaN(y))return y;if((f=Math.min(f,y))===0)return f}return f}(s.type==="Polygon"?[s.coordinates]:s.coordinates,a,l):null}(i,r,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}var gp=Ml;function ga(t){if(t instanceof Bo&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof ap||t instanceof gp)return!1;let e=!0;return t.eachChild(i=>{e&&!ga(i)&&(e=!1)}),e}function Il(t){if(t instanceof Bo&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(i=>{e&&!Il(i)&&(e=!1)}),e}function yp(t){if(t instanceof Bo&&t.name==="config")return!1;let e=!0;return t.eachChild(i=>{e&&!yp(i)&&(e=!1)}),e}function ya(t,e){if(t instanceof Bo&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(r=>{i&&!ya(r,e)&&(i=!1)}),i}class vp{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const r=e[1];return i.scope.has(r)?new vp(r,i.scope.get(r)):i.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var ny=vp;class xp{constructor(e,i=[],r,o=new YE,n=[],s){this.registry=e,this.path=i,this.key=i.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=n,this.expectedType=r,this.options=s}parse(e,i,r,o,n={}){return i||r?this.concat(i,r,o)._parse(e,n):this._parse(e,n)}_parse(e,i){function r(o,n,s){return s==="assert"?new un(n,[o]):s==="coerce"?new Ss(n,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const s=this.expectedType,a=n.type;if(s.kind!=="string"&&s.kind!=="number"&&s.kind!=="boolean"&&s.kind!=="object"&&s.kind!=="array"||a.kind!=="value")if(s.kind!=="color"&&s.kind!=="formatted"&&s.kind!=="resolvedImage"||a.kind!=="value"&&a.kind!=="string"){if(this.checkSubtype(s,a))return null}else n=r(n,s,i.typeAnnotation||"coerce");else n=r(n,s,i.typeAnnotation||"assert")}if(!(n instanceof bl)&&n.type.kind!=="resolvedImage"&&bp(n)){const s=new qg(this.options);try{n=new bl(n.type,n.evaluate(s))}catch(a){return this.error(a.message),null}}return n}return Ss.parse(["to-array",e],this)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,r){const o=typeof e=="number"?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new xp(this.registry,o,i||null,n,this.errors,this.options)}error(e,...i){const r=`${this.key}${i.map(o=>`[${o}]`).join("")}`;this.errors.push(new Oo(r,e))}checkSubtype(e,i){const r=yl(e,i);return r&&this.error(r),r}}var sy=xp;function bp(t){if(t instanceof ny)return bp(t.boundExpression);if(t instanceof Bo&&t.name==="error"||t instanceof Bo&&t.name==="config"||t instanceof Xc||t instanceof ap||t instanceof gp)return!1;const e=t instanceof Ss||t instanceof un;let i=!0;return t.eachChild(r=>{i=e?i&&bp(r):i&&r instanceof bl}),!!i&&ga(t)&&ya(t,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light"])}function tu(t,e){const i=t.length-1;let r,o,n=0,s=i,a=0;for(;n<=s;)if(a=Math.floor((n+s)/2),r=t[a],o=t[a+1],r<=e){if(a===i||e<o)return a;n=a+1}else{if(!(r>e))throw new or("Input is not a number.");s=a-1}return 0}class wp{constructor(e,i,r){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[o,n]of r)this.labels.push(o),this.outputs.push(n)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=[];let n=null;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);for(let s=1;s<e.length;s+=2){const a=s===1?-1/0:e[s],l=e[s+1],c=s,u=s+1;if(typeof a!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(o.length&&o[o.length-1][0]>=a)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);const p=i.parse(l,u,n);if(!p)return null;n=n||p.type,o.push([a,p])}return new wp(n,r,o)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;return o>=i[n-1]?r[n-1].evaluate(e):r[tu(i,o)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}var Tp=wp;function rt(t,e,i){return t*(1-i)+e*i}function ay(t,e,i){return t.map((r,o)=>rt(r,e[o],i))}var iu=Object.freeze({__proto__:null,array:ay,color:function(t,e,i){return new bt(rt(t.r,e.r,i),rt(t.g,e.g,i),rt(t.b,e.b,i),rt(t.a,e.a,i))},number:rt});const ly=.95047,cy=1.08883,uy=4/29,va=6/29,hy=3*va*va,mS=va*va*va,_S=Math.PI/180,gS=180/Math.PI;function Ep(t){return t>mS?Math.pow(t,1/3):t/hy+uy}function Sp(t){return t>va?t*t*t:hy*(t-uy)}function Ap(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mp(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dy(t){const e=Mp(t.r),i=Mp(t.g),r=Mp(t.b),o=Ep((.4124564*e+.3575761*i+.1804375*r)/ly),n=Ep((.2126729*e+.7151522*i+.072175*r)/1);return{l:116*n-16,a:500*(o-n),b:200*(n-Ep((.0193339*e+.119192*i+.9503041*r)/cy)),alpha:t.a}}function py(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*Sp(e),i=ly*Sp(i),r=cy*Sp(r),new bt(Ap(3.2404542*i-1.5371385*e-.4985314*r),Ap(-.969266*i+1.8760108*e+.041556*r),Ap(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}function yS(t,e,i){const r=e-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}const Cl={forward:dy,reverse:py,interpolate:function(t,e,i){return{l:rt(t.l,e.l,i),a:rt(t.a,e.a,i),b:rt(t.b,e.b,i),alpha:rt(t.alpha,e.alpha,i)}}},kl={forward:function(t){const{l:e,a:i,b:r}=dy(t),o=Math.atan2(r,i)*gS;return{h:o<0?o+360:o,c:Math.sqrt(i*i+r*r),l:e,alpha:t.a}},reverse:function(t){const e=t.h*_S,i=t.c;return py({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:yS(t.h,e.h,i),c:rt(t.c,e.c,i),l:rt(t.l,e.l,i),alpha:rt(t.alpha,e.alpha,i)}}};var fy=Object.freeze({__proto__:null,hcl:kl,lab:Cl});class ru{constructor(e,i,r,o,n){this.type=e,this.operator=i,this.interpolation=r,this.input=o,this.labels=[],this.outputs=[];for(const[s,a]of n)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(e,i,r,o){let n=0;if(e.name==="exponential")n=Ip(i,e.base,r,o);else if(e.name==="linear")n=Ip(i,1,r,o);else if(e.name==="cubic-bezier"){const s=e.controlPoints;n=new qe(s[0],s[1],s[2],s[3]).solve(Ip(i,1,r,o))}return n}static parse(e,i){let[r,o,n,...s]=e;if(!Array.isArray(o)||o.length===0)return i.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){const c=o[1];if(typeof c!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:c}}else{if(o[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(o[0])}`,1,0);{const c=o.slice(1);if(c.length!==4||c.some(u=>typeof u!="number"||u<0||u>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:c}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(n=i.parse(n,2,ze),!n)return null;const a=[];let l=null;r==="interpolate-hcl"||r==="interpolate-lab"?l=ao:i.expectedType&&i.expectedType.kind!=="value"&&(l=i.expectedType);for(let c=0;c<s.length;c+=2){const u=s[c],p=s[c+1],f=c+3,_=c+4;if(typeof u!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(a.length&&a[a.length-1][0]>=u)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);const g=i.parse(p,_,l);if(!g)return null;l=l||g.type,a.push([u,g])}return l.kind==="number"||l.kind==="color"||l.kind==="array"&&l.itemType.kind==="number"&&typeof l.N=="number"?new ru(l,r,o,n,a):i.error(`Type ${Ni(l)} is not interpolatable.`)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;if(o>=i[n-1])return r[n-1].evaluate(e);const s=tu(i,o),a=ru.interpolationFactor(this.interpolation,o,i[s],i[s+1]),l=r[s].evaluate(e),c=r[s+1].evaluate(e);return this.operator==="interpolate"?iu[this.type.kind.toLowerCase()](l,c,a):this.operator==="interpolate-hcl"?kl.reverse(kl.interpolate(kl.forward(l),kl.forward(c),a)):Cl.reverse(Cl.interpolate(Cl.forward(l),Cl.forward(c),a))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const i=[this.operator,e,this.input.serialize()];for(let r=0;r<this.labels.length;r++)i.push(this.labels[r],this.outputs[r].serialize());return i}}function Ip(t,e,i,r){const o=r-i,n=t-i;return o===0?0:e===1?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}var Fo=ru;class Cp{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let r=null;const o=i.expectedType;o&&o.kind!=="value"&&(r=o);const n=[];for(const a of e.slice(1)){const l=i.parse(a,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,n.push(l)}const s=o&&n.some(a=>yl(o,a.type));return new Cp(s?jt:r,n)}evaluate(e){let i,r=null,o=0;for(const n of this.args){if(o++,r=n.evaluate(e),r&&r instanceof lo&&!r.available&&(i||(i=r),r=null,o===this.args.length))return i;if(r!==null)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var my=Cp;class kp{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n<e.length-1;n+=2){const s=e[n];if(typeof s!="string")return i.error(`Expected string, but found ${typeof s} instead.`,n);if(/[^a-zA-Z0-9_]/.test(s))return i.error("Variable names must contain only alphanumeric characters or '_'.",n);const a=i.parse(e[n+1],n+1);if(!a)return null;r.push([s,a])}const o=i.parse(e[e.length-1],e.length-1,i.expectedType,r);return o?new kp(r,o):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,r]of this.bindings)e.push(i,r.serialize());return e.push(this.result.serialize()),e}}var _y=kp;class Pp{constructor(e,i,r){this.type=e,this.index=i,this.input=r}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,ze),o=i.parse(e[2],2,zr(i.expectedType||jt));return r&&o?new Pp(o.type.itemType,r,o):null}evaluate(e){const i=this.index.evaluate(e),r=this.input.evaluate(e);if(i<0)throw new or(`Array index out of bounds: ${i} < 0.`);if(i>=r.length)throw new or(`Array index out of bounds: ${i} > ${r.length-1}.`);if(i!==Math.floor(i))throw new or(`Array index must be an integer, but found ${i} instead.`);return r[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var vS=Pp;class Dp{constructor(e,i){this.type=Ut,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);return r&&o?Yd(r.type,[Ut,Ft,ze,da,jt])?new Dp(r,o):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(r==null)return!1;if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);return r.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var xS=Dp;class ou{constructor(e,i,r){this.type=ze,this.needle=e,this.haystack=i,this.fromIndex=r}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);if(!r||!o)return null;if(!Yd(r.type,[Ut,Ft,ze,da,jt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new ou(r,o,n):null}return new ou(r,o)}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);if(this.fromIndex){const o=this.fromIndex.evaluate(e);return r.indexOf(i,o)}return r.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var bS=ou;class zp{constructor(e,i,r,o,n,s){this.inputType=e,this.type=i,this.input=r,this.cases=o,this.outputs=n,this.otherwise=s}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let r,o;i.expectedType&&i.expectedType.kind!=="value"&&(o=i.expectedType);const n={},s=[];for(let c=2;c<e.length-1;c+=2){let u=e[c];const p=e[c+1];Array.isArray(u)||(u=[u]);const f=i.concat(c);if(u.length===0)return f.error("Expected at least one branch label.");for(const g of u){if(typeof g!="number"&&typeof g!="string")return f.error("Branch labels must be numbers or strings.");if(typeof g=="number"&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return f.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof g=="number"&&Math.floor(g)!==g)return f.error("Numeric branch labels must be integer values.");if(r){if(f.checkSubtype(r,Ji(g)))return null}else r=Ji(g);if(n[String(g)]!==void 0)return f.error("Branch labels must be unique.");n[String(g)]=s.length}const _=i.parse(p,c,o);if(!_)return null;o=o||_.type,s.push(_)}const a=i.parse(e[1],1,jt);if(!a)return null;const l=i.parse(e[e.length-1],e.length-1,o);return l?a.type.kind!=="value"&&i.concat(1).checkSubtype(r,a.type)?null:new zp(r,o,a,n,s,l):null}evaluate(e){const i=this.input.evaluate(e);return(Ji(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),r=[],o={};for(const s of i){const a=o[this.cases[s]];a===void 0?(o[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}const n=s=>this.inputType.kind==="number"?Number(s):s;for(const[s,a]of r)e.push(a.length===1?n(a[0]):a.map(n)),e.push(this.outputs[s].serialize());return e.push(this.otherwise.serialize()),e}}var wS=zp;class Rp{constructor(e,i,r){this.type=e,this.branches=i,this.otherwise=r}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let r;i.expectedType&&i.expectedType.kind!=="value"&&(r=i.expectedType);const o=[];for(let s=1;s<e.length-1;s+=2){const a=i.parse(e[s],s,Ut);if(!a)return null;const l=i.parse(e[s+1],s+1,r);if(!l)return null;o.push([a,l]),r=r||l.type}const n=i.parse(e[e.length-1],e.length-1,r);return n?new Rp(r,o,n):null}evaluate(e){for(const[i,r]of this.branches)if(i.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,r]of this.branches)e(i),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var TS=Rp;class nu{constructor(e,i,r,o){this.type=e,this.input=i,this.beginIndex=r,this.endIndex=o}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,ze);if(!r||!o)return null;if(!Yd(r.type,[zr(jt),Ft,jt]))return i.error(`Expected first argument to be of type array or string, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new nu(r.type,r,o,n):null}return new nu(r.type,r,o)}evaluate(e){const i=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!vl(i,["string","array"]))throw new or(`Expected first argument to be of type array or string, but found ${Ni(Ji(i))} instead.`);if(this.endIndex){const o=this.endIndex.evaluate(e);return i.slice(r,o)}return i.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var ES=nu;function gy(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function yy(t,e,i,r){return r.compare(e,i)===0}function xa(t,e,i){const r=t!=="=="&&t!=="!=";return class TT{constructor(n,s,a){this.type=Ut,this.lhs=n,this.rhs=s,this.collator=a,this.hasUntypedArgument=n.type.kind==="value"||s.type.kind==="value"}static parse(n,s){if(n.length!==3&&n.length!==4)return s.error("Expected two or three arguments.");const a=n[0];let l=s.parse(n[1],1,jt);if(!l)return null;if(!gy(a,l.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${Ni(l.type)}'.`);let c=s.parse(n[2],2,jt);if(!c)return null;if(!gy(a,c.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${Ni(c.type)}'.`);if(l.type.kind!==c.type.kind&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error(`Cannot compare types '${Ni(l.type)}' and '${Ni(c.type)}'.`);r&&(l.type.kind==="value"&&c.type.kind!=="value"?l=new un(c.type,[l]):l.type.kind!=="value"&&c.type.kind==="value"&&(c=new un(l.type,[c])));let u=null;if(n.length===4){if(l.type.kind!=="string"&&c.type.kind!=="string"&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(u=s.parse(n[3],3,Wc),!u)return null}return new TT(l,c,u)}evaluate(n){const s=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!==c.kind||l.kind!=="string"&&l.kind!=="number")throw new or(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${c.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!=="string"||c.kind!=="string")return e(n,s,a)}return this.collator?i(n,s,a,this.collator.evaluate(n)):e(n,s,a)}eachChild(n){n(this.lhs),n(this.rhs),this.collator&&n(this.collator)}outputDefined(){return!0}serialize(){const n=[t];return this.eachChild(s=>{n.push(s.serialize())}),n}}}const SS=xa("==",function(t,e,i){return e===i},yy),AS=xa("!=",function(t,e,i){return e!==i},function(t,e,i,r){return!yy(0,e,i,r)}),MS=xa("<",function(t,e,i){return e<i},function(t,e,i,r){return r.compare(e,i)<0}),IS=xa(">",function(t,e,i){return e>i},function(t,e,i,r){return r.compare(e,i)>0}),CS=xa("<=",function(t,e,i){return e<=i},function(t,e,i,r){return r.compare(e,i)<=0}),kS=xa(">=",function(t,e,i){return e>=i},function(t,e,i,r){return r.compare(e,i)>=0});class Lp{constructor(e,i,r,o,n,s){this.type=Ft,this.number=e,this.locale=i,this.currency=r,this.unit=o,this.minFractionDigits=n,this.maxFractionDigits=s}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return i.error("NumberFormat options argument must be an object.");let n=null;if(o.locale&&(n=i.parse(o.locale,1,Ft),!n))return null;let s=null;if(o.currency&&(s=i.parse(o.currency,1,Ft),!s))return null;let a=null;if(o.unit&&(a=i.parse(o.unit,1,Ft),!a))return null;let l=null;if(o["min-fraction-digits"]&&(l=i.parse(o["min-fraction-digits"],1,ze),!l))return null;let c=null;return o["max-fraction-digits"]&&(c=i.parse(o["max-fraction-digits"],1,ze),!c)?null:new Lp(r,n,s,a,l,c)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Op{constructor(e){this.type=ze,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=i.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${Ni(r.type)} instead.`):new Op(r):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new or(`Expected value to be of type string or array, but found ${Ni(Ji(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}function Bp(t){return function(){t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const vy={"==":SS,"!=":AS,">":IS,"<":MS,">=":kS,"<=":CS,array:un,at:vS,boolean:un,case:TS,coalesce:my,collator:Xc,format:wl,image:Tl,in:xS,"index-of":bS,interpolate:Fo,"interpolate-hcl":Fo,"interpolate-lab":Fo,length:Op,let:_y,literal:bl,match:wS,number:un,"number-format":Lp,object:un,slice:ES,step:Tp,string:un,"to-boolean":Ss,"to-color":Ss,"to-number":Ss,"to-string":Ss,var:ny,within:ap,distance:gp};function xy(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=Ug(e,i,r,n);if(s)throw new or(s);return new bt(e/255*n,i/255*n,r/255*n,n)}function by(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=function(c,u,p,f){return typeof c=="number"&&c>=0&&c<=360?typeof u=="number"&&u>=0&&u<=100&&typeof p=="number"&&p>=0&&p<=100?f===void 0||typeof f=="number"&&f>=0&&f<=1?null:`Invalid hsla value [${[c,u,p,f].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 'h' must be between 0 and 360.`}(e,i,r,n);if(s)throw new or(s);const a=`hsla(${e}, ${i}%, ${r}%, ${n})`,l=bt.parse(a);if(!l)throw new or(`Failed to parse HSLA color: ${a}`);return l}function wy(t,e){return t in e}function Fp(t,e){const i=e[t];return i===void 0?null:i}function Ty(t,e){switch(t){case"string":return String(e);case"number":return+e;case"boolean":return!!e;case"color":return bt.parse(e)}return e}function Ey(t,e,i,r){return r!==void 0&&(t=r*Math.round(t/r)),e!==void 0&&t<e&&(t=e),i!==void 0&&t>i&&(t=i),t}function Sy(t,e,i){i.length&&(e+=`${i}`);const r=t.getConfig(e);if(!r)return null;const{type:o,value:n,values:s,minValue:a,maxValue:l,stepValue:c}=r,u=r.default.evaluate(t);let p=n?n.evaluate(t):u;return o&&(p=Ty(o,p)),n!==void 0&&p!==void 0&&s&&!s.includes(p)&&(p=u,o&&(p=Ty(o,p))),p===void 0||a===void 0&&l===void 0&&c===void 0||(typeof p=="number"?p=Ey(p,a,l,c):Array.isArray(p)&&(p=p.map(f=>typeof f=="number"?Ey(f,a,l,c):f))),p}function Is(t){return{type:t}}Bo.register(vy,{error:[{kind:"error"},[Ft],(t,[e])=>{throw new or(e.evaluate(t))}],typeof:[Ft,[jt],(t,[e])=>Ni(Ji(e.evaluate(t)))],"to-rgba":[zr(ze,4),[ao],(t,[e])=>e.evaluate(t).toArray()],rgb:[ao,[ze,ze,ze],xy],rgba:[ao,[ze,ze,ze,ze],xy],hsl:[ao,[ze,ze,ze],by],hsla:[ao,[ze,ze,ze,ze],by],has:{type:Ut,overloads:[[[Ft],(t,[e])=>wy(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>wy(e.evaluate(t),i.evaluate(t))]]},get:{type:jt,overloads:[[[Ft],(t,[e])=>Fp(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>Fp(e.evaluate(t),i.evaluate(t))]]},config:{type:jt,overloads:[[[Ft],(t,[e])=>Sy(t,e.evaluate(t),"")],[[Ft,Ft],(t,[e,i])=>Sy(t,e.evaluate(t),i.evaluate(t))]]},"feature-state":[jt,[Ft],(t,[e])=>Fp(e.evaluate(t),t.featureState||{})],properties:[pa,[],t=>t.properties()],"geometry-type":[Ft,[],t=>t.geometryType()],id:[jt,[],t=>t.id()],zoom:[ze,[],t=>t.globals.zoom],pitch:[ze,[],t=>t.globals.pitch||0],"distance-from-center":[ze,[],t=>t.distanceFromCenter()],"measure-light":[ze,[Ft],(t,[e])=>t.measureLight(e.evaluate(t))],"heatmap-density":[ze,[],t=>t.globals.heatmapDensity||0],"line-progress":[ze,[],t=>t.globals.lineProgress||0],"raster-value":[ze,[],t=>t.globals.rasterValue||0],"sky-radial-progress":[ze,[],t=>t.globals.skyRadialProgress||0],accumulated:[jt,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[ze,Is(ze),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[ze,Is(ze),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:ze,overloads:[[[ze,ze],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[ze],(t,[e])=>-e.evaluate(t)]]},"/":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[ze,[],()=>Math.LN2],pi:[ze,[],()=>Math.PI],e:[ze,[],()=>Math.E],"^":[ze,[ze,ze],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[ze,[ze],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))],log2:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[ze,[ze],(t,[e])=>Math.sin(e.evaluate(t))],cos:[ze,[ze],(t,[e])=>Math.cos(e.evaluate(t))],tan:[ze,[ze],(t,[e])=>Math.tan(e.evaluate(t))],asin:[ze,[ze],(t,[e])=>Math.asin(e.evaluate(t))],acos:[ze,[ze],(t,[e])=>Math.acos(e.evaluate(t))],atan:[ze,[ze],(t,[e])=>Math.atan(e.evaluate(t))],min:[ze,Is(ze),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[ze,Is(ze),(t,e)=>Math.max(...e.map(i=>i.evaluate(t)))],abs:[ze,[ze],(t,[e])=>Math.abs(e.evaluate(t))],round:[ze,[ze],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[ze,[ze],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[ze,[ze],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Ut,[Ft,jt],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Ut,[jt],(t,[e])=>t.id()===e.value],"filter-type-==":[Ut,[Ft],(t,[e])=>t.geometryType()===e.value],"filter-<":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<o}],"filter-id-<":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<r}],"filter->":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[Ut,[jt],(t,[e])=>e.value in t.properties()],"filter-has-id":[Ut,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Ut,[zr(Ft)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Ut,[zr(jt)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Ut,[Ft,zr(jt)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Ut,[Ft,zr(jt)],(t,[e,i])=>function(r,o,n,s){for(;n<=s;){const a=n+s>>1;if(o[a]===r)return!0;o[a]>r?s=a-1:n=a+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Ut,[Ut],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Ut,[Ft],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ft,Is(jt),(t,e)=>e.map(i=>xl(i.evaluate(t))).join("")],"resolved-locale":[Ft,[Wc],(t,[e])=>e.evaluate(t).resolvedLocale()],random:[ze,[ze,ze,jt],(t,e)=>{const[i,r,o]=e.map(s=>s.evaluate(t));if(i>r||i===r)return i;let n;if(typeof o=="string")n=function(s){let a=0;if(s.length===0)return a;for(let l=0;l<s.length;l++)a=(a<<5)-a+s.charCodeAt(l),a&=a;return a}(o);else{if(typeof o!="number")throw new or(`Invalid seed input: ${o}`);n=o}return i+Bp(n)()*(r-i)}]});var Pl=vy;function Ay(t){return{result:"success",value:t}}function Cs(t){return{result:"error",value:t}}function My(t,e){return!!t&&!!t.parameters&&t.parameters.indexOf(e)>-1}function ks(t){return t["property-type"]==="data-driven"}function Iy(t){return My(t.expression,"measure-light")}function Np(t){return My(t.expression,"zoom")}function jp(t){return!!t.expression&&t.expression.interpolated}function su(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function PS(t){return t}function Cy(t,e){const i=e.type==="color",r=t.stops&&typeof t.stops[0][0]=="object",o=r||!(r||t.property!==void 0),n=t.type||(jp(e)?"exponential":"interval");if(i&&((t=ln({},t)).stops&&(t.stops=t.stops.map(c=>[c[0],bt.parse(c[1])])),t.default=bt.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!fy[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,a,l;if(n==="exponential")s=ky;else if(n==="interval")s=zS;else if(n==="categorical"){s=DS,a=Object.create(null);for(const c of t.stops)a[c[0]]=c[1];l=typeof t.stops[0][0]}else{if(n!=="identity")throw new Error(`Unknown function type "${n}"`);s=RS}if(r){const c={},u=[];for(let _=0;_<t.stops.length;_++){const g=t.stops[_],y=g[0].zoom;c[y]===void 0&&(c[y]={zoom:y,type:t.type,property:t.property,default:t.default,stops:[]},u.push(y)),c[y].stops.push([g[0].value,g[1]])}const p=[];for(const _ of u)p.push([c[_].zoom,Cy(c[_],e)]);const f={name:"linear"};return{kind:"composite",interpolationType:f,interpolationFactor:Fo.interpolationFactor.bind(void 0,f),zoomStops:p.map(_=>_[0]),evaluate:({zoom:_},g)=>ky({stops:p,base:t.base},e,_).evaluate(_,g)}}if(o){const c=n==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:c,interpolationFactor:Fo.interpolationFactor.bind(void 0,c),zoomStops:t.stops.map(u=>u[0]),evaluate:({zoom:u})=>s(t,e,u,a,l)}}return{kind:"source",evaluate(c,u){const p=u&&u.properties?u.properties[t.property]:void 0;return p===void 0?Dl(t.default,e.default):s(t,e,p,a,l)}}}function Dl(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function DS(t,e,i,r,o){return Dl(typeof i===o?r[i]:void 0,t.default,e.default)}function zS(t,e,i){if(Yt(i)!=="number")return Dl(t.default,e.default);const r=t.stops.length;if(r===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const o=tu(t.stops.map(n=>n[0]),i);return t.stops[o][1]}function ky(t,e,i){const r=t.base!==void 0?t.base:1;if(Yt(i)!=="number")return Dl(t.default,e.default);const o=t.stops.length;if(o===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[o-1][0])return t.stops[o-1][1];const n=tu(t.stops.map(u=>u[0]),i),s=function(u,p,f,_){const g=_-f,y=u-f;return g===0?0:p===1?y/g:(Math.pow(p,y)-1)/(Math.pow(p,g)-1)}(i,r,t.stops[n][0],t.stops[n+1][0]),a=t.stops[n][1],l=t.stops[n+1][1];let c=iu[e.type]||PS;if(t.colorSpace&&t.colorSpace!=="rgb"){const u=fy[t.colorSpace];c=(p,f)=>u.reverse(u.interpolate(u.forward(p),u.forward(f),s))}return typeof a.evaluate=="function"?{evaluate(...u){const p=a.evaluate.apply(void 0,u),f=l.evaluate.apply(void 0,u);if(p!==void 0&&f!==void 0)return c(p,f,s)}}:c(a,l,s)}function RS(t,e,i){return e.type==="color"?i=bt.parse(i):e.type==="formatted"?i=Lr.fromString(i.toString()):e.type==="resolvedImage"?i=lo.fromString(i.toString()):Yt(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Dl(i,t.default,e.default)}class Vp{constructor(e,i,r){this.expression=e,this._warningHistory={},this._evaluator=new qg(r),this._defaultValue=i?function(o){return o.type==="color"&&(su(o.default)||Array.isArray(o.default))?new bt(0,0,0,0):o.type==="color"?bt.parse(o.default)||null:o.default===void 0?null:o.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(e,i,r,o,n,s,a,l){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=r,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,r,o,n,s,a,l){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=r||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{const c=this.expression.evaluate(this._evaluator);if(c==null||typeof c=="number"&&c!=c)return this._defaultValue;if(this._enumValues&&!(c in this._enumValues))throw new or(`Expected value to be one of ${Object.keys(this._enumValues).map(u=>JSON.stringify(u)).join(", ")}, but found ${JSON.stringify(c)} instead.`);return c}catch(c){return this._warningHistory[c.message]||(this._warningHistory[c.message]=!0,typeof console<"u"&&console.warn(c.message)),this._defaultValue}}}function au(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Pl}function Fn(t,e,i){const r=new sy(Pl,[],e?function(n){const s={color:ao,string:Ft,number:ze,enum:Ft,boolean:Ut,formatted:_l,resolvedImage:gl};return n.type==="array"?zr(s[n.value]||jt,n.length):s[n.type]}(e):void 0,void 0,void 0,i),o=r.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?Ay(new Vp(o,e,i)):Cs(r.errors)}class Up{constructor(e,i,r){this.kind=e,this._styleExpression=i,this.isLightConstant=r,this.isStateDependent=e!=="constant"&&!Il(i.expression),this.isConfigDependent=!yp(i.expression)}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}}class Nn{constructor(e,i,r,o,n){this.kind=e,this.zoomStops=r,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!Il(i.expression),this.isLightConstant=n,this.isConfigDependent=!yp(i.expression),this.interpolationType=o}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}interpolationFactor(e,i,r){return this.interpolationType?Fo.interpolationFactor(this.interpolationType,e,i,r):0}}function qp(t,e,i){if((t=Fn(t,e,i)).result==="error")return t;const r=t.value.expression,o=ga(r);if(!o&&!ks(e))return Cs([new Oo("","data expressions not supported")]);const n=ya(r,["zoom","pitch","distance-from-center"]);if(!n&&!Np(e))return Cs([new Oo("","zoom expressions not supported")]);const s=ya(r,["measure-light"]);if(!s&&!Iy(e))return Cs([new Oo("","measure-light expression not supported")]);const a=e.expression&&e.expression.relaxZoomRestriction,l=cu(r);return l||n||a?l instanceof Oo?Cs([l]):l instanceof Fo&&!jp(e)?Cs([new Oo("",'"interpolate" expressions cannot be used with this property')]):Ay(l?new Nn(o?"camera":"composite",t.value,l.labels,l instanceof Fo?l.interpolation:void 0,s):new Up(o?"constant":"source",t.value,s)):Cs([new Oo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class lu{constructor(e,i){this._parameters=e,this._specification=i,ln(this,Cy(this._parameters,this._specification))}static deserialize(e){return new lu(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function cu(t){let e=null;if(t instanceof _y)e=cu(t.result);else if(t instanceof my){for(const i of t.args)if(e=cu(i),e)break}else(t instanceof Tp||t instanceof Fo)&&t.input instanceof Bo&&t.input.name==="zoom"&&(e=t);return e instanceof Oo||t.eachChild(i=>{const r=cu(i);r instanceof Oo?e=r:e&&r&&e!==r&&(e=new Oo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function co(t){const e=t.key,i=t.value,r=t.valueSpec||{},o=t.objectElementValidators||{},n=t.style,s=t.styleSpec;let a=[];const l=Yt(i);if(l!=="object")return[new Oe(e,i,`object expected, ${l} found`)];for(const c in i){const u=c.split(".")[0];let p;o[u]?p=o[u]:r[u]?p=ar:o["*"]?p=o["*"]:r["*"]&&(p=ar),p?a=a.concat(p({key:(e&&`${e}.`)+c,value:i[c],valueSpec:r[u]||r["*"],style:n,styleSpec:s,object:i,objectKey:c},i)):a.push(new Es(e,i[c],`unknown property "${c}"`))}for(const c in r)o[c]||r[c].required&&r[c].default===void 0&&i[c]===void 0&&a.push(new Oe(e,i,`missing required property "${c}"`));return a}function Py(t){const e=t.value,i=t.valueSpec,r=t.style,o=t.styleSpec,n=t.key,s=t.arrayElementValidator||ar;if(Yt(e)!=="array")return[new Oe(n,e,`array expected, ${Yt(e)} found`)];if(i.length&&e.length!==i.length)return[new Oe(n,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new Oe(n,e,`array length at least ${i["min-length"]} expected, length ${e.length} found`)];let a={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum,function:void 0};o.$version<7&&(a.function=i.function),Yt(i.value)==="object"&&(a=i.value);let l=[];for(let c=0;c<e.length;c++)l=l.concat(s({array:e,arrayIndex:c,value:e[c],valueSpec:a,style:r,styleSpec:o,key:`${n}[${c}]`},!0));return l}function Dy(t){const e=t.key,i=t.value,r=t.valueSpec;let o=Yt(i);if(o==="number"&&i!=i&&(o="NaN"),o!=="number")return[new Oe(e,i,`number expected, ${o} found`)];if("minimum"in r){let n=r.minimum;if(Yt(r.minimum)==="array"&&(n=r.minimum[t.arrayIndex]),i<n)return[new Oe(e,i,`${i} is less than the minimum value ${n}`)]}if("maximum"in r){let n=r.maximum;if(Yt(r.maximum)==="array"&&(n=r.maximum[t.arrayIndex]),i>n)return[new Oe(e,i,`${i} is greater than the maximum value ${n}`)]}return[]}function zy(t){const e=t.valueSpec,i=Gi(t.value.type);let r,o,n,s={};const a=i!=="categorical"&&t.value.property===void 0,l=!a,c=Yt(t.value.stops)==="array"&&Yt(t.value.stops[0])==="array"&&Yt(t.value.stops[0][0])==="object",u=co({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(_){if(i==="identity")return[new Oe(_.key,_.value,'identity function may not have a "stops" property')];let g=[];const y=_.value;return g=g.concat(Py({key:_.key,value:y,valueSpec:_.valueSpec,style:_.style,styleSpec:_.styleSpec,arrayElementValidator:p})),Yt(y)==="array"&&y.length===0&&g.push(new Oe(_.key,y,"array must have at least one stop")),g},default:function(_){return ar({key:_.key,value:_.value,valueSpec:e,style:_.style,styleSpec:_.styleSpec})}}});return i==="identity"&&a&&u.push(new Oe(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||u.push(new Oe(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!jp(t.valueSpec)&&u.push(new Oe(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ks(t.valueSpec)?u.push(new Oe(t.key,t.value,"property functions not supported")):a&&!Np(t.valueSpec)&&u.push(new Oe(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!c||t.value.property!==void 0||u.push(new Oe(t.key,t.value,'"property" property is required')),u;function p(_){let g=[];const y=_.value,v=_.key;if(Yt(y)!=="array")return[new Oe(v,y,`array expected, ${Yt(y)} found`)];if(y.length!==2)return[new Oe(v,y,`array length 2 expected, length ${y.length} found`)];if(c){if(Yt(y[0])!=="object")return[new Oe(v,y,`object expected, ${Yt(y[0])} found`)];if(y[0].zoom===void 0)return[new Oe(v,y,"object stop key must have zoom")];if(y[0].value===void 0)return[new Oe(v,y,"object stop key must have value")];const b=Gi(y[0].zoom);if(typeof b!="number")return[new Oe(v,y[0].zoom,"stop zoom values must be numbers")];if(n&&n>b)return[new Oe(v,y[0].zoom,"stop zoom values must appear in ascending order")];b!==n&&(n=b,o=void 0,s={}),g=g.concat(co({key:`${v}[0]`,value:y[0],valueSpec:{zoom:{}},style:_.style,styleSpec:_.styleSpec,objectElementValidators:{zoom:Dy,value:f}}))}else g=g.concat(f({key:`${v}[0]`,value:y[0],style:_.style,styleSpec:_.styleSpec},y));return au(cn(y[1]))?g.concat([new Oe(`${v}[1]`,y[1],"expressions are not allowed in function stops.")]):g.concat(ar({key:`${v}[1]`,value:y[1],valueSpec:e,style:_.style,styleSpec:_.styleSpec}))}function f(_,g){const y=Yt(_.value),v=Gi(_.value),b=_.value!==null?_.value:g;if(r){if(y!==r)return[new Oe(_.key,b,`${y} stop domain type must match previous stop domain type ${r}`)]}else r=y;if(y!=="number"&&y!=="string"&&y!=="boolean"&&typeof v!="number"&&typeof v!="string"&&typeof v!="boolean")return[new Oe(_.key,b,"stop domain value must be a number, string, or boolean")];if(y!=="number"&&i!=="categorical"){let w=`number expected, ${y} found`;return ks(e)&&i===void 0&&(w+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Oe(_.key,b,w)]}return i!=="categorical"||y!=="number"||typeof v=="number"&&isFinite(v)&&Math.floor(v)===v?i!=="categorical"&&y==="number"&&typeof v=="number"&&typeof o=="number"&&o!==void 0&&v<o?[new Oe(_.key,b,"stop domain values must appear in ascending order")]:(o=v,i==="categorical"&&v in s?[new Oe(_.key,b,"stop domain values must be unique")]:(s[v]=!0,[])):[new Oe(_.key,b,`integer expected, found ${String(v)}`)]}}function Ps(t){const e=(t.expressionContext==="property"?qp:Fn)(cn(t.value),t.valueSpec);if(e.result==="error")return e.value.map(r=>new Oe(`${t.key}${r.key}`,t.value,r.message));const i=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!i.outputDefined())return[new Oe(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!Il(i))return[new Oe(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Ry(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!ya(i,["zoom","feature-state"]))return[new Oe(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!ga(i))return[new Oe(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ry(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const o of e.valueSpec.expression.parameters)i.delete(o);if(i.size===0)return[];const r=[];return t instanceof Bo&&i.has(t.name)?[new Oe(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(o=>{r.push(...Ry(o,e))}),r)}function uu(t){const e=t.key,i=t.value,r=t.valueSpec,o=[];return Array.isArray(r.values)?r.values.indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(r.values).indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function Gp(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Gp(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function hu(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Gp(t)||(t=du(t));const i=t;let r=!0;try{r=function(c){if(!ba(c))return c;let u=cn(c);return Oy(u),u=Ly(u),u}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
1
+ import{H as M2,G as M_,q as Dn,d as In,o as ur,c as Cn,y as Dd,e as Hr,E as yT,w as vd,z as cD,b as Qo,a as sl,g as fs,j as W_,v as An,C as vT,t as Pc,A as uD,m as hD,f as en,r as xT,n as cg,s as I2,i as dD,D as pD}from"./_plugin-vue_export-helper.js";var C2={},Do=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bT(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}function fD(h){if(h.__esModule)return h;var d=h.default;if(typeof d=="function"){var m=function x(){return this instanceof x?Reflect.construct(d,arguments,this.constructor):d.apply(this,arguments)};m.prototype=d.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(h).forEach(function(x){var T=Object.getOwnPropertyDescriptor(h,x);Object.defineProperty(m,x,T.get?T:{enumerable:!0,get:function(){return h[x]}})}),m}var wT={exports:{}};(function(h,d){(function(m,x){h.exports=x()})(Do,function(){var m,x,T;function I(R,C){if(!m)m=C;else if(!x)x=C;else{var Z="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+m+")(sharedChunk); ("+x+")(sharedChunk); self.onerror = null;",ee={};m(ee),T=C(ee),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(T.workerUrl=window.URL.createObjectURL(new Blob([Z],{type:"text/javascript"})))}}I(["exports"],function(R){var C=typeof self<"u"?self:{},Z="3.1.2";let ee;const ne={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(ee==null){const t=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{ee=C2.API_URL_REGEX!=null?new RegExp(C2.API_URL_REGEX):t}catch{ee=t}}return ee},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!ne.API_URL)return null;try{const t=new URL(ne.API_URL);return t.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":t.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},Te={supported:!1,testSupport:function(t){!ve&&ke&&(Xe?ut(t):Me=t)}};let Me,ke,ve=!1,Xe=!1;function ut(t){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,ke),t.isContextLost())return;Te.supported=!0}catch{}t.deleteTexture(e),ve=!0}C.document&&(ke=C.document.createElement("img"),ke.onload=function(){Me&&ut(Me),Me=null,Xe=!0},ke.onerror=function(){ve=!0,Me=null},ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const tt="01";function yt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _t=st;function st(t,e,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=e,this.p2x=i,this.p2y=r}st.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,e){if(e===void 0&&(e=1e-6),t<0)return 0;if(t>1)return 1;for(var i=t,r=0;r<8;r++){var o=this.sampleCurveX(i)-t;if(Math.abs(o)<e)return i;var n=this.sampleCurveDerivativeX(i);if(Math.abs(n)<1e-6)break;i-=o/n}var s=0,a=1;for(i=t,r=0;r<20&&(o=this.sampleCurveX(i),!(Math.abs(o-t)<e));r++)t>o?s=i:a=i,i=.5*(a-s)+s;return i},solve:function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))}};var qe=yt(_t),$t=pi;function pi(t,e){this.x=t,this.y=e}pi.prototype={clone:function(){return new pi(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),i=Math.sin(t),r=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=r,this},_rotateAround:function(t,e){var i=Math.cos(t),r=Math.sin(t),o=e.y+r*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-r*(this.y-e.y),this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},pi.convert=function(t){return t instanceof pi?t:Array.isArray(t)?new pi(t[0],t[1]):t};var X=yt($t);function lt(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!lt(t[i],e[i]))return!1;return!0}if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object"||Object.keys(t).length!==Object.keys(e).length)return!1;for(const i in t)if(!lt(t[i],e[i]))return!1;return!0}return t===e}const Rn=Math.PI/180,hr=180/Math.PI;function it(t){return t*Rn}function wi(t){return t*hr}const no=[[0,0],[1,0],[1,1],[0,1]];function Cr(t){if(t<=0)return 0;if(t>=1)return 1;const e=t*t,i=e*t;return 4*(t<.5?i:3*(t-e)+i-.75)}function on(t){let e=1/0,i=1/0,r=-1/0,o=-1/0;for(const n of t)e=Math.min(e,n.x),i=Math.min(i,n.y),r=Math.max(r,n.x),o=Math.max(o,n.y);return{min:new X(e,i),max:new X(r,o)}}function nn(t,e,i=0,r=!0){const o=new X(i,i),n=t.sub(o),s=e.add(o),a=[n,new X(s.x,n.y),s,new X(n.x,s.y)];return r&&a.push(n.clone()),a}function zo(t,e,i,r){const o=new qe(t,e,i,r);return function(n){return o.solve(n)}}const kr=zo(.25,.1,.25,1);function je(t,e,i){return Math.min(i,Math.max(e,t))}function Ro(t,e,i){return(i=je((i-t)/(e-t),0,1))*i*(3-2*i)}function Lo(t,e,i){const r=i-e,o=((t-e)%r+r)%r+e;return o===e?i:o}function xs(t,e,i){if(!t.length)return i(null,[]);let r=t.length;const o=new Array(t.length);let n=null;t.forEach((s,a)=>{e(s,(l,c)=>{l&&(n=l),o[a]=c,--r==0&&i(n,o)})})}function bs(t){const e=[];for(const i in t)e.push(t[i]);return e}function Be(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Pr(t,e){const i={};for(let r=0;r<e.length;r++){const o=e[r];o in t&&(i[o]=t[o])}return i}let jd=1;function na(){return jd++}function Fc(){return function t(e){return e?(e^Math.random()*(16>>e/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function Nc(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function jc(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function Yi(t,e){t.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function sa(t,e){return t.indexOf(e,t.length-e.length)!==-1}function aa(t,e,i){const r={};for(const o in t)r[o]=e.call(this,t[o],o,t);return r}function xe(t,e,i){const r={};for(const o in t)e.call(this,t[o],o,t)&&(r[o]=t[o]);return r}function N(t){return Array.isArray(t)?t.map(N):typeof t=="object"&&t?aa(t,N):t}const U={};function H(t){U[t]||(typeof console<"u"&&console.warn(t),U[t]=!0)}function de(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}function fe(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function Le([t,e,i]){const r=it(e+90),o=it(i);return{x:t*Math.cos(r)*Math.sin(o),y:t*Math.sin(r)*Math.sin(o),z:t*Math.cos(o),azimuthal:e,polar:i}}function Ge(t,e,i){const r=Math.sqrt(t*t+e*e+i*i),o=r>0?Math.acos(i/r)*hr:0;let n=t!==0||e!==0?Math.atan2(-e,-t)*hr+90:0;return n<0&&(n+=360),[r,n,o]}function me(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function We(t){const e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,r,o,n)=>{const s=o||n;return e[r]=!s||s.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let ht=null;function at(){return!!C.document.fullscreenElement||!!C.document.webkitFullscreenElement}function si(t){try{const e=C[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch{return!1}}function Ti(t,e){return[t[4*e],t[4*e+1],t[4*e+2],t[4*e+3]]}function rr(t,e,i){t[4*e+0]=i[0],t[4*e+1]=i[1],t[4*e+2]=i[2],t[4*e+3]=i[3]}function Ei(t,e){return[Math.pow(t[0],2.2)*e,Math.pow(t[1],2.2)*e,Math.pow(t[2],2.2)*e]}function zi(t){return[Math.pow(t[0],1/2.2),Math.pow(t[1],1/2.2),Math.pow(t[2],1/2.2)]}const ui="mapbox-tiles";let dr=500,br=50,wr,xo;function la(){try{return C.caches}catch{}}function Dr(){la()&&!wr&&(wr=C.caches.open(ui))}function sn(t){const e=t.indexOf("?");if(e<0)return t;const i=function(o){const n=o.indexOf("?");return n>0?o.slice(n+1).split("&"):[]}(t),r=i.filter(o=>{const n=o.split("=");return n[0]==="language"||n[0]==="worldview"});return r.length?`${t.slice(0,e)}?${r.join("&")}`:t.slice(0,e)}let Ln=1/0;function ca(t){Ln++,Ln>br&&(t.getActor().send("enforceCacheSizeLimit",dr),Ln=0)}const le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(le);class ue extends Error{constructor(e,i,r){i===401&&Si(r)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=r}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const ge=me()?()=>self.worker&&self.worker.referrer:()=>(C.location.protocol==="blob:"?C.parent:C).location.href,be=function(t,e){if(!(/^file:/.test(i=t.url)||/^file:/.test(ge())&&!/^\w+:/.test(i))){if(C.fetch&&C.Request&&C.AbortController&&C.Request.prototype.hasOwnProperty("signal"))return function(r,o){const n=new C.AbortController,s=new C.Request(r.url,{method:r.method||"GET",body:r.body,credentials:r.credentials,headers:r.headers,referrer:ge(),referrerPolicy:r.referrerPolicy,signal:n.signal});let a=!1,l=!1;const c=(u=s.url).indexOf("sku=")>0&&Si(u);var u;r.type==="json"&&s.headers.set("Accept","application/json");const p=(_,g,y)=>{if(l)return;if(_&&_.message!=="SecurityError"&&H(_.toString()),g&&y)return f(g);const v=Date.now();C.fetch(s).then(b=>{if(b.ok){const w=c?b.clone():null;return f(b,w,v)}return o(new ue(b.statusText,b.status,r.url))}).catch(b=>{b.name!=="AbortError"&&o(new Error(`${b.message} ${r.url}`))})},f=(_,g,y)=>{(r.type==="arrayBuffer"?_.arrayBuffer():r.type==="json"?_.json():_.text()).then(v=>{l||(g&&y&&function(b,w,S){if(Dr(),!wr)return;const A={status:w.status,statusText:w.statusText,headers:new C.Headers};w.headers.forEach((k,D)=>A.headers.set(D,k));const E=We(w.headers.get("Cache-Control")||"");if(E["no-store"])return;E["max-age"]&&A.headers.set("Expires",new Date(S+1e3*E["max-age"]).toUTCString());const M=A.headers.get("Expires");M&&(new Date(M).getTime()-S<42e4||function(k,D){if(xo===void 0)try{new Response(new ReadableStream),xo=!0}catch{xo=!1}xo?D(k.body):k.blob().then(D)}(w,k=>{const D=new C.Response(k,A);Dr(),wr&&wr.then(z=>z.put(sn(b.url),D)).catch(z=>H(z.message))}))}(s,g,y),a=!0,o(null,v,_.headers.get("Cache-Control"),_.headers.get("Expires")))}).catch(v=>{l||o(new Error(v.message))})};return c?function(_,g){if(Dr(),!wr)return g(null);const y=sn(_.url);wr.then(v=>{v.match(y).then(b=>{const w=function(S){if(!S)return!1;const A=new Date(S.headers.get("Expires")||0),E=We(S.headers.get("Cache-Control")||"");return A>Date.now()&&!E["no-cache"]}(b);v.delete(y),w&&v.put(y,b.clone()),g(null,b,w)}).catch(g)}).catch(g)}(s,p):p(null,null),{cancel:()=>{l=!0,a||n.abort()}}}(t,e);if(me()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var i;return function(r,o){const n=new C.XMLHttpRequest;n.open(r.method||"GET",r.url,!0),r.type==="arrayBuffer"&&(n.responseType="arraybuffer");for(const s in r.headers)n.setRequestHeader(s,r.headers[s]);return r.type==="json"&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials=r.credentials==="include",n.onerror=()=>{o(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(r.type==="json")try{s=JSON.parse(n.response)}catch(a){return o(a)}o(null,s,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else o(new ue(n.statusText,n.status,r.url))},n.send(r.body),{cancel:()=>n.abort()}}(t,e)},we=function(t,e){return be(Be(t,{type:"json"}),e)},Ie=function(t,e){return be(Be(t,{type:"arrayBuffer"}),e)};function Pe(t){const e=C.document.createElement("a");return e.href=t,e.protocol===C.document.location.protocol&&e.host===C.document.location.host}const Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Ne,Ce;Ne=[],Ce=0;const vt=function(t,e){if(Te.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ce>=ne.MAX_PARALLEL_IMAGE_REQUESTS){const n={requestParameters:t,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Ne.push(n),n}Ce++;let i=!1;const r=()=>{if(!i)for(i=!0,Ce--;Ne.length&&Ce<ne.MAX_PARALLEL_IMAGE_REQUESTS;){const n=Ne.shift(),{requestParameters:s,callback:a,cancelled:l}=n;l||(n.cancel=vt(s,a).cancel)}},o=Ie(t,(n,s,a,l)=>{r(),n?e(n):s&&(C.createImageBitmap?function(c,u){const p=new C.Blob([new Uint8Array(c)],{type:"image/png"});C.createImageBitmap(p).then(f=>{u(null,f)}).catch(f=>{u(new Error(`Could not load image because of ${f.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(s,(c,u)=>e(c,u,a,l)):function(c,u){const p=new C.Image,f=C.URL;p.onload=()=>{u(null,p),f.revokeObjectURL(p.src),p.onload=null,C.requestAnimationFrame(()=>{p.src=Ee})},p.onerror=()=>u(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const _=new C.Blob([new Uint8Array(c)],{type:"image/png"});p.src=c.byteLength?f.createObjectURL(_):Ee}(s,(c,u)=>e(c,u,a,l)))});return{cancel:()=>{o.cancel(),r()}}},ei="NO_ACCESS_TOKEN";class Ye{constructor(e,i,r){this._transformRequestFn=e,this._customAccessToken=i,this._silenceAuthErrors=!!r,this._createSkuToken()}_createSkuToken(){const e=function(){let i="";for(let r=0;r<10;r++)i+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",tt,i].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(e,i){return this._transformRequestFn&&this._transformRequestFn(e,i)||{url:e}}normalizeStyleURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.params.push(`sdk=js-${Z}`),r.path=`/styles/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeGlyphsURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/fonts/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeModelURL(e,i){if(!Xt(e))return e;const r=Ki(e);return r.path=`/models/v1${r.path}`,this._makeAPIURL(r,this._customAccessToken||i)}normalizeSourceURL(e,i,r,o){if(!Xt(e))return e;const n=Ki(e);return n.path=`/v4/${n.authority}.json`,n.params.push("secure"),r&&n.params.push(`language=${r}`),o&&n.params.push(`worldview=${o}`),this._makeAPIURL(n,this._customAccessToken||i)}normalizeSpriteURL(e,i,r,o){const n=Ki(e);return Xt(e)?(n.path=`/styles/v1${n.path}/sprite${i}${r}`,this._makeAPIURL(n,this._customAccessToken||o)):(n.path+=`${i}${r}`,Tr(n))}normalizeTileURL(e,i,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Xt(e))return e;const o=Ki(e);o.path=o.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${i||r&&o.authority!=="raster"&&r===512?"@2x":""}${Te.supported?".webp":"$1"}`),o.authority==="raster"?o.path=`/${ne.RASTER_URL_PREFIX}${o.path}`:(o.path=o.path.replace(/^.+\/v4\//,"/"),o.path=`/${ne.TILE_URL_VERSION}${o.path}`);const n=this._customAccessToken||function(s){for(const a of s){const l=a.match(/^access_token=(.*)$/);if(l)return l[1]}return null}(o.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&n&&this._skuToken&&o.params.push(`sku=${this._skuToken}`),this._makeAPIURL(o,n)}canonicalizeTileURL(e,i){const r=Ki(e);if(!r.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!r.path.match(/\.[\w]+$/))return e;let o="mapbox://";r.path.match(/^\/raster\/v1\//)?o+=`raster/${r.path.replace(`/${ne.RASTER_URL_PREFIX}/`,"")}`:o+=`tiles/${r.path.replace(`/${ne.TILE_URL_VERSION}/`,"")}`;let n=r.params;return i&&(n=n.filter(s=>!s.match(/^access_token=/))),n.length&&(o+=`?${n.join("&")}`),o}canonicalizeTileset(e,i){const r=!!i&&Xt(i),o=[];for(const n of e.tiles||[])Si(n)?o.push(this.canonicalizeTileURL(n,r)):o.push(n);return o}_makeAPIURL(e,i){const r="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",o=Ki(ne.API_URL);if(e.protocol=o.protocol,e.authority=o.authority,e.protocol==="http"){const n=e.params.indexOf("secure");n>=0&&e.params.splice(n,1)}if(o.path!=="/"&&(e.path=`${o.path}${e.path}`),!ne.REQUIRE_ACCESS_TOKEN)return Tr(e);if(i=i||ne.ACCESS_TOKEN,!this._silenceAuthErrors){if(!i)throw new Error(`An API access token is required to use Mapbox GL. ${r}`);if(i[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${r}`)}return e.params=e.params.filter(n=>n.indexOf("access_token")===-1),e.params.push(`access_token=${i||""}`),Tr(e)}}function Xt(t){return t.indexOf("mapbox:")===0}function Si(t){return ne.API_URL_REGEX.test(t)}function Ri(t){return ne.API_CDN_URL_REGEX.test(t)}function qi(t){return ne.API_STYLE_REGEX.test(t)&&!pr(t)}function pr(t){return ne.API_SPRITE_REGEX.test(t)}const so=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function Ki(t){const e=t.match(so);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Tr(t){const e=t.params.length?`?${t.params.join("&")}`:"";return`${t.protocol}://${t.authority}${t.path}${e}`}const fr="mapbox.eventData";function ua(t){if(!t)return null;const e=t.split(".");if(!e||e.length!==3)return null;try{return JSON.parse(decodeURIComponent(C.atob(e[1]).split("").map(i=>"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class On{constructor(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(e){const i=ua(ne.ACCESS_TOKEN);let r="";return r=i&&i.u?C.btoa(encodeURIComponent(i.u).replace(/%([0-9A-F]{2})/g,(o,n)=>String.fromCharCode(+("0x"+n)))):ne.ACCESS_TOKEN||"",e?`${fr}.${e}:${r}`:`${fr}:${r}`}fetchEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{const o=C.localStorage.getItem(i);o&&(this.eventData=JSON.parse(o));const n=C.localStorage.getItem(r);n&&(this.anonId=n)}catch{H("Unable to read from LocalStorage")}}saveEventData(){const e=si("localStorage"),i=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{C.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&C.localStorage.setItem(i,JSON.stringify(this.eventData))}catch{H("Unable to write to LocalStorage")}}processRequests(e){}postEvent(e,i,r,o){if(!ne.EVENTS_URL)return;const n=Ki(ne.EVENTS_URL);n.params.push(`access_token=${o||ne.ACCESS_TOKEN||""}`);const s={event:this.type,created:new Date(e).toISOString()},a=i?Be(s,i):s,l={url:Tr(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=function(c,u){return be(Be(c,{method:"POST"}),u)}(l,c=>{this.pendingRequest=null,r(c),this.saveEventData(),this.processRequests(o)})}queueRequest(e,i){this.queue.push(e),this.processRequests(i)}}const ha=new class extends On{constructor(t){super("appUserTurnstile"),this._customAccessToken=t}postTurnstileEvent(t,e){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(t)&&t.some(i=>Xt(i)||Si(i))&&this.queueRequest(Date.now(),e)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const e=ua(ne.ACCESS_TOKEN),i=e?e.u:ne.ACCESS_TOKEN;let r=i!==this.eventData.tokenU;jc(this.anonId)||(this.anonId=Fc(),r=!0);const o=this.queue.shift();if(this.eventData.lastSuccess){const n=new Date(this.eventData.lastSuccess),s=new Date(o),a=(o-this.eventData.lastSuccess)/864e5;r=r||a>=1||a<-1||n.getDate()!==s.getDate()}else r=!0;r?this.postEvent(o,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,"enabled.telemetry":!1,userId:this.anonId},n=>{n||(this.eventData.lastSuccess=o,this.eventData.tokenU=i)},t):this.processRequests()}},Vd=ha.postTurnstileEvent.bind(ha),Mg=new class extends On{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.EVENTS_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||(this.anonId||this.fetchEventData(),jc(this.anonId)||(this.anonId=Fc()),this.postEvent(i,{sdkIdentifier:"mapbox-gl-js",sdkVersion:Z,skuId:tt,skuToken:this.skuToken,userId:this.anonId},r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t))}},GE=Mg.postMapLoadEvent.bind(Mg),Ig=new class extends On{constructor(){super("gljs.performance")}postPerformanceEvent(t,e){ne.EVENTS_URL&&(t||ne.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:e},t)}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:e,performanceData:i}=this.queue.shift(),r=function(o){const n=C.performance.getEntriesByType("resource"),s=C.performance.getEntriesByType("mark"),a=function(f){const _={};if(f){for(const g in f)if(g!=="other")for(const y of f[g]){const v=`${g}ResolveRangeMin`,b=`${g}ResolveRangeMax`,w=`${g}RequestCount`,S=`${g}RequestCachedCount`;_[v]=Math.min(_[v]||1/0,y.startTime),_[b]=Math.max(_[b]||-1/0,y.responseEnd);const A=E=>{_[E]===void 0&&(_[E]=0),++_[E]};y.transferSize!==void 0&&y.transferSize===0&&A(S),A(w)}}return _}(function(f,_){const g={};if(f)for(const y of f){const v=_(y);g[v]===void 0&&(g[v]=[]),g[v].push(y)}return g}(n,HE)),l=C.devicePixelRatio,c=C.navigator.connection||C.navigator.mozConnection||C.navigator.webkitConnection,u={counters:[],metadata:[],attributes:[]},p=(f,_,g)=>{g!=null&&f.push({name:_,value:g.toString()})};for(const f in a)p(u.counters,f,a[f]);if(o.interactionRange[0]!==1/0&&o.interactionRange[1]!==-1/0&&(p(u.counters,"interactionRangeMin",o.interactionRange[0]),p(u.counters,"interactionRangeMax",o.interactionRange[1])),s)for(const f of Object.keys(Uc)){const _=Uc[f],g=s.find(y=>y.name===_);g&&p(u.counters,_,g.startTime)}return p(u.counters,"visibilityHidden",o.visibilityHidden),p(u.attributes,"style",function(f){if(f)for(const _ of f){const g=_.name.split("?")[0];if(qi(g)){const y=g.split("/").slice(-2);if(y.length===2)return`mapbox://styles/${y[0]}/${y[1]}`}}}(n)),p(u.attributes,"terrainEnabled",o.terrainEnabled?"true":"false"),p(u.attributes,"fogEnabled",o.fogEnabled?"true":"false"),p(u.attributes,"projection",o.projection),p(u.attributes,"zoom",o.zoom),p(u.metadata,"devicePixelRatio",l),p(u.metadata,"connectionEffectiveType",c?c.effectiveType:void 0),p(u.metadata,"navigatorUserAgent",C.navigator.userAgent),p(u.metadata,"screenWidth",C.screen.width),p(u.metadata,"screenHeight",C.screen.height),p(u.metadata,"windowWidth",C.innerWidth),p(u.metadata,"windowHeight",C.innerHeight),p(u.metadata,"mapWidth",o.width/l),p(u.metadata,"mapHeight",o.height/l),p(u.metadata,"webglRenderer",o.renderer),p(u.metadata,"webglVendor",o.vendor),p(u.metadata,"sdkVersion",Z),p(u.metadata,"sdkIdentifier","mapbox-gl-js"),u}(i);for(const o of r.metadata);for(const o of r.counters);for(const o of r.attributes);this.postEvent(e,r,()=>{},t)}},$E=Ig.postPerformanceEvent.bind(Ig),Cg=new class extends On{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(t,e,i,r){if(!ne.API_URL||!ne.SESSION_PATH)return;const o=Ki(ne.API_URL+ne.SESSION_PATH);o.params.push(`sku=${e||""}`),o.params.push(`access_token=${r||ne.ACCESS_TOKEN||""}`);const n={url:Tr(o),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(s,a){return be(Be(s,{method:"GET"}),a)}(n,s=>{this.pendingRequest=null,i(s),this.saveEventData(),this.processRequests(r)})}getSessionAPI(t,e,i,r){this.skuToken=e,this.errorCb=r,ne.SESSION_PATH&&ne.API_URL&&(i||ne.ACCESS_TOKEN?this.queueRequest({id:t,timestamp:Date.now()},i):this.errorCb(new Error(ei)))}processRequests(t){if(this.pendingRequest||this.queue.length===0)return;const{id:e,timestamp:i}=this.queue.shift();e&&this.success[e]||this.getSession(i,this.skuToken,r=>{r?this.errorCb(r):e&&(this.success[e]=!0)},t)}},WE=Cg.getSessionAPI.bind(Cg),Vc=new Set;function kg(t,e){e?Vc.add(t):Vc.delete(t)}const Uc={create:"create",load:"load",fullLoad:"fullLoad"},Pg={mark(t){C.performance.mark(t)},measure(t,e,i){C.performance.measure(t,e,i)}};function HE(t){const e=t.name.split("?")[0];return Ri(e)&&e.includes("mapbox-gl.js")?"javascript":Ri(e)&&e.includes("mapbox-gl.css")?"css":function(i){return ne.API_FONTS_REGEX.test(i)}(e)?"fontRange":pr(e)?"sprite":qi(e)?"style":function(i){return ne.API_TILEJSON_REGEX.test(i)}(e)?"tilejson":"other"}const ZE=C.performance;function Dg(t){const e=t?t.url.toString():void 0;return ZE.getEntriesByName(e)}var zg=Ud;function Ud(t){return!function(e){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var r,o,n=new Blob([""],{type:"text/javascript"}),s=URL.createObjectURL(n);try{o=new Worker(s),r=!0}catch{r=!1}return o&&o.terminate(),URL.revokeObjectURL(s),r}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var r=document.createElement("canvas");r.width=r.height=1;var o=r.getContext("2d");if(!o)return!1;var n=o.getImageData(0,0,1,1);return n&&n.width===r.width}()?(qd[i=e&&e.failIfMajorPerformanceCaveat]===void 0&&(qd[i]=function(r){var o,n=function(s){var a=document.createElement("canvas"),l=Object.create(Ud.webGLContextAttributes);return l.failIfMajorPerformanceCaveat=s,a.getContext("webgl",l)||a.getContext("experimental-webgl",l)}(r);if(!n)return!1;try{o=n.createShader(n.VERTEX_SHADER)}catch{return!1}return!(!o||n.isContextLost())&&(n.shaderSource(o,"void main() {}"),n.compileShader(o),n.getShaderParameter(o,n.COMPILE_STATUS)===!0)}(i)),qd[i]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var i}(t)}var qd={};let Gd,qc,$d,Gc,ws;function Rg(){return Gd==null&&(Gd=C.OffscreenCanvas&&new C.OffscreenCanvas(1,1).getContext("2d")&&typeof C.createImageBitmap=="function"),Gd}Ud.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const ct={now:()=>Gc!==void 0?Gc:C.performance.now(),setNow(t){Gc=t},restoreNow(){Gc=void 0},frame(t){const e=C.requestAnimationFrame(t);return{cancel:()=>C.cancelAnimationFrame(e)}},getImageData(t,e=0){const{width:i,height:r}=t;ws||(ws=C.document.createElement("canvas"));const o=ws.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("failed to create canvas 2d context");return(i>ws.width||r>ws.height)&&(ws.width=i,ws.height=r),o.clearRect(-e,-e,i+2*e,r+2*e),o.drawImage(t,0,0,i,r),o.getImageData(-e,-e,i+2*e,r+2*e)},resolveURL:t=>(qc||(qc=C.document.createElement("a")),qc.href=t,qc.href),get devicePixelRatio(){return C.devicePixelRatio},get prefersReducedMotion(){return!!C.matchMedia&&($d==null&&($d=C.matchMedia("(prefers-reduced-motion: reduce)")),$d.matches)},hasCanvasFingerprintNoise(){if(!Rg())return!1;const t=new C.OffscreenCanvas(85,1),e=t.getContext("2d",{willReadFrequently:!0});let i=0;for(let o=0;o<t.width;++o)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(o,0,1,1);const r=e.getImageData(0,0,t.width,t.height);i=0;for(let o=0;o<r.data.length;++o)if(o%4!=3&&i++!==r.data[o])return!0;return!1}};function ni(t,e,i){const r=C.document.createElement(t);return e!==void 0&&(r.className=e),i&&i.appendChild(r),r}function an(t,e,i){const r=C.document.createElementNS("http://www.w3.org/2000/svg",t);for(const o of Object.keys(e))r.setAttributeNS(null,o,e[o]);return i&&i.appendChild(r),r}const Ts=C.document&&C.document.documentElement.style,fl=Ts&&Ts.userSelect!==void 0?"userSelect":"WebkitUserSelect";let Lg;function Og(){Ts&&fl&&(Lg=Ts[fl],Ts[fl]="none")}function Bg(){Ts&&fl&&(Ts[fl]=Lg)}function Wd(t){t.preventDefault(),t.stopPropagation(),C.removeEventListener("click",Wd,!0)}function Hd(){C.addEventListener("click",Wd,!0),C.setTimeout(()=>{C.removeEventListener("click",Wd,!0)},0)}function ml(t,e){const i=t.getBoundingClientRect();return Ng(t,i,e)}function $c(t,e){const i=t.getBoundingClientRect(),r=[];for(let o=0;o<e.length;o++)r.push(Ng(t,i,e[o]));return r}function Fg(t){return C.InstallTrigger!==void 0&&t.button===2&&t.ctrlKey&&C.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button}function Ng(t,e,i){const r=t.offsetWidth===e.width?1:t.offsetWidth/e.width;return new X((i.clientX-e.left)*r,(i.clientY-e.top)*r)}function jg(t,e,i){i[t]&&i[t].indexOf(e)!==-1||(i[t]=i[t]||[],i[t].push(e))}function Zd(t,e,i){if(i&&i[t]){const r=i[t].indexOf(e);r!==-1&&i[t].splice(r,1)}}class ye{constructor(e,i={}){Be(this,i),this.type=e}}class nt extends ye{constructor(e,i={}){super("error",Be({error:e},i))}}class Fi{on(e,i){return this._listeners=this._listeners||{},jg(e,i,this._listeners),this}off(e,i){return Zd(e,i,this._listeners),Zd(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},jg(e,i,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,i){typeof e=="string"&&(e=new ye(e,i||{}));const r=e.type;if(this.listens(r)){e.target=this;const o=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(const a of o)a.call(this,e);const n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(const a of n)Zd(r,a,this._oneTimeListeners),a.call(this,e);const s=this._eventedParent;s&&(Be(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),s.fire(e))}else e instanceof nt&&console.error(e.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}var J=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"fragment":{"type":"boolean"},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360},"pitch":{"type":"number","default":0},"light":{"type":"light"},"lights":{"required":false,"type":"array","value":"light-3d"},"terrain":{"type":"terrain","optional":true},"fog":{"type":"fog"},"camera":{"type":"camera"},"imports":{"type":"array","value":"import"},"schema":{"type":"schema"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string","default":"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"},"models":{"type":"models"}},"model":{"type":"string","required":true},"import":{"id":{"type":"string","required":true},"url":{"type":"string","required":true},"config":{"type":"config"},"data":{"type":"$root"}},"config":{"*":{"type":"*"}},"schema":{"*":{"type":"option"}},"option":{"default":{"type":"*","required":true},"type":{"type":"enum","values":{"string":1,"number":1,"boolean":1,"color":1}},"array":{"type":"boolean"},"minValue":{"type":"number"},"maxValue":{"type":"number"},"stepValue":{"type":"number"},"values":{"type":"array","value":"*"},"metadata":{"type":"*"}},"models":{"*":{"type":"model"}},"light-3d":{"id":{"type":"string","required":true},"properties":{"type":"properties"},"type":{"type":"enum","values":{"ambient":{},"directional":{},"flat":{}}}},"properties":["properties_light_directional","properties_light_ambient","properties_light_flat"],"properties_light_directional":{"direction":{"type":"array","default":[210,30],"minimum":[0,0],"maximum":[360,90],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"cast-shadows":{"type":"boolean","default":false,"expression":{},"property-type":"data-constant"},"shadow-intensity":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_ambient":{"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"properties_light_flat":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_raster_array","source_geojson","source_video","source_image","source_model"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":1}},"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":1,"tms":1},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":1}},"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},"scheme":{"type":"enum","values":{"xyz":1,"tms":1},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":1}},"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},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":1,"mapbox":1},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_array":{"type":{"required":true,"type":"enum","values":{"raster-array":1}},"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},"attribution":{"type":"string"},"rasterLayers":{"type":"*"},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":1}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":1}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":1}},"url":{"required":false,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_model":{"type":{"required":true,"type":"enum","values":{"model":1,"batched-model":1}},"maxzoom":{"type":"number","default":18},"minzoom":{"type":"number","default":0},"tiles":{"type":"array","value":"string"}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"model":{},"background":{},"sky":{},"slot":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"slot":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky","layout_model"],"layout_background":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_model":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"model-id":{"type":"string","default":"","property-type":"data-driven","expression":{"parameters":["zoom","feature"]}}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":1,"round":1,"square":1},"default":"butt","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":1,"round":1,"miter":1},"default":"miter","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":1,"line":1,"line-center":1},"default":"point","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":1,"viewport-y":1,"source":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"symbol-z-elevate":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":1,"width":1,"height":1,"both":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":1,"viewport":1,"auto":1},"default":"auto","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":1,"left":1,"center":1,"right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","default":0,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":1,"left":1,"right":1,"top":1,"bottom":1,"top-left":1,"top-right":1,"bottom-left":1,"bottom-right":1},"default":"center","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":1,"vertical":1},"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":1,"uppercase":1,"lowercase":1},"default":"none","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","length":2,"default":[0,0],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":1,"none":1},"default":"visible","expression":{},"property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"property-type":"data-driven","expression":{"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":1,"!=":1,">":1,">=":1,"<":1,"<=":1,"in":1,"!in":1,"all":1,"any":1,"none":1,"has":1,"!has":1}},"geometry_type":{"type":"enum","values":{"Point":1,"LineString":1,"Polygon":1}},"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":1,"exponential":1,"interval":1,"categorical":1},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":1,"lab":1,"hcl":1},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true},"transition":true},"vertical-range":{"type":"array","default":[0,0],"minimum":0,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"],"relaxZoomRestriction":true}}},"camera":{"camera-projection":{"type":"enum","values":{"perspective":1,"orthographic":1},"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"default":"perspective","property-type":"data-constant"}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":1,"viewport":1},"property-type":"data-constant","expression":{"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":1,"equalEarth":1,"equirectangular":1,"lambertConformalConic":1,"mercator":1,"naturalEarth":1,"winkelTripel":1,"globe":1},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky","paint_model"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-wall-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-radius":{"property-type":"data-constant","type":"number","default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-flood-light-color":{"property-type":"data-constant","type":"color","default":"#ffffff","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-intensity":{"property-type":"data-constant","type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]}},"fill-extrusion-flood-light-wall-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-radius":{"property-type":"data-driven","type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["feature","feature-state"]}},"fill-extrusion-flood-light-ground-attenuation":{"property-type":"data-constant","type":"number","default":0.69,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-vertical-scale":{"property-type":"data-constant","type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"fill-extrusion-rounded-roof":{"property-type":"data-constant","type":"boolean","default":true,"expression":{"parameters":["zoom"]}},"fill-extrusion-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"},"fill-extrusion-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"property-type":"constant"},"line-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"line-border-width":{"type":"number","private":true,"default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-border-color":{"type":"color","private":true,"default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"circle-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"text-emissive-strength":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-image-cross-fade":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"transition":true},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state","measure-light"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"map","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"icon-color-saturation":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-color":{"type":"color","expression":{"interpolated":true,"parameters":["raster-value"]},"property-type":"color-ramp"},"raster-color-mix":{"type":"array","default":[0.2126,0.7152,0.0722,0],"length":4,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-color-range":{"type":"array","default":[0,1],"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":1,"nearest":1},"default":"linear","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"raster-array-band":{"type":"string","required":false,"property-type":"data-constant"},"raster-elevation":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":1,"viewport":1},"default":"viewport","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"},"hillshade-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-emissive-strength":{"type":"number","default":0,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","measure-light"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":1,"atmosphere":1},"default":"atmosphere","expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","default":10,"minimum":0,"maximum":100,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","value":"number","default":[0,0],"length":2,"minimum":[0,0],"maximum":[360,180],"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","default":90,"minimum":0,"maximum":180,"expression":{"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_model":{"model-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"model-rotation":{"type":"array","value":"number","length":3,"default":[0,0,0],"period":360,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-scale":{"type":"array","value":"number","length":3,"default":[1,1,1],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-translation":{"type":"array","value":"number","length":3,"default":[0,0,0],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","zoom"]},"transition":true},"model-color":{"type":"color","default":"#ffffff","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light","zoom"]},"transition":true},"model-color-mix-intensity":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-type":{"type":"enum","values":{"common-3d":1,"location-indicator":1},"default":"common-3d","property-type":"data-constant"},"model-cast-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-receive-shadows":{"type":"boolean","default":true,"expression":{},"property-type":"data-constant"},"model-ambient-occlusion-intensity":{"type":"number","default":1,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant","transition":true},"model-emissive-strength":{"type":"number","property-type":"data-driven","default":0,"minimum":0,"maximum":5,"expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-roughness":{"type":"number","default":1,"minimum":0,"maximum":1,"property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state"]},"transition":true},"model-height-based-emissive-strength-multiplier":{"type":"array","default":[1,1,1,1,0],"length":5,"value":"number","property-type":"data-driven","expression":{"interpolated":true,"parameters":["feature","feature-state","measure-light"]},"transition":true},"model-cutoff-fade-range":{"type":"number","default":0,"minimum":0,"maximum":1,"expression":{},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0},"delay":{"type":"number","default":0,"minimum":0}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');class Oe{constructor(e,i,r,o){this.message=(e?`${e}: `:"")+r,o&&(this.identifier=o),i!=null&&i.__line__&&(this.line=i.__line__)}}class Es extends Oe{}function ln(t,...e){for(const i of e)for(const r in i)t[r]=i[r];return t}function Gi(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function cn(t){if(Array.isArray(t))return t.map(cn);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const i in t)e[i]=cn(t[i]);return e}return Gi(t)}class XE extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}var Oo=XE;class Xd{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[r,o]of i)this.bindings[r]=o}concat(e){return new Xd(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}var YE=Xd;const da={kind:"null"},ze={kind:"number"},Ft={kind:"string"},Ut={kind:"boolean"},ao={kind:"color"},pa={kind:"object"},jt={kind:"value"},Wc={kind:"collator"},_l={kind:"formatted"},gl={kind:"resolvedImage"};function zr(t,e){return{kind:"array",itemType:t,N:e}}function Ni(t){if(t.kind==="array"){const e=Ni(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}const KE=[da,ze,Ft,Ut,ao,_l,pa,zr(jt),gl];function yl(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!yl(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(const i of KE)if(!yl(i,e))return null}}return`Expected ${Ni(t)} but found ${Ni(e)} instead.`}function Yd(t,e){return e.some(i=>i.kind===t.kind)}function vl(t,e){return e.some(i=>i==="null"?t===null:i==="array"?Array.isArray(t):i==="object"?t&&!Array.isArray(t)&&typeof t=="object":i===typeof t)}var Kd,Vg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Hc(t){return(t=Math.round(t))<0?0:t>255?255:t}function Jd(t){return Hc(t[t.length-1]==="%"?parseFloat(t)/100*255:parseInt(t))}function Zc(t){return(e=t[t.length-1]==="%"?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function Qd(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{Kd={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in Vg)return Vg[i].slice();if(i[0]==="#")return i.length===4?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:i.length===7&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var r=i.indexOf("("),o=i.indexOf(")");if(r!==-1&&o+1===i.length){var n=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),a=1;switch(n){case"rgba":if(s.length!==4)return null;a=Zc(s.pop());case"rgb":return s.length!==3?null:[Jd(s[0]),Jd(s[1]),Jd(s[2]),a];case"hsla":if(s.length!==4)return null;a=Zc(s.pop());case"hsl":if(s.length!==3)return null;var l=(parseFloat(s[0])%360+360)%360/360,c=Zc(s[1]),u=Zc(s[2]),p=u<=.5?u*(c+1):u+c-u*c,f=2*u-p;return[Hc(255*Qd(f,p,l+1/3)),Hc(255*Qd(f,p,l)),Hc(255*Qd(f,p,l-1/3)),a];default:return null}}return null}}catch{}class Rr{constructor(e,i,r,o=1){this.r=e,this.g=i,this.b=r,this.a=o}static parse(e){if(!e)return;if(e instanceof Rr)return e;if(typeof e!="string")return;const i=Kd(e);return i?new Rr(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3]):void 0}toString(){const[e,i,r,o]=this.toArray();return`rgba(${Math.round(e)},${Math.round(i)},${Math.round(r)},${o})`}toArray(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[255*e/o,255*i/o,255*r/o,o]}toArray01(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[e/o,i/o,r/o,o]}toArray01Scaled(e){const{r:i,g:r,b:o,a:n}=this;return n===0?[0,0,0]:[i/n*e,r/n*e,o/n*e]}toArray01PremultipliedAlpha(){const{r:e,g:i,b:r,a:o}=this;return[e,i,r,o]}toArray01Linear(){const{r:e,g:i,b:r,a:o}=this;return o===0?[0,0,0,0]:[Math.pow(e/o,2.2),Math.pow(i/o,2.2),Math.pow(r/o,2.2),o]}}Rr.black=new Rr(0,0,0,1),Rr.white=new Rr(1,1,1,1),Rr.transparent=new Rr(0,0,0,0),Rr.red=new Rr(1,0,0,1),Rr.blue=new Rr(0,0,1,1);var bt=Rr;class ep{constructor(e,i,r){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class tp{constructor(e,i,r,o,n){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=r,this.fontStack=o,this.textColor=n}}class Lr{constructor(e){this.sections=e}static fromString(e){return new Lr([new tp(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.namePrimary.length!==0)}static factory(e){return e instanceof Lr?e:Lr.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){e.push(["image",i.image.namePrimary]);continue}e.push(i.text);const r={};i.fontStack&&(r["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(r["font-scale"]=i.scale),i.textColor&&(r["text-color"]=["rgba"].concat(i.textColor.toArray())),e.push(r)}return e}}class lo{constructor(e){this.namePrimary=e.namePrimary,e.nameSecondary&&(this.nameSecondary=e.nameSecondary),this.available=e.available}toString(){return this.nameSecondary?`[${this.namePrimary},${this.nameSecondary}]`:this.namePrimary}static fromString(e,i){return e?new lo({namePrimary:e,nameSecondary:i,available:!1}):null}serialize(){return this.nameSecondary?["image",this.namePrimary,this.nameSecondary]:["image",this.namePrimary]}}function Ug(t,e,i,r){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?r===void 0||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[t,e,i,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[t,e,i,r]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function fa(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof bt||t instanceof ep||t instanceof Lr||t instanceof lo)return!0;if(Array.isArray(t)){for(const e of t)if(!fa(e))return!1;return!0}if(typeof t=="object"){for(const e in t)if(!fa(t[e]))return!1;return!0}return!1}function Ji(t){if(t===null)return da;if(typeof t=="string")return Ft;if(typeof t=="boolean")return Ut;if(typeof t=="number")return ze;if(t instanceof bt)return ao;if(t instanceof ep)return Wc;if(t instanceof Lr)return _l;if(t instanceof lo)return gl;if(Array.isArray(t)){const e=t.length;let i;for(const r of t){const o=Ji(r);if(i){if(i===o)continue;i=jt;break}i=o}return zr(i||jt,e)}return pa}function xl(t){const e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof bt||t instanceof Lr||t instanceof lo?t.toString():JSON.stringify(t)}class ip{constructor(e,i){this.type=e,this.value=i}static parse(e,i){if(e.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!fa(e[1]))return i.error("invalid value");const r=e[1];let o=Ji(r);const n=i.expectedType;return o.kind!=="array"||o.N!==0||!n||n.kind!=="array"||typeof n.N=="number"&&n.N!==0||(o=n),new ip(o,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof bt?["rgba"].concat(this.value.toArray()):this.value instanceof Lr?this.value.serialize():this.value}}var bl=ip,or=class{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}};const rp={string:Ft,number:ze,boolean:Ut,object:pa};class op{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");let r,o=1;const n=e[0];if(n==="array"){let a,l;if(e.length>2){const c=e[1];if(typeof c!="string"||!(c in rp)||c==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);a=rp[c],o++}else a=jt;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return i.error('The length argument to "array" must be a positive integer literal',2);l=e[2],o++}r=zr(a,l)}else r=rp[n];const s=[];for(;o<e.length;o++){const a=i.parse(e[o],o,jt);if(!a)return null;s.push(a)}return new op(r,s)}evaluate(e){for(let i=0;i<this.args.length;i++){const r=this.args[i].evaluate(e);if(!yl(this.type,Ji(r)))return r;if(i===this.args.length-1)throw new or(`Expected value to be of type ${Ni(this.type)}, but found ${Ni(Ji(r))} instead.`)}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,i=[e.kind];if(e.kind==="array"){const r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){i.push(r.kind);const o=e.N;(typeof o=="number"||this.args.length>1)&&i.push(o)}}return i.concat(this.args.map(r=>r.serialize()))}}var un=op;class wl{constructor(e){this.type=_l,this.sections=e}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return i.error("First argument must be an image or text section.");const o=[];let n=!1;for(let s=1;s<=e.length-1;++s){const a=e[s];if(n&&typeof a=="object"&&!Array.isArray(a)){n=!1;let l=null;if(a["font-scale"]&&(l=i.parse(a["font-scale"],1,ze),!l))return null;let c=null;if(a["text-font"]&&(c=i.parse(a["text-font"],1,zr(Ft)),!c))return null;let u=null;if(a["text-color"]&&(u=i.parse(a["text-color"],1,ao),!u))return null;const p=o[o.length-1];p.scale=l,p.font=c,p.textColor=u}else{const l=i.parse(e[s],1,jt);if(!l)return null;const c=l.type.kind;if(c!=="string"&&c!=="value"&&c!=="null"&&c!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,o.push({content:l,scale:null,font:null,textColor:null})}}return new wl(o)}evaluate(e){return new Lr(this.sections.map(i=>{const r=i.content.evaluate(e);return Ji(r)===gl?new tp("",r,null,null,null):new tp(xl(r),null,i.scale?i.scale.evaluate(e):null,i.font?i.font.evaluate(e).join(","):null,i.textColor?i.textColor.evaluate(e):null)}))}eachChild(e){for(const i of this.sections)e(i.content),i.scale&&e(i.scale),i.font&&e(i.font),i.textColor&&e(i.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const i of this.sections){e.push(i.content.serialize());const r={};i.scale&&(r["font-scale"]=i.scale.serialize()),i.font&&(r["text-font"]=i.font.serialize()),i.textColor&&(r["text-color"]=i.textColor.serialize()),e.push(r)}return e}}class Tl{constructor(e,i){this.type=gl,this.inputPrimary=e,this.inputSecondary=i}static parse(e,i){if(e.length<2)return i.error("Expected two or more arguments.");const r=i.parse(e[1],1,Ft);if(!r)return i.error("No image name provided.");if(e.length===2)return new Tl(r);const o=i.parse(e[2],1,Ft);return o?new Tl(r,o):i.error("Secondary image variant is not a string.")}evaluate(e){const i=lo.fromString(this.inputPrimary.evaluate(e),this.inputSecondary?this.inputSecondary.evaluate(e):void 0);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(i.namePrimary)>-1,i.nameSecondary&&i.available&&e.availableImages&&(i.available=e.availableImages.indexOf(i.nameSecondary)>-1)),i}eachChild(e){e(this.inputPrimary),this.inputSecondary&&e(this.inputSecondary)}outputDefined(){return!1}serialize(){return this.inputSecondary?["image",this.inputPrimary.serialize(),this.inputSecondary.serialize()]:["image",this.inputPrimary.serialize()]}}function Yt(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}const JE={"to-boolean":Ut,"to-color":ao,"to-number":ze,"to-string":Ft};class np{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expected at least one argument.");const r=e[0],o=[];let n=da;if(r==="to-array"){if(!Array.isArray(e[1]))return null;const s=e[1].length;if(i.expectedType){if(i.expectedType.kind!=="array")return i.error(`Expected ${i.expectedType.kind} but found array.`);n=zr(i.expectedType.itemType,s)}else{if(!(s>0&&fa(e[1][0])))return null;n=zr(Ji(e[1][0]),s)}for(let a=0;a<s;a++){const l=e[1][a];let c;if(Yt(l)==="array")c=i.parse(l,void 0,n.itemType);else{const u=Yt(l);if(u!==n.itemType.kind)return i.error(`Expected ${n.itemType.kind} but found ${u}.`);c=i.registry.literal.parse(["literal",l===void 0?null:l],i)}if(!c)return null;o.push(c)}}else{if((r==="to-boolean"||r==="to-string")&&e.length!==2)return i.error("Expected one argument.");n=JE[r];for(let s=1;s<e.length;s++){const a=i.parse(e[s],s,jt);if(!a)return null;o.push(a)}}return new np(n,o)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let i,r;for(const o of this.args){if(i=o.evaluate(e),r=null,i instanceof bt)return i;if(typeof i=="string"){const n=e.parseColor(i);if(n)return n}else if(Array.isArray(i)&&(r=i.length<3||i.length>4?`Invalid rbga value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ug(i[0],i[1],i[2],i[3]),!r))return new bt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new or(r||`Could not parse color from value '${typeof i=="string"?i:String(JSON.stringify(i))}'`)}if(this.type.kind==="number"){let i=null;for(const r of this.args){if(i=r.evaluate(e),i===null)return 0;const o=Number(i);if(!isNaN(o))return o}throw new or(`Could not convert ${JSON.stringify(i)} to number.`)}return this.type.kind==="formatted"?Lr.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?lo.fromString(xl(this.args[0].evaluate(e))):this.type.kind==="array"?this.args.map(i=>i.evaluate(e)):xl(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new wl([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Tl(this.args[0]).serialize();const e=this.type.kind==="array"?[]:[`to-${this.type.kind}`];return this.eachChild(i=>{e.push(i.serialize())}),e}}var Ss=np;const QE=["Unknown","Point","LineString","Polygon"];var qg=class{constructor(t){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null,this.options=t}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?QE[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}measureLight(t){return this.globals.brightness||0}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:i,y:r}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(i*e-t[0])+this.featureDistanceData.bearing[1]*(r*e-t[1])}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=bt.parse(t)),e}getConfig(t){return this.options?this.options.get(t):null}};class As{constructor(e,i,r,o,n){this.name=e,this.type=i,this._evaluate=r,this.args=o,this._overloadIndex=n}evaluate(e){if(!this._evaluate){const i=As.definitions[this.name];this._evaluate=Array.isArray(i)?i[2]:i.overloads[this._overloadIndex][1]}return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,i){const r=e[0],o=As.definitions[r];if(!o)return i.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(o)?o[0]:o.type,s=Array.isArray(o)?[[o[1],o[2]]]:o.overloads,a=[];let l=null,c=-1;for(const[u,p]of s){if(Array.isArray(u)&&u.length!==e.length-1)continue;a.push(u),c++,l=new sy(i.registry,i.path,null,i.scope,void 0,i.options);const f=[];let _=!1;for(let g=1;g<e.length;g++){const y=e[g],v=Array.isArray(u)?u[g-1]:u.type,b=l.parse(y,1+f.length,v);if(!b){_=!0;break}f.push(b)}if(!_)if(Array.isArray(u)&&u.length!==f.length)l.error(`Expected ${u.length} arguments, but found ${f.length} instead.`);else{for(let g=0;g<f.length;g++){const y=Array.isArray(u)?u[g]:u.type,v=f[g];l.concat(g+1).checkSubtype(y,v.type)}if(l.errors.length===0)return new As(r,n,p,f,c)}}if(a.length===1)i.errors.push(...l.errors);else{const u=(a.length?a:s.map(([f])=>f)).map(eS).join(" | "),p=[];for(let f=1;f<e.length;f++){const _=i.parse(e[f],1+p.length);if(!_)return null;p.push(Ni(_.type))}i.error(`Expected arguments of type ${u}, but found (${p.join(", ")}) instead.`)}return null}static register(e,i){As.definitions=i;for(const r in i)e[r]=As}}function eS(t){return Array.isArray(t)?`(${t.map(Ni).join(", ")})`:`(${Ni(t.type)}...)`}var Bo=As;class Xc{constructor(e,i,r){this.type=Wc,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=i}static parse(e,i){if(e.length!==2)return i.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return i.error("Collator options argument must be an object.");const o=i.parse(r["case-sensitive"]!==void 0&&r["case-sensitive"],1,Ut);if(!o)return null;const n=i.parse(r["diacritic-sensitive"]!==void 0&&r["diacritic-sensitive"],1,Ut);if(!n)return null;let s=null;return r.locale&&(s=i.parse(r.locale,1,Ft),!s)?null:new Xc(o,n,s)}evaluate(e){return new ep(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}var Gg={exports:{}};Gg.exports=function(){function t(r,o,n,s,a){for(;s>n;){if(s-n>600){var l=s-n+1,c=o-n+1,u=Math.log(l),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(l-p)/l)*(c-l/2<0?-1:1);t(r,o,Math.max(n,Math.floor(o-c*p/l+f)),Math.min(s,Math.floor(o+(l-c)*p/l+f)),a)}var _=r[o],g=n,y=s;for(e(r,n,o),a(r[s],_)>0&&e(r,n,s);g<y;){for(e(r,g,y),g++,y--;a(r[g],_)<0;)g++;for(;a(r[y],_)>0;)y--}a(r[n],_)===0?e(r,n,y):e(r,++y,s),y<=o&&(n=y+1),o<=y&&(s=y-1)}}function e(r,o,n){var s=r[o];r[o]=r[n],r[n]=s}function i(r,o){return r<o?-1:r>o?1:0}return function(r,o,n,s,a){t(r,o,n||0,s||r.length-1,a||i)}}();var tS=yt(Gg.exports);function iS(t){let e=0;for(let i,r,o=0,n=t.length,s=n-1;o<n;s=o++)i=t[o],r=t[s],e+=(r.x-i.x)*(i.y+r.y);return e}function El(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Sl(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function rS(t,e,i){const r=t[0]-e[0],o=t[1]-e[1],n=t[0]-i[0],s=t[1]-i[1];return r*s-n*o==0&&r*n<=0&&o*s<=0}function ma(t,e,i=!1){let r=!1;for(let a=0,l=e.length;a<l;a++){const c=e[a];for(let u=0,p=c.length,f=p-1;u<p;f=u++){const _=c[f],g=c[u];if(rS(t,_,g))return i;(n=_)[1]>(o=t)[1]!=(s=g)[1]>o[1]&&o[0]<(s[0]-n[0])*(o[1]-n[1])/(s[1]-n[1])+n[0]&&(r=!r)}}var o,n,s;return r}function $g(t,e,i,r){const o=r[0]-i[0],n=r[1]-i[1],s=(t[0]-i[0])*n-o*(t[1]-i[1]),a=(e[0]-i[0])*n-o*(e[1]-i[1]);return s>0&&a<0||s<0&&a>0}function Yc(t,e,i,r){return(o=[r[0]-i[0],r[1]-i[1]])[0]*(n=[e[0]-t[0],e[1]-t[1]])[1]-o[1]*n[0]!=0&&!(!$g(t,e,i,r)||!$g(i,r,t,e));var o,n}const Bn=8192;function oS(t,e){const i=(180+t[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,o=Math.pow(2,e.z);return[Math.round(i*o*Bn),Math.round(r*o*Bn)]}function nS(t,e){for(let i=0;i<e.length;i++)if(ma(t,e[i]))return!0;return!1}function sS(t,e,i){for(const r of i)for(let o=0,n=r.length,s=n-1;o<n;s=o++)if(Yc(t,e,r[s],r[o]))return!0;return!1}function Wg(t,e){for(let i=0;i<t.length;++i)if(!ma(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(sS(t[i],t[i+1],e))return!1;return!0}function aS(t,e){for(let i=0;i<e.length;i++)if(Wg(t,e[i]))return!0;return!1}function sp(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=[];for(let s=0;s<t[o].length;s++){const a=oS(t[o][s],i);El(e,a),n.push(a)}r.push(n)}return r}function Hg(t,e,i){const r=[];for(let o=0;o<t.length;o++){const n=sp(t[o],e,i);r.push(n)}return r}function Zg(t,e,i,r){if(t[0]<i[0]||t[0]>i[2]){const o=.5*r;let n=t[0]-i[0]>o?-r:i[0]-t[0]>o?r:0;n===0&&(n=t[0]-i[2]>o?-r:i[2]-t[0]>o?r:0),t[0]+=n}El(e,t)}function Xg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const a of t)for(const l of a){const c=[l.x+n[0],l.y+n[1]];Zg(c,e,i,o),s.push(c)}return s}function Yg(t,e,i,r){const o=Math.pow(2,r.z)*Bn,n=[r.x*Bn,r.y*Bn],s=[];if(!t)return s;for(const l of t){const c=[];for(const u of l){const p=[u.x+n[0],u.y+n[1]];El(e,p),c.push(p)}s.push(c)}if(e[2]-e[0]<=o/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const l of s)for(const c of l)Zg(c,e,i,o)}var a;return s}class Al{constructor(e,i){this.type=Ut,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection")for(let o=0;o<r.features.length;++o){const n=r.features[o].geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new Al(r,r.features[o].geometry)}else if(r.type==="Feature"){const o=r.geometry.type;if(o==="Polygon"||o==="MultiPolygon")return new Al(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new Al(r,r)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!ma(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Xg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!nS(c,a))return!1}return!0}(e,this.geometries);if(e.geometryType()==="LineString")return function(i,r){const o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],s=i.canonicalID();if(!s)return!1;if(r.type==="Polygon"){const a=sp(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!Wg(c,a))return!1}if(r.type==="MultiPolygon"){const a=Hg(r.coordinates,n,s),l=Yg(i.geometry(),o,n,s);if(!Sl(o,n))return!1;for(const c of l)if(!aS(c,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var ap=Al,Kg={exports:{}};Kg.exports=function(){var t={kilometers:1,miles:.621371192237334,nauticalmiles:.5399568034557235,meters:1e3,metres:1e3,yards:1093.6132983377079,feet:3280.839895013123,inches:39370.078740157485},e=1/298.257223563,i=e*(2-e),r=Math.PI/180,o=function(c,u){if(c===void 0)throw new Error("No latitude given.");if(u&&!t[u])throw new Error("Unknown unit "+u+". Use one of: "+Object.keys(t).join(", "));var p=6378.137*r*(u?t[u]:1),f=Math.cos(c*r),_=1/(1-i*(1-f*f)),g=Math.sqrt(_);this.kx=p*g*f,this.ky=p*g*_*(1-i)},n={units:{configurable:!0}};function s(c,u){return c[0]===u[0]&&c[1]===u[1]}function a(c,u,p){var f=l(u[0]-c[0]);return[c[0]+f*p,c[1]+(u[1]-c[1])*p]}function l(c){for(;c<-180;)c+=360;for(;c>180;)c-=360;return c}return o.fromTile=function(c,u,p){var f=Math.PI*(1-2*(c+.5)/Math.pow(2,u)),_=Math.atan(.5*(Math.exp(f)-Math.exp(-f)))/r;return new o(_,p)},n.units.get=function(){return t},o.prototype.distance=function(c,u){var p=l(c[0]-u[0])*this.kx,f=(c[1]-u[1])*this.ky;return Math.sqrt(p*p+f*f)},o.prototype.bearing=function(c,u){var p=l(u[0]-c[0])*this.kx;return Math.atan2(p,(u[1]-c[1])*this.ky)/r},o.prototype.destination=function(c,u,p){var f=p*r;return this.offset(c,Math.sin(f)*u,Math.cos(f)*u)},o.prototype.offset=function(c,u,p){return[c[0]+u/this.kx,c[1]+p/this.ky]},o.prototype.lineDistance=function(c){for(var u=0,p=0;p<c.length-1;p++)u+=this.distance(c[p],c[p+1]);return u},o.prototype.area=function(c){for(var u=0,p=0;p<c.length;p++)for(var f=c[p],_=0,g=f.length,y=g-1;_<g;y=_++)u+=l(f[_][0]-f[y][0])*(f[_][1]+f[y][1])*(p?-1:1);return Math.abs(u)/2*this.kx*this.ky},o.prototype.along=function(c,u){var p=0;if(u<=0)return c[0];for(var f=0;f<c.length-1;f++){var _=c[f],g=c[f+1],y=this.distance(_,g);if((p+=y)>u)return a(_,g,(u-(p-y))/y)}return c[c.length-1]},o.prototype.pointToSegmentDistance=function(c,u,p){var f=u[0],_=u[1],g=l(p[0]-f)*this.kx,y=(p[1]-_)*this.ky,v=0;return g===0&&y===0||((v=(l(c[0]-f)*this.kx*g+(c[1]-_)*this.ky*y)/(g*g+y*y))>1?(f=p[0],_=p[1]):v>0&&(f+=g/this.kx*v,_+=y/this.ky*v)),g=l(c[0]-f)*this.kx,y=(c[1]-_)*this.ky,Math.sqrt(g*g+y*y)},o.prototype.pointOnLine=function(c,u){for(var p,f,_,g,y=1/0,v=0;v<c.length-1;v++){var b=c[v][0],w=c[v][1],S=l(c[v+1][0]-b)*this.kx,A=(c[v+1][1]-w)*this.ky,E=0;S===0&&A===0||((E=(l(u[0]-b)*this.kx*S+(u[1]-w)*this.ky*A)/(S*S+A*A))>1?(b=c[v+1][0],w=c[v+1][1]):E>0&&(b+=S/this.kx*E,w+=A/this.ky*E));var M=(S=l(u[0]-b)*this.kx)*S+(A=(u[1]-w)*this.ky)*A;M<y&&(y=M,p=b,f=w,_=v,g=E)}return{point:[p,f],index:_,t:Math.max(0,Math.min(1,g))}},o.prototype.lineSlice=function(c,u,p){var f=this.pointOnLine(p,c),_=this.pointOnLine(p,u);if(f.index>_.index||f.index===_.index&&f.t>_.t){var g=f;f=_,_=g}var y=[f.point],v=f.index+1,b=_.index;!s(p[v],y[0])&&v<=b&&y.push(p[v]);for(var w=v+1;w<=b;w++)y.push(p[w]);return s(p[b],_.point)||y.push(_.point),y},o.prototype.lineSliceAlong=function(c,u,p){for(var f=0,_=[],g=0;g<p.length-1;g++){var y=p[g],v=p[g+1],b=this.distance(y,v);if((f+=b)>c&&_.length===0&&_.push(a(y,v,(c-(f-b))/b)),f>=u)return _.push(a(y,v,(u-(f-b))/b)),_;f>c&&_.push(v)}return _},o.prototype.bufferPoint=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[0]+f,c[1]+p]},o.prototype.bufferBBox=function(c,u){var p=u/this.ky,f=u/this.kx;return[c[0]-f,c[1]-p,c[2]+f,c[3]+p]},o.prototype.insideBBox=function(c,u){return l(c[0]-u[0])>=0&&l(c[0]-u[2])<=0&&c[1]>=u[1]&&c[1]<=u[3]},Object.defineProperties(o,n),o}();var lp=yt(Kg.exports),Jg={exports:{}};Jg.exports=function(){var t=function(i,r){if(i===void 0&&(i=[]),r===void 0&&(r=e),this.data=i,this.length=this.data.length,this.compare=r,this.length>0)for(var o=(this.length>>1)-1;o>=0;o--)this._down(o)};function e(i,r){return i<r?-1:i>r?1:0}return t.prototype.push=function(i){this.data.push(i),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(this.length!==0){var i=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),i}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(i){for(var r=this.data,o=this.compare,n=r[i];i>0;){var s=i-1>>1,a=r[s];if(o(n,a)>=0)break;r[i]=a,i=s}r[i]=n},t.prototype._down=function(i){for(var r=this.data,o=this.compare,n=this.length>>1,s=r[i];i<n;){var a=1+(i<<1),l=r[a],c=a+1;if(c<this.length&&o(r[c],l)<0&&(a=c,l=r[c]),o(l,s)>=0)break;r[i]=l,i=a}r[i]=s},t}();var cp=yt(Jg.exports),oe=8192;function Qg(t,e){return e.dist-t.dist}const up=100,hp=50;function ey(t){const e=[1/0,1/0,-1/0,-1/0];if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Kc(t){return t[1]-t[0]+1}function hn(t,e){const i=t[1]>=t[0]&&t[1]<e;return i||console.warn("Distance Expression: Index is out of range"),i}function dp(t,e){if(t[0]>t[1])return[null,null];const i=Kc(t);if(e){if(i===2)return[t,null];const r=Math.floor(i/2);return[[t[0],t[0]+r],[t[0]+r,t[1]]]}{if(i===1)return[t,null];const r=Math.floor(i/2)-1;return[[t[0],t[0]+r],[t[0]+r+1,t[1]]]}}function Ms(t,e){const i=[1/0,1/0,-1/0,-1/0];if(!hn(e,t.length))return i;for(let r=e[0];r<=e[1];++r)El(i,t[r]);return i}function Jc(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0;i<t.length;++i)for(let r=0;r<t[i].length;++r)El(e,t[i][r]);return e}function _a(t,e,i){if(ey(t)||ey(e))return NaN;let r=0,o=0;return t[2]<e[0]&&(r=e[0]-t[2]),t[0]>e[2]&&(r=t[0]-e[2]),t[1]>e[3]&&(o=t[1]-e[3]),t[3]<e[1]&&(o=e[1]-t[3]),i.distance([0,0],[r,o])}function pp(t,e){const i=Math.pow(2,e.z);return[(o=(t.x/oe+e.x)/i,360*o-180),(r=(t.y/oe+e.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*r)*Math.PI/180))-90)];var r,o}function lS(t,e){const i=[];for(let r=0;r<t.length;++r)i.push(pp(t[r],e));return i}function ty(t,e,i){const r=i.pointOnLine(e,t).point;return i.distance(t,r)}function iy(t,e,i,r,o){const n=i.slice(r[0],r[1]+1);let s=1/0;for(let a=e[0];a<=e[1];++a)if((s=Math.min(s,ty(t[a],n,o)))===0)return 0;return s}function fp(t,e,i,r,o){const n=Math.min(o.pointToSegmentDistance(t,i,r),o.pointToSegmentDistance(e,i,r)),s=Math.min(o.pointToSegmentDistance(i,t,e),o.pointToSegmentDistance(r,t,e));return Math.min(n,s)}function cS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<e[1];++s)for(let a=r[0];a<r[1];++a){if(Yc(t[s],t[s+1],i[a],i[a+1]))return 0;n=Math.min(n,fp(t[s],t[s+1],i[a],i[a+1],o))}return n}function uS(t,e,i,r,o){if(!hn(e,t.length)||!hn(r,i.length))return NaN;let n=1/0;for(let s=e[0];s<=e[1];++s)for(let a=r[0];a<=r[1];++a)if((n=Math.min(n,o.distance(t[s],i[a])))===0)return n;return n}function hS(t,e,i){if(ma(t,e,!0))return 0;let r=1/0;for(const o of e){const n=o.length;if(n<2)return console.warn("Distance Expression: Invalid polygon!"),NaN;if(o[0]!==o[n-1]&&(r=Math.min(r,i.pointToSegmentDistance(t,o[n-1],o[0])))===0||(r=Math.min(r,ty(t,o,i)))===0)return r}return r}function dS(t,e,i,r){if(!hn(e,t.length))return NaN;for(let n=e[0];n<=e[1];++n)if(ma(t[n],i,!0))return 0;let o=1/0;for(let n=e[0];n<e[1];++n)for(const s of i)for(let a=0,l=s.length,c=l-1;a<l;c=a++){if(Yc(t[n],t[n+1],s[c],s[a]))return 0;o=Math.min(o,fp(t[n],t[n+1],s[c],s[a],r))}return o}function ry(t,e){for(const i of t)for(let r=0;r<=i.length-1;++r)if(ma(i[r],e,!0))return!0;return!1}function pS(t,e,i,r=1/0){const o=Jc(t),n=Jc(e);if(r!==1/0&&_a(o,n,i)>=r)return r;if(Sl(o,n)){if(ry(t,e))return 0}else if(ry(e,t))return 0;let s=r;for(const a of t)for(let l=0,c=a.length,u=c-1;l<c;u=l++)for(const p of e)for(let f=0,_=p.length,g=_-1;f<_;g=f++){if(Yc(a[u],a[l],p[g],p[f]))return 0;s=Math.min(s,fp(a[u],a[l],p[g],p[f],i))}return s}function Qc(t,e,i,r,o,n,s){if(n===null||s===null)return;const a=_a(Ms(r,n),Ms(o,s),i);a<e&&t.push({dist:a,range1:n,range2:s})}function fS(t,e,i,r,o=1/0){let n=Math.min(r.distance(t[0],i[0][0]),o);if(n===0)return n;const s=new cp([{dist:0,range1:[0,t.length-1],range2:[0,0]}],Qg),a=e?hp:up,l=Jc(i);for(;s.length;){const c=s.pop();if(c.dist>=n)continue;const u=c.range1;if(Kc(u)<=a){if(!hn(u,t.length))return NaN;if(e){const p=dS(t,u,i,r);if((n=Math.min(n,p))===0)return n}else for(let p=u[0];p<=u[1];++p){const f=hS(t[p],i,r);if((n=Math.min(n,f))===0)return n}}else{const p=dp(u,e);if(p[0]!==null){const f=_a(Ms(t,p[0]),l,r);f<n&&s.push({dist:f,range1:p[0],range2:[0,0]})}if(p[1]!==null){const f=_a(Ms(t,p[1]),l,r);f<n&&s.push({dist:f,range1:p[1],range2:[0,0]})}}}return n}function oy(t,e,i,r,o,n=1/0){let s=Math.min(n,o.distance(t[0],i[0]));if(s===0)return s;const a=new cp([{dist:0,range1:[0,t.length-1],range2:[0,i.length-1]}],Qg),l=e?hp:up,c=r?hp:up;for(;a.length;){const u=a.pop();if(u.dist>=s)continue;const p=u.range1,f=u.range2;if(Kc(p)<=l&&Kc(f)<=c){if(!hn(p,t.length)||!hn(f,i.length))return NaN;if(e&&r?s=Math.min(s,cS(t,p,i,f,o)):e||r?e&&!r?s=Math.min(s,iy(i,f,t,p,o)):!e&&r&&(s=Math.min(s,iy(t,p,i,f,o))):s=Math.min(s,uS(t,p,i,f,o)),s===0)return s}else{const _=dp(p,e),g=dp(f,r);Qc(a,s,o,t,i,_[0],g[0]),Qc(a,s,o,t,i,_[0],g[1]),Qc(a,s,o,t,i,_[1],g[0]),Qc(a,s,o,t,i,_[1],g[1])}}return s}function mp(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i)if(!(n!==1/0&&_a(s,Ms(a,[0,a.length-1]),r)>=n)&&(n=Math.min(n,oy(t,e,a,!0,r,n)),n===0))return n;return n}function eu(t,e,i,r,o=1/0){let n=o;const s=Ms(t,[0,t.length-1]);for(const a of i){if(n!==1/0&&_a(s,Jc(a),r)>=n)continue;const l=fS(t,e,a,r,n);if(isNaN(l))return l;if((n=Math.min(n,l))===0)return n}return n}function _p(t){return t==="Point"||t==="MultiPoint"||t==="LineString"||t==="MultiLineString"||t==="Polygon"||t==="MultiPolygon"}class Ml{constructor(e,i){this.type=ze,this.geojson=e,this.geometries=i}static parse(e,i){if(e.length!==2)return i.error(`'distance' expression requires either one argument, but found ' ${e.length-1} instead.`);if(fa(e[1])){const r=e[1];if(r.type==="FeatureCollection"){for(let o=0;o<r.features.length;++o)if(_p(r.features[o].geometry.type))return new Ml(r,r.features[o].geometry)}else if(r.type==="Feature"){if(_p(r.geometry.type))return new Ml(r,r.geometry)}else if(_p(r.type))return new Ml(r,r)}return i.error("'distance' expression needs to be an array with format ['Distance', GeoJSONObj].")}evaluate(e){const i=e.geometry(),r=e.canonicalID();if(i!=null&&r!=null){if(e.geometryType()==="Point")return function(o,n,s){const a=[];for(const c of o)for(const u of c)a.push(pp(u,n));const l=new lp(a[0][1],"meters");return s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString"?oy(a,!1,s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",l):s.type==="MultiLineString"?mp(a,!1,s.coordinates,l):s.type==="Polygon"||s.type==="MultiPolygon"?eu(a,!1,s.type==="Polygon"?[s.coordinates]:s.coordinates,l):null}(i,r,this.geometries);if(e.geometryType()==="LineString")return function(o,n,s){const a=[];for(const c of o){const u=[];for(const p of c)u.push(pp(p,n));a.push(u)}const l=new lp(a[0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return mp(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=mp(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}if(s.type==="Polygon"||s.type==="MultiPolygon"){let c=1/0;for(let u=0;u<a.length;u++){const p=eu(a[u],!0,s.type==="Polygon"?[s.coordinates]:s.coordinates,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return null}(i,r,this.geometries);if(e.geometryType()==="Polygon")return function(o,n,s){const a=[];for(const c of function(u,p){const f=u.length;if(f<=1)return[u];const _=[];let g,y;for(let v=0;v<f;v++){const b=iS(u[v]);b!==0&&(u[v].area=Math.abs(b),y===void 0&&(y=b<0),y===b<0?(g&&_.push(g),g=[u[v]]):g.push(u[v]))}return g&&_.push(g),_}(o)){const u=[];for(let p=0;p<c.length;++p)u.push(lS(c[p],n));a.push(u)}const l=new lp(a[0][0][0][1],"meters");if(s.type==="Point"||s.type==="MultiPoint"||s.type==="LineString")return eu(s.type==="Point"?[s.coordinates]:s.coordinates,s.type==="LineString",a,l);if(s.type==="MultiLineString"){let c=1/0;for(let u=0;u<s.coordinates.length;u++){const p=eu(s.coordinates[u],!0,a,l,c);if(isNaN(p))return p;if((c=Math.min(c,p))===0)return c}return c}return s.type==="Polygon"||s.type==="MultiPolygon"?function(c,u,p){let f=1/0;for(const _ of c)for(const g of u){const y=pS(_,g,p,f);if(isNaN(y))return y;if((f=Math.min(f,y))===0)return f}return f}(s.type==="Polygon"?[s.coordinates]:s.coordinates,a,l):null}(i,r,this.geometries);console.warn("Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.")}else console.warn("Distance Expression: requirs valid feature and canonical information.");return null}eachChild(){}outputDefined(){return!0}serialize(){return["distance",this.geojson]}}var gp=Ml;function ga(t){if(t instanceof Bo&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof ap||t instanceof gp)return!1;let e=!0;return t.eachChild(i=>{e&&!ga(i)&&(e=!1)}),e}function Il(t){if(t instanceof Bo&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(i=>{e&&!Il(i)&&(e=!1)}),e}function yp(t){if(t instanceof Bo&&t.name==="config")return!1;let e=!0;return t.eachChild(i=>{e&&!yp(i)&&(e=!1)}),e}function ya(t,e){if(t instanceof Bo&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild(r=>{i&&!ya(r,e)&&(i=!1)}),i}class vp{constructor(e,i){this.type=i.type,this.name=e,this.boundExpression=i}static parse(e,i){if(e.length!==2||typeof e[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const r=e[1];return i.scope.has(r)?new vp(r,i.scope.get(r)):i.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var ny=vp;class xp{constructor(e,i=[],r,o=new YE,n=[],s){this.registry=e,this.path=i,this.key=i.map(a=>`[${a}]`).join(""),this.scope=o,this.errors=n,this.expectedType=r,this.options=s}parse(e,i,r,o,n={}){return i||r?this.concat(i,r,o)._parse(e,n):this._parse(e,n)}_parse(e,i){function r(o,n,s){return s==="assert"?new un(n,[o]):s==="coerce"?new Ss(n,[o]):o}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const o=typeof e[0]=="string"?this.registry[e[0]]:void 0;if(o){let n=o.parse(e,this);if(!n)return null;if(this.expectedType){const s=this.expectedType,a=n.type;if(s.kind!=="string"&&s.kind!=="number"&&s.kind!=="boolean"&&s.kind!=="object"&&s.kind!=="array"||a.kind!=="value")if(s.kind!=="color"&&s.kind!=="formatted"&&s.kind!=="resolvedImage"||a.kind!=="value"&&a.kind!=="string"){if(this.checkSubtype(s,a))return null}else n=r(n,s,i.typeAnnotation||"coerce");else n=r(n,s,i.typeAnnotation||"assert")}if(!(n instanceof bl)&&n.type.kind!=="resolvedImage"&&bp(n)){const s=new qg(this.options);try{n=new bl(n.type,n.evaluate(s))}catch(a){return this.error(a.message),null}}return n}return Ss.parse(["to-array",e],this)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,i,r){const o=typeof e=="number"?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new xp(this.registry,o,i||null,n,this.errors,this.options)}error(e,...i){const r=`${this.key}${i.map(o=>`[${o}]`).join("")}`;this.errors.push(new Oo(r,e))}checkSubtype(e,i){const r=yl(e,i);return r&&this.error(r),r}}var sy=xp;function bp(t){if(t instanceof ny)return bp(t.boundExpression);if(t instanceof Bo&&t.name==="error"||t instanceof Bo&&t.name==="config"||t instanceof Xc||t instanceof ap||t instanceof gp)return!1;const e=t instanceof Ss||t instanceof un;let i=!0;return t.eachChild(r=>{i=e?i&&bp(r):i&&r instanceof bl}),!!i&&ga(t)&&ya(t,["zoom","heatmap-density","line-progress","raster-value","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center","measure-light"])}function tu(t,e){const i=t.length-1;let r,o,n=0,s=i,a=0;for(;n<=s;)if(a=Math.floor((n+s)/2),r=t[a],o=t[a+1],r<=e){if(a===i||e<o)return a;n=a+1}else{if(!(r>e))throw new or("Input is not a number.");s=a-1}return 0}class wp{constructor(e,i,r){this.type=e,this.input=i,this.labels=[],this.outputs=[];for(const[o,n]of r)this.labels.push(o),this.outputs.push(n)}static parse(e,i){if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=[];let n=null;i.expectedType&&i.expectedType.kind!=="value"&&(n=i.expectedType);for(let s=1;s<e.length;s+=2){const a=s===1?-1/0:e[s],l=e[s+1],c=s,u=s+1;if(typeof a!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',c);if(o.length&&o[o.length-1][0]>=a)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);const p=i.parse(l,u,n);if(!p)return null;n=n||p.type,o.push([a,p])}return new wp(n,r,o)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;return o>=i[n-1]?r[n-1].evaluate(e):r[tu(i,o)].evaluate(e)}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let i=0;i<this.labels.length;i++)i>0&&e.push(this.labels[i]),e.push(this.outputs[i].serialize());return e}}var Tp=wp;function rt(t,e,i){return t*(1-i)+e*i}function ay(t,e,i){return t.map((r,o)=>rt(r,e[o],i))}var iu=Object.freeze({__proto__:null,array:ay,color:function(t,e,i){return new bt(rt(t.r,e.r,i),rt(t.g,e.g,i),rt(t.b,e.b,i),rt(t.a,e.a,i))},number:rt});const ly=.95047,cy=1.08883,uy=4/29,va=6/29,hy=3*va*va,mS=va*va*va,_S=Math.PI/180,gS=180/Math.PI;function Ep(t){return t>mS?Math.pow(t,1/3):t/hy+uy}function Sp(t){return t>va?t*t*t:hy*(t-uy)}function Ap(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mp(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dy(t){const e=Mp(t.r),i=Mp(t.g),r=Mp(t.b),o=Ep((.4124564*e+.3575761*i+.1804375*r)/ly),n=Ep((.2126729*e+.7151522*i+.072175*r)/1);return{l:116*n-16,a:500*(o-n),b:200*(n-Ep((.0193339*e+.119192*i+.9503041*r)/cy)),alpha:t.a}}function py(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,r=isNaN(t.b)?e:e-t.b/200;return e=1*Sp(e),i=ly*Sp(i),r=cy*Sp(r),new bt(Ap(3.2404542*i-1.5371385*e-.4985314*r),Ap(-.969266*i+1.8760108*e+.041556*r),Ap(.0556434*i-.2040259*e+1.0572252*r),t.alpha)}function yS(t,e,i){const r=e-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}const Cl={forward:dy,reverse:py,interpolate:function(t,e,i){return{l:rt(t.l,e.l,i),a:rt(t.a,e.a,i),b:rt(t.b,e.b,i),alpha:rt(t.alpha,e.alpha,i)}}},kl={forward:function(t){const{l:e,a:i,b:r}=dy(t),o=Math.atan2(r,i)*gS;return{h:o<0?o+360:o,c:Math.sqrt(i*i+r*r),l:e,alpha:t.a}},reverse:function(t){const e=t.h*_S,i=t.c;return py({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:yS(t.h,e.h,i),c:rt(t.c,e.c,i),l:rt(t.l,e.l,i),alpha:rt(t.alpha,e.alpha,i)}}};var fy=Object.freeze({__proto__:null,hcl:kl,lab:Cl});class ru{constructor(e,i,r,o,n){this.type=e,this.operator=i,this.interpolation=r,this.input=o,this.labels=[],this.outputs=[];for(const[s,a]of n)this.labels.push(s),this.outputs.push(a)}static interpolationFactor(e,i,r,o){let n=0;if(e.name==="exponential")n=Ip(i,e.base,r,o);else if(e.name==="linear")n=Ip(i,1,r,o);else if(e.name==="cubic-bezier"){const s=e.controlPoints;n=new qe(s[0],s[1],s[2],s[3]).solve(Ip(i,1,r,o))}return n}static parse(e,i){let[r,o,n,...s]=e;if(!Array.isArray(o)||o.length===0)return i.error("Expected an interpolation type expression.",1);if(o[0]==="linear")o={name:"linear"};else if(o[0]==="exponential"){const c=o[1];if(typeof c!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);o={name:"exponential",base:c}}else{if(o[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(o[0])}`,1,0);{const c=o.slice(1);if(c.length!==4||c.some(u=>typeof u!="number"||u<0||u>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);o={name:"cubic-bezier",controlPoints:c}}}if(e.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(n=i.parse(n,2,ze),!n)return null;const a=[];let l=null;r==="interpolate-hcl"||r==="interpolate-lab"?l=ao:i.expectedType&&i.expectedType.kind!=="value"&&(l=i.expectedType);for(let c=0;c<s.length;c+=2){const u=s[c],p=s[c+1],f=c+3,_=c+4;if(typeof u!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(a.length&&a[a.length-1][0]>=u)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);const g=i.parse(p,_,l);if(!g)return null;l=l||g.type,a.push([u,g])}return l.kind==="number"||l.kind==="color"||l.kind==="array"&&l.itemType.kind==="number"&&typeof l.N=="number"?new ru(l,r,o,n,a):i.error(`Type ${Ni(l)} is not interpolatable.`)}evaluate(e){const i=this.labels,r=this.outputs;if(i.length===1)return r[0].evaluate(e);const o=this.input.evaluate(e);if(o<=i[0])return r[0].evaluate(e);const n=i.length;if(o>=i[n-1])return r[n-1].evaluate(e);const s=tu(i,o),a=ru.interpolationFactor(this.interpolation,o,i[s],i[s+1]),l=r[s].evaluate(e),c=r[s+1].evaluate(e);return this.operator==="interpolate"?iu[this.type.kind.toLowerCase()](l,c,a):this.operator==="interpolate-hcl"?kl.reverse(kl.interpolate(kl.forward(l),kl.forward(c),a)):Cl.reverse(Cl.interpolate(Cl.forward(l),Cl.forward(c),a))}eachChild(e){e(this.input);for(const i of this.outputs)e(i)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;e=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const i=[this.operator,e,this.input.serialize()];for(let r=0;r<this.labels.length;r++)i.push(this.labels[r],this.outputs[r].serialize());return i}}function Ip(t,e,i,r){const o=r-i,n=t-i;return o===0?0:e===1?n/o:(Math.pow(e,n)-1)/(Math.pow(e,o)-1)}var Fo=ru;class Cp{constructor(e,i){this.type=e,this.args=i}static parse(e,i){if(e.length<2)return i.error("Expectected at least one argument.");let r=null;const o=i.expectedType;o&&o.kind!=="value"&&(r=o);const n=[];for(const a of e.slice(1)){const l=i.parse(a,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,n.push(l)}const s=o&&n.some(a=>yl(o,a.type));return new Cp(s?jt:r,n)}evaluate(e){let i,r=null,o=0;for(const n of this.args){if(o++,r=n.evaluate(e),r&&r instanceof lo&&!r.available&&(i||(i=r),r=null,o===this.args.length))return i;if(r!==null)break}return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var my=Cp;class kp{constructor(e,i){this.type=i.type,this.bindings=[].concat(e),this.result=i}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const i of this.bindings)e(i[1]);e(this.result)}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let n=1;n<e.length-1;n+=2){const s=e[n];if(typeof s!="string")return i.error(`Expected string, but found ${typeof s} instead.`,n);if(/[^a-zA-Z0-9_]/.test(s))return i.error("Variable names must contain only alphanumeric characters or '_'.",n);const a=i.parse(e[n+1],n+1);if(!a)return null;r.push([s,a])}const o=i.parse(e[e.length-1],e.length-1,i.expectedType,r);return o?new kp(r,o):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[i,r]of this.bindings)e.push(i,r.serialize());return e.push(this.result.serialize()),e}}var _y=kp;class Pp{constructor(e,i,r){this.type=e,this.index=i,this.input=r}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,ze),o=i.parse(e[2],2,zr(i.expectedType||jt));return r&&o?new Pp(o.type.itemType,r,o):null}evaluate(e){const i=this.index.evaluate(e),r=this.input.evaluate(e);if(i<0)throw new or(`Array index out of bounds: ${i} < 0.`);if(i>=r.length)throw new or(`Array index out of bounds: ${i} > ${r.length-1}.`);if(i!==Math.floor(i))throw new or(`Array index must be an integer, but found ${i} instead.`);return r[i]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var vS=Pp;class Dp{constructor(e,i){this.type=Ut,this.needle=e,this.haystack=i}static parse(e,i){if(e.length!==3)return i.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);return r&&o?Yd(r.type,[Ut,Ft,ze,da,jt])?new Dp(r,o):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`):null}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(r==null)return!1;if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);return r.indexOf(i)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var xS=Dp;class ou{constructor(e,i,r){this.type=ze,this.needle=e,this.haystack=i,this.fromIndex=r}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,jt);if(!r||!o)return null;if(!Yd(r.type,[Ut,Ft,ze,da,jt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new ou(r,o,n):null}return new ou(r,o)}evaluate(e){const i=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!vl(i,["boolean","string","number","null"]))throw new or(`Expected first argument to be of type boolean, string, number or null, but found ${Ni(Ji(i))} instead.`);if(!vl(r,["string","array"]))throw new or(`Expected second argument to be of type array or string, but found ${Ni(Ji(r))} instead.`);if(this.fromIndex){const o=this.fromIndex.evaluate(e);return r.indexOf(i,o)}return r.indexOf(i)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var bS=ou;class zp{constructor(e,i,r,o,n,s){this.inputType=e,this.type=i,this.input=r,this.cases=o,this.outputs=n,this.otherwise=s}static parse(e,i){if(e.length<5)return i.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return i.error("Expected an even number of arguments.");let r,o;i.expectedType&&i.expectedType.kind!=="value"&&(o=i.expectedType);const n={},s=[];for(let c=2;c<e.length-1;c+=2){let u=e[c];const p=e[c+1];Array.isArray(u)||(u=[u]);const f=i.concat(c);if(u.length===0)return f.error("Expected at least one branch label.");for(const g of u){if(typeof g!="number"&&typeof g!="string")return f.error("Branch labels must be numbers or strings.");if(typeof g=="number"&&Math.abs(g)>Number.MAX_SAFE_INTEGER)return f.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof g=="number"&&Math.floor(g)!==g)return f.error("Numeric branch labels must be integer values.");if(r){if(f.checkSubtype(r,Ji(g)))return null}else r=Ji(g);if(n[String(g)]!==void 0)return f.error("Branch labels must be unique.");n[String(g)]=s.length}const _=i.parse(p,c,o);if(!_)return null;o=o||_.type,s.push(_)}const a=i.parse(e[1],1,jt);if(!a)return null;const l=i.parse(e[e.length-1],e.length-1,o);return l?a.type.kind!=="value"&&i.concat(1).checkSubtype(r,a.type)?null:new zp(r,o,a,n,s,l):null}evaluate(e){const i=this.input.evaluate(e);return(Ji(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],i=Object.keys(this.cases).sort(),r=[],o={};for(const s of i){const a=o[this.cases[s]];a===void 0?(o[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}const n=s=>this.inputType.kind==="number"?Number(s):s;for(const[s,a]of r)e.push(a.length===1?n(a[0]):a.map(n)),e.push(this.outputs[s].serialize());return e.push(this.otherwise.serialize()),e}}var wS=zp;class Rp{constructor(e,i,r){this.type=e,this.branches=i,this.otherwise=r}static parse(e,i){if(e.length<4)return i.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return i.error("Expected an odd number of arguments.");let r;i.expectedType&&i.expectedType.kind!=="value"&&(r=i.expectedType);const o=[];for(let s=1;s<e.length-1;s+=2){const a=i.parse(e[s],s,Ut);if(!a)return null;const l=i.parse(e[s+1],s+1,r);if(!l)return null;o.push([a,l]),r=r||l.type}const n=i.parse(e[e.length-1],e.length-1,r);return n?new Rp(r,o,n):null}evaluate(e){for(const[i,r]of this.branches)if(i.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[i,r]of this.branches)e(i),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,i])=>i.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(i=>{e.push(i.serialize())}),e}}var TS=Rp;class nu{constructor(e,i,r,o){this.type=e,this.input=i,this.beginIndex=r,this.endIndex=o}static parse(e,i){if(e.length<=2||e.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=i.parse(e[1],1,jt),o=i.parse(e[2],2,ze);if(!r||!o)return null;if(!Yd(r.type,[zr(jt),Ft,jt]))return i.error(`Expected first argument to be of type array or string, but found ${Ni(r.type)} instead`);if(e.length===4){const n=i.parse(e[3],3,ze);return n?new nu(r.type,r,o,n):null}return new nu(r.type,r,o)}evaluate(e){const i=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!vl(i,["string","array"]))throw new or(`Expected first argument to be of type array or string, but found ${Ni(Ji(i))} instead.`);if(this.endIndex){const o=this.endIndex.evaluate(e);return i.slice(r,o)}return i.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var ES=nu;function gy(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function yy(t,e,i,r){return r.compare(e,i)===0}function xa(t,e,i){const r=t!=="=="&&t!=="!=";return class TT{constructor(n,s,a){this.type=Ut,this.lhs=n,this.rhs=s,this.collator=a,this.hasUntypedArgument=n.type.kind==="value"||s.type.kind==="value"}static parse(n,s){if(n.length!==3&&n.length!==4)return s.error("Expected two or three arguments.");const a=n[0];let l=s.parse(n[1],1,jt);if(!l)return null;if(!gy(a,l.type))return s.concat(1).error(`"${a}" comparisons are not supported for type '${Ni(l.type)}'.`);let c=s.parse(n[2],2,jt);if(!c)return null;if(!gy(a,c.type))return s.concat(2).error(`"${a}" comparisons are not supported for type '${Ni(c.type)}'.`);if(l.type.kind!==c.type.kind&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error(`Cannot compare types '${Ni(l.type)}' and '${Ni(c.type)}'.`);r&&(l.type.kind==="value"&&c.type.kind!=="value"?l=new un(c.type,[l]):l.type.kind!=="value"&&c.type.kind==="value"&&(c=new un(l.type,[c])));let u=null;if(n.length===4){if(l.type.kind!=="string"&&c.type.kind!=="string"&&l.type.kind!=="value"&&c.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(u=s.parse(n[3],3,Wc),!u)return null}return new TT(l,c,u)}evaluate(n){const s=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!==c.kind||l.kind!=="string"&&l.kind!=="number")throw new or(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${c.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const l=Ji(s),c=Ji(a);if(l.kind!=="string"||c.kind!=="string")return e(n,s,a)}return this.collator?i(n,s,a,this.collator.evaluate(n)):e(n,s,a)}eachChild(n){n(this.lhs),n(this.rhs),this.collator&&n(this.collator)}outputDefined(){return!0}serialize(){const n=[t];return this.eachChild(s=>{n.push(s.serialize())}),n}}}const SS=xa("==",function(t,e,i){return e===i},yy),AS=xa("!=",function(t,e,i){return e!==i},function(t,e,i,r){return!yy(0,e,i,r)}),MS=xa("<",function(t,e,i){return e<i},function(t,e,i,r){return r.compare(e,i)<0}),IS=xa(">",function(t,e,i){return e>i},function(t,e,i,r){return r.compare(e,i)>0}),CS=xa("<=",function(t,e,i){return e<=i},function(t,e,i,r){return r.compare(e,i)<=0}),kS=xa(">=",function(t,e,i){return e>=i},function(t,e,i,r){return r.compare(e,i)>=0});class Lp{constructor(e,i,r,o,n,s){this.type=Ft,this.number=e,this.locale=i,this.currency=r,this.unit=o,this.minFractionDigits=n,this.maxFractionDigits=s}static parse(e,i){if(e.length!==3)return i.error("Expected two arguments.");const r=i.parse(e[1],1,ze);if(!r)return null;const o=e[2];if(typeof o!="object"||Array.isArray(o))return i.error("NumberFormat options argument must be an object.");let n=null;if(o.locale&&(n=i.parse(o.locale,1,Ft),!n))return null;let s=null;if(o.currency&&(s=i.parse(o.currency,1,Ft),!s))return null;let a=null;if(o.unit&&(a=i.parse(o.unit,1,Ft),!a))return null;let l=null;if(o["min-fraction-digits"]&&(l=i.parse(o["min-fraction-digits"],1,ze),!l))return null;let c=null;return o["max-fraction-digits"]&&(c=i.parse(o["max-fraction-digits"],1,ze),!c)?null:new Lp(r,n,s,a,l,c)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class Op{constructor(e){this.type=ze,this.input=e}static parse(e,i){if(e.length!==2)return i.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=i.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${Ni(r.type)} instead.`):new Op(r):null}evaluate(e){const i=this.input.evaluate(e);if(typeof i=="string"||Array.isArray(i))return i.length;throw new or(`Expected value to be of type string or array, but found ${Ni(Ji(i))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(i=>{e.push(i.serialize())}),e}}function Bp(t){return function(){t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}const vy={"==":SS,"!=":AS,">":IS,"<":MS,">=":kS,"<=":CS,array:un,at:vS,boolean:un,case:TS,coalesce:my,collator:Xc,format:wl,image:Tl,in:xS,"index-of":bS,interpolate:Fo,"interpolate-hcl":Fo,"interpolate-lab":Fo,length:Op,let:_y,literal:bl,match:wS,number:un,"number-format":Lp,object:un,slice:ES,step:Tp,string:un,"to-boolean":Ss,"to-color":Ss,"to-number":Ss,"to-string":Ss,var:ny,within:ap,distance:gp};function xy(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=Ug(e,i,r,n);if(s)throw new or(s);return new bt(e/255*n,i/255*n,r/255*n,n)}function by(t,[e,i,r,o]){e=e.evaluate(t),i=i.evaluate(t),r=r.evaluate(t);const n=o?o.evaluate(t):1,s=function(c,u,p,f){return typeof c=="number"&&c>=0&&c<=360?typeof u=="number"&&u>=0&&u<=100&&typeof p=="number"&&p>=0&&p<=100?f===void 0||typeof f=="number"&&f>=0&&f<=1?null:`Invalid hsla value [${[c,u,p,f].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 's', and 'l' must be between 0 and 100.`:`Invalid hsla value [${(typeof f=="number"?[c,u,p,f]:[c,u,p]).join(", ")}]: 'h' must be between 0 and 360.`}(e,i,r,n);if(s)throw new or(s);const a=`hsla(${e}, ${i}%, ${r}%, ${n})`,l=bt.parse(a);if(!l)throw new or(`Failed to parse HSLA color: ${a}`);return l}function wy(t,e){return t in e}function Fp(t,e){const i=e[t];return i===void 0?null:i}function Ty(t,e){switch(t){case"string":return String(e);case"number":return+e;case"boolean":return!!e;case"color":return bt.parse(e)}return e}function Ey(t,e,i,r){return r!==void 0&&(t=r*Math.round(t/r)),e!==void 0&&t<e&&(t=e),i!==void 0&&t>i&&(t=i),t}function Sy(t,e,i){i.length&&(e+=`${i}`);const r=t.getConfig(e);if(!r)return null;const{type:o,value:n,values:s,minValue:a,maxValue:l,stepValue:c}=r,u=r.default.evaluate(t);let p=n?n.evaluate(t):u;return o&&(p=Ty(o,p)),n!==void 0&&p!==void 0&&s&&!s.includes(p)&&(p=u,o&&(p=Ty(o,p))),p===void 0||a===void 0&&l===void 0&&c===void 0||(typeof p=="number"?p=Ey(p,a,l,c):Array.isArray(p)&&(p=p.map(f=>typeof f=="number"?Ey(f,a,l,c):f))),p}function Is(t){return{type:t}}Bo.register(vy,{error:[{kind:"error"},[Ft],(t,[e])=>{throw new or(e.evaluate(t))}],typeof:[Ft,[jt],(t,[e])=>Ni(Ji(e.evaluate(t)))],"to-rgba":[zr(ze,4),[ao],(t,[e])=>e.evaluate(t).toArray()],rgb:[ao,[ze,ze,ze],xy],rgba:[ao,[ze,ze,ze,ze],xy],hsl:[ao,[ze,ze,ze],by],hsla:[ao,[ze,ze,ze,ze],by],has:{type:Ut,overloads:[[[Ft],(t,[e])=>wy(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>wy(e.evaluate(t),i.evaluate(t))]]},get:{type:jt,overloads:[[[Ft],(t,[e])=>Fp(e.evaluate(t),t.properties())],[[Ft,pa],(t,[e,i])=>Fp(e.evaluate(t),i.evaluate(t))]]},config:{type:jt,overloads:[[[Ft],(t,[e])=>Sy(t,e.evaluate(t),"")],[[Ft,Ft],(t,[e,i])=>Sy(t,e.evaluate(t),i.evaluate(t))]]},"feature-state":[jt,[Ft],(t,[e])=>Fp(e.evaluate(t),t.featureState||{})],properties:[pa,[],t=>t.properties()],"geometry-type":[Ft,[],t=>t.geometryType()],id:[jt,[],t=>t.id()],zoom:[ze,[],t=>t.globals.zoom],pitch:[ze,[],t=>t.globals.pitch||0],"distance-from-center":[ze,[],t=>t.distanceFromCenter()],"measure-light":[ze,[Ft],(t,[e])=>t.measureLight(e.evaluate(t))],"heatmap-density":[ze,[],t=>t.globals.heatmapDensity||0],"line-progress":[ze,[],t=>t.globals.lineProgress||0],"raster-value":[ze,[],t=>t.globals.rasterValue||0],"sky-radial-progress":[ze,[],t=>t.globals.skyRadialProgress||0],accumulated:[jt,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[ze,Is(ze),(t,e)=>{let i=0;for(const r of e)i+=r.evaluate(t);return i}],"*":[ze,Is(ze),(t,e)=>{let i=1;for(const r of e)i*=r.evaluate(t);return i}],"-":{type:ze,overloads:[[[ze,ze],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[ze],(t,[e])=>-e.evaluate(t)]]},"/":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[ze,[ze,ze],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[ze,[],()=>Math.LN2],pi:[ze,[],()=>Math.PI],e:[ze,[],()=>Math.E],"^":[ze,[ze,ze],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[ze,[ze],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))],log2:[ze,[ze],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[ze,[ze],(t,[e])=>Math.sin(e.evaluate(t))],cos:[ze,[ze],(t,[e])=>Math.cos(e.evaluate(t))],tan:[ze,[ze],(t,[e])=>Math.tan(e.evaluate(t))],asin:[ze,[ze],(t,[e])=>Math.asin(e.evaluate(t))],acos:[ze,[ze],(t,[e])=>Math.acos(e.evaluate(t))],atan:[ze,[ze],(t,[e])=>Math.atan(e.evaluate(t))],min:[ze,Is(ze),(t,e)=>Math.min(...e.map(i=>i.evaluate(t)))],max:[ze,Is(ze),(t,e)=>Math.max(...e.map(i=>i.evaluate(t)))],abs:[ze,[ze],(t,[e])=>Math.abs(e.evaluate(t))],round:[ze,[ze],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[ze,[ze],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[ze,[ze],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Ut,[Ft,jt],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Ut,[jt],(t,[e])=>t.id()===e.value],"filter-type-==":[Ut,[Ft],(t,[e])=>t.geometryType()===e.value],"filter-<":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<o}],"filter-id-<":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<r}],"filter->":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>o}],"filter-id->":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>r}],"filter-<=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r<=o}],"filter-id-<=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i<=r}],"filter->=":[Ut,[Ft,jt],(t,[e,i])=>{const r=t.properties()[e.value],o=i.value;return typeof r==typeof o&&r>=o}],"filter-id->=":[Ut,[jt],(t,[e])=>{const i=t.id(),r=e.value;return typeof i==typeof r&&i>=r}],"filter-has":[Ut,[jt],(t,[e])=>e.value in t.properties()],"filter-has-id":[Ut,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[Ut,[zr(Ft)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Ut,[zr(jt)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Ut,[Ft,zr(jt)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Ut,[Ft,zr(jt)],(t,[e,i])=>function(r,o,n,s){for(;n<=s;){const a=n+s>>1;if(o[a]===r)return!0;o[a]>r?s=a-1:n=a+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Ut,overloads:[[[Ut,Ut],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Is(Ut),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Ut,[Ut],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Ut,[Ft],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Ft,[Ft],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Ft,Is(jt),(t,e)=>e.map(i=>xl(i.evaluate(t))).join("")],"resolved-locale":[Ft,[Wc],(t,[e])=>e.evaluate(t).resolvedLocale()],random:[ze,[ze,ze,jt],(t,e)=>{const[i,r,o]=e.map(s=>s.evaluate(t));if(i>r||i===r)return i;let n;if(typeof o=="string")n=function(s){let a=0;if(s.length===0)return a;for(let l=0;l<s.length;l++)a=(a<<5)-a+s.charCodeAt(l),a&=a;return a}(o);else{if(typeof o!="number")throw new or(`Invalid seed input: ${o}`);n=o}return i+Bp(n)()*(r-i)}]});var Pl=vy;function Ay(t){return{result:"success",value:t}}function Cs(t){return{result:"error",value:t}}function My(t,e){return!!t&&!!t.parameters&&t.parameters.indexOf(e)>-1}function ks(t){return t["property-type"]==="data-driven"}function Iy(t){return My(t.expression,"measure-light")}function Np(t){return My(t.expression,"zoom")}function jp(t){return!!t.expression&&t.expression.interpolated}function su(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function PS(t){return t}function Cy(t,e){const i=e.type==="color",r=t.stops&&typeof t.stops[0][0]=="object",o=r||!(r||t.property!==void 0),n=t.type||(jp(e)?"exponential":"interval");if(i&&((t=ln({},t)).stops&&(t.stops=t.stops.map(c=>[c[0],bt.parse(c[1])])),t.default=bt.parse(t.default?t.default:e.default)),t.colorSpace&&t.colorSpace!=="rgb"&&!fy[t.colorSpace])throw new Error(`Unknown color space: ${t.colorSpace}`);let s,a,l;if(n==="exponential")s=ky;else if(n==="interval")s=zS;else if(n==="categorical"){s=DS,a=Object.create(null);for(const c of t.stops)a[c[0]]=c[1];l=typeof t.stops[0][0]}else{if(n!=="identity")throw new Error(`Unknown function type "${n}"`);s=RS}if(r){const c={},u=[];for(let _=0;_<t.stops.length;_++){const g=t.stops[_],y=g[0].zoom;c[y]===void 0&&(c[y]={zoom:y,type:t.type,property:t.property,default:t.default,stops:[]},u.push(y)),c[y].stops.push([g[0].value,g[1]])}const p=[];for(const _ of u)p.push([c[_].zoom,Cy(c[_],e)]);const f={name:"linear"};return{kind:"composite",interpolationType:f,interpolationFactor:Fo.interpolationFactor.bind(void 0,f),zoomStops:p.map(_=>_[0]),evaluate:({zoom:_},g)=>ky({stops:p,base:t.base},e,_).evaluate(_,g)}}if(o){const c=n==="exponential"?{name:"exponential",base:t.base!==void 0?t.base:1}:null;return{kind:"camera",interpolationType:c,interpolationFactor:Fo.interpolationFactor.bind(void 0,c),zoomStops:t.stops.map(u=>u[0]),evaluate:({zoom:u})=>s(t,e,u,a,l)}}return{kind:"source",evaluate(c,u){const p=u&&u.properties?u.properties[t.property]:void 0;return p===void 0?Dl(t.default,e.default):s(t,e,p,a,l)}}}function Dl(t,e,i){return t!==void 0?t:e!==void 0?e:i!==void 0?i:void 0}function DS(t,e,i,r,o){return Dl(typeof i===o?r[i]:void 0,t.default,e.default)}function zS(t,e,i){if(Yt(i)!=="number")return Dl(t.default,e.default);const r=t.stops.length;if(r===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[r-1][0])return t.stops[r-1][1];const o=tu(t.stops.map(n=>n[0]),i);return t.stops[o][1]}function ky(t,e,i){const r=t.base!==void 0?t.base:1;if(Yt(i)!=="number")return Dl(t.default,e.default);const o=t.stops.length;if(o===1||i<=t.stops[0][0])return t.stops[0][1];if(i>=t.stops[o-1][0])return t.stops[o-1][1];const n=tu(t.stops.map(u=>u[0]),i),s=function(u,p,f,_){const g=_-f,y=u-f;return g===0?0:p===1?y/g:(Math.pow(p,y)-1)/(Math.pow(p,g)-1)}(i,r,t.stops[n][0],t.stops[n+1][0]),a=t.stops[n][1],l=t.stops[n+1][1];let c=iu[e.type]||PS;if(t.colorSpace&&t.colorSpace!=="rgb"){const u=fy[t.colorSpace];c=(p,f)=>u.reverse(u.interpolate(u.forward(p),u.forward(f),s))}return typeof a.evaluate=="function"?{evaluate(...u){const p=a.evaluate.apply(void 0,u),f=l.evaluate.apply(void 0,u);if(p!==void 0&&f!==void 0)return c(p,f,s)}}:c(a,l,s)}function RS(t,e,i){return e.type==="color"?i=bt.parse(i):e.type==="formatted"?i=Lr.fromString(i.toString()):e.type==="resolvedImage"?i=lo.fromString(i.toString()):Yt(i)===e.type||e.type==="enum"&&e.values[i]||(i=void 0),Dl(i,t.default,e.default)}class Vp{constructor(e,i,r){this.expression=e,this._warningHistory={},this._evaluator=new qg(r),this._defaultValue=i?function(o){return o.type==="color"&&(su(o.default)||Array.isArray(o.default))?new bt(0,0,0,0):o.type==="color"?bt.parse(o.default)||null:o.default===void 0?null:o.default}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(e,i,r,o,n,s,a,l){return this._evaluator.globals=e,this._evaluator.feature=i,this._evaluator.featureState=r,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null,this.expression.evaluate(this._evaluator)}evaluate(e,i,r,o,n,s,a,l){this._evaluator.globals=e,this._evaluator.feature=i||null,this._evaluator.featureState=r||null,this._evaluator.canonical=o||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=l||null;try{const c=this.expression.evaluate(this._evaluator);if(c==null||typeof c=="number"&&c!=c)return this._defaultValue;if(this._enumValues&&!(c in this._enumValues))throw new or(`Expected value to be one of ${Object.keys(this._enumValues).map(u=>JSON.stringify(u)).join(", ")}, but found ${JSON.stringify(c)} instead.`);return c}catch(c){return this._warningHistory[c.message]||(this._warningHistory[c.message]=!0,typeof console<"u"&&console.warn(c.message)),this._defaultValue}}}function au(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Pl}function Fn(t,e,i){const r=new sy(Pl,[],e?function(n){const s={color:ao,string:Ft,number:ze,enum:Ft,boolean:Ut,formatted:_l,resolvedImage:gl};return n.type==="array"?zr(s[n.value]||jt,n.length):s[n.type]}(e):void 0,void 0,void 0,i),o=r.parse(t,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?Ay(new Vp(o,e,i)):Cs(r.errors)}class Up{constructor(e,i,r){this.kind=e,this._styleExpression=i,this.isLightConstant=r,this.isStateDependent=e!=="constant"&&!Il(i.expression),this.isConfigDependent=!yp(i.expression)}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}}class Nn{constructor(e,i,r,o,n){this.kind=e,this.zoomStops=r,this._styleExpression=i,this.isStateDependent=e!=="camera"&&!Il(i.expression),this.isLightConstant=n,this.isConfigDependent=!yp(i.expression),this.interpolationType=o}evaluateWithoutErrorHandling(e,i,r,o,n,s){return this._styleExpression.evaluateWithoutErrorHandling(e,i,r,o,n,s)}evaluate(e,i,r,o,n,s){return this._styleExpression.evaluate(e,i,r,o,n,s)}interpolationFactor(e,i,r){return this.interpolationType?Fo.interpolationFactor(this.interpolationType,e,i,r):0}}function qp(t,e,i){if((t=Fn(t,e,i)).result==="error")return t;const r=t.value.expression,o=ga(r);if(!o&&!ks(e))return Cs([new Oo("","data expressions not supported")]);const n=ya(r,["zoom","pitch","distance-from-center"]);if(!n&&!Np(e))return Cs([new Oo("","zoom expressions not supported")]);const s=ya(r,["measure-light"]);if(!s&&!Iy(e))return Cs([new Oo("","measure-light expression not supported")]);const a=e.expression&&e.expression.relaxZoomRestriction,l=cu(r);return l||n||a?l instanceof Oo?Cs([l]):l instanceof Fo&&!jp(e)?Cs([new Oo("",'"interpolate" expressions cannot be used with this property')]):Ay(l?new Nn(o?"camera":"composite",t.value,l.labels,l instanceof Fo?l.interpolation:void 0,s):new Up(o?"constant":"source",t.value,s)):Cs([new Oo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression, or in the properties of atmosphere.')])}class lu{constructor(e,i){this._parameters=e,this._specification=i,ln(this,Cy(this._parameters,this._specification))}static deserialize(e){return new lu(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function cu(t){let e=null;if(t instanceof _y)e=cu(t.result);else if(t instanceof my){for(const i of t.args)if(e=cu(i),e)break}else(t instanceof Tp||t instanceof Fo)&&t.input instanceof Bo&&t.input.name==="zoom"&&(e=t);return e instanceof Oo||t.eachChild(i=>{const r=cu(i);r instanceof Oo?e=r:e&&r&&e!==r&&(e=new Oo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function co(t){const e=t.key,i=t.value,r=t.valueSpec||{},o=t.objectElementValidators||{},n=t.style,s=t.styleSpec;let a=[];const l=Yt(i);if(l!=="object")return[new Oe(e,i,`object expected, ${l} found`)];for(const c in i){const u=c.split(".")[0];let p;o[u]?p=o[u]:r[u]?p=ar:o["*"]?p=o["*"]:r["*"]&&(p=ar),p?a=a.concat(p({key:(e&&`${e}.`)+c,value:i[c],valueSpec:r[u]||r["*"],style:n,styleSpec:s,object:i,objectKey:c},i)):a.push(new Es(e,i[c],`unknown property "${c}"`))}for(const c in r)o[c]||r[c].required&&r[c].default===void 0&&i[c]===void 0&&a.push(new Oe(e,i,`missing required property "${c}"`));return a}function Py(t){const e=t.value,i=t.valueSpec,r=t.style,o=t.styleSpec,n=t.key,s=t.arrayElementValidator||ar;if(Yt(e)!=="array")return[new Oe(n,e,`array expected, ${Yt(e)} found`)];if(i.length&&e.length!==i.length)return[new Oe(n,e,`array length ${i.length} expected, length ${e.length} found`)];if(i["min-length"]&&e.length<i["min-length"])return[new Oe(n,e,`array length at least ${i["min-length"]} expected, length ${e.length} found`)];let a={type:i.value,values:i.values,minimum:i.minimum,maximum:i.maximum,function:void 0};o.$version<7&&(a.function=i.function),Yt(i.value)==="object"&&(a=i.value);let l=[];for(let c=0;c<e.length;c++)l=l.concat(s({array:e,arrayIndex:c,value:e[c],valueSpec:a,style:r,styleSpec:o,key:`${n}[${c}]`},!0));return l}function Dy(t){const e=t.key,i=t.value,r=t.valueSpec;let o=Yt(i);if(o==="number"&&i!=i&&(o="NaN"),o!=="number")return[new Oe(e,i,`number expected, ${o} found`)];if("minimum"in r){let n=r.minimum;if(Yt(r.minimum)==="array"&&(n=r.minimum[t.arrayIndex]),i<n)return[new Oe(e,i,`${i} is less than the minimum value ${n}`)]}if("maximum"in r){let n=r.maximum;if(Yt(r.maximum)==="array"&&(n=r.maximum[t.arrayIndex]),i>n)return[new Oe(e,i,`${i} is greater than the maximum value ${n}`)]}return[]}function zy(t){const e=t.valueSpec,i=Gi(t.value.type);let r,o,n,s={};const a=i!=="categorical"&&t.value.property===void 0,l=!a,c=Yt(t.value.stops)==="array"&&Yt(t.value.stops[0])==="array"&&Yt(t.value.stops[0][0])==="object",u=co({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(_){if(i==="identity")return[new Oe(_.key,_.value,'identity function may not have a "stops" property')];let g=[];const y=_.value;return g=g.concat(Py({key:_.key,value:y,valueSpec:_.valueSpec,style:_.style,styleSpec:_.styleSpec,arrayElementValidator:p})),Yt(y)==="array"&&y.length===0&&g.push(new Oe(_.key,y,"array must have at least one stop")),g},default:function(_){return ar({key:_.key,value:_.value,valueSpec:e,style:_.style,styleSpec:_.styleSpec})}}});return i==="identity"&&a&&u.push(new Oe(t.key,t.value,'missing required property "property"')),i==="identity"||t.value.stops||u.push(new Oe(t.key,t.value,'missing required property "stops"')),i==="exponential"&&t.valueSpec.expression&&!jp(t.valueSpec)&&u.push(new Oe(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ks(t.valueSpec)?u.push(new Oe(t.key,t.value,"property functions not supported")):a&&!Np(t.valueSpec)&&u.push(new Oe(t.key,t.value,"zoom functions not supported"))),i!=="categorical"&&!c||t.value.property!==void 0||u.push(new Oe(t.key,t.value,'"property" property is required')),u;function p(_){let g=[];const y=_.value,v=_.key;if(Yt(y)!=="array")return[new Oe(v,y,`array expected, ${Yt(y)} found`)];if(y.length!==2)return[new Oe(v,y,`array length 2 expected, length ${y.length} found`)];if(c){if(Yt(y[0])!=="object")return[new Oe(v,y,`object expected, ${Yt(y[0])} found`)];if(y[0].zoom===void 0)return[new Oe(v,y,"object stop key must have zoom")];if(y[0].value===void 0)return[new Oe(v,y,"object stop key must have value")];const b=Gi(y[0].zoom);if(typeof b!="number")return[new Oe(v,y[0].zoom,"stop zoom values must be numbers")];if(n&&n>b)return[new Oe(v,y[0].zoom,"stop zoom values must appear in ascending order")];b!==n&&(n=b,o=void 0,s={}),g=g.concat(co({key:`${v}[0]`,value:y[0],valueSpec:{zoom:{}},style:_.style,styleSpec:_.styleSpec,objectElementValidators:{zoom:Dy,value:f}}))}else g=g.concat(f({key:`${v}[0]`,value:y[0],style:_.style,styleSpec:_.styleSpec},y));return au(cn(y[1]))?g.concat([new Oe(`${v}[1]`,y[1],"expressions are not allowed in function stops.")]):g.concat(ar({key:`${v}[1]`,value:y[1],valueSpec:e,style:_.style,styleSpec:_.styleSpec}))}function f(_,g){const y=Yt(_.value),v=Gi(_.value),b=_.value!==null?_.value:g;if(r){if(y!==r)return[new Oe(_.key,b,`${y} stop domain type must match previous stop domain type ${r}`)]}else r=y;if(y!=="number"&&y!=="string"&&y!=="boolean"&&typeof v!="number"&&typeof v!="string"&&typeof v!="boolean")return[new Oe(_.key,b,"stop domain value must be a number, string, or boolean")];if(y!=="number"&&i!=="categorical"){let w=`number expected, ${y} found`;return ks(e)&&i===void 0&&(w+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Oe(_.key,b,w)]}return i!=="categorical"||y!=="number"||typeof v=="number"&&isFinite(v)&&Math.floor(v)===v?i!=="categorical"&&y==="number"&&typeof v=="number"&&typeof o=="number"&&o!==void 0&&v<o?[new Oe(_.key,b,"stop domain values must appear in ascending order")]:(o=v,i==="categorical"&&v in s?[new Oe(_.key,b,"stop domain values must be unique")]:(s[v]=!0,[])):[new Oe(_.key,b,`integer expected, found ${String(v)}`)]}}function Ps(t){const e=(t.expressionContext==="property"?qp:Fn)(cn(t.value),t.valueSpec);if(e.result==="error")return e.value.map(r=>new Oe(`${t.key}${r.key}`,t.value,r.message));const i=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!i.outputDefined())return[new Oe(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!Il(i))return[new Oe(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if(t.expressionContext==="filter")return Ry(i,t);if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!ya(i,["zoom","feature-state"]))return[new Oe(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(t.expressionContext==="cluster-initial"&&!ga(i))return[new Oe(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ry(t,e){const i=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(e.valueSpec&&e.valueSpec.expression)for(const o of e.valueSpec.expression.parameters)i.delete(o);if(i.size===0)return[];const r=[];return t instanceof Bo&&i.has(t.name)?[new Oe(e.key,e.value,`["${t.name}"] expression is not supported in a filter for a ${e.object.type} layer with id: ${e.object.id}`)]:(t.eachChild(o=>{r.push(...Ry(o,e))}),r)}function uu(t){const e=t.key,i=t.value,r=t.valueSpec,o=[];return Array.isArray(r.values)?r.values.indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${r.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(r.values).indexOf(Gi(i))===-1&&o.push(new Oe(e,i,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(i)} found`)),o}function Gp(t){if(t===!0||t===!1)return!0;if(!Array.isArray(t)||t.length===0)return!1;switch(t[0]){case"has":return t.length>=2&&t[1]!=="$id"&&t[1]!=="$type";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Gp(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function hu(t,e="fill"){if(t==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Gp(t)||(t=du(t));const i=t;let r=!0;try{r=function(c){if(!ba(c))return c;let u=cn(c);return Oy(u),u=Ly(u),u}(i)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
2
2
  This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
3
3
  and paste the contents of this message in the report.
4
4
  Thank you!
@@ -2027,9 +2027,9 @@ ${r.vertexSource}`;const g=a.createShader(a.FRAGMENT_SHADER);if(a.isContextLost(
2027
2027
  must be that same as the previous version of the image
2028
2028
  (${i.data.width}, ${i.data.height})`))):this.fire(new nt(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(t){return t?!!this.style&&!!this.style.getImage(t):(this.fire(new nt(new Error("Missing required image id"))),!1)}removeImage(t){this.style.removeImage(t)}loadImage(t,e){vt(this._requestManager.transformRequest(t,le.Image),(i,r)=>{e(i,r instanceof C.HTMLImageElement?ct.getImageData(r):r)})}listImages(){return this.style.listImages()}addModel(t,e){this._lazyInitEmptyStyle(),this.style.addModel(t,e)}hasModel(t){return t?this.style.hasModel(t):(this.fire(new nt(new Error("Missing required model id"))),!1)}removeModel(t){this.style.removeModel(t)}listModels(){return this.style.listModels()}addLayer(t,e){return this._isValidId(t.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)):this}moveLayer(t,e){return this._isValidId(t)?(this.style.moveLayer(t,e),this._update(!0)):this}removeLayer(t){return this._isValidId(t)?(this.style.removeLayer(t),this._update(!0)):this}getLayer(t){return this._isValidId(t)?this.style.getOwnLayer(t):null}setLayerZoomRange(t,e,i){return this._isValidId(t)?(this.style.setLayerZoomRange(t,e,i),this._update(!0)):this}setFilter(t,e,i={}){return this._isValidId(t)?(this.style.setFilter(t,e,i),this._update(!0)):this}getFilter(t){return this._isValidId(t)?this.style.getFilter(t):null}setPaintProperty(t,e,i,r={}){return this._isValidId(t)?(this.style.setPaintProperty(t,e,i,r),this._update(!0)):this}getPaintProperty(t,e){return this._isValidId(t)?this.style.getPaintProperty(t,e):null}setLayoutProperty(t,e,i,r={}){return this._isValidId(t)?(this.style.setLayoutProperty(t,e,i,r),this._update(!0)):this}getLayoutProperty(t,e){return this._isValidId(t)?this.style.getLayoutProperty(t,e):null}getConfigProperty(t,e){return this.style.getConfigProperty(t,e)}setConfigProperty(t,e,i){return this.style.setConfigProperty(t,e,i),this._update(!0)}setLights(t){if(this._lazyInitEmptyStyle(),t&&t.length===1&&t[0].type==="flat"){const e=t[0];e.properties?this.style.setFlatLight(e.properties,e.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(t),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const t=this.style.getLights()||[];return t.length===0&&t.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),t}setLight(t,e={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:t}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(t){return this._lazyInitEmptyStyle(),!t&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(t),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(t){return this._lazyInitEmptyStyle(),this.style.setFog(t),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setCamera(t){return this.style.setCamera(t),this._triggerCameraUpdate(t)}_triggerCameraUpdate(t){return this._update(this.transform.setOrthographicProjectionAtLowPitch(t["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(t){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(ot.convert(t),this.transform):0}setFeatureState(t,e){return this._isValidId(t.source)?(this.style.setFeatureState(t,e),this._update()):this}removeFeatureState(t,e){return this._isValidId(t.source)?(this.style.removeFeatureState(t,e),this._update()):this}getFeatureState(t){return this._isValidId(t.source)?this.style.getFeatureState(t):null}_updateContainerDimensions(){if(!this._container)return;const t=this._container.getBoundingClientRect().width||400,e=this._container.getBoundingClientRect().height||300;let i,r,o,n=this._container;for(;n&&(!r||!o);){const s=C.getComputedStyle(n).transform;s&&s!=="none"&&(i=s.match(/matrix.*\((.+)\)/)[1].split(", "),i[0]&&i[0]!=="0"&&i[0]!=="1"&&(r=i[0]),i[3]&&i[3]!=="0"&&i[3]!=="1"&&(o=i[3])),n=n.parentElement}this._containerWidth=r?Math.abs(t/r):t,this._containerHeight=o?Math.abs(e/o):e}_detectMissingCSS(){C.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&H("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=ni("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();const e=this._canvasContainer=ni("div","mapboxgl-canvas-container",t);this._canvas=ni("canvas","mapboxgl-canvas",e),this._interactive&&(e.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const i=this._controlContainer=ni("div","mapboxgl-control-container",t),r=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(o=>{r[o]=ni("div",`mapboxgl-ctrl-${o}`,i)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(t,e){const i=ct.devicePixelRatio||1;this._canvas.width=i*Math.ceil(t),this._canvas.height=i*Math.ceil(e),this._canvas.style.width=`${t}px`,this._canvas.style.height=`${e}px`}_addMarker(t){this._markers.push(t)}_removeMarker(t){const e=this._markers.indexOf(t);e!==-1&&this._markers.splice(e,1)}_addPopup(t){this._popups.push(t)}_removePopup(t){const e=this._popups.indexOf(t);e!==-1&&this._popups.splice(e,1)}_setupPainter(){const t=Be({},zg.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),e=this._canvas.getContext("webgl2",t);e?(kg(e,!0),this.painter=new h3(e,this._contextCreateOptions,this.transform),this.on("data",i=>{i.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),Te.testSupport(e)):this.fire(new nt(new Error("Failed to initialize WebGL")))}_contextLost(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new ye("webglcontextlost",{originalEvent:t}))}_contextRestored(t){this._setupPainter(),this.resize(),this._update(),this.fire(new ye("webglcontextrestored",{originalEvent:t}))}_onMapScroll(t){if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(t){return this._update(),this._renderTaskQueue.add(t)}_cancelRenderFrame(t){this._renderTaskQueue.remove(t)}_requestDomTask(t){!this.loaded()||this.loaded()&&!this.isMoving()?t():this._domRenderTaskQueue.add(t)}_render(t){let e;this.fire(new ye("renderstart"));const i=this.painter.context.extTimerQuery,r=ct.now(),o=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(e=o.createQuery(),o.beginQuery(i.TIME_ELAPSED_EXT,e)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],C.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],C.performance.now())),this._renderTaskQueue.run(t),this._domRenderTaskQueue.run(t),this._removed)return;this._updateProjectionTransition();const n=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const l=this.transform.zoom,c=this.transform.pitch,u=ct.now(),p=new gi(l,{now:u,fadeDuration:n,pitch:c,transition:this.style.transition});this.style.update(p)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let s=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),s=this._updateAverageElevation(r),this.style.updateSources(this.transform),this._forceMarkerAndPopupUpdate()):s=this._updateAverageElevation(r),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,n,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:n,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new ye("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new ye("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),e){const l=ct.now()-r;o.endQuery(i.TIME_ELAPSED_EXT),setTimeout(()=>{const c=o.getQueryParameter(e,o.QUERY_RESULT)/1e6;o.deleteQuery(e),this.fire(new ye("gpu-timing-frame",{cpuTime:l,gpuTime:c})),C.performance.mark("frame-gpu",{startTime:r,detail:{gpuTime:c}})},50)}if(this.listens("gpu-timing-layer")){const l=this.painter.collectGpuTimers();setTimeout(()=>{const c=this.painter.queryGpuTimers(l);this.fire(new ye("gpu-timing-layer",{layerTimes:c}))},50)}if(this.listens("gpu-timing-deferred-render")){const l=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const c=this.painter.queryGpuTimeDeferredRender(l);this.fire(new ye("gpu-timing-deferred-render",{gpuTime:c}))},50)}const a=this._sourcesDirty||this._styleDirty||this._placementDirty||s;if(a||this._repaint)this.triggerRepaint();else{const l=!this.isMoving()&&this.loaded();if(l&&(s=this._updateAverageElevation(r,!0)),s)this.triggerRepaint();else if(this._triggerFrame(!1),l&&(this.fire(new ye("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const c=this._calculateSpeedIndex();this.fire(new ye("speedindexcompleted",{speedIndex:c})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,Pg.mark(Uc.fullLoad),this._performanceMetricsCollection&&$E(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(t){for(const e of this._markers)t&&!this.getRenderWorldCopies()&&(e._lngLat=e._lngLat.wrap()),e._update();for(const e of this._popups)!t||this.getRenderWorldCopies()||e._trackPointer||(e._lngLat=e._lngLat.wrap()),e._update()}_updateAverageElevation(t,e=!1){const i=o=>(this.transform.averageElevation=o,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&i(0);const r=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(r||(e||t-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(t)){const o=this.transform.averageElevation;let n=this.transform.sampleAverageElevation();this.transform.elevation&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(n)?n=0:this._averageElevationLastSampledAt=t;const s=Math.abs(o-n);if(s>1){if(this._isInitialLoad||r)return this._averageElevation.jumpTo(n),i(n);this._averageElevation.easeTo(n,t,300)}else if(s>1e-4)return this._averageElevation.jumpTo(n),i(n)}return!!this._averageElevation.isEasing(t)&&i(this._averageElevation.getValue(t))}_authenticate(){WE(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,t=>{if(t&&(t.message===ei||t.status===401)){const e=this.painter.context.gl;kg(e,!1),this._logoControl instanceof f2&&this._logoControl._updateLogo(),e&&e.clear(e.DEPTH_BUFFER_BIT|e.COLOR_BUFFER_BIT|e.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new nt(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),GE(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const t=this._isDragging();this.painter.updateTerrain(this.style,t)}_calculateSpeedIndex(){const t=this.painter.canvasCopy(),e=this.painter.getCanvasCopiesAndTimestamps();e.timeStamps.push(performance.now());const i=this.painter.context.gl,r=i.createFramebuffer();function o(n){i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,n,0);const s=new Uint8Array(i.drawingBufferWidth*i.drawingBufferHeight*4);return i.readPixels(0,0,i.drawingBufferWidth,i.drawingBufferHeight,i.RGBA,i.UNSIGNED_BYTE,s),s}return i.bindFramebuffer(i.FRAMEBUFFER,r),this._canvasPixelComparison(o(t),e.canvasCopies.map(o),e.timeStamps)}_canvasPixelComparison(t,e,i){let r=i[1]-i[0];const o=t.length/4;for(let n=0;n<e.length;n++){const s=e[n];let a=0;for(let l=0;l<s.length;l+=4)s[l]===t[l]&&s[l+1]===t[l+1]&&s[l+2]===t[l+2]&&s[l+3]===t[l+3]&&(a+=1);r+=(i[n+2]-i[n+1])*(1-a/o)}return r}remove(){this._hash&&this._hash.remove();for(const e of this._controls)e.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),C!==void 0&&(C.removeEventListener("resize",this._onWindowResize,!1),C.removeEventListener("orientationchange",this._onWindowResize,!1),C.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),C.removeEventListener("online",this._onWindowOnline,!1),C.removeEventListener("visibilitychange",this._onVisibilityChange,!1));const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),Vc.delete(this.painter.context.gl),this._removed=!0,this.fire(new ye("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(t){this._renderNextFrame=this._renderNextFrame||t,this.style&&!this._frame&&(this._frame=ct.frame(e=>{const i=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,i&&this._render(e)}))}_preloadTiles(t){return xs(this.style?Object.values(this.style._sourceCaches):[],(e,i)=>e._preloadTiles(t,i),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(t){this._trackResize&&this.resize({originalEvent:t})._update()}_onVisibilityChange(){C.document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(t){this._showTerrainWireframe!==t&&(this._showTerrainWireframe=t,this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(t){this._showLayers2DWireframe!==t&&(this._showLayers2DWireframe=t,this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(t){this._showLayers3DWireframe!==t&&(this._showLayers3DWireframe=t,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(t){this._speedIndexTiming!==t&&(this._speedIndexTiming=t,this._update())}get showPadding(){return!!this._showPadding}set showPadding(t){this._showPadding!==t&&(this._showPadding=t,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())}get repaint(){return!!this._repaint}set repaint(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(t){this._vertices=t,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(t){this._showTileAABBs!==t&&(this._showTileAABBs=t,t&&this._update())}_setCacheLimits(t,e){(function(i,r){dr=i,br=r})(t,e)}get version(){return Z}},NavigationControl:class{constructor(t){this.options=Be({},rD,t),this._container=ni("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(Yi(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",e=>{this._map&&this._map.zoomIn({},{originalEvent:e})}),ni("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",e=>{this._map&&this._map.zoomOut({},{originalEvent:e})}),ni("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(Yi(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",e=>{const i=this._map;i&&(this.options.visualizePitch?i.resetNorthPitch({},{originalEvent:e}):i.resetNorth({},{originalEvent:e}))}),this._compassIcon=ni("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const t=this._map;if(!t)return;const e=t.getZoom(),i=e===t.getMaxZoom(),r=e===t.getMinZoom();this._zoomInButton.disabled=i,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",i.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())}_rotateCompassArrow(){const t=this._map;if(!t)return;const e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(t.transform.pitch*(Math.PI/180)),.5)}) rotateX(${t.transform.pitch}deg) rotateZ(${t.transform.angle*(180/Math.PI)}deg)`:`rotate(${t.transform.angle*(180/Math.PI)}deg)`;t._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=e)})}onAdd(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),t.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&t.on("pitch",this._rotateCompassArrow),t.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new oD(t,this._compass,this.options.visualizePitch)),this._container}onRemove(){const t=this._map;t&&(this._container.remove(),this.options.showZoom&&t.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&t.off("pitch",this._rotateCompassArrow),t.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(t,e){const i=ni("button",t,this._container);return i.type="button",i.addEventListener("click",e),i}_setButtonTitle(t,e){if(!this._map)return;const i=this._map._getUIString(`NavigationControl.${e}`);t.setAttribute("aria-label",i),t.firstElementChild&&t.firstElementChild.setAttribute("title",i)}},GeolocateControl:class extends Fi{constructor(t){super(),this.options=Be({geolocation:C.navigator.geolocation},nD,t),Yi(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=n2(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(t){return this._map=t,this._container=ni("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(t){const e=(i=!!this.options.geolocation)=>{this._supportsGeolocation=i,t(i)};this._supportsGeolocation!==void 0?t(this._supportsGeolocation):C.navigator.permissions!==void 0?C.navigator.permissions.query({name:"geolocation"}).then(i=>e(i.state!=="denied")).catch(()=>e()):e()}_isOutOfMapMaxBounds(t){const e=this._map.getMaxBounds(),i=t.coords;return!!e&&(i.longitude<e.getWest()||i.longitude>e.getEast()||i.latitude<e.getSouth()||i.latitude>e.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new ye("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(t),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(t),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new ye("geolocate",t)),this._finish()}}_updateCamera(t){const e=new ot(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,r=Be({bearing:this._map.getBearing()},this.options.fitBoundsOptions);this._map.fitBounds(e.toBounds(i),r,{geolocateSource:!0})}_updateMarker(t){if(t){const e=new ot(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(e).addTo(this._map),this._userLocationDotMarker.setLngLat(e).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const t=this._map.transform,e=ti(1,t._center.lat)*t.worldSize,i=Math.ceil(2*this._accuracy*e);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(t){if(this._map){if(this.options.trackUserLocation)if(t.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;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new ye("error",t)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(t){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=ni("button","mapboxgl-ctrl-geolocate",this._container),ni("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",t===!1){H("Geolocation support is not available so the GeolocateControl will be disabled.");const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e)}else{const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",e),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=ni("div","mapboxgl-user-location"),this._dotElement.appendChild(ni("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(ni("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new x_({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=ni("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new x_({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",e=>{e.geolocateSource||this._watchState!=="ACTIVE_LOCK"||e.originalEvent&&e.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new ye("trackuserlocationend")))})}}_onDeviceOrientation(t){this._userLocationDotMarker&&(t.webkitCompassHeading?this._heading=t.webkitCompassHeading:t.absolute===!0&&(this._heading=-1*t.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return H("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 ye("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new ye("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 ye("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){let t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(t={maximumAge:6e5,timeout:0},this._noTimeout=!0):(t=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,t),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const t=()=>{C.addEventListener("ondeviceorientationabsolute"in C?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};C.DeviceMotionEvent!==void 0&&typeof C.DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(e=>{e==="granted"&&t()}).catch(console.error):t()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),C.removeEventListener("deviceorientation",this._onDeviceOrientation),C.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:p2,ScaleControl:class{constructor(t){this.options=Be({},sD,t),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),Yi(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const t=this.options.maxWidth||100,e=this._map,i=e._containerHeight/2,r=e._containerWidth/2-t/2,o=e.unproject([r,i]),n=e.unproject([r+t,i]),s=o.distanceTo(n);if(this.options.unit==="imperial"){const a=3.2808*s;a>5280?this._setScale(t,a/5280,"mile"):this._setScale(t,a,"foot")}else this.options.unit==="nautical"?this._setScale(t,s/1852,"nautical-mile"):s>=1e3?this._setScale(t,s/1e3,"kilometer"):this._setScale(t,s,"meter")}_setScale(t,e,i){this._map._requestDomTask(()=>{const r=function(n){const s=Math.pow(10,`${Math.floor(n)}`.length-1);let a=n/s;return a=a>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(l){const c=Math.pow(10,Math.ceil(-Math.log(l)/Math.LN10));return Math.round(l*c)/c}(a),s*a}(e),o=r/e;this._container.innerHTML=this._isNumberFormatSupported&&i!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:i}).format(r):`${r}&nbsp;${aD[i]}`,this._container.style.width=t*o+"px"})}onAdd(t){return this._map=t,this._language=t.getLanguage(),this._container=ni("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(t){this._language=t,this._update()}setUnit(t){this.options.unit=t,this._update()}},FullscreenControl:class{constructor(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof C.HTMLElement?this._container=t.container:H("Full screen control 'container' must be a DOM element.")),Yi(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in C.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in C.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=ni("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",H("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,C.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!C.document.fullscreenEnabled&&!C.document.webkitFullscreenEnabled)}_setupUI(){const t=this._fullscreenButton=ni("button","mapboxgl-ctrl-fullscreen",this._controlContainer);ni("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden","true"),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),C.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",t)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(C.document.fullscreenElement||C.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?C.document.exitFullscreen?C.document.exitFullscreen():C.document.webkitCancelFullScreen&&C.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends Fi{constructor(t){super(),this.options=Be(Object.create(J3),t),Yi(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(t&&t.className?t.className.trim().split(/\s+/):[])}addTo(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&t.on("preclick",this._onClose),this.options.closeOnMove&&t.on("move",this._onClose),t.on("remove",this.remove),this._update(),t._addPopup(this),this._focusFirstElement(),this._trackPointer?(t.on("mousemove",this._onMouseEvent),t.on("mouseup",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")):t.on("move",this._update),this.fire(new ye("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const t=this._map;return t&&(t.off("move",this._update),t.off("move",this._onClose),t.off("preclick",this._onClose),t.off("click",this._onClose),t.off("remove",this.remove),t.off("mousemove",this._onMouseEvent),t.off("mouseup",this._onMouseEvent),t.off("drag",this._onMouseEvent),t._canvasContainer&&t._canvasContainer.classList.remove("mapboxgl-track-pointer"),t._removePopup(this),this._map=void 0),this.fire(new ye("close")),this}getLngLat(){return this._lngLat}setLngLat(t){this._lngLat=ot.convert(t),this._pos=null,this._trackPointer=!1,this._update();const e=this._map;return e&&(e.on("move",this._update),e.off("mousemove",this._onMouseEvent),e._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const t=this._map;return t&&(t.off("move",this._update),t.on("mousemove",this._onMouseEvent),t.on("drag",this._onMouseEvent),t._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(t){return this.setDOMContent(C.document.createTextNode(t))}setHTML(t){const e=C.document.createDocumentFragment(),i=C.document.createElement("body");let r;for(i.innerHTML=t;r=i.firstChild,r;)e.appendChild(r);return this.setDOMContent(e)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(t){return this.options.maxWidth=t,this._update(),this}setDOMContent(t){let e=this._content;if(e)for(;e.hasChildNodes();)e.firstChild&&e.removeChild(e.firstChild);else e=this._content=ni("div","mapboxgl-popup-content",this._container||void 0);if(e.appendChild(t),this.options.closeButton){const i=this._closeButton=ni("button","mapboxgl-popup-close-button",e);i.type="button",i.setAttribute("aria-label","Close popup"),i.setAttribute("aria-hidden","true"),i.innerHTML="&#215;",i.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(t){return this._classList.add(t),this._updateClassList(),this}removeClassName(t){return this._classList.delete(t),this._updateClassList(),this}setOffset(t){return this.options.offset=t,this._update(),this}toggleClassName(t){let e;return this._classList.delete(t)?e=!1:(this._classList.add(t),e=!0),this._updateClassList(),e}_onMouseEvent(t){this._update(t.point)}_getAnchor(t){if(this.options.anchor)return this.options.anchor;const e=this._map,i=this._container,r=this._pos;if(!e||!i||!r)return"bottom";const o=i.offsetWidth,n=i.offsetHeight,s=r.x<o/2,a=r.x>e.transform.width-o/2;if(r.y+t<n)return s?"top-left":a?"top-right":"top";if(r.y>e.transform.height-n){if(s)return"bottom-left";if(a)return"bottom-right"}return s?"left":a?"right":"bottom"}_updateClassList(){const t=this._container;if(!t)return;const e=[...this._classList];e.push("mapboxgl-popup"),this._anchor&&e.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&e.push("mapboxgl-popup-track-pointer"),t.className=e.join(" ")}_update(t){const e=this._map,i=this._content;if(!e||!this._lngLat&&!this._trackPointer||!i)return;let r=this._container;if(r||(r=this._container=ni("div","mapboxgl-popup",e.getContainer()),this._tip=ni("div","mapboxgl-popup-tip",r),r.appendChild(i)),this.options.maxWidth&&r.style.maxWidth!==this.options.maxWidth&&(r.style.maxWidth=this.options.maxWidth),e.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=_2(this._lngLat,this._pos,e.transform)),!this._trackPointer||t){const o=this._pos=this._trackPointer&&t?t:e.project(this._lngLat),n=g2(this.options.offset),s=this._anchor=this._getAnchor(n.y),a=g2(this.options.offset,s),l=o.add(a).round();e._requestDomTask(()=>{this._container&&s&&(this._container.style.transform=`${v_[s]} translate(${l.x}px,${l.y}px)`)})}if(!this._marker&&e._showingGlobe()){const o=Lu(e.transform,this._lngLat)?0:1;this._setOpacity(o)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const t=this._container.querySelector(Q3);t&&t.focus()}_onClose(){this.remove()}_setOpacity(t){this._container&&(this._container.style.opacity=`${t}`),this._content&&(this._content.style.pointerEvents=t?"auto":"none")}},Marker:x_,Style:ko,LngLat:ot,LngLatBounds:Nr,Point:X,MercatorCoordinate:Pt,FreeCameraOptions:I1,Evented:Fi,config:ne,prewarm:function(){_c().acquire(Gm)},clearPrewarmedResources:function(){const t=mc;t&&(t.isPreloaded()&&t.numActive()===1?(t.release(Gm),mc=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 ne.ACCESS_TOKEN},set accessToken(t){ne.ACCESS_TOKEN=t},get baseApiUrl(){return ne.API_URL},set baseApiUrl(t){ne.API_URL=t},get workerCount(){return Xa.workerCount},set workerCount(t){Xa.workerCount=t},get maxParallelImageRequests(){return ne.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){ne.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage(t){(function(e){if(!la())return;const i=C.caches.delete(ui);e&&i.catch(e).then(()=>e())})(t)},workerUrl:"",workerClass:null,get dracoUrl(){return qb()},set dracoUrl(t){(function(e){$m=ct.resolveURL(e),Wm||(Wm=new Gs(_c(),new Fi)),Wm.broadcast("setDracoUrl",$m)})(t)},setNow:ct.setNow,restoreNow:ct.restoreNow};R.A=Rb,R.D=Qu,R.E=oe,R.F=pm,R.K=Oh,R.O=Nt,R.P=X,R.T=Q1,R.V=Zu,R.a=Hu,R.b=Px,R.c=Mh,R.d=class extends Fi{constructor(t,e,i,r,o,n){super(),this.actor=t,this.layerIndex=e,this.availableImages=i,this.loadVectorData=o||Vb,this.loading={},this.loaded={},this.deduped=new jb(t.scheduler),this.isSpriteLoaded=r,this.scheduler=t.scheduler,this.brightness=n}loadTile(t,e){const i=t.uid,r=t&&t.request,o=r&&r.collectResourceTiming,n=this.loading[i]=new Mk(t);n.abort=this.loadVectorData(t,(s,a)=>{const l=!this.loading[i];if(delete this.loading[i],l||s||!a)return n.status="done",l||(this.loaded[i]=n),e(s);const c=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl),n.vectorTile=a.vectorTile||new hm(new Ju(c));const p=()=>{n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor,(f,_)=>{if(f||!_)return e(f);const g={};if(o){const y=Dg(r);y.length>0&&(g.resourceTiming=JSON.parse(JSON.stringify(y)))}e(null,Be({rawTileData:c.slice(0)},_,u,g))})};this.isSpriteLoaded?p():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(p,{type:"parseTile",isSymbolTile:t.isSymbolTile,zoom:t.tileZoom}):p()}),this.loaded=this.loaded||{},this.loaded[i]=n})}reloadTile(t,e){const i=this.loaded,r=t.uid,o=this;if(i&&i[r]){const n=i[r];n.showCollisionBoxes=t.showCollisionBoxes,n.projection=t.projection,n.brightness=t.brightness,n.tileTransform=Ns(t.tileID.canonical,t.projection),n.extraShadowCaster=t.extraShadowCaster;const s=(a,l)=>{const c=n.reloadCallback;c&&(delete n.reloadCallback,n.parse(n.vectorTile,o.layerIndex,this.availableImages,o.actor,c)),e(a,l)};n.status==="parsing"?n.reloadCallback=s:n.status==="done"&&(n.vectorTile?n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}else e(null,void 0)}abortTile(t,e){const i=t.uid,r=this.loading[i];r&&(r.abort&&r.abort(),delete this.loading[i]),e()}removeTile(t,e){const i=this.loaded,r=t.uid;i&&i[r]&&delete i[r],e()}},R.e=Fn,R.f=Dg,R.g=yt,R.h=we,R.i=Ie,R.j=function(t,e){const i=Jm(t);for(const r of i){for(const o of r.meshes)Bk(o);r.lights&&(r.lightMeshIndex=r.meshes.length,r.meshes.push(Fk(r.lights,e)))}return i},R.k=gi,R.l=function(t){let e=0;if(new Uint32Array(t,0,1)[0]!==$b){const i=new Uint32Array(t,0,7),[,,r,o,n,s]=i;e=i.byteLength+o+n+s+n,(r!==t.byteLength||e>=t.byteLength)&&H("Invalid b3dm header information.")}return Xb(t,e)},R.m=lh,R.n=uo,R.o=ye,R.p=$t,R.q=function(t){Dr(),wr&&wr.then(e=>{e.keys().then(i=>{for(let r=0;r<i.length-t;r++)e.delete(i[r])})})},R.r=ew,R.s=Jh,R.t=$l,R.v=bs,R.w=C}),I(["./shared"],function(R){function C(xe){if(typeof xe=="number"||typeof xe=="boolean"||typeof xe=="string"||xe==null)return JSON.stringify(xe);if(Array.isArray(xe)){let U="[";for(const H of xe)U+=`${C(H)},`;return`${U}]`}let N="{";for(const U of Object.keys(xe).sort())N+=`${U}:${C(xe[U])},`;return`${N}}`}function Z(xe){let N="";for(const U of R.r)N+=`/${C(xe[U])}`;return N}class ee{constructor(N){this.keyCache={},this._layers={},this._layerConfigs={},N&&this.replace(N)}replace(N,U){this._layerConfigs={},this._layers={},this.update(N,[],U)}update(N,U,H){this._options=H;for(const fe of N){this._layerConfigs[fe.id]=fe;const Le=this._layers[fe.id]=R.c(fe,this._options);Le.setScope(this.scope),Le.compileFilter(),this.keyCache[fe.id]&&delete this.keyCache[fe.id]}for(const fe of U)delete this.keyCache[fe],delete this._layerConfigs[fe],delete this._layers[fe];this.familiesBySource={};const de=function(fe,Le){const Ge={};for(let We=0;We<fe.length;We++){const ht=Le&&Le[fe[We].id]||Z(fe[We]);Le&&(Le[fe[We].id]=ht);let at=Ge[ht];at||(at=Ge[ht]=[]),at.push(fe[We])}const me=[];for(const We in Ge)me.push(Ge[We]);return me}(R.v(this._layerConfigs),this.keyCache);for(const fe of de){const Le=fe.map(si=>this._layers[si.id]),Ge=Le[0];if(Ge.visibility==="none")continue;const me=Ge.source||"";let We=this.familiesBySource[me];We||(We=this.familiesBySource[me]={});const ht=Ge.sourceLayer||"_geojsonTileLayer";let at=We[ht];at||(at=We[ht]=[]),at.push(Le)}}}class ne{loadTile(N,U){const{uid:H,encoding:de,rawImageData:fe,padding:Le}=N,Ge=R.w.ImageBitmap&&fe instanceof R.w.ImageBitmap?this.getImageData(fe,Le):fe;U(null,new R.D(H,Ge,de,Le<1))}getImageData(N,U){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(N.width,N.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=N.width,this.offscreenCanvas.height=N.height,this.offscreenCanvasContext.drawImage(N,0,0,N.width,N.height);const H=this.offscreenCanvasContext.getImageData(-U,-U,N.width+2*U,N.height+2*U);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),H}}function Te(xe,N){if(xe.length!==0){Me(xe[0],N);for(var U=1;U<xe.length;U++)Me(xe[U],!N)}}function Me(xe,N){for(var U=0,H=0,de=0,fe=xe.length,Le=fe-1;de<fe;Le=de++){var Ge=(xe[de][0]-xe[Le][0])*(xe[Le][1]+xe[de][1]),me=U+Ge;H+=Math.abs(U)>=Math.abs(Ge)?U-me+Ge:Ge-me+U,U=me}U+H>=0!=!!N&&xe.reverse()}var ke=R.g(function xe(N,U){var H,de=N&&N.type;if(de==="FeatureCollection")for(H=0;H<N.features.length;H++)xe(N.features[H],U);else if(de==="GeometryCollection")for(H=0;H<N.geometries.length;H++)xe(N.geometries[H],U);else if(de==="Feature")xe(N.geometry,U);else if(de==="Polygon")Te(N.coordinates,U);else if(de==="MultiPolygon")for(H=0;H<N.coordinates.length;H++)Te(N.coordinates[H],U);return N});const ve=R.V.prototype.toGeoJSON;var Xe={exports:{}},ut=R.p,tt=R.a.VectorTileFeature,yt=_t;function _t(xe,N){this.options=N||{},this.features=xe,this.length=xe.length}function st(xe,N){this.id=typeof xe.id=="number"?xe.id:void 0,this.type=xe.type,this.rawGeometry=xe.type===1?[xe.geometry]:xe.geometry,this.properties=xe.tags,this.extent=N||4096}_t.prototype.feature=function(xe){return new st(this.features[xe],this.options.extent)},st.prototype.loadGeometry=function(){var xe=this.rawGeometry;this.geometry=[];for(var N=0;N<xe.length;N++){for(var U=xe[N],H=[],de=0;de<U.length;de++)H.push(new ut(U[de][0],U[de][1]));this.geometry.push(H)}return this.geometry},st.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var xe=this.geometry,N=1/0,U=-1/0,H=1/0,de=-1/0,fe=0;fe<xe.length;fe++)for(var Le=xe[fe],Ge=0;Ge<Le.length;Ge++){var me=Le[Ge];N=Math.min(N,me.x),U=Math.max(U,me.x),H=Math.min(H,me.y),de=Math.max(de,me.y)}return[N,H,U,de]},st.prototype.toGeoJSON=tt.prototype.toGeoJSON;var qe=R.b,$t=yt;function pi(xe){var N=new qe;return function(U,H){for(var de in U.layers)H.writeMessage(3,X,U.layers[de])}(xe,N),N.finish()}function X(xe,N){var U;N.writeVarintField(15,xe.version||1),N.writeStringField(1,xe.name||""),N.writeVarintField(5,xe.extent||4096);var H={keys:[],values:[],keycache:{},valuecache:{}};for(U=0;U<xe.length;U++)H.feature=xe.feature(U),N.writeMessage(2,lt,H);var de=H.keys;for(U=0;U<de.length;U++)N.writeStringField(3,de[U]);var fe=H.values;for(U=0;U<fe.length;U++)N.writeMessage(4,no,fe[U])}function lt(xe,N){var U=xe.feature;U.id!==void 0&&N.writeVarintField(1,U.id),N.writeMessage(2,Rn,xe),N.writeVarintField(3,U.type),N.writeMessage(4,wi,U)}function Rn(xe,N){var U=xe.feature,H=xe.keys,de=xe.values,fe=xe.keycache,Le=xe.valuecache;for(var Ge in U.properties){var me=U.properties[Ge],We=fe[Ge];if(me!==null){We===void 0&&(H.push(Ge),fe[Ge]=We=H.length-1),N.writeVarint(We);var ht=typeof me;ht!=="string"&&ht!=="boolean"&&ht!=="number"&&(me=JSON.stringify(me));var at=ht+":"+me,si=Le[at];si===void 0&&(de.push(me),Le[at]=si=de.length-1),N.writeVarint(si)}}}function hr(xe,N){return(N<<3)+(7&xe)}function it(xe){return xe<<1^xe>>31}function wi(xe,N){for(var U=xe.loadGeometry(),H=xe.type,de=0,fe=0,Le=U.length,Ge=0;Ge<Le;Ge++){var me=U[Ge],We=1;H===1&&(We=me.length),N.writeVarint(hr(1,We));for(var ht=H===3?me.length-1:me.length,at=0;at<ht;at++){at===1&&H!==1&&N.writeVarint(hr(2,ht-1));var si=me[at].x-de,Ti=me[at].y-fe;N.writeVarint(it(si)),N.writeVarint(it(Ti)),de+=si,fe+=Ti}H===3&&N.writeVarint(hr(7,1))}}function no(xe,N){var U=typeof xe;U==="string"?N.writeStringField(1,xe):U==="boolean"?N.writeBooleanField(7,xe):U==="number"&&(xe%1!=0?N.writeDoubleField(3,xe):xe<0?N.writeSVarintField(6,xe):N.writeVarintField(5,xe))}Xe.exports=pi,Xe.exports.fromVectorTileJs=pi,Xe.exports.fromGeojsonVt=function(xe,N){N=N||{};var U={};for(var H in xe)U[H]=new $t(xe[H].features,N),U[H].name=H,U[H].version=N.version,U[H].extent=N.extent;return pi({layers:U})},Xe.exports.GeoJSONWrapper=$t;var Cr=R.g(Xe.exports);const on={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:xe=>xe},nn=Math.fround||(zo=new Float32Array(1),xe=>(zo[0]=+xe,zo[0]));var zo;const kr=3,je=5,Ro=6;class Lo{constructor(N){this.options=Object.assign(Object.create(on),N),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(N){const{log:U,minZoom:H,maxZoom:de}=this.options;U&&console.time("total time");const fe=`prepare ${N.length} points`;U&&console.time(fe),this.points=N;const Le=[];for(let me=0;me<N.length;me++){const We=N[me];if(!We.geometry)continue;const[ht,at]=We.geometry.coordinates,si=nn(Be(ht)),Ti=nn(Pr(at));Le.push(si,Ti,1/0,me,-1,1),this.options.reduce&&Le.push(0)}let Ge=this.trees[de+1]=this._createTree(Le);U&&console.timeEnd(fe);for(let me=de;me>=H;me--){const We=+Date.now();Ge=this.trees[me]=this._createTree(this._cluster(Ge,me)),U&&console.log("z%d: %d clusters in %dms",me,Ge.numItems,+Date.now()-We)}return U&&console.timeEnd("total time"),this}getClusters(N,U){let H=((N[0]+180)%360+360)%360-180;const de=Math.max(-90,Math.min(90,N[1]));let fe=N[2]===180?180:((N[2]+180)%360+360)%360-180;const Le=Math.max(-90,Math.min(90,N[3]));if(N[2]-N[0]>=360)H=-180,fe=180;else if(H>fe){const at=this.getClusters([H,de,180,Le],U),si=this.getClusters([-180,de,fe,Le],U);return at.concat(si)}const Ge=this.trees[this._limitZoom(U)],me=Ge.range(Be(H),Pr(Le),Be(fe),Pr(de)),We=Ge.data,ht=[];for(const at of me){const si=this.stride*at;ht.push(We[si+je]>1?xs(We,si,this.clusterProps):this.points[We[si+kr]])}return ht}getChildren(N){const U=this._getOriginId(N),H=this._getOriginZoom(N),de="No cluster with the specified id.",fe=this.trees[H];if(!fe)throw new Error(de);const Le=fe.data;if(U*this.stride>=Le.length)throw new Error(de);const Ge=this.options.radius/(this.options.extent*Math.pow(2,H-1)),me=fe.within(Le[U*this.stride],Le[U*this.stride+1],Ge),We=[];for(const ht of me){const at=ht*this.stride;Le[at+4]===N&&We.push(Le[at+je]>1?xs(Le,at,this.clusterProps):this.points[Le[at+kr]])}if(We.length===0)throw new Error(de);return We}getLeaves(N,U,H){const de=[];return this._appendLeaves(de,N,U=U||10,H=H||0,0),de}getTile(N,U,H){const de=this.trees[this._limitZoom(N)],fe=Math.pow(2,N),{extent:Le,radius:Ge}=this.options,me=Ge/Le,We=(H-me)/fe,ht=(H+1+me)/fe,at={features:[]};return this._addTileFeatures(de.range((U-me)/fe,We,(U+1+me)/fe,ht),de.data,U,H,fe,at),U===0&&this._addTileFeatures(de.range(1-me/fe,We,1,ht),de.data,fe,H,fe,at),U===fe-1&&this._addTileFeatures(de.range(0,We,me/fe,ht),de.data,-1,H,fe,at),at.features.length?at:null}getClusterExpansionZoom(N){let U=this._getOriginZoom(N)-1;for(;U<=this.options.maxZoom;){const H=this.getChildren(N);if(U++,H.length!==1)break;N=H[0].properties.cluster_id}return U}_appendLeaves(N,U,H,de,fe){const Le=this.getChildren(U);for(const Ge of Le){const me=Ge.properties;if(me&&me.cluster?fe+me.point_count<=de?fe+=me.point_count:fe=this._appendLeaves(N,me.cluster_id,H,de,fe):fe<de?fe++:N.push(Ge),N.length===H)break}return fe}_createTree(N){const U=new R.K(N.length/this.stride|0,this.options.nodeSize,Float32Array);for(let H=0;H<N.length;H+=this.stride)U.add(N[H],N[H+1]);return U.finish(),U.data=N,U}_addTileFeatures(N,U,H,de,fe,Le){for(const Ge of N){const me=Ge*this.stride,We=U[me+je]>1;let ht,at,si;if(We)ht=bs(U,me,this.clusterProps),at=U[me],si=U[me+1];else{const Ei=this.points[U[me+kr]];ht=Ei.properties;const[zi,ui]=Ei.geometry.coordinates;at=Be(zi),si=Pr(ui)}const Ti={type:1,geometry:[[Math.round(this.options.extent*(at*fe-H)),Math.round(this.options.extent*(si*fe-de))]],tags:ht};let rr;rr=We||this.options.generateId?U[me+kr]:this.points[U[me+kr]].id,rr!==void 0&&(Ti.id=rr),Le.features.push(Ti)}}_limitZoom(N){return Math.max(this.options.minZoom,Math.min(Math.floor(+N),this.options.maxZoom+1))}_cluster(N,U){const{radius:H,extent:de,reduce:fe,minPoints:Le}=this.options,Ge=H/(de*Math.pow(2,U)),me=N.data,We=[],ht=this.stride;for(let at=0;at<me.length;at+=ht){if(me[at+2]<=U)continue;me[at+2]=U;const si=me[at],Ti=me[at+1],rr=N.within(me[at],me[at+1],Ge),Ei=me[at+je];let zi=Ei;for(const ui of rr){const dr=ui*ht;me[dr+2]>U&&(zi+=me[dr+je])}if(zi>Ei&&zi>=Le){let ui,dr=si*Ei,br=Ti*Ei,wr=-1;const xo=((at/ht|0)<<5)+(U+1)+this.points.length;for(const la of rr){const Dr=la*ht;if(me[Dr+2]<=U)continue;me[Dr+2]=U;const sn=me[Dr+je];dr+=me[Dr]*sn,br+=me[Dr+1]*sn,me[Dr+4]=xo,fe&&(ui||(ui=this._map(me,at,!0),wr=this.clusterProps.length,this.clusterProps.push(ui)),fe(ui,this._map(me,Dr)))}me[at+4]=xo,We.push(dr/zi,br/zi,1/0,xo,-1,zi),fe&&We.push(wr)}else{for(let ui=0;ui<ht;ui++)We.push(me[at+ui]);if(zi>1)for(const ui of rr){const dr=ui*ht;if(!(me[dr+2]<=U)){me[dr+2]=U;for(let br=0;br<ht;br++)We.push(me[dr+br])}}}}return We}_getOriginId(N){return N-this.points.length>>5}_getOriginZoom(N){return(N-this.points.length)%32}_map(N,U,H){if(N[U+je]>1){const Le=this.clusterProps[N[U+Ro]];return H?Object.assign({},Le):Le}const de=this.points[N[U+kr]].properties,fe=this.options.map(de);return H&&fe===de?Object.assign({},fe):fe}}function xs(xe,N,U){return{type:"Feature",id:xe[N+kr],properties:bs(xe,N,U),geometry:{type:"Point",coordinates:[(H=xe[N],360*(H-.5)),jd(xe[N+1])]}};var H}function bs(xe,N,U){const H=xe[N+je],de=H>=1e4?`${Math.round(H/1e3)}k`:H>=1e3?Math.round(H/100)/10+"k":H,fe=xe[N+Ro],Le=fe===-1?{}:Object.assign({},U[fe]);return Object.assign(Le,{cluster:!0,cluster_id:xe[N+kr],point_count:H,point_count_abbreviated:de})}function Be(xe){return xe/360+.5}function Pr(xe){const N=Math.sin(xe*Math.PI/180),U=.5-.25*Math.log((1+N)/(1-N))/Math.PI;return U<0?0:U>1?1:U}function jd(xe){const N=(180-360*xe)*Math.PI/180;return 360*Math.atan(Math.exp(N))/Math.PI-90}var na={exports:{}};na.exports=function(){function xe(le,ue,ge,be){for(var we,Ie=be,Pe=ge-ue>>1,Ee=ge-ue,Ne=le[ue],Ce=le[ue+1],vt=le[ge],ei=le[ge+1],Ye=ue+3;Ye<ge;Ye+=3){var Xt=N(le[Ye],le[Ye+1],Ne,Ce,vt,ei);if(Xt>Ie)we=Ye,Ie=Xt;else if(Xt===Ie){var Si=Math.abs(Ye-Pe);Si<Ee&&(we=Ye,Ee=Si)}}Ie>be&&(we-ue>3&&xe(le,ue,we,be),le[we+2]=Ie,ge-we>3&&xe(le,we,ge,be))}function N(le,ue,ge,be,we,Ie){var Pe=we-ge,Ee=Ie-be;if(Pe!==0||Ee!==0){var Ne=((le-ge)*Pe+(ue-be)*Ee)/(Pe*Pe+Ee*Ee);Ne>1?(ge=we,be=Ie):Ne>0&&(ge+=Pe*Ne,be+=Ee*Ne)}return(Pe=le-ge)*Pe+(Ee=ue-be)*Ee}function U(le,ue,ge,be){var we={id:le===void 0?null:le,type:ue,geometry:ge,tags:be,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Ie){var Pe=Ie.geometry,Ee=Ie.type;if(Ee==="Point"||Ee==="MultiPoint"||Ee==="LineString")H(Ie,Pe);else if(Ee==="Polygon"||Ee==="MultiLineString")for(var Ne=0;Ne<Pe.length;Ne++)H(Ie,Pe[Ne]);else if(Ee==="MultiPolygon")for(Ne=0;Ne<Pe.length;Ne++)for(var Ce=0;Ce<Pe[Ne].length;Ce++)H(Ie,Pe[Ne][Ce])}(we),we}function H(le,ue){for(var ge=0;ge<ue.length;ge+=3)le.minX=Math.min(le.minX,ue[ge]),le.minY=Math.min(le.minY,ue[ge+1]),le.maxX=Math.max(le.maxX,ue[ge]),le.maxY=Math.max(le.maxY,ue[ge+1])}function de(le,ue,ge,be){if(ue.geometry){var we=ue.geometry.coordinates,Ie=ue.geometry.type,Pe=Math.pow(ge.tolerance/((1<<ge.maxZoom)*ge.extent),2),Ee=[],Ne=ue.id;if(ge.promoteId?Ne=ue.properties[ge.promoteId]:ge.generateId&&(Ne=be||0),Ie==="Point")fe(we,Ee);else if(Ie==="MultiPoint")for(var Ce=0;Ce<we.length;Ce++)fe(we[Ce],Ee);else if(Ie==="LineString")Le(we,Ee,Pe,!1);else if(Ie==="MultiLineString"){if(ge.lineMetrics){for(Ce=0;Ce<we.length;Ce++)Le(we[Ce],Ee=[],Pe,!1),le.push(U(Ne,"LineString",Ee,ue.properties));return}Ge(we,Ee,Pe,!1)}else if(Ie==="Polygon")Ge(we,Ee,Pe,!0);else{if(Ie!=="MultiPolygon"){if(Ie==="GeometryCollection"){for(Ce=0;Ce<ue.geometry.geometries.length;Ce++)de(le,{id:Ne,geometry:ue.geometry.geometries[Ce],properties:ue.properties},ge,be);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Ce=0;Ce<we.length;Ce++){var vt=[];Ge(we[Ce],vt,Pe,!0),Ee.push(vt)}}le.push(U(Ne,Ie,Ee,ue.properties))}}function fe(le,ue){ue.push(me(le[0])),ue.push(We(le[1])),ue.push(0)}function Le(le,ue,ge,be){for(var we,Ie,Pe=0,Ee=0;Ee<le.length;Ee++){var Ne=me(le[Ee][0]),Ce=We(le[Ee][1]);ue.push(Ne),ue.push(Ce),ue.push(0),Ee>0&&(Pe+=be?(we*Ce-Ne*Ie)/2:Math.sqrt(Math.pow(Ne-we,2)+Math.pow(Ce-Ie,2))),we=Ne,Ie=Ce}var vt=ue.length-3;ue[2]=1,xe(ue,0,vt,ge),ue[vt+2]=1,ue.size=Math.abs(Pe),ue.start=0,ue.end=ue.size}function Ge(le,ue,ge,be){for(var we=0;we<le.length;we++){var Ie=[];Le(le[we],Ie,ge,be),ue.push(Ie)}}function me(le){return le/360+.5}function We(le){var ue=Math.sin(le*Math.PI/180),ge=.5-.25*Math.log((1+ue)/(1-ue))/Math.PI;return ge<0?0:ge>1?1:ge}function ht(le,ue,ge,be,we,Ie,Pe,Ee){if(be/=ue,Ie>=(ge/=ue)&&Pe<be)return le;if(Pe<ge||Ie>=be)return null;for(var Ne=[],Ce=0;Ce<le.length;Ce++){var vt=le[Ce],ei=vt.geometry,Ye=vt.type,Xt=we===0?vt.minX:vt.minY,Si=we===0?vt.maxX:vt.maxY;if(Xt>=ge&&Si<be)Ne.push(vt);else if(!(Si<ge||Xt>=be)){var Ri=[];if(Ye==="Point"||Ye==="MultiPoint")at(ei,Ri,ge,be,we);else if(Ye==="LineString")si(ei,Ri,ge,be,we,!1,Ee.lineMetrics);else if(Ye==="MultiLineString")rr(ei,Ri,ge,be,we,!1);else if(Ye==="Polygon")rr(ei,Ri,ge,be,we,!0);else if(Ye==="MultiPolygon")for(var qi=0;qi<ei.length;qi++){var pr=[];rr(ei[qi],pr,ge,be,we,!0),pr.length&&Ri.push(pr)}if(Ri.length){if(Ee.lineMetrics&&Ye==="LineString"){for(qi=0;qi<Ri.length;qi++)Ne.push(U(vt.id,Ye,Ri[qi],vt.tags));continue}Ye!=="LineString"&&Ye!=="MultiLineString"||(Ri.length===1?(Ye="LineString",Ri=Ri[0]):Ye="MultiLineString"),Ye!=="Point"&&Ye!=="MultiPoint"||(Ye=Ri.length===3?"Point":"MultiPoint"),Ne.push(U(vt.id,Ye,Ri,vt.tags))}}}return Ne.length?Ne:null}function at(le,ue,ge,be,we){for(var Ie=0;Ie<le.length;Ie+=3){var Pe=le[Ie+we];Pe>=ge&&Pe<=be&&(ue.push(le[Ie]),ue.push(le[Ie+1]),ue.push(le[Ie+2]))}}function si(le,ue,ge,be,we,Ie,Pe){for(var Ee,Ne,Ce=Ti(le),vt=we===0?zi:ui,ei=le.start,Ye=0;Ye<le.length-3;Ye+=3){var Xt=le[Ye],Si=le[Ye+1],Ri=le[Ye+2],qi=le[Ye+3],pr=le[Ye+4],so=we===0?Xt:Si,Ki=we===0?qi:pr,Tr=!1;Pe&&(Ee=Math.sqrt(Math.pow(Xt-qi,2)+Math.pow(Si-pr,2))),so<ge?Ki>ge&&(Ne=vt(Ce,Xt,Si,qi,pr,ge),Pe&&(Ce.start=ei+Ee*Ne)):so>be?Ki<be&&(Ne=vt(Ce,Xt,Si,qi,pr,be),Pe&&(Ce.start=ei+Ee*Ne)):Ei(Ce,Xt,Si,Ri),Ki<ge&&so>=ge&&(Ne=vt(Ce,Xt,Si,qi,pr,ge),Tr=!0),Ki>be&&so<=be&&(Ne=vt(Ce,Xt,Si,qi,pr,be),Tr=!0),!Ie&&Tr&&(Pe&&(Ce.end=ei+Ee*Ne),ue.push(Ce),Ce=Ti(le)),Pe&&(ei+=Ee)}var fr=le.length-3;Xt=le[fr],Si=le[fr+1],Ri=le[fr+2],(so=we===0?Xt:Si)>=ge&&so<=be&&Ei(Ce,Xt,Si,Ri),fr=Ce.length-3,Ie&&fr>=3&&(Ce[fr]!==Ce[0]||Ce[fr+1]!==Ce[1])&&Ei(Ce,Ce[0],Ce[1],Ce[2]),Ce.length&&ue.push(Ce)}function Ti(le){var ue=[];return ue.size=le.size,ue.start=le.start,ue.end=le.end,ue}function rr(le,ue,ge,be,we,Ie){for(var Pe=0;Pe<le.length;Pe++)si(le[Pe],ue,ge,be,we,Ie,!1)}function Ei(le,ue,ge,be){le.push(ue),le.push(ge),le.push(be)}function zi(le,ue,ge,be,we,Ie){var Pe=(Ie-ue)/(be-ue);return le.push(Ie),le.push(ge+(we-ge)*Pe),le.push(1),Pe}function ui(le,ue,ge,be,we,Ie){var Pe=(Ie-ge)/(we-ge);return le.push(ue+(be-ue)*Pe),le.push(Ie),le.push(1),Pe}function dr(le,ue){for(var ge=[],be=0;be<le.length;be++){var we,Ie=le[be],Pe=Ie.type;if(Pe==="Point"||Pe==="MultiPoint"||Pe==="LineString")we=br(Ie.geometry,ue);else if(Pe==="MultiLineString"||Pe==="Polygon"){we=[];for(var Ee=0;Ee<Ie.geometry.length;Ee++)we.push(br(Ie.geometry[Ee],ue))}else if(Pe==="MultiPolygon")for(we=[],Ee=0;Ee<Ie.geometry.length;Ee++){for(var Ne=[],Ce=0;Ce<Ie.geometry[Ee].length;Ce++)Ne.push(br(Ie.geometry[Ee][Ce],ue));we.push(Ne)}ge.push(U(Ie.id,Pe,we,Ie.tags))}return ge}function br(le,ue){var ge=[];ge.size=le.size,le.start!==void 0&&(ge.start=le.start,ge.end=le.end);for(var be=0;be<le.length;be+=3)ge.push(le[be]+ue,le[be+1],le[be+2]);return ge}function wr(le,ue){if(le.transformed)return le;var ge,be,we,Ie=1<<le.z,Pe=le.x,Ee=le.y;for(ge=0;ge<le.features.length;ge++){var Ne=le.features[ge],Ce=Ne.geometry,vt=Ne.type;if(Ne.geometry=[],vt===1)for(be=0;be<Ce.length;be+=2)Ne.geometry.push(xo(Ce[be],Ce[be+1],ue,Ie,Pe,Ee));else for(be=0;be<Ce.length;be++){var ei=[];for(we=0;we<Ce[be].length;we+=2)ei.push(xo(Ce[be][we],Ce[be][we+1],ue,Ie,Pe,Ee));Ne.geometry.push(ei)}}return le.transformed=!0,le}function xo(le,ue,ge,be,we,Ie){return[Math.round(ge*(le*be-we)),Math.round(ge*(ue*be-Ie))]}function la(le,ue,ge,be,we){for(var Ie=ue===we.maxZoom?0:we.tolerance/((1<<ue)*we.extent),Pe={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:ge,y:be,z:ue,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Ee=0;Ee<le.length;Ee++){Pe.numFeatures++,Dr(Pe,le[Ee],Ie,we);var Ne=le[Ee].minX,Ce=le[Ee].minY,vt=le[Ee].maxX,ei=le[Ee].maxY;Ne<Pe.minX&&(Pe.minX=Ne),Ce<Pe.minY&&(Pe.minY=Ce),vt>Pe.maxX&&(Pe.maxX=vt),ei>Pe.maxY&&(Pe.maxY=ei)}return Pe}function Dr(le,ue,ge,be){var we=ue.geometry,Ie=ue.type,Pe=[];if(Ie==="Point"||Ie==="MultiPoint")for(var Ee=0;Ee<we.length;Ee+=3)Pe.push(we[Ee]),Pe.push(we[Ee+1]),le.numPoints++,le.numSimplified++;else if(Ie==="LineString")sn(Pe,we,le,ge,!1,!1);else if(Ie==="MultiLineString"||Ie==="Polygon")for(Ee=0;Ee<we.length;Ee++)sn(Pe,we[Ee],le,ge,Ie==="Polygon",Ee===0);else if(Ie==="MultiPolygon")for(var Ne=0;Ne<we.length;Ne++){var Ce=we[Ne];for(Ee=0;Ee<Ce.length;Ee++)sn(Pe,Ce[Ee],le,ge,!0,Ee===0)}if(Pe.length){var vt=ue.tags||null;if(Ie==="LineString"&&be.lineMetrics){for(var ei in vt={},ue.tags)vt[ei]=ue.tags[ei];vt.mapbox_clip_start=we.start/we.size,vt.mapbox_clip_end=we.end/we.size}var Ye={geometry:Pe,type:Ie==="Polygon"||Ie==="MultiPolygon"?3:Ie==="LineString"||Ie==="MultiLineString"?2:1,tags:vt};ue.id!==null&&(Ye.id=ue.id),le.features.push(Ye)}}function sn(le,ue,ge,be,we,Ie){var Pe=be*be;if(be>0&&ue.size<(we?Pe:be))ge.numPoints+=ue.length/3;else{for(var Ee=[],Ne=0;Ne<ue.length;Ne+=3)(be===0||ue[Ne+2]>Pe)&&(ge.numSimplified++,Ee.push(ue[Ne]),Ee.push(ue[Ne+1])),ge.numPoints++;we&&function(Ce,vt){for(var ei=0,Ye=0,Xt=Ce.length,Si=Xt-2;Ye<Xt;Si=Ye,Ye+=2)ei+=(Ce[Ye]-Ce[Si])*(Ce[Ye+1]+Ce[Si+1]);if(ei>0===vt)for(Ye=0,Xt=Ce.length;Ye<Xt/2;Ye+=2){var Ri=Ce[Ye],qi=Ce[Ye+1];Ce[Ye]=Ce[Xt-2-Ye],Ce[Ye+1]=Ce[Xt-1-Ye],Ce[Xt-2-Ye]=Ri,Ce[Xt-1-Ye]=qi}}(Ee,Ie),le.push(Ee)}}function Ln(le,ue){var ge=(ue=this.options=function(we,Ie){for(var Pe in Ie)we[Pe]=Ie[Pe];return we}(Object.create(this.options),ue)).debug;if(ge&&console.time("preprocess data"),ue.maxZoom<0||ue.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ue.promoteId&&ue.generateId)throw new Error("promoteId and generateId cannot be used together.");var be=function(we,Ie){var Pe=[];if(we.type==="FeatureCollection")for(var Ee=0;Ee<we.features.length;Ee++)de(Pe,we.features[Ee],Ie,Ee);else de(Pe,we.type==="Feature"?we:{geometry:we},Ie);return Pe}(le,ue);this.tiles={},this.tileCoords=[],ge&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ue.indexMaxZoom,ue.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(be=function(we,Ie){var Pe=Ie.buffer/Ie.extent,Ee=we,Ne=ht(we,1,-1-Pe,Pe,0,-1,2,Ie),Ce=ht(we,1,1-Pe,2+Pe,0,-1,2,Ie);return(Ne||Ce)&&(Ee=ht(we,1,-Pe,1+Pe,0,-1,2,Ie)||[],Ne&&(Ee=dr(Ne,1).concat(Ee)),Ce&&(Ee=Ee.concat(dr(Ce,-1)))),Ee}(be,ue)).length&&this.splitTile(be,0,0,0),ge&&(be.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function ca(le,ue,ge){return 32*((1<<le)*ge+ue)+le}return Ln.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ln.prototype.splitTile=function(le,ue,ge,be,we,Ie,Pe){for(var Ee=[le,ue,ge,be],Ne=this.options,Ce=Ne.debug;Ee.length;){be=Ee.pop(),ge=Ee.pop(),ue=Ee.pop(),le=Ee.pop();var vt=1<<ue,ei=ca(ue,ge,be),Ye=this.tiles[ei];if(!Ye&&(Ce>1&&console.time("creation"),Ye=this.tiles[ei]=la(le,ue,ge,be,Ne),this.tileCoords.push({z:ue,x:ge,y:be}),Ce)){Ce>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ue,ge,be,Ye.numFeatures,Ye.numPoints,Ye.numSimplified),console.timeEnd("creation"));var Xt="z"+ue;this.stats[Xt]=(this.stats[Xt]||0)+1,this.total++}if(Ye.source=le,we){if(ue===Ne.maxZoom||ue===we)continue;var Si=1<<we-ue;if(ge!==Math.floor(Ie/Si)||be!==Math.floor(Pe/Si))continue}else if(ue===Ne.indexMaxZoom||Ye.numPoints<=Ne.indexMaxPoints)continue;if(Ye.source=null,le.length!==0){Ce>1&&console.time("clipping");var Ri,qi,pr,so,Ki,Tr,fr=.5*Ne.buffer/Ne.extent,ua=.5-fr,On=.5+fr,ha=1+fr;Ri=qi=pr=so=null,Ki=ht(le,vt,ge-fr,ge+On,0,Ye.minX,Ye.maxX,Ne),Tr=ht(le,vt,ge+ua,ge+ha,0,Ye.minX,Ye.maxX,Ne),le=null,Ki&&(Ri=ht(Ki,vt,be-fr,be+On,1,Ye.minY,Ye.maxY,Ne),qi=ht(Ki,vt,be+ua,be+ha,1,Ye.minY,Ye.maxY,Ne),Ki=null),Tr&&(pr=ht(Tr,vt,be-fr,be+On,1,Ye.minY,Ye.maxY,Ne),so=ht(Tr,vt,be+ua,be+ha,1,Ye.minY,Ye.maxY,Ne),Tr=null),Ce>1&&console.timeEnd("clipping"),Ee.push(Ri||[],ue+1,2*ge,2*be),Ee.push(qi||[],ue+1,2*ge,2*be+1),Ee.push(pr||[],ue+1,2*ge+1,2*be),Ee.push(so||[],ue+1,2*ge+1,2*be+1)}}},Ln.prototype.getTile=function(le,ue,ge){var be=this.options,we=be.extent,Ie=be.debug;if(le<0||le>24)return null;var Pe=1<<le,Ee=ca(le,ue=(ue%Pe+Pe)%Pe,ge);if(this.tiles[Ee])return wr(this.tiles[Ee],we);Ie>1&&console.log("drilling down to z%d-%d-%d",le,ue,ge);for(var Ne,Ce=le,vt=ue,ei=ge;!Ne&&Ce>0;)Ce--,vt=Math.floor(vt/2),ei=Math.floor(ei/2),Ne=this.tiles[ca(Ce,vt,ei)];return Ne&&Ne.source?(Ie>1&&console.log("found parent tile z%d-%d-%d",Ce,vt,ei),Ie>1&&console.time("drilling down"),this.splitTile(Ne.source,Ce,vt,ei,le,ue,ge),Ie>1&&console.timeEnd("drilling down"),this.tiles[Ee]?wr(this.tiles[Ee],we):null):null},function(le,ue){return new Ln(le,ue)}}();var Fc=R.g(na.exports);function Nc(xe,N){const U=xe.tileID.canonical;if(!this._geoJSONIndex)return N(null,null);const H=this._geoJSONIndex.getTile(U.z,U.x,U.y);if(!H)return N(null,null);const de=new class{constructor(Le){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=R.E,this.length=Le.length,this._features=Le}feature(Le){return new class{constructor(Ge){this._feature=Ge,this.extent=R.E,this.type=Ge.type,this.properties=Ge.tags,"id"in Ge&&!isNaN(Ge.id)&&(this.id=parseInt(Ge.id,10))}loadGeometry(){if(this._feature.type===1){const Ge=[];for(const me of this._feature.geometry)Ge.push([new R.P(me[0],me[1])]);return Ge}{const Ge=[];for(const me of this._feature.geometry){const We=[];for(const ht of me)We.push(new R.P(ht[0],ht[1]));Ge.push(We)}return Ge}}toGeoJSON(Ge,me,We){return ve.call(this,Ge,me,We)}}(this._features[Le])}}(H.features);let fe=Cr(de);fe.byteOffset===0&&fe.byteLength===fe.buffer.byteLength||(fe=new Uint8Array(fe)),N(null,{vectorTile:de,rawData:fe.buffer})}class jc extends R.d{constructor(N,U,H,de,fe,Le){super(N,U,H,de,Nc,Le),fe&&(this.loadGeoJSON=fe)}loadData(N,U){const H=N&&N.request,de=H&&H.collectResourceTiming;this.loadGeoJSON(N,(fe,Le)=>{if(fe||!Le)return U(fe);if(typeof Le!="object")return U(new Error(`Input data given to '${N.source}' is not a valid GeoJSON object.`));{ke(Le,!0);try{if(N.filter){const me=R.e(N.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(me.result==="error")throw new Error(me.value.map(We=>`${We.key}: ${We.message}`).join(", "));Le={type:"FeatureCollection",features:Le.features.filter(We=>me.value.evaluate({zoom:0},We))}}this._geoJSONIndex=N.cluster?new Lo(function({superclusterOptions:me,clusterProperties:We}){if(!We||!me)return me;const ht={},at={},si={accumulated:null,zoom:0},Ti={properties:null},rr=Object.keys(We);for(const Ei of rr){const[zi,ui]=We[Ei],dr=R.e(ui),br=R.e(typeof zi=="string"?[zi,["accumulated"],["get",Ei]]:zi);ht[Ei]=dr.value,at[Ei]=br.value}return me.map=Ei=>{Ti.properties=Ei;const zi={};for(const ui of rr)zi[ui]=ht[ui].evaluate(si,Ti);return zi},me.reduce=(Ei,zi)=>{Ti.properties=zi;for(const ui of rr)si.accumulated=Ei[ui],Ei[ui]=at[ui].evaluate(si,Ti)},me}(N)).load(Le.features):Fc(Le,N.geojsonVtOptions)}catch(me){return U(me)}this.loaded={};const Ge={};if(de){const me=R.f(H);me&&(Ge.resourceTiming={},Ge.resourceTiming[N.source]=JSON.parse(JSON.stringify(me)))}U(null,Ge)}})}reloadTile(N,U){const H=this.loaded;return H&&H[N.uid]?super.reloadTile(N,U):this.loadTile(N,U)}loadGeoJSON(N,U){if(N.request)R.h(N.request,U);else{if(typeof N.data!="string")return U(new Error(`Input data given to '${N.source}' is not a valid GeoJSON object.`));try{return U(null,JSON.parse(N.data))}catch{return U(new Error(`Input data given to '${N.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(N,U){try{U(null,this._geoJSONIndex.getClusterExpansionZoom(N.clusterId))}catch(H){U(H)}}getClusterChildren(N,U){try{U(null,this._geoJSONIndex.getChildren(N.clusterId))}catch(H){U(H)}}getClusterLeaves(N,U){try{U(null,this._geoJSONIndex.getLeaves(N.clusterId,N.limit,N.offset))}catch(H){U(H)}}}class Yi{constructor(N,U){this.tileID=new R.O(N.tileID.overscaledZ,N.tileID.wrap,N.tileID.canonical.z,N.tileID.canonical.x,N.tileID.canonical.y),this.tileZoom=N.tileZoom,this.uid=N.uid,this.zoom=N.zoom,this.canonical=N.tileID.canonical,this.pixelRatio=N.pixelRatio,this.tileSize=N.tileSize,this.source=N.source,this.overscaling=this.tileID.overscaleFactor(),this.projection=N.projection,this.brightness=U}parse(N,U,H,de){this.status="parsing";const fe=new R.O(H.tileID.overscaledZ,H.tileID.wrap,H.tileID.canonical.z,H.tileID.canonical.x,H.tileID.canonical.y),Le={},Ge=U.familiesBySource[H.source],me=new R.F(fe,H.promoteId);return me.bucketLayerIDs=[],R.l(N).then(We=>{if(!We)return de(new Error("Could not parse tile"));const ht=R.j(We,1/R.t(H.tileID.canonical)),at=We.json.extensionsUsed&&We.json.extensionsUsed.includes("MAPBOX_mesh_features"),si=new R.k(this.zoom,{brightness:this.brightness});for(const Ti in Ge)for(const rr of Ge[Ti]){const Ei=rr[0],zi=We.json.extensionsUsed;Ei.recalculate(si,[]);const ui=new R.T(ht,fe,zi&&zi.includes("MAPBOX_mesh_features"),this.brightness);at||(ui.needsUpload=!0),Le[Ei.fqid]=ui,ui.evaluate(Ei)}this.status="done",de(null,{buckets:Le,featureIndex:me})}).catch(We=>de(new Error(We.message)))}}class sa{constructor(N,U,H,de,fe,Le){this.actor=N,this.layerIndex=U,this.brightness=Le,this.loading={},this.loaded={}}loadTile(N,U){const H=N.uid,de=this.loading[H]=new Yi(N,this.brightness);R.i(N.request,(fe,Le)=>{const Ge=!this.loading[H];return delete this.loading[H],Ge||fe?(de.status="done",Ge||(this.loaded[H]=de),U(fe)):Le&&Le.byteLength!==0?void de.parse(Le,this.layerIndex,N,(me,We)=>{de.status="done",this.loaded=this.loaded||{},this.loaded[H]=de,me||!We?U(me):U(null,We)}):(de.status="done",this.loaded[H]=de,U())})}reloadTile(N,U){const H=this.loaded,de=N.uid;if(H&&H[de]){const fe=H[de];fe.projection=N.projection,fe.brightness=N.brightness;const Le=(Ge,me)=>{fe.reloadCallback&&(delete fe.reloadCallback,this.loadTile(N,U)),U(Ge,me)};fe.status==="parsing"?fe.reloadCallback=Le:fe.status==="done"&&this.loadTile(N,U)}}abortTile(N,U){const H=N.uid;this.loading[H]&&delete this.loading[H],U()}removeTile(N,U){const H=this.loaded,de=N.uid;H&&H[de]&&delete H[de],U()}}class aa{constructor(N){this.self=N,this.actor=new R.A(N,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=R.m({name:"mercator"}),this.workerSourceTypes={vector:R.d,geojson:jc,"batched-model":sa},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(U,H)=>{if(this.workerSourceTypes[U])throw new Error(`Worker source with name "${U}" already registered.`);this.workerSourceTypes[U]=H},this.self.registerRTLTextPlugin=U=>{if(R.n.isParsed())throw new Error("RTL text plugin already registered.");R.n.applyArabicShaping=U.applyArabicShaping,R.n.processBidirectionalText=U.processBidirectionalText,R.n.processStyledBidirectionalText=U.processStyledBidirectionalText}}clearCaches(N,U,H){delete this.layerIndexes[N],delete this.availableImages[N],delete this.workerSources[N],delete this.demWorkerSources[N],H()}checkIfReady(N,U,H){H()}setReferrer(N,U){this.referrer=U}spriteLoaded(N,{scope:U,isLoaded:H}){if(this.isSpriteLoaded[N]||(this.isSpriteLoaded[N]={}),this.isSpriteLoaded[N][U]=H,this.workerSources[N]&&this.workerSources[N][U])for(const de in this.workerSources[N][U]){const fe=this.workerSources[N][U][de];for(const Le in fe)fe[Le]instanceof R.d&&(fe[Le].isSpriteLoaded=H,fe[Le].fire(new R.o("isSpriteLoaded")))}}setImages(N,{scope:U,images:H},de){if(this.availableImages[N]||(this.availableImages[N]={}),this.availableImages[N][U]=H,this.workerSources[N]&&this.workerSources[N][U]){for(const fe in this.workerSources[N][U]){const Le=this.workerSources[N][U][fe];for(const Ge in Le)Le[Ge].availableImages=H}de()}else de()}setProjection(N,U){this.projections[N]=R.m(U)}setBrightness(N,U,H){this.brightness=U,H()}setLayers(N,U,H){this.getLayerIndex(N,U.scope).replace(U.layers,U.options),H()}updateLayers(N,U,H){this.getLayerIndex(N,U.scope).update(U.layers,U.removedIds,U.options),H()}loadTile(N,U,H){U.projection=this.projections[N]||this.defaultProjection,this.getWorkerSource(N,U.type,U.source,U.scope).loadTile(U,H)}loadDEMTile(N,U,H){this.getDEMWorkerSource(N,U.source,U.scope).loadTile(U,H)}reloadTile(N,U,H){U.projection=this.projections[N]||this.defaultProjection,this.getWorkerSource(N,U.type,U.source,U.scope).reloadTile(U,H)}abortTile(N,U,H){this.getWorkerSource(N,U.type,U.source,U.scope).abortTile(U,H)}removeTile(N,U,H){this.getWorkerSource(N,U.type,U.source,U.scope).removeTile(U,H)}removeSource(N,U,H){if(!(this.workerSources[N]&&this.workerSources[N][U.scope]&&this.workerSources[N][U.scope][U.type]&&this.workerSources[N][U.scope][U.type][U.source]))return;const de=this.workerSources[N][U.scope][U.type][U.source];delete this.workerSources[N][U.scope][U.type][U.source],de.removeSource!==void 0?de.removeSource(U,H):H()}loadWorkerSource(N,U,H){try{this.self.importScripts(U.url),H()}catch(de){H(de.toString())}}syncRTLPluginState(N,U,H){try{R.n.setState(U);const de=R.n.getPluginURL();if(R.n.isLoaded()&&!R.n.isParsed()&&de!=null){this.self.importScripts(de);const fe=R.n.isParsed();H(fe?void 0:new Error(`RTL Text Plugin failed to import scripts from ${de}`),fe)}}catch(de){H(de.toString())}}setDracoUrl(N,U){this.dracoUrl=U}getAvailableImages(N,U){this.availableImages[N]||(this.availableImages[N]={});let H=this.availableImages[N][U];return H||(H=[]),H}getLayerIndex(N,U){this.layerIndexes[N]||(this.layerIndexes[N]={});let H=this.layerIndexes[N][U];return H||(H=this.layerIndexes[N][U]=new ee,H.scope=U),H}getWorkerSource(N,U,H,de){if(this.workerSources[N]||(this.workerSources[N]={}),this.workerSources[N][de]||(this.workerSources[N][de]={}),this.workerSources[N][de][U]||(this.workerSources[N][de][U]={}),this.isSpriteLoaded[N]||(this.isSpriteLoaded[N]={}),!this.workerSources[N][de][U][H]){const fe={send:(Le,Ge,me,We,ht,at)=>{this.actor.send(Le,Ge,me,N,ht,at)},scheduler:this.actor.scheduler};this.workerSources[N][de][U][H]=new this.workerSourceTypes[U](fe,this.getLayerIndex(N,de),this.getAvailableImages(N,de),this.isSpriteLoaded[N][de],void 0,this.brightness)}return this.workerSources[N][de][U][H]}getDEMWorkerSource(N,U,H){return this.demWorkerSources[N]||(this.demWorkerSources[N]={}),this.demWorkerSources[N][H]||(this.demWorkerSources[N][H]={}),this.demWorkerSources[N][H][U]||(this.demWorkerSources[N][H][U]=new ne),this.demWorkerSources[N][H][U]}enforceCacheSizeLimit(N,U){R.q(U)}getWorkerPerformanceMetrics(N,U,H){H(void 0,void 0)}}return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new aa(self)),aa}),I(["./shared"],function(R){return R.s});var P=T;return P})})(wT);var H_=wT.exports;const k2=bT(H_);var pl=_D,mD=Object.prototype.hasOwnProperty;function _D(){for(var h={},d=0;d<arguments.length;d++){var m=arguments[d];for(var x in m)mD.call(m,x)&&(h[x]=m[x])}return h}var ET={exports:{}};(function(h,d){(function(){var m={};h.exports=m,m.simpleFilter=function(x,T){return T.filter(function(I){return m.test(x,I)})},m.test=function(x,T){return m.match(x,T)!==null},m.match=function(x,T,I){I=I||{};var P=0,R=[],C=T.length,Z=0,ee=0,ne=I.pre||"",Te=I.post||"",Me=I.caseSensitive&&T||T.toLowerCase(),ke;x=I.caseSensitive&&x||x.toLowerCase();for(var ve=0;ve<C;ve++)ke=T[ve],Me[ve]===x[P]?(ke=ne+ke+Te,P+=1,ee+=1+ee):ee=0,Z+=ee,R[R.length]=ke;return P===x.length?(Z=Me===x?1/0:Z,{rendered:R.join(""),score:Z}):null},m.filter=function(x,T,I){return!T||T.length===0?[]:typeof x!="string"?T:(I=I||{},T.reduce(function(P,R,C,Z){var ee=R;I.extract&&(ee=I.extract(R));var ne=m.match(x,ee,I);return ne!=null&&(P[P.length]={string:ne.rendered,score:ne.score,index:C,original:R}),P},[]).sort(function(P,R){var C=R.score-P.score;return C||P.index-R.index}))}})()})(ET);var gD=ET.exports,Zr=function(h){return this.component=h,this.items=[],this.active=0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,h.el.parentNode.insertBefore(this.wrapper,h.el.nextSibling),this};Zr.prototype.show=function(){this.element.style.display="block"};Zr.prototype.hide=function(){this.element.style.display="none"};Zr.prototype.add=function(h){this.items.push(h)};Zr.prototype.clear=function(){this.items=[],this.active=0};Zr.prototype.isEmpty=function(){return!this.items.length};Zr.prototype.isVisible=function(){return this.element.style.display==="block"};Zr.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var h=0;h<this.items.length;h++)this.drawItem(this.items[h],this.active===h);this.show()};Zr.prototype.drawItem=function(h,d){var m=document.createElement("li"),x=document.createElement("a");d&&(m.className+=" active"),x.innerHTML=h.string,m.appendChild(x),this.element.appendChild(m),m.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),m.addEventListener("mouseup",function(){this.handleMouseUp.call(this,h)}.bind(this))};Zr.prototype.handleMouseUp=function(h){this.selectingListItem=!1,this.component.value(h.original),this.clear(),this.draw()};Zr.prototype.move=function(h){this.active=h,this.draw()};Zr.prototype.previous=function(){this.move(this.active===0?this.items.length-1:this.active-1)};Zr.prototype.next=function(){this.move(this.active===this.items.length-1?0:this.active+1)};Zr.prototype.drawError=function(h){var d=document.createElement("li");d.innerHTML=h,this.element.appendChild(d),this.show()};var yD=Zr,vD=pl,xD=gD,bD=yD,xr=function(h,d,m){return m=m||{},this.options=vD({minLength:2,limit:5,filter:!0,hideOnBlur:!0},m),this.el=h,this.data=d||[],this.list=new bD(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",function(x){this.handleKeyUp(x.keyCode)}.bind(this),!1),this.el.addEventListener("keydown",function(x){this.handleKeyDown(x)}.bind(this)),this.el.addEventListener("focus",function(){this.handleFocus()}.bind(this)),this.el.addEventListener("blur",function(){this.handleBlur()}.bind(this)),this.el.addEventListener("paste",function(x){this.handlePaste(x)}.bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};xr.prototype.handleKeyUp=function(h){h===40||h===38||h===27||h===13||h===9||this.handleInputChange(this.el.value)};xr.prototype.handleKeyDown=function(h){switch(h.keyCode){case 13:case 9:this.list.isEmpty()||(this.list.isVisible()&&h.preventDefault(),this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next();break}};xr.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()};xr.prototype.handlePaste=function(h){if(h.clipboardData)this.handleInputChange(h.clipboardData.getData("Text"));else{var d=this;setTimeout(function(){d.handleInputChange(h.target.value)},100)}};xr.prototype.handleInputChange=function(h){if(this.query=this.normalize(h),this.list.clear(),this.query.length<this.options.minLength){this.list.draw();return}this.getCandidates(function(d){for(var m=0;m<d.length&&(this.list.add(d[m]),m!==this.options.limit-1);m++);this.list.draw()}.bind(this))};xr.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1};xr.prototype.update=function(h){this.data=h,this.handleKeyUp()};xr.prototype.clear=function(){this.data=[],this.list.clear()};xr.prototype.normalize=function(h){return h=h.toLowerCase(),h};xr.prototype.match=function(h,d){return h.indexOf(d)>-1};xr.prototype.value=function(h){if(this.selected=h,this.el.value=this.getItemValue(h),document.createEvent){var d=document.createEvent("HTMLEvents");d.initEvent("change",!0,!1),this.el.dispatchEvent(d)}else this.el.fireEvent("onchange")};xr.prototype.getCandidates=function(h){var d={pre:"<strong>",post:"</strong>",extract:function(x){return this.getItemValue(x)}.bind(this)},m;this.options.filter?(m=xD.filter(this.query,this.data,d),m=m.map(function(x){return{original:x.original,string:this.render(x.original,x.string)}}.bind(this))):m=this.data.map(function(x){var T=this.render(x);return{original:x,string:T}}.bind(this)),h(m)};xr.prototype.getItemValue=function(h){return h};xr.prototype.render=function(h,d){if(d)return d;for(var m=h.original?this.getItemValue(h.original):this.getItemValue(h),x=this.normalize(m),T=x.lastIndexOf(this.query);T>-1;){var I=T+this.query.length;m=m.slice(0,T)+"<strong>"+m.slice(T,I)+"</strong>"+m.slice(I),T=x.slice(0,T).lastIndexOf(this.query)}return m};xr.prototype.renderError=function(h){this.list.drawError(h)};var wD=xr,ST=wD,TD=ST;typeof window<"u"&&(window.Suggestions=ST);var ED="Expected a function",P2=NaN,SD="[object Symbol]",AD=/^\s+|\s+$/g,MD=/^[-+]0x[0-9a-f]+$/i,ID=/^0b[01]+$/i,CD=/^0o[0-7]+$/i,kD=parseInt,PD=typeof Do=="object"&&Do&&Do.Object===Object&&Do,DD=typeof self=="object"&&self&&self.Object===Object&&self,zD=PD||DD||Function("return this")(),RD=Object.prototype,LD=RD.toString,OD=Math.max,BD=Math.min,I_=function(){return zD.Date.now()};function FD(h,d,m){var x,T,I,P,R,C,Z=0,ee=!1,ne=!1,Te=!0;if(typeof h!="function")throw new TypeError(ED);d=D2(d)||0,Z_(m)&&(ee=!!m.leading,ne="maxWait"in m,I=ne?OD(D2(m.maxWait)||0,d):I,Te="trailing"in m?!!m.trailing:Te);function Me(qe){var $t=x,pi=T;return x=T=void 0,Z=qe,P=h.apply(pi,$t),P}function ke(qe){return Z=qe,R=setTimeout(ut,d),ee?Me(qe):P}function ve(qe){var $t=qe-C,pi=qe-Z,X=d-$t;return ne?BD(X,I-pi):X}function Xe(qe){var $t=qe-C,pi=qe-Z;return C===void 0||$t>=d||$t<0||ne&&pi>=I}function ut(){var qe=I_();if(Xe(qe))return tt(qe);R=setTimeout(ut,ve(qe))}function tt(qe){return R=void 0,Te&&x?Me(qe):(x=T=void 0,P)}function yt(){R!==void 0&&clearTimeout(R),Z=0,x=C=T=R=void 0}function _t(){return R===void 0?P:tt(I_())}function st(){var qe=I_(),$t=Xe(qe);if(x=arguments,T=this,C=qe,$t){if(R===void 0)return ke(C);if(ne)return R=setTimeout(ut,d),Me(C)}return R===void 0&&(R=setTimeout(ut,d)),P}return st.cancel=yt,st.flush=_t,st}function Z_(h){var d=typeof h;return!!h&&(d=="object"||d=="function")}function ND(h){return!!h&&typeof h=="object"}function jD(h){return typeof h=="symbol"||ND(h)&&LD.call(h)==SD}function D2(h){if(typeof h=="number")return h;if(jD(h))return P2;if(Z_(h)){var d=typeof h.valueOf=="function"?h.valueOf():h;h=Z_(d)?d+"":d}if(typeof h!="string")return h===0?h:+h;h=h.replace(AD,"");var m=ID.test(h);return m||CD.test(h)?kD(h.slice(2),m?2:8):MD.test(h)?P2:+h}var VD=FD,ug={exports:{}},ll=typeof Reflect=="object"?Reflect:null,z2=ll&&typeof ll.apply=="function"?ll.apply:function(h,d,m){return Function.prototype.apply.call(h,d,m)},ld;ll&&typeof ll.ownKeys=="function"?ld=ll.ownKeys:Object.getOwnPropertySymbols?ld=function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:ld=function(h){return Object.getOwnPropertyNames(h)};function UD(h){console&&console.warn&&console.warn(h)}var AT=Number.isNaN||function(h){return h!==h};function Ii(){Ii.init.call(this)}ug.exports=Ii;ug.exports.once=WD;Ii.EventEmitter=Ii;Ii.prototype._events=void 0;Ii.prototype._eventsCount=0;Ii.prototype._maxListeners=void 0;var R2=10;function zd(h){if(typeof h!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof h)}Object.defineProperty(Ii,"defaultMaxListeners",{enumerable:!0,get:function(){return R2},set:function(h){if(typeof h!="number"||h<0||AT(h))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+h+".");R2=h}});Ii.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Ii.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||AT(h))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+h+".");return this._maxListeners=h,this};function MT(h){return h._maxListeners===void 0?Ii.defaultMaxListeners:h._maxListeners}Ii.prototype.getMaxListeners=function(){return MT(this)};Ii.prototype.emit=function(h){for(var d=[],m=1;m<arguments.length;m++)d.push(arguments[m]);var x=h==="error",T=this._events;if(T!==void 0)x=x&&T.error===void 0;else if(!x)return!1;if(x){var I;if(d.length>0&&(I=d[0]),I instanceof Error)throw I;var P=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw P.context=I,P}var R=T[h];if(R===void 0)return!1;if(typeof R=="function")z2(R,this,d);else for(var C=R.length,Z=DT(R,C),m=0;m<C;++m)z2(Z[m],this,d);return!0};function IT(h,d,m,x){var T,I,P;if(zd(m),I=h._events,I===void 0?(I=h._events=Object.create(null),h._eventsCount=0):(I.newListener!==void 0&&(h.emit("newListener",d,m.listener?m.listener:m),I=h._events),P=I[d]),P===void 0)P=I[d]=m,++h._eventsCount;else if(typeof P=="function"?P=I[d]=x?[m,P]:[P,m]:x?P.unshift(m):P.push(m),T=MT(h),T>0&&P.length>T&&!P.warned){P.warned=!0;var R=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");R.name="MaxListenersExceededWarning",R.emitter=h,R.type=d,R.count=P.length,UD(R)}return h}Ii.prototype.addListener=function(h,d){return IT(this,h,d,!1)};Ii.prototype.on=Ii.prototype.addListener;Ii.prototype.prependListener=function(h,d){return IT(this,h,d,!0)};function qD(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function CT(h,d,m){var x={fired:!1,wrapFn:void 0,target:h,type:d,listener:m},T=qD.bind(x);return T.listener=m,x.wrapFn=T,T}Ii.prototype.once=function(h,d){return zd(d),this.on(h,CT(this,h,d)),this};Ii.prototype.prependOnceListener=function(h,d){return zd(d),this.prependListener(h,CT(this,h,d)),this};Ii.prototype.removeListener=function(h,d){var m,x,T,I,P;if(zd(d),x=this._events,x===void 0)return this;if(m=x[h],m===void 0)return this;if(m===d||m.listener===d)--this._eventsCount===0?this._events=Object.create(null):(delete x[h],x.removeListener&&this.emit("removeListener",h,m.listener||d));else if(typeof m!="function"){for(T=-1,I=m.length-1;I>=0;I--)if(m[I]===d||m[I].listener===d){P=m[I].listener,T=I;break}if(T<0)return this;T===0?m.shift():GD(m,T),m.length===1&&(x[h]=m[0]),x.removeListener!==void 0&&this.emit("removeListener",h,P||d)}return this};Ii.prototype.off=Ii.prototype.removeListener;Ii.prototype.removeAllListeners=function(h){var d,m,x;if(m=this._events,m===void 0)return this;if(m.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):m[h]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete m[h]),this;if(arguments.length===0){var T=Object.keys(m),I;for(x=0;x<T.length;++x)I=T[x],I!=="removeListener"&&this.removeAllListeners(I);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(d=m[h],typeof d=="function")this.removeListener(h,d);else if(d!==void 0)for(x=d.length-1;x>=0;x--)this.removeListener(h,d[x]);return this};function kT(h,d,m){var x=h._events;if(x===void 0)return[];var T=x[d];return T===void 0?[]:typeof T=="function"?m?[T.listener||T]:[T]:m?$D(T):DT(T,T.length)}Ii.prototype.listeners=function(h){return kT(this,h,!0)};Ii.prototype.rawListeners=function(h){return kT(this,h,!1)};Ii.listenerCount=function(h,d){return typeof h.listenerCount=="function"?h.listenerCount(d):PT.call(h,d)};Ii.prototype.listenerCount=PT;function PT(h){var d=this._events;if(d!==void 0){var m=d[h];if(typeof m=="function")return 1;if(m!==void 0)return m.length}return 0}Ii.prototype.eventNames=function(){return this._eventsCount>0?ld(this._events):[]};function DT(h,d){for(var m=new Array(d),x=0;x<d;++x)m[x]=h[x];return m}function GD(h,d){for(;d+1<h.length;d++)h[d]=h[d+1];h.pop()}function $D(h){for(var d=new Array(h.length),m=0;m<d.length;++m)d[m]=h[m].listener||h[m];return d}function WD(h,d){return new Promise(function(m,x){function T(P){h.removeListener(d,I),x(P)}function I(){typeof h.removeListener=="function"&&h.removeListener("error",T),m([].slice.call(arguments))}zT(h,d,I,{once:!0}),d!=="error"&&HD(h,T,{once:!0})})}function HD(h,d,m){typeof h.on=="function"&&zT(h,"error",d,m)}function zT(h,d,m,x){if(typeof h.on=="function")x.once?h.once(d,m):h.on(d,m);else if(typeof h.addEventListener=="function")h.addEventListener(d,function T(I){x.once&&h.removeEventListener(d,T),m(I)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof h)}var ZD=ug.exports,XD={fr:{name:"France",bbox:[[-4.59235,41.380007],[9.560016,51.148506]]},us:{name:"United States",bbox:[[-171.791111,18.91619],[-66.96466,71.357764]]},ru:{name:"Russia",bbox:[[19.66064,41.151416],[190.10042,81.2504]]},ca:{name:"Canada",bbox:[[-140.99778,41.675105],[-52.648099,83.23324]]}};function YD(h){var d=h.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return d?{key:d[1],value:d[2]}:null}function KD(h){var d=h.match(/<?([^>]*)>(.*)/);if(!d)return null;var m=d[1],x=d[2].split(";"),T=null,I=x.reduce(function(P,R){var C=YD(R);return C?C.key==="rel"?(T||(T=C.value),P):(P[C.key]=C.value,P):P},{});return T?{url:m,rel:T,params:I}:null}function JD(h){return h?h.split(/,\s*</).reduce(function(d,m){var x=KD(m);if(!x)return d;var T=x.rel.split(/\s+/);return T.forEach(function(I){d[I]||(d[I]={url:x.url,params:x.params})}),d},{}):{}}var QD=JD,ez=QD;function hg(h,d){this.request=h,this.headers=d.headers,this.rawBody=d.body,this.statusCode=d.statusCode;try{this.body=JSON.parse(d.body||"{}")}catch{this.body=d.body}this.links=ez(this.headers.link)}hg.prototype.hasNextPage=function(){return!!this.links.next};hg.prototype.nextPage=function(){return this.hasNextPage()?this.request._extend({path:this.links.next.url}):null};var tz=hg,Rd={API_ORIGIN:"https://api.mapbox.com",EVENT_PROGRESS_DOWNLOAD:"downloadProgress",EVENT_PROGRESS_UPLOAD:"uploadProgress",EVENT_ERROR:"error",EVENT_RESPONSE:"response",ERROR_HTTP:"HttpError",ERROR_REQUEST_ABORTED:"RequestAbortedError"},L2=Rd;function iz(h){var d=h.type||L2.ERROR_HTTP,m;if(h.body)try{m=JSON.parse(h.body)}catch{m=h.body}else m=null;var x=h.message||null;x||(typeof m=="string"?x=m:m&&typeof m.message=="string"?x=m.message:d===L2.ERROR_REQUEST_ABORTED&&(x="Request aborted")),this.message=x,this.type=d,this.statusCode=h.statusCode||null,this.request=h.request,this.body=m}var rz=iz;function oz(h){var d=h.indexOf(":"),m=h.substring(0,d).trim().toLowerCase(),x=h.substring(d+1).trim();return{name:m,value:x}}function nz(h){var d={};return h&&h.trim().split(/[\r|\n]+/).forEach(function(m){var x=oz(m);d[x.name]=x.value}),d}var sz=nz,az=tz,O2=rz,C_=Rd,lz=sz,xd={};function cz(h){var d=xd[h.id];d&&(d.abort(),delete xd[h.id])}function uz(h,d){return new az(h,{body:d.response,headers:lz(d.getAllResponseHeaders()),statusCode:d.status})}function B2(h){var d=h.total,m=h.loaded,x=100*m/d;return{total:d,transferred:m,percent:x}}function hz(h,d){return new Promise(function(m,x){d.onprogress=function(P){h.emitter.emit(C_.EVENT_PROGRESS_DOWNLOAD,B2(P))};var T=h.file;T&&(d.upload.onprogress=function(P){h.emitter.emit(C_.EVENT_PROGRESS_UPLOAD,B2(P))}),d.onerror=function(P){x(P)},d.onabort=function(){var P=new O2({request:h,type:C_.ERROR_REQUEST_ABORTED});x(P)},d.onload=function(){if(delete xd[h.id],d.status<200||d.status>=400){var P=new O2({request:h,body:d.response,statusCode:d.status});x(P);return}m(d)};var I=h.body;typeof I=="string"?d.send(I):I?d.send(JSON.stringify(I)):T?d.send(T):d.send(),xd[h.id]=d}).then(function(m){return uz(h,m)})}function dz(h,d){var m=h.url(d),x=new window.XMLHttpRequest;return x.open(h.method,m),Object.keys(h.headers).forEach(function(T){x.setRequestHeader(T,h.headers[T])}),x}function pz(h){return Promise.resolve().then(function(){var d=dz(h,h.client.accessToken);return hz(h,d)})}var fz={browserAbort:cz,browserSend:pz},bd={exports:{}};/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */bd.exports;(function(h,d){(function(m){var x=d,T=h&&h.exports==x&&h,I=typeof Do=="object"&&Do;(I.global===I||I.window===I)&&(m=I);var P=function(ke){this.message=ke};P.prototype=new Error,P.prototype.name="InvalidCharacterError";var R=function(ke){throw new P(ke)},C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z=/[\t\n\f\r ]/g,ee=function(ke){ke=String(ke).replace(Z,"");var ve=ke.length;ve%4==0&&(ke=ke.replace(/==?$/,""),ve=ke.length),(ve%4==1||/[^+a-zA-Z0-9/]/.test(ke))&&R("Invalid character: the string to be decoded is not correctly encoded.");for(var Xe=0,ut,tt,yt="",_t=-1;++_t<ve;)tt=C.indexOf(ke.charAt(_t)),ut=Xe%4?ut*64+tt:tt,Xe++%4&&(yt+=String.fromCharCode(255&ut>>(-2*Xe&6)));return yt},ne=function(ke){ke=String(ke),/[^\0-\xFF]/.test(ke)&&R("The string to be encoded contains characters outside of the Latin1 range.");for(var ve=ke.length%3,Xe="",ut=-1,tt,yt,_t,st,qe=ke.length-ve;++ut<qe;)tt=ke.charCodeAt(ut)<<16,yt=ke.charCodeAt(++ut)<<8,_t=ke.charCodeAt(++ut),st=tt+yt+_t,Xe+=C.charAt(st>>18&63)+C.charAt(st>>12&63)+C.charAt(st>>6&63)+C.charAt(st&63);return ve==2?(tt=ke.charCodeAt(ut)<<8,yt=ke.charCodeAt(++ut),st=tt+yt,Xe+=C.charAt(st>>10)+C.charAt(st>>4&63)+C.charAt(st<<2&63)+"="):ve==1&&(st=ke.charCodeAt(ut),Xe+=C.charAt(st>>2)+C.charAt(st<<4&63)+"=="),Xe},Te={encode:ne,decode:ee,version:"0.1.0"};if(x&&!x.nodeType)if(T)T.exports=Te;else for(var Me in Te)Te.hasOwnProperty(Me)&&(x[Me]=Te[Me]);else m.base64=Te})(Do)})(bd,bd.exports);var mz=bd.exports,_z=mz,k_={};function gz(h){if(k_[h])return k_[h];var d=h.split("."),m=d[0],x=d[1];if(!x)throw new Error("Invalid token");var T=yz(x),I={usage:m,user:T.u};return Xs(T,"a")&&(I.authorization=T.a),Xs(T,"exp")&&(I.expires=T.exp*1e3),Xs(T,"iat")&&(I.created=T.iat*1e3),Xs(T,"scopes")&&(I.scopes=T.scopes),Xs(T,"client")&&(I.client=T.client),Xs(T,"ll")&&(I.lastLogin=T.ll),Xs(T,"iu")&&(I.impersonator=T.iu),k_[h]=I,I}function yz(h){try{return JSON.parse(_z.decode(h))}catch{throw new Error("Invalid token")}}function Xs(h,d){return Object.prototype.hasOwnProperty.call(h,d)}var RT=gz,LT={exports:{}};(function(h){var d=Object.prototype.hasOwnProperty,m="~";function x(){}Object.create&&(x.prototype=Object.create(null),new x().__proto__||(m=!1));function T(C,Z,ee){this.fn=C,this.context=Z,this.once=ee||!1}function I(C,Z,ee,ne,Te){if(typeof ee!="function")throw new TypeError("The listener must be a function");var Me=new T(ee,ne||C,Te),ke=m?m+Z:Z;return C._events[ke]?C._events[ke].fn?C._events[ke]=[C._events[ke],Me]:C._events[ke].push(Me):(C._events[ke]=Me,C._eventsCount++),C}function P(C,Z){--C._eventsCount===0?C._events=new x:delete C._events[Z]}function R(){this._events=new x,this._eventsCount=0}R.prototype.eventNames=function(){var C=[],Z,ee;if(this._eventsCount===0)return C;for(ee in Z=this._events)d.call(Z,ee)&&C.push(m?ee.slice(1):ee);return Object.getOwnPropertySymbols?C.concat(Object.getOwnPropertySymbols(Z)):C},R.prototype.listeners=function(C){var Z=m?m+C:C,ee=this._events[Z];if(!ee)return[];if(ee.fn)return[ee.fn];for(var ne=0,Te=ee.length,Me=new Array(Te);ne<Te;ne++)Me[ne]=ee[ne].fn;return Me},R.prototype.listenerCount=function(C){var Z=m?m+C:C,ee=this._events[Z];return ee?ee.fn?1:ee.length:0},R.prototype.emit=function(C,Z,ee,ne,Te,Me){var ke=m?m+C:C;if(!this._events[ke])return!1;var ve=this._events[ke],Xe=arguments.length,ut,tt;if(ve.fn){switch(ve.once&&this.removeListener(C,ve.fn,void 0,!0),Xe){case 1:return ve.fn.call(ve.context),!0;case 2:return ve.fn.call(ve.context,Z),!0;case 3:return ve.fn.call(ve.context,Z,ee),!0;case 4:return ve.fn.call(ve.context,Z,ee,ne),!0;case 5:return ve.fn.call(ve.context,Z,ee,ne,Te),!0;case 6:return ve.fn.call(ve.context,Z,ee,ne,Te,Me),!0}for(tt=1,ut=new Array(Xe-1);tt<Xe;tt++)ut[tt-1]=arguments[tt];ve.fn.apply(ve.context,ut)}else{var yt=ve.length,_t;for(tt=0;tt<yt;tt++)switch(ve[tt].once&&this.removeListener(C,ve[tt].fn,void 0,!0),Xe){case 1:ve[tt].fn.call(ve[tt].context);break;case 2:ve[tt].fn.call(ve[tt].context,Z);break;case 3:ve[tt].fn.call(ve[tt].context,Z,ee);break;case 4:ve[tt].fn.call(ve[tt].context,Z,ee,ne);break;default:if(!ut)for(_t=1,ut=new Array(Xe-1);_t<Xe;_t++)ut[_t-1]=arguments[_t];ve[tt].fn.apply(ve[tt].context,ut)}}return!0},R.prototype.on=function(C,Z,ee){return I(this,C,Z,ee,!1)},R.prototype.once=function(C,Z,ee){return I(this,C,Z,ee,!0)},R.prototype.removeListener=function(C,Z,ee,ne){var Te=m?m+C:C;if(!this._events[Te])return this;if(!Z)return P(this,Te),this;var Me=this._events[Te];if(Me.fn)Me.fn===Z&&(!ne||Me.once)&&(!ee||Me.context===ee)&&P(this,Te);else{for(var ke=0,ve=[],Xe=Me.length;ke<Xe;ke++)(Me[ke].fn!==Z||ne&&!Me[ke].once||ee&&Me[ke].context!==ee)&&ve.push(Me[ke]);ve.length?this._events[Te]=ve.length===1?ve[0]:ve:P(this,Te)}return this},R.prototype.removeAllListeners=function(C){var Z;return C?(Z=m?m+C:C,this._events[Z]&&P(this,Z)):(this._events=new x,this._eventsCount=0),this},R.prototype.off=R.prototype.removeListener,R.prototype.addListener=R.prototype.on,R.prefixed=m,R.EventEmitter=R,h.exports=R})(LT);var vz=LT.exports;function xz(h){return h.map(encodeURIComponent).join(",")}function OT(h){return Array.isArray(h)?xz(h):encodeURIComponent(String(h))}function BT(h,d,m){if(m===!1||m===null)return h;var x=/\?/.test(h)?"&":"?",T=encodeURIComponent(d);return m!==void 0&&m!==""&&m!==!0&&(T+="="+OT(m)),""+h+x+T}function bz(h,d){if(!d)return h;var m=h;return Object.keys(d).forEach(function(x){var T=d[x];T!==void 0&&(Array.isArray(T)&&(T=T.filter(function(I){return I!=null}).join(",")),m=BT(m,x,T))}),m}function wz(h,d){if(!d||h.slice(0,4)==="http")return h;var m=h[0]==="/"?"":"/";return""+d.replace(/\/$/,"")+m+h}function Tz(h,d){return d?h.replace(/\/:([a-zA-Z0-9]+)/g,function(m,x){var T=d[x];if(T===void 0)throw new Error("Unspecified route parameter "+x);var I=OT(T);return"/"+I}):h}var Ez={appendQueryObject:bz,appendQueryParam:BT,prependOrigin:wz,interpolateRouteParams:Tz},Sz=RT,dg=pl,Az=vz,ed=Ez,F2=Rd,Mz=1;function ys(h,d){if(!h)throw new Error("MapiRequest requires a client");if(!d||!d.path||!d.method)throw new Error("MapiRequest requires an options object with path and method properties");var m={};d.body&&(m["content-type"]="application/json");var x=dg(m,d.headers),T=Object.keys(x).reduce(function(I,P){return I[P.toLowerCase()]=x[P],I},{});this.id=Mz++,this._options=d,this.emitter=new Az,this.client=h,this.response=null,this.error=null,this.sent=!1,this.aborted=!1,this.path=d.path,this.method=d.method,this.origin=d.origin||h.origin,this.query=d.query||{},this.params=d.params||{},this.body=d.body||null,this.file=d.file||null,this.encoding=d.encoding||"utf8",this.sendFileAs=d.sendFileAs||null,this.headers=T}ys.prototype.url=function(h){var d=ed.prependOrigin(this.path,this.origin);d=ed.appendQueryObject(d,this.query);var m=this.params,x=h??this.client.accessToken;if(x){d=ed.appendQueryParam(d,"access_token",x);var T=Sz(x).user;m=dg({ownerId:T},m)}return d=ed.interpolateRouteParams(d,m),d};ys.prototype.send=function(){var h=this;if(h.sent)throw new Error("This request has already been sent. Check the response and error properties. Create a new request with clone().");return h.sent=!0,h.client.sendRequest(h).then(function(d){return h.response=d,h.emitter.emit(F2.EVENT_RESPONSE,d),d},function(d){throw h.error=d,h.emitter.emit(F2.EVENT_ERROR,d),d})};ys.prototype.abort=function(){this._nextPageRequest&&(this._nextPageRequest.abort(),delete this._nextPageRequest),!(this.response||this.error||this.aborted)&&(this.aborted=!0,this.client.abortRequest(this))};ys.prototype.eachPage=function(h){var d=this;function m(I){function P(){delete d._nextPageRequest;var R=I.nextPage();R&&(d._nextPageRequest=R,T(R))}h(null,I,P)}function x(I){h(I,null,function(){})}function T(I){I.send().then(m,x)}T(this)};ys.prototype.clone=function(){return this._extend()};ys.prototype._extend=function(h){var d=dg(this._options,h);return new ys(this.client,d)};var Iz=ys,Cz=RT,kz=Iz,Pz=Rd;function FT(h){if(!h||!h.accessToken)throw new Error("Cannot create a client without an access token");Cz(h.accessToken),this.accessToken=h.accessToken,this.origin=h.origin||Pz.API_ORIGIN}FT.prototype.createRequest=function(h){return new kz(this,h)};var NT=FT,jT=fz,VT=NT;function hl(h){VT.call(this,h)}hl.prototype=Object.create(VT.prototype);hl.prototype.constructor=hl;hl.prototype.sendRequest=jT.browserSend;hl.prototype.abortRequest=jT.browserAbort;function Dz(h){return new hl(h)}var UT=Dz,zz=UT,Rz=zz,Lz=Object.prototype.toString,Oz=function(h){var d;return Lz.call(h)==="[object Object]"&&(d=Object.getPrototypeOf(h),d===null||d===Object.getPrototypeOf({}))},Bz=Oz,Fz=pl,qT="value",P_=`
2029
2029
  `,Oi={};Oi.assert=function(h,d){return d=d||{},function(m){var x=vs(h,m);if(x){var T=pg(x,d);throw d.apiName&&(T=d.apiName+": "+T),new Error(T)}}};Oi.shape=function(h){var d=Uz(h);return function(m){var x=vs(Oi.plainObject,m);if(x)return x;for(var T,I,P=[],R=0;R<d.length;R++)T=d[R].key,I=d[R].value,x=vs(I,m[T]),x&&P.push([T].concat(x));return P.length<2?P[0]:function(C){P=P.map(function(ne){var Te=ne[0],Me=pg(ne,C).split(`
2030
- `).join(P_);return"- "+Te+": "+Me});var Z=C.path.join("."),ee=Z===qT?"":" of "+Z;return"The following properties"+ee+" have invalid values:"+P_+P.join(P_)}}};Oi.strictShape=function(h){var d=Oi.shape(h);return function(m){var x=d(m);if(x)return x;var T=Object.keys(m).reduce(function(I,P){return h[P]===void 0&&I.push(P),I},[]);if(T.length!==0)return function(){return"The following keys are invalid: "+T.join(", ")}}};Oi.arrayOf=function(h){return GT(h)};Oi.tuple=function(){var h=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return GT(h)};function GT(h){var d=Array.isArray(h),m=function(x){return d?h[x]:h};return function(x){var T=vs(Oi.plainArray,x);if(T)return T;if(d&&x.length!==h.length)return"an array with "+h.length+" items";for(var I=0;I<x.length;I++)if(T=vs(m(I),x[I]),T)return[I].concat(T)}}Oi.required=function(h){function d(m){return m==null?function(x){return $T(x,WT(x.path)?"cannot be undefined/null.":"is required.")}:h.apply(this,arguments)}return d.__required=!0,d};Oi.oneOfType=function(){var h=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return function(d){var m=h.map(function(x){return vs(x,d)}).filter(Boolean);if(m.length===h.length)return m.every(function(x){return x.length===1&&typeof x[0]=="string"})?Nz(m.map(function(x){return x[0]})):m.reduce(function(x,T){return T.length>x.length?T:x})}};Oi.equal=function(h){return function(d){if(d!==h)return JSON.stringify(h)}};Oi.oneOf=function(){var h=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),d=h.map(function(m){return Oi.equal(m)});return Oi.oneOfType.apply(this,d)};Oi.range=function(h){var d=h[0],m=h[1];return function(x){var T=vs(Oi.number,x);if(T||x<d||x>m)return"number between "+d+" & "+m+" (inclusive)"}};Oi.any=function(){};Oi.boolean=function(h){if(typeof h!="boolean")return"boolean"};Oi.number=function(h){if(typeof h!="number")return"number"};Oi.plainArray=function(h){if(!Array.isArray(h))return"array"};Oi.plainObject=function(h){if(!Bz(h))return"object"};Oi.string=function(h){if(typeof h!="string")return"string"};Oi.func=function(h){if(typeof h!="function")return"function"};function vs(h,d){if(!(d==null&&!h.hasOwnProperty("__required"))){var m=h(d);if(m)return Array.isArray(m)?m:[m]}}function pg(h,d){var m=h.length,x=h[m-1],T=h.slice(0,m-1);return T.length===0&&(T=[qT]),d=Fz(d,{path:T}),typeof x=="function"?x(d):$T(d,jz(x))}function Nz(h){return h.length<2?h[0]:h.length===2?h.join(" or "):h.slice(0,-1).join(", ")+", or "+h.slice(-1)}function jz(h){return"must be "+Vz(h)+"."}function Vz(h){return/^an? /.test(h)?h:/^[aeiou]/i.test(h)?"an "+h:/^[a-z]/i.test(h)?"a "+h:h}function $T(h,d){var m=WT(h.path),x=h.path.join(".")+" "+d,T=m?"Item at position ":"";return T+x}function WT(h){return typeof h[h.length-1]=="number"||typeof h[0]=="number"}function Uz(h){return Object.keys(h||{}).map(function(d){return{key:d,value:h[d]}})}Oi.validate=vs;Oi.processMessage=pg;var qz=Oi,Gz=pl,cl=qz;function $z(h){if(typeof window<"u")return h instanceof Do.Blob||h instanceof Do.ArrayBuffer?void 0:"Blob or ArrayBuffer";if(!(typeof h=="string"||h.pipe!==void 0))return"Filename or Readable stream"}function Wz(h,d){return cl.assert(cl.strictShape(h),d)}function Hz(h){var d="date";if(typeof h=="boolean")return d;try{var m=new Date(h);if(m.getTime&&isNaN(m.getTime()))return d}catch{return d}}function Zz(h){return cl.tuple(cl.number,cl.number)(h)}var Xz=Gz(cl,{file:$z,date:Hz,coordinates:Zz,assertShape:Wz});function Yz(h,d){var m=function(x,T){return d.indexOf(x)!==-1&&T!==void 0};return typeof d=="function"&&(m=d),Object.keys(h).filter(function(x){return m(x,h[x])}).reduce(function(x,T){return x[T]=h[T],x},{})}var Kz=Yz;function Jz(h,d){return Object.keys(h).reduce(function(m,x){return m[x]=d(x,h[x]),m},{})}var Qz=Jz,eR=Qz;function tR(h){return eR(h,function(d,m){return typeof m=="boolean"?JSON.stringify(m):m})}var iR=tR,rR=NT,oR=UT;function nR(h){return function(d){var m;rR.prototype.isPrototypeOf(d)?m=d:m=oR(d);var x=Object.create(h);return x.client=m,x}}var sR=nR,HT=pl,oi=Xz,wd=Kz,ZT=iR,aR=sR,fg={},XT=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];fg.forwardGeocode=function(h){oi.assertShape({query:oi.required(oi.string),mode:oi.oneOf("mapbox.places","mapbox.places-permanent"),countries:oi.arrayOf(oi.string),proximity:oi.oneOf(oi.coordinates,"ip"),types:oi.arrayOf(oi.oneOf(XT)),autocomplete:oi.boolean,bbox:oi.arrayOf(oi.number),limit:oi.number,language:oi.arrayOf(oi.string),routing:oi.boolean,fuzzyMatch:oi.boolean,worldview:oi.string,session_token:oi.string})(h),h.mode=h.mode||"mapbox.places";var d=ZT(HT({country:h.countries},wd(h,["proximity","types","autocomplete","bbox","limit","language","routing","fuzzyMatch","worldview","session_token"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:wd(h,["mode","query"]),query:d})};fg.reverseGeocode=function(h){oi.assertShape({query:oi.required(oi.coordinates),mode:oi.oneOf("mapbox.places","mapbox.places-permanent"),countries:oi.arrayOf(oi.string),types:oi.arrayOf(oi.oneOf(XT)),bbox:oi.arrayOf(oi.number),limit:oi.number,language:oi.arrayOf(oi.string),reverseMode:oi.oneOf("distance","score"),routing:oi.boolean,worldview:oi.string,session_token:oi.string})(h),h.mode=h.mode||"mapbox.places";var d=ZT(HT({country:h.countries},wd(h,["country","types","bbox","limit","language","reverseMode","routing","worldview","session_token"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:wd(h,["mode","query"]),query:d})};var lR=aR(fg);let cR="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",YT=h=>crypto.getRandomValues(new Uint8Array(h)),KT=(h,d,m)=>{let x=(2<<Math.log(h.length-1)/Math.LN2)-1,T=-~(1.6*x*d/h.length);return(I=d)=>{let P="";for(;;){let R=m(T),C=T;for(;C--;)if(P+=h[R[C]&x]||"",P.length===I)return P}}},uR=(h,d=21)=>KT(h,d,YT),hR=(h=21)=>crypto.getRandomValues(new Uint8Array(h)).reduce((d,m)=>(m&=63,m<36?d+=m.toString(36):m<62?d+=(m-26).toString(36).toUpperCase():m>62?d+="-":d+="_",d),"");const dR=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:uR,customRandom:KT,nanoid:hR,random:YT,urlAlphabet:cR},Symbol.toStringTag,{value:"Module"})),pR=fD(dR);var fR=pR.nanoid;function JT(h){this.origin=h.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=h.accessToken,this.version="0.3.0",this.pluginSessionID=this.generateSessionID(),this.sessionIncrementer=0,this.userAgent=this.getUserAgent(),this.options=h,this.send=this.send.bind(this),this.countries=h.countries?h.countries.split(","):null,this.types=h.types?h.types.split(","):null,this.bbox=h.bbox?h.bbox:null,this.language=h.language?h.language.split(","):null,this.limit=h.limit?+h.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(h),this.eventQueue=new Array,this.flushInterval=h.flushInterval||1e3,this.maxQueueSize=h.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}JT.prototype={select:function(h,d){var m=this.getEventPayload("search.select",d,{selectedFeature:h});if(m&&!(m.resultIndex===this.lastSentIndex&&m.queryString===this.lastSentInput||m.resultIndex==-1))return this.lastSentIndex=m.resultIndex,this.lastSentInput=m.queryString,this.push(m)},start:function(h){var d=this.getEventPayload("search.start",h);if(d)return this.push(d)},keyevent:function(h,d){if(h.key&&!(h.metaKey||[9,27,37,39,13,38,40].indexOf(h.keyCode)!==-1)){var m=this.getEventPayload("search.keystroke",d,{key:h.key});if(m)return this.push(m)}},send:function(h,d){if(!this.enableEventLogging)return d?d():void 0;var m=this.getRequestOptions(h);this.request(m,function(x){if(x)return this.handleError(x,d);if(d)return d()}.bind(this))},getRequestOptions:function(h){Array.isArray(h)||(h=[h]);var d={method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(h)};return d},getEventPayload:function(h,d,m={}){if(h==="search.select"&&!m.selectedFeature||h==="search.keystroke"&&!m.key)return null;var x;if(!d.options.proximity)x=null;else if(typeof d.options.proximity=="object")x=[d.options.proximity.longitude,d.options.proximity.latitude];else if(d.options.proximity==="ip"){var T=d._headers?d._headers["ip-proximity"]:null;T&&typeof T=="string"?x=T.split(",").map(parseFloat):x=[999,999]}else x=d.options.proximity;var I=d._map?d._map.getZoom():void 0,P={event:h,version:this.getEventSchemaVersion(h),created:+new Date,sessionIdentifier:this.getSessionId(),country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",autocomplete:d.options.autocomplete,fuzzyMatch:d.options.fuzzyMatch,proximity:x,limit:d.options.limit,routing:d.options.routing,worldview:d.options.worldview,mapZoom:I,keyboardLocale:this.locale};if(h==="search.select"?P.queryString=d.inputString:h!="search.select"&&d._inputEl?P.queryString=d._inputEl.value:P.queryString=d.inputString,["search.keystroke","search.select"].includes(h)&&(P.path="geocoding/v5/mapbox.places"),h==="search.keystroke"&&m.key)P.lastAction=m.key;else if(h==="search.select"&&m.selectedFeature){var R=m.selectedFeature,C=this.getSelectedIndex(R,d);if(P.resultIndex=C,P.resultPlaceName=R.place_name,P.resultId=R.id,R.properties&&(P.resultMapboxId=R.properties.mapbox_id),d._typeahead){var Z=d._typeahead.data;Z&&Z.length>0&&(P.suggestionIds=this.getSuggestionIds(Z),P.suggestionNames=this.getSuggestionNames(Z),P.suggestionTypes=this.getSuggestionTypes(Z),P.suggestionSources=this.getSuggestionSources(Z))}}return this.validatePayload(P)?P:null},request:function(h,d){var m=new XMLHttpRequest;m.onreadystatechange=function(){if(this.readyState==4)return this.status==204?d(null):d(this.statusText)},m.open(h.method,h.host+"/"+h.path,!0);for(var x in h.headers){var T=h.headers[x];m.setRequestHeader(x,T)}m.send(h.body)},handleError:function(h,d){if(d)return d(h)},generateSessionID:function(){return fR()},getSessionId:function(){return this.pluginSessionID+"."+this.sessionIncrementer},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(h,d){if(d._typeahead){var m=d._typeahead.data,x=h.id,T=m.map(function(P){return P.id}),I=T.indexOf(x);return I}},getSuggestionIds:function(h){return h.map(function(d){return d.properties?d.properties.mapbox_id||"":d.id||""})},getSuggestionNames:function(h){return h.map(function(d){return d.place_name||""})},getSuggestionTypes:function(h){return h.map(function(d){return d.place_type&&Array.isArray(d.place_type)&&d.place_type[0]||""})},getSuggestionSources:function(h){return h.map(function(d){return d._source||""})},getEventSchemaVersion:function(h){return["search.keystroke","search.select"].includes(h)?"2.2":"2.0"},validatePayload:function(h){if(!h||!h.event)return!1;var d=["event","created","sessionIdentifier","queryString"],m=["event","created","sessionIdentifier","queryString","lastAction"],x=["event","created","sessionIdentifier","queryString","resultIndex","path","suggestionIds"],T=h.event;return T==="search.start"?this.objectHasRequiredProps(h,d):T==="search.keystroke"?this.objectHasRequiredProps(h,m):T==="search.select"?this.objectHasRequiredProps(h,x):!0},objectHasRequiredProps:function(h,d){return d.every(function(m){return m==="queryString"?typeof h[m]=="string"&&h[m].length>0:h[m]!==void 0})},shouldEnableLogging:function(h){return!(h.enableEventLogging===!1||h.origin&&h.origin!=="https://api.mapbox.com")},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(h,d){this.eventQueue.push(h),(this.eventQueue.length>=this.maxQueueSize||d)&&this.flush()},remove:function(){this.flush()}};var mR=JT,_R={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},gR={placeholder:_R},QT={exports:{}};(function(h){(function(d,m,x){h.exports?h.exports=x():d[m]=x()})(Do,"subtag",function(){var d="",m=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function x(C){return C.match(m)||[]}function T(C){return x(C).filter(function(Z,ee){return Z&&ee})}function I(C){return C=x(C),{language:C[1]||d,extlang:C[2]||d,script:C[3]||d,region:C[4]||d}}function P(C,Z,ee){Object.defineProperty(C,Z,{value:ee,enumerable:!0})}function R(C,Z,ee){function ne(Te){return x(Te)[C]||d}P(ne,"pattern",Z),P(I,ee,ne)}return R(1,/^[a-zA-Z]{2,3}$/,"language"),R(2,/^[a-zA-Z]{3}$/,"extlang"),R(3,/^[a-zA-Z]{4}$/,"script"),R(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),P(I,"split",T),I})})(QT);var yR=QT.exports;function eE(){}eE.prototype={isSupport:function(){return!!window.navigator.geolocation},getCurrentPosition:function(){const h={enableHighAccuracy:!0};return new Promise(function(d,m){window.navigator.geolocation.getCurrentPosition(d,m,h)})}};var vR=eE;function xR(h,d){const m=tE(h),x=["address","street","place","country"];var T;if(typeof d=="function")return d(m);const I=x.indexOf(d);return I===-1?T=x:T=x.slice(I),T.reduce(function(P,R){return m[R]?(P!==""&&(P=P+", "),P+m[R]):P},"")}function tE(h){const d=h.address||"",m=h.text||"",x=h.place_name||"",T={address:x.split(",")[0],houseNumber:d,street:m,placeName:x};return h.context.forEach(function(I){const P=I.id.split(".")[0];T[P]=I.text}),T}const bR=/^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)[ ]*$/;var wR={transformFeatureToGeolocationText:xR,getAddressInfo:tE,REVERSE_GEOCODE_COORD_RGX:bR},TR=TD,ER=VD,Js=pl,SR=ZD.EventEmitter,N2=XD,D_=Rz,z_=lR,AR=mR,MR=gR,IR=yR,CR=vR,j2=wR;const hs={FORWARD:0,LOCAL:1,REVERSE:2};function kR(){var h=document.createElement("div");return h.className="mapboxgl-ctrl-geocoder--powered-by",h.innerHTML='<a href="https://www.mapbox.com/search-service" target="_blank">Powered by Mapbox</a>',h}function iE(h){this._eventEmitter=new SR,this.options=Js({},this.options,h),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geolocation=new CR}iE.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,flipCoordinates:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,enableGeolocation:!1,addressAccuracy:"street",getItemValue:function(h){return h.place_name},render:function(h){var d=h.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title">'+d[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address">'+d.splice(1,d.length).join(",")+"</div></div>"}},_headers:{},addTo:function(h){function d(m,x){if(!document.body.contains(x))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const T=m.onAdd();x.appendChild(T)}if(h._controlContainer)h.addControl(this);else if(h instanceof HTMLElement)d(this,h);else if(typeof h=="string"){const m=document.querySelectorAll(h);if(m.length===0)throw new Error("Element ",h,"not found.");if(m.length>1)throw new Error("Geocoder can only be added to a single html element");d(this,m[0])}else throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(h){if(h&&typeof h!="string"&&(this._map=h),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=z_(D_({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new AR(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this),this._geolocateUser=this._geolocateUser.bind(this);var d=this.container=document.createElement("div");d.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var m=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",ER(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",function(Z){this.eventManager.keyevent(Z,this)}.bind(this));var x=document.createElement("div");x.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var T=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');if(this._clearEl.appendChild(T),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),x.appendChild(this._clearEl),x.appendChild(this._loadingEl),d.appendChild(m),d.appendChild(this._inputEl),d.appendChild(x),this.options.enableGeolocation&&this.geolocation.isSupport()){this._geolocateEl=document.createElement("button"),this._geolocateEl.setAttribute("aria-label","Geolocate"),this._geolocateEl.addEventListener("click",this._geolocateUser),this._geolocateEl.className="mapboxgl-ctrl-geocoder--button";var I=this.createIcon("geolocate",'<path d="M12.999 3.677L2.042 8.269c-.962.403-.747 1.823.29 1.912l5.032.431.431 5.033c.089 1.037 1.509 1.252 1.912.29l4.592-10.957c.345-.822-.477-1.644-1.299-1.299z" fill="#4264fb"/>');this._geolocateEl.appendChild(I),x.appendChild(this._geolocateEl),this._showGeolocateButton()}var P=this._typeahead=new TR(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit});this.setRenderFunction(this.options.render),P.getItemValue=this.options.getItemValue;var R=P.list.draw,C=this._footerNode=kR();return P.list.draw=function(){R.call(this),C.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),C.addEventListener("mouseup",function(){this.selectingListItem=!1}.bind(this)),this.element.appendChild(C)},this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),d},_geolocateUser:function(){this._hideGeolocateButton(),this._showLoadingIcon(),this.geolocation.getCurrentPosition().then(function(h){this._hideLoadingIcon();const d={geometry:{type:"Point",coordinates:[h.coords.longitude,h.coords.latitude]}};this._handleMarker(d),this._fly(d),this._typeahead.clear(),this._typeahead.selected=!0,this.lastSelected=JSON.stringify(d),this._showClearButton(),this.fresh=!1;const m={limit:1,language:[this.options.language],query:d.geometry.coordinates,types:["address"]};if(this.options.localGeocoderOnly){const x=d.geometry.coordinates[0]+","+d.geometry.coordinates[1];this._setInputValue(x),this._eventEmitter.emit("result",{result:d})}else this.geocoderService.reverseGeocode(m).send().then(function(x){const T=x.body.features[0];if(T){const I=j2.transformFeatureToGeolocationText(T,this.options.addressAccuracy);this._setInputValue(I),T.user_coordinates=d.geometry.coordinates,this._eventEmitter.emit("result",{result:T})}else this._eventEmitter.emit("result",{result:{user_coordinates:d.geometry.coordinates}})}.bind(this))}.bind(this)).catch(function(h){h.code===1?this._renderUserDeniedGeolocationError():this._renderLocationError(),this._hideLoadingIcon(),this._showGeolocateButton(),this._hideAttribution()}.bind(this))},createIcon:function(h,d){var m=document.createElementNS("http://www.w3.org/2000/svg","svg");return m.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+h),m.setAttribute("viewBox","0 0 18 18"),m.setAttribute("xml:space","preserve"),m.setAttribute("width",18),m.setAttribute("height",18),m.innerHTML=d,m},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_setInputValue:function(h){this._inputEl.value=h,setTimeout(function(){this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0)}.bind(this),1)},_onPaste:function(h){var d=(h.clipboardData||window.clipboardData).getData("text");d.length>=this.options.minLength&&this._geocode(d)},_onKeyDown:function(h){var d=27,m=9;if(h.keyCode===d&&this.options.clearAndBlurOnEsc)return this._clear(h),this._inputEl.blur();var x=h.target&&h.target.shadowRoot?h.target.shadowRoot.activeElement:h.target,T=x?x.value:"";if(!T)return this.fresh=!0,h.keyCode!==m&&this.clear(h),this._showGeolocateButton(),this._hideClearButton();this._hideGeolocateButton(),!(h.metaKey||[m,d,37,39,13,38,40].indexOf(h.keyCode)!==-1)&&x.value.length>=this.options.minLength&&this._geocode(x.value)},_showButton:function(){this._typeahead.selected&&this._showClearButton()},_hideButton:function(){this._typeahead.selected&&this._hideClearButton()},_showClearButton:function(){this._clearEl.style.display="block"},_hideClearButton:function(){this._clearEl.style.display="none"},_showGeolocateButton:function(){this._geolocateEl&&this.geolocation.isSupport()&&(this._geolocateEl.style.display="block")},_hideGeolocateButton:function(){this._geolocateEl&&(this._geolocateEl.style.display="none")},_showLoadingIcon:function(){this._loadingEl.style.display="block"},_hideLoadingIcon:function(){this._loadingEl.style.display="none"},_showAttribution:function(){this._footerNode.style.display="block"},_hideAttribution:function(){this._footerNode.style.display="none"},_onBlur:function(h){this.options.clearOnBlur&&this._clearOnBlur(h),this.options.collapsed&&this._collapse()},_onChange:function(){var h=this._typeahead.selected;h&&JSON.stringify(h)!==this.lastSelected&&(this._hideClearButton(),this.options.flyTo&&this._fly(h),this.options.marker&&this._mapboxgl&&this._handleMarker(h),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(h),this._eventEmitter.emit("result",{result:h}),this.eventManager.select(h,this))},_fly:function(h){var d;if(h.properties&&N2[h.properties.short_code])d=Js({},this.options.flyTo),this._map&&this._map.fitBounds(N2[h.properties.short_code].bbox,d);else if(h.bbox){var m=h.bbox;d=Js({},this.options.flyTo),this._map&&this._map.fitBounds([[m[0],m[1]],[m[2],m[3]]],d)}else{var x={zoom:this.options.zoom};d=Js({},x,this.options.flyTo),h.center?d.center=h.center:h.geometry&&h.geometry.type&&h.geometry.type==="Point"&&h.geometry.coordinates&&(d.center=h.geometry.coordinates),this._map&&this._map.flyTo(d)}},_requestType:function(h,d){var m;return h.localGeocoderOnly?m=hs.LOCAL:h.reverseGeocode&&j2.REVERSE_GEOCODE_COORD_RGX.test(d)?m=hs.REVERSE:m=hs.FORWARD,m},_setupConfig:function(h,d){const m=["bbox","limit","proximity","countries","types","language","reverseMode","mode","autocomplete","fuzzyMatch","routing","worldview"],x=/[\s,]+/;var T=this,I=m.reduce(function(R,C){if(T.options[C]===void 0||T.options[C]===null)return R;["countries","types","language"].indexOf(C)>-1?R[C]=T.options[C].split(x):R[C]=T.options[C];const Z=typeof T.options[C].longitude=="number"&&typeof T.options[C].latitude=="number";if(C==="proximity"&&Z){const ee=T.options[C].longitude,ne=T.options[C].latitude;R[C]=[ee,ne]}return R},{});switch(h){case hs.REVERSE:{var P=d.split(x).map(function(R){return parseFloat(R,10)});T.options.flipCoordinates||P.reverse(),I.types&&I.types[0],I=Js(I,{query:P,limit:1}),["proximity","autocomplete","fuzzyMatch","bbox"].forEach(function(R){R in I&&delete I[R]})}break;case hs.FORWARD:{const R=d.trim();/^(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?$/.test(R)&&(d=d.replace(/,/g," ")),I=Js(I,{query:d})}break}return I.session_token=this.eventManager.getSessionId(),I},_geocode:function(h){this.inputString=h,this._showLoadingIcon(),this._eventEmitter.emit("loading",{query:h});const d=this._requestType(this.options,h),m=this._setupConfig(d,h);var x;switch(d){case hs.LOCAL:x=Promise.resolve();break;case hs.FORWARD:x=this.geocoderService.forwardGeocode(m).send();break;case hs.REVERSE:x=this.geocoderService.reverseGeocode(m).send();break}var T=this.options.localGeocoder?this.options.localGeocoder(h)||[]:[],I=[],P=null;return x.catch(function(R){P=R}.bind(this)).then(function(R){this._hideLoadingIcon();var C={};return R?R.statusCode=="200"&&(C=R.body,C.request=R.request,C.headers=R.headers,this._headers=R.headers):C={type:"FeatureCollection",features:[]},C.config=m,this.fresh&&(this.eventManager.start(this),this.fresh=!1),C.features&&C.features.length&&C.features.map(function(Z){Z._source="mapbox"}),C.features=C.features?T.concat(C.features):T,this.options.externalGeocoder?(I=this.options.externalGeocoder(h,C.features)||Promise.resolve([]),I.then(function(Z){return C.features=C.features?Z.concat(C.features):Z,C},function(){return C})):C}.bind(this)).then(function(R){if(P)throw P;this.options.filter&&R.features.length&&(R.features=R.features.filter(this.options.filter)),R.features.length?(this._showClearButton(),this._hideGeolocateButton(),this._showAttribution(),this._eventEmitter.emit("results",R),this._typeahead.update(R.features)):(this._hideClearButton(),this._hideAttribution(),this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",R))}.bind(this)).catch(function(R){this._hideLoadingIcon(),this._hideAttribution(),T.length&&this.options.localGeocoder||I.length&&this.options.externalGeocoder?(this._showClearButton(),this._hideGeolocateButton(),this._typeahead.update(T)):(this._hideClearButton(),this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:T}),this._eventEmitter.emit("error",{error:R})}.bind(this)),x},_clear:function(h){h&&h.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this.eventManager.sessionIncrementer++,this._onChange(),this._hideClearButton(),this._showGeolocateButton(),this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(h){this._clear(h),this._inputEl.focus()},_clearOnBlur:function(h){var d=this;h.relatedTarget&&d._clear(h)},_onQueryResult:function(h){var d=h.body;if(d.features.length){var m=d.features[0];this._typeahead.selected=m,this._inputEl.value=m.place_name,this._onChange()}},_updateProximity:function(){if(!(!this._map||!this.options.trackProximity))if(this._map.getZoom()>9){var h=this._map.getCenter().wrap();this.setProximity({longitude:h.lng,latitude:h.lat},!1)}else this.setProximity(null,!1)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(h){return this._geocode(h).then(this._onQueryResult),this},_renderError:function(){var h="<div class='mapbox-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(h)},_renderLocationError:function(){var h="<div class='mapbox-gl-geocoder--error'>A location error has occurred</div>";this._renderMessage(h)},_renderNoResults:function(){var h="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results'>No results found</div>";this._renderMessage(h)},_renderUserDeniedGeolocationError:function(){var h="<div class='mapbox-gl-geocoder--error'>Geolocation permission denied</div>";this._renderMessage(h)},_renderMessage:function(h){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(h)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var h=this.options.language.split(",")[0],d=IR.language(h),m=MR.placeholder[d];if(m)return m}return"Search"},setInput:function(h,d){return d===void 0&&(d=!1),this._inputEl.value=h,this._typeahead.selected=null,this._typeahead.clear(),h.length>=this.options.minLength&&(d?this._geocode(h):this._onChange()),this},setProximity:function(h,d=!0){return this.options.proximity=h,d&&(this.options.trackProximity=!1),this},getProximity:function(){return this.options.proximity},setRenderFunction:function(h){return h&&typeof h=="function"&&(this._typeahead.render=h),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(h){var d=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=h||this.options.language||d,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(h){return this.options.zoom=h,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(h){return this.options.flyTo=h,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(h){return this.options.placeholder=h||this._getPlaceholderText(),this._inputEl.placeholder=this.options.placeholder,this._inputEl.setAttribute("aria-label",this.options.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(h){return this.options.bbox=h,this},getCountries:function(){return this.options.countries},setCountries:function(h){return this.options.countries=h,this},getTypes:function(){return this.options.types},setTypes:function(h){return this.options.types=h,this},getMinLength:function(){return this.options.minLength},setMinLength:function(h){return this.options.minLength=h,this._typeahead&&(this._typeahead.options.minLength=h),this},getLimit:function(){return this.options.limit},setLimit:function(h){return this.options.limit=h,this._typeahead&&(this._typeahead.options.limit=h),this},getFilter:function(){return this.options.filter},setFilter:function(h){return this.options.filter=h,this},setOrigin:function(h){return this.options.origin=h,this.geocoderService=z_(D_({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},setAccessToken:function(h){return this.options.accessToken=h,this.geocoderService=z_(D_({accessToken:this.options.accessToken,origin:this.options.origin})),this},setAutocomplete:function(h){return this.options.autocomplete=h,this},getAutocomplete:function(){return this.options.autocomplete},setFuzzyMatch:function(h){return this.options.fuzzyMatch=h,this},getFuzzyMatch:function(){return this.options.fuzzyMatch},setRouting:function(h){return this.options.routing=h,this},getRouting:function(){return this.options.routing},setWorldview:function(h){return this.options.worldview=h,this},getWorldview:function(){return this.options.worldview},_handleMarker:function(h){if(this._map){this._removeMarker();var d={color:"#4668F2"},m=Js({},d,this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(m),h.center?this.mapMarker.setLngLat(h.center).addTo(this._map):h.geometry&&h.geometry.type&&h.geometry.type==="Point"&&h.geometry.coordinates&&this.mapMarker.setLngLat(h.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(h,d){return this._eventEmitter.on(h,d),this},off:function(h,d){return this._eventEmitter.removeListener(h,d),this.eventManager.remove(),this}};var PR=iE;const DR=bT(PR);function rE(h){var d,m,x="";if(typeof h=="string"||typeof h=="number")x+=h;else if(typeof h=="object")if(Array.isArray(h))for(d=0;d<h.length;d++)h[d]&&(m=rE(h[d]))&&(x&&(x+=" "),x+=m);else for(d in h)h[d]&&(x&&(x+=" "),x+=d);return x}function zR(){for(var h,d,m=0,x="";m<arguments.length;)(h=arguments[m++])&&(d=rE(h))&&(x&&(x+=" "),x+=d);return x}const V2=h=>typeof h=="boolean"?"".concat(h):h===0?"0":h,U2=zR,oE=(h,d)=>m=>{var x;if(d?.variants==null)return U2(h,m?.class,m?.className);const{variants:T,defaultVariants:I}=d,P=Object.keys(T).map(Z=>{const ee=m?.[Z],ne=I?.[Z];if(ee===null)return null;const Te=V2(ee)||V2(ne);return T[Z][Te]}),R=m&&Object.entries(m).reduce((Z,ee)=>{let[ne,Te]=ee;return Te===void 0||(Z[ne]=Te),Z},{}),C=d==null||(x=d.compoundVariants)===null||x===void 0?void 0:x.reduce((Z,ee)=>{let{class:ne,className:Te,...Me}=ee;return Object.entries(Me).every(ke=>{let[ve,Xe]=ke;return Array.isArray(Xe)?Xe.includes({...I,...R}[ve]):{...I,...R}[ve]===Xe})?[...Z,ne,Te]:Z},[]);return U2(h,P,C,m?.class,m?.className)},Sc=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ld=(h,d,m,x="")=>{const T=h.split(":");if(h.slice(0,1)==="@"){if(T.length<2||T.length>3)return null;x=T.shift().slice(1)}if(T.length>3||!T.length)return null;if(T.length>1){const R=T.pop(),C=T.pop(),Z={provider:T.length>0?T[0]:x,prefix:C,name:R};return d&&!cd(Z)?null:Z}const I=T[0],P=I.split("-");if(P.length>1){const R={provider:x,prefix:P.shift(),name:P.join("-")};return d&&!cd(R)?null:R}if(m&&x===""){const R={provider:x,prefix:"",name:I};return d&&!cd(R,m)?null:R}return null},cd=(h,d)=>h?!!((h.provider===""||h.provider.match(Sc))&&(d&&h.prefix===""||h.prefix.match(Sc))&&h.name.match(Sc)):!1,nE=Object.freeze({left:0,top:0,width:16,height:16}),Td=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Od=Object.freeze({...nE,...Td}),X_=Object.freeze({...Od,body:"",hidden:!1});function RR(h,d){const m={};!h.hFlip!=!d.hFlip&&(m.hFlip=!0),!h.vFlip!=!d.vFlip&&(m.vFlip=!0);const x=((h.rotate||0)+(d.rotate||0))%4;return x&&(m.rotate=x),m}function q2(h,d){const m=RR(h,d);for(const x in X_)x in Td?x in h&&!(x in m)&&(m[x]=Td[x]):x in d?m[x]=d[x]:x in h&&(m[x]=h[x]);return m}function LR(h,d){const m=h.icons,x=h.aliases||Object.create(null),T=Object.create(null);function I(P){if(m[P])return T[P]=[];if(!(P in T)){T[P]=null;const R=x[P]&&x[P].parent,C=R&&I(R);C&&(T[P]=[R].concat(C))}return T[P]}return Object.keys(m).concat(Object.keys(x)).forEach(I),T}function OR(h,d,m){const x=h.icons,T=h.aliases||Object.create(null);let I={};function P(R){I=q2(x[R]||T[R],I)}return P(d),m.forEach(P),q2(h,I)}function sE(h,d){const m=[];if(typeof h!="object"||typeof h.icons!="object")return m;h.not_found instanceof Array&&h.not_found.forEach(T=>{d(T,null),m.push(T)});const x=LR(h);for(const T in x){const I=x[T];I&&(d(T,OR(h,T,I)),m.push(T))}return m}const BR={provider:"",aliases:{},not_found:{},...nE};function R_(h,d){for(const m in d)if(m in h&&typeof h[m]!=typeof d[m])return!1;return!0}function aE(h){if(typeof h!="object"||h===null)return null;const d=h;if(typeof d.prefix!="string"||!h.icons||typeof h.icons!="object"||!R_(h,BR))return null;const m=d.icons;for(const T in m){const I=m[T];if(!T.match(Sc)||typeof I.body!="string"||!R_(I,X_))return null}const x=d.aliases||Object.create(null);for(const T in x){const I=x[T],P=I.parent;if(!T.match(Sc)||typeof P!="string"||!m[P]&&!x[P]||!R_(I,X_))return null}return d}const G2=Object.create(null);function FR(h,d){return{provider:h,prefix:d,icons:Object.create(null),missing:new Set}}function ia(h,d){const m=G2[h]||(G2[h]=Object.create(null));return m[d]||(m[d]=FR(h,d))}function mg(h,d){return aE(d)?sE(d,(m,x)=>{x?h.icons[m]=x:h.missing.add(m)}):[]}function NR(h,d,m){try{if(typeof m.body=="string")return h.icons[d]={...m},!0}catch{}return!1}let Dc=!1;function lE(h){return typeof h=="boolean"&&(Dc=h),Dc}function jR(h){const d=typeof h=="string"?Ld(h,!0,Dc):h;if(d){const m=ia(d.provider,d.prefix),x=d.name;return m.icons[x]||(m.missing.has(x)?null:void 0)}}function VR(h,d){const m=Ld(h,!0,Dc);if(!m)return!1;const x=ia(m.provider,m.prefix);return NR(x,m.name,d)}function UR(h,d){if(typeof h!="object")return!1;if(typeof d!="string"&&(d=h.provider||""),Dc&&!d&&!h.prefix){let T=!1;return aE(h)&&(h.prefix="",sE(h,(I,P)=>{P&&VR(I,P)&&(T=!0)})),T}const m=h.prefix;if(!cd({provider:d,prefix:m,name:"a"}))return!1;const x=ia(d,m);return!!mg(x,h)}const cE=Object.freeze({width:null,height:null}),uE=Object.freeze({...cE,...Td}),qR=/(-?[0-9.]*[0-9]+[0-9.]*)/g,GR=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $2(h,d,m){if(d===1)return h;if(m=m||100,typeof h=="number")return Math.ceil(h*d*m)/m;if(typeof h!="string")return h;const x=h.split(qR);if(x===null||!x.length)return h;const T=[];let I=x.shift(),P=GR.test(I);for(;;){if(P){const R=parseFloat(I);isNaN(R)?T.push(I):T.push(Math.ceil(R*d*m)/m)}else T.push(I);if(I=x.shift(),I===void 0)return T.join("");P=!P}}const $R=h=>h==="unset"||h==="undefined"||h==="none";function WR(h,d){const m={...Od,...h},x={...uE,...d},T={left:m.left,top:m.top,width:m.width,height:m.height};let I=m.body;[m,x].forEach(ke=>{const ve=[],Xe=ke.hFlip,ut=ke.vFlip;let tt=ke.rotate;Xe?ut?tt+=2:(ve.push("translate("+(T.width+T.left).toString()+" "+(0-T.top).toString()+")"),ve.push("scale(-1 1)"),T.top=T.left=0):ut&&(ve.push("translate("+(0-T.left).toString()+" "+(T.height+T.top).toString()+")"),ve.push("scale(1 -1)"),T.top=T.left=0);let yt;switch(tt<0&&(tt-=Math.floor(tt/4)*4),tt=tt%4,tt){case 1:yt=T.height/2+T.top,ve.unshift("rotate(90 "+yt.toString()+" "+yt.toString()+")");break;case 2:ve.unshift("rotate(180 "+(T.width/2+T.left).toString()+" "+(T.height/2+T.top).toString()+")");break;case 3:yt=T.width/2+T.left,ve.unshift("rotate(-90 "+yt.toString()+" "+yt.toString()+")");break}tt%2===1&&(T.left!==T.top&&(yt=T.left,T.left=T.top,T.top=yt),T.width!==T.height&&(yt=T.width,T.width=T.height,T.height=yt)),ve.length&&(I='<g transform="'+ve.join(" ")+'">'+I+"</g>")});const P=x.width,R=x.height,C=T.width,Z=T.height;let ee,ne;P===null?(ne=R===null?"1em":R==="auto"?Z:R,ee=$2(ne,C/Z)):(ee=P==="auto"?C:P,ne=R===null?$2(ee,Z/C):R==="auto"?Z:R);const Te={},Me=(ke,ve)=>{$R(ve)||(Te[ke]=ve.toString())};return Me("width",ee),Me("height",ne),Te.viewBox=T.left.toString()+" "+T.top.toString()+" "+C.toString()+" "+Z.toString(),{attributes:Te,body:I}}const HR=/\sid="(\S+)"/g,ZR="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let XR=0;function YR(h,d=ZR){const m=[];let x;for(;x=HR.exec(h);)m.push(x[1]);if(!m.length)return h;const T="suffix"+(Math.random()*16777216|Date.now()).toString(16);return m.forEach(I=>{const P=typeof d=="function"?d(I):d+(XR++).toString(),R=I.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");h=h.replace(new RegExp('([#;"])('+R+')([")]|\\.[a-z])',"g"),"$1"+P+T+"$3")}),h=h.replace(new RegExp(T,"g"),""),h}const Y_=Object.create(null);function KR(h,d){Y_[h]=d}function K_(h){return Y_[h]||Y_[""]}function _g(h){let d;if(typeof h.resources=="string")d=[h.resources];else if(d=h.resources,!(d instanceof Array)||!d.length)return null;return{resources:d,path:h.path||"/",maxURL:h.maxURL||500,rotate:h.rotate||750,timeout:h.timeout||5e3,random:h.random===!0,index:h.index||0,dataAfterTimeout:h.dataAfterTimeout!==!1}}const gg=Object.create(null),td=["https://api.simplesvg.com","https://api.unisvg.com"],J_=[];for(;td.length>0;)td.length===1||Math.random()>.5?J_.push(td.shift()):J_.push(td.pop());gg[""]=_g({resources:["https://api.iconify.design"].concat(J_)});function hE(h,d){const m=_g(d);return m===null?!1:(gg[h]=m,!0)}function yg(h){return gg[h]}const JR=()=>{let h;try{if(h=fetch,typeof h=="function")return h}catch{}};let W2=JR();function QR(h,d){const m=yg(h);if(!m)return 0;let x;if(!m.maxURL)x=0;else{let T=0;m.resources.forEach(P=>{T=Math.max(T,P.length)});const I=d+".json?icons=";x=m.maxURL-T-m.path.length-I.length}return x}function eL(h){return h===404}const tL=(h,d,m)=>{const x=[],T=QR(h,d),I="icons";let P={type:I,provider:h,prefix:d,icons:[]},R=0;return m.forEach((C,Z)=>{R+=C.length+1,R>=T&&Z>0&&(x.push(P),P={type:I,provider:h,prefix:d,icons:[]},R=C.length),P.icons.push(C)}),x.push(P),x};function iL(h){if(typeof h=="string"){const d=yg(h);if(d)return d.path}return"/"}const rL=(h,d,m)=>{if(!W2){m("abort",424);return}let x=iL(d.provider);switch(d.type){case"icons":{const I=d.prefix,P=d.icons.join(","),R=new URLSearchParams({icons:P});x+=I+".json?"+R.toString();break}case"custom":{const I=d.uri;x+=I.slice(0,1)==="/"?I.slice(1):I;break}default:m("abort",400);return}let T=503;W2(h+x).then(I=>{const P=I.status;if(P!==200){setTimeout(()=>{m(eL(P)?"abort":"next",P)});return}return T=501,I.json()}).then(I=>{if(typeof I!="object"||I===null){setTimeout(()=>{I===404?m("abort",I):m("next",T)});return}setTimeout(()=>{m("success",I)})}).catch(()=>{m("next",T)})},oL={prepare:tL,send:rL};function nL(h){const d={loaded:[],missing:[],pending:[]},m=Object.create(null);h.sort((T,I)=>T.provider!==I.provider?T.provider.localeCompare(I.provider):T.prefix!==I.prefix?T.prefix.localeCompare(I.prefix):T.name.localeCompare(I.name));let x={provider:"",prefix:"",name:""};return h.forEach(T=>{if(x.name===T.name&&x.prefix===T.prefix&&x.provider===T.provider)return;x=T;const I=T.provider,P=T.prefix,R=T.name,C=m[I]||(m[I]=Object.create(null)),Z=C[P]||(C[P]=ia(I,P));let ee;R in Z.icons?ee=d.loaded:P===""||Z.missing.has(R)?ee=d.missing:ee=d.pending;const ne={provider:I,prefix:P,name:R};ee.push(ne)}),d}function dE(h,d){h.forEach(m=>{const x=m.loaderCallbacks;x&&(m.loaderCallbacks=x.filter(T=>T.id!==d))})}function sL(h){h.pendingCallbacksFlag||(h.pendingCallbacksFlag=!0,setTimeout(()=>{h.pendingCallbacksFlag=!1;const d=h.loaderCallbacks?h.loaderCallbacks.slice(0):[];if(!d.length)return;let m=!1;const x=h.provider,T=h.prefix;d.forEach(I=>{const P=I.icons,R=P.pending.length;P.pending=P.pending.filter(C=>{if(C.prefix!==T)return!0;const Z=C.name;if(h.icons[Z])P.loaded.push({provider:x,prefix:T,name:Z});else if(h.missing.has(Z))P.missing.push({provider:x,prefix:T,name:Z});else return m=!0,!0;return!1}),P.pending.length!==R&&(m||dE([h],I.id),I.callback(P.loaded.slice(0),P.missing.slice(0),P.pending.slice(0),I.abort))})}))}let aL=0;function lL(h,d,m){const x=aL++,T=dE.bind(null,m,x);if(!d.pending.length)return T;const I={id:x,icons:d,callback:h,abort:T};return m.forEach(P=>{(P.loaderCallbacks||(P.loaderCallbacks=[])).push(I)}),T}function cL(h,d=!0,m=!1){const x=[];return h.forEach(T=>{const I=typeof T=="string"?Ld(T,d,m):T;I&&x.push(I)}),x}var uL={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function hL(h,d,m,x){const T=h.resources.length,I=h.random?Math.floor(Math.random()*T):h.index;let P;if(h.random){let qe=h.resources.slice(0);for(P=[];qe.length>1;){const $t=Math.floor(Math.random()*qe.length);P.push(qe[$t]),qe=qe.slice(0,$t).concat(qe.slice($t+1))}P=P.concat(qe)}else P=h.resources.slice(I).concat(h.resources.slice(0,I));const R=Date.now();let C="pending",Z=0,ee,ne=null,Te=[],Me=[];typeof x=="function"&&Me.push(x);function ke(){ne&&(clearTimeout(ne),ne=null)}function ve(){C==="pending"&&(C="aborted"),ke(),Te.forEach(qe=>{qe.status==="pending"&&(qe.status="aborted")}),Te=[]}function Xe(qe,$t){$t&&(Me=[]),typeof qe=="function"&&Me.push(qe)}function ut(){return{startTime:R,payload:d,status:C,queriesSent:Z,queriesPending:Te.length,subscribe:Xe,abort:ve}}function tt(){C="failed",Me.forEach(qe=>{qe(void 0,ee)})}function yt(){Te.forEach(qe=>{qe.status==="pending"&&(qe.status="aborted")}),Te=[]}function _t(qe,$t,pi){const X=$t!=="success";switch(Te=Te.filter(lt=>lt!==qe),C){case"pending":break;case"failed":if(X||!h.dataAfterTimeout)return;break;default:return}if($t==="abort"){ee=pi,tt();return}if(X){ee=pi,Te.length||(P.length?st():tt());return}if(ke(),yt(),!h.random){const lt=h.resources.indexOf(qe.resource);lt!==-1&&lt!==h.index&&(h.index=lt)}C="completed",Me.forEach(lt=>{lt(pi)})}function st(){if(C!=="pending")return;ke();const qe=P.shift();if(qe===void 0){if(Te.length){ne=setTimeout(()=>{ke(),C==="pending"&&(yt(),tt())},h.timeout);return}tt();return}const $t={status:"pending",resource:qe,callback:(pi,X)=>{_t($t,pi,X)}};Te.push($t),Z++,ne=setTimeout(st,h.rotate),m(qe,d,$t.callback)}return setTimeout(st),ut}function pE(h){const d={...uL,...h};let m=[];function x(){m=m.filter(P=>P().status==="pending")}function T(P,R,C){const Z=hL(d,P,R,(ee,ne)=>{x(),C&&C(ee,ne)});return m.push(Z),Z}function I(P){return m.find(R=>P(R))||null}return{query:T,find:I,setIndex:P=>{d.index=P},getIndex:()=>d.index,cleanup:x}}function H2(){}const L_=Object.create(null);function dL(h){if(!L_[h]){const d=yg(h);if(!d)return;const m=pE(d),x={config:d,redundancy:m};L_[h]=x}return L_[h]}function pL(h,d,m){let x,T;if(typeof h=="string"){const I=K_(h);if(!I)return m(void 0,424),H2;T=I.send;const P=dL(h);P&&(x=P.redundancy)}else{const I=_g(h);if(I){x=pE(I);const P=h.resources?h.resources[0]:"",R=K_(P);R&&(T=R.send)}}return!x||!T?(m(void 0,424),H2):x.query(d,T,m)().abort}const Z2="iconify2",zc="iconify",fE=zc+"-count",X2=zc+"-version",mE=36e5,fL=168;function Q_(h,d){try{return h.getItem(d)}catch{}}function vg(h,d,m){try{return h.setItem(d,m),!0}catch{}}function Y2(h,d){try{h.removeItem(d)}catch{}}function eg(h,d){return vg(h,fE,d.toString())}function tg(h){return parseInt(Q_(h,fE))||0}const Bd={local:!0,session:!0},_E={local:new Set,session:new Set};let xg=!1;function mL(h){xg=h}let id=typeof window>"u"?{}:window;function gE(h){const d=h+"Storage";try{if(id&&id[d]&&typeof id[d].length=="number")return id[d]}catch{}Bd[h]=!1}function yE(h,d){const m=gE(h);if(!m)return;const x=Q_(m,X2);if(x!==Z2){if(x){const R=tg(m);for(let C=0;C<R;C++)Y2(m,zc+C.toString())}vg(m,X2,Z2),eg(m,0);return}const T=Math.floor(Date.now()/mE)-fL,I=R=>{const C=zc+R.toString(),Z=Q_(m,C);if(typeof Z=="string"){try{const ee=JSON.parse(Z);if(typeof ee=="object"&&typeof ee.cached=="number"&&ee.cached>T&&typeof ee.provider=="string"&&typeof ee.data=="object"&&typeof ee.data.prefix=="string"&&d(ee,R))return!0}catch{}Y2(m,C)}};let P=tg(m);for(let R=P-1;R>=0;R--)I(R)||(R===P-1?(P--,eg(m,P)):_E[h].add(R))}function vE(){if(!xg){mL(!0);for(const h in Bd)yE(h,d=>{const m=d.data,x=d.provider,T=m.prefix,I=ia(x,T);if(!mg(I,m).length)return!1;const P=m.lastModified||-1;return I.lastModifiedCached=I.lastModifiedCached?Math.min(I.lastModifiedCached,P):P,!0})}}function _L(h,d){const m=h.lastModifiedCached;if(m&&m>=d)return m===d;if(h.lastModifiedCached=d,m)for(const x in Bd)yE(x,T=>{const I=T.data;return T.provider!==h.provider||I.prefix!==h.prefix||I.lastModified===d});return!0}function gL(h,d){xg||vE();function m(x){let T;if(!Bd[x]||!(T=gE(x)))return;const I=_E[x];let P;if(I.size)I.delete(P=Array.from(I).shift());else if(P=tg(T),!eg(T,P+1))return;const R={cached:Math.floor(Date.now()/mE),provider:h.provider,data:d};return vg(T,zc+P.toString(),JSON.stringify(R))}d.lastModified&&!_L(h,d.lastModified)||Object.keys(d.icons).length&&(d.not_found&&(d=Object.assign({},d),delete d.not_found),m("local")||m("session"))}function K2(){}function yL(h){h.iconsLoaderFlag||(h.iconsLoaderFlag=!0,setTimeout(()=>{h.iconsLoaderFlag=!1,sL(h)}))}function vL(h,d){h.iconsToLoad?h.iconsToLoad=h.iconsToLoad.concat(d).sort():h.iconsToLoad=d,h.iconsQueueFlag||(h.iconsQueueFlag=!0,setTimeout(()=>{h.iconsQueueFlag=!1;const{provider:m,prefix:x}=h,T=h.iconsToLoad;delete h.iconsToLoad;let I;!T||!(I=K_(m))||I.prepare(m,x,T).forEach(P=>{pL(m,P,R=>{if(typeof R!="object")P.icons.forEach(C=>{h.missing.add(C)});else try{const C=mg(h,R);if(!C.length)return;const Z=h.pendingIcons;Z&&C.forEach(ee=>{Z.delete(ee)}),gL(h,R)}catch(C){console.error(C)}yL(h)})})}))}const xL=(h,d)=>{const m=cL(h,!0,lE()),x=nL(m);if(!x.pending.length){let C=!0;return d&&setTimeout(()=>{C&&d(x.loaded,x.missing,x.pending,K2)}),()=>{C=!1}}const T=Object.create(null),I=[];let P,R;return x.pending.forEach(C=>{const{provider:Z,prefix:ee}=C;if(ee===R&&Z===P)return;P=Z,R=ee,I.push(ia(Z,ee));const ne=T[Z]||(T[Z]=Object.create(null));ne[ee]||(ne[ee]=[])}),x.pending.forEach(C=>{const{provider:Z,prefix:ee,name:ne}=C,Te=ia(Z,ee),Me=Te.pendingIcons||(Te.pendingIcons=new Set);Me.has(ne)||(Me.add(ne),T[Z][ee].push(ne))}),I.forEach(C=>{const{provider:Z,prefix:ee}=C;T[Z][ee].length&&vL(C,T[Z][ee])}),d?lL(d,x,I):K2};function bL(h,d){const m={...h};for(const x in d){const T=d[x],I=typeof T;x in cE?(T===null||T&&(I==="string"||I==="number"))&&(m[x]=T):I===typeof m[x]&&(m[x]=x==="rotate"?T%4:T)}return m}const wL=/[\s,]+/;function TL(h,d){d.split(wL).forEach(m=>{switch(m.trim()){case"horizontal":h.hFlip=!0;break;case"vertical":h.vFlip=!0;break}})}function EL(h,d=0){const m=h.replace(/^-?[0-9.]*/,"");function x(T){for(;T<0;)T+=4;return T%4}if(m===""){const T=parseInt(h);return isNaN(T)?0:x(T)}else if(m!==h){let T=0;switch(m){case"%":T=25;break;case"deg":T=90}if(T){let I=parseFloat(h.slice(0,h.length-m.length));return isNaN(I)?0:(I=I/T,I%1===0?x(I):0)}}return d}function SL(h,d){let m=h.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const x in d)m+=" "+x+'="'+d[x]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+m+">"+h+"</svg>"}function AL(h){return h.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ML(h){return"data:image/svg+xml,"+AL(h)}function IL(h){return'url("'+ML(h)+'")'}const J2={...uE,inline:!1},CL={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kL={display:"inline-block"},ig={backgroundColor:"currentColor"},xE={backgroundColor:"transparent"},Q2={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},eT={webkitMask:ig,mask:ig,background:xE};for(const h in eT){const d=eT[h];for(const m in Q2)d[h+m]=Q2[m]}const ud={};["horizontal","vertical"].forEach(h=>{const d=h.slice(0,1)+"Flip";ud[h+"-flip"]=d,ud[h.slice(0,1)+"-flip"]=d,ud[h+"Flip"]=d});function tT(h){return h+(h.match(/^[-0-9.]+$/)?"px":"")}const iT=(h,d)=>{const m=bL(J2,d),x={...CL},T=d.mode||"svg",I={},P=d.style,R=typeof P=="object"&&!(P instanceof Array)?P:{};for(let ve in d){const Xe=d[ve];if(Xe!==void 0)switch(ve){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":m[ve]=Xe===!0||Xe==="true"||Xe===1;break;case"flip":typeof Xe=="string"&&TL(m,Xe);break;case"color":I.color=Xe;break;case"rotate":typeof Xe=="string"?m[ve]=EL(Xe):typeof Xe=="number"&&(m[ve]=Xe);break;case"ariaHidden":case"aria-hidden":Xe!==!0&&Xe!=="true"&&delete x["aria-hidden"];break;default:{const ut=ud[ve];ut?(Xe===!0||Xe==="true"||Xe===1)&&(m[ut]=!0):J2[ve]===void 0&&(x[ve]=Xe)}}}const C=WR(h,m),Z=C.attributes;if(m.inline&&(I.verticalAlign="-0.125em"),T==="svg"){x.style={...I,...R},Object.assign(x,Z);let ve=0,Xe=d.id;return typeof Xe=="string"&&(Xe=Xe.replace(/-/g,"_")),x.innerHTML=YR(C.body,Xe?()=>Xe+"ID"+ve++:"iconifyVue"),I2("svg",x)}const{body:ee,width:ne,height:Te}=h,Me=T==="mask"||(T==="bg"?!1:ee.indexOf("currentColor")!==-1),ke=SL(ee,{...Z,width:ne+"",height:Te+""});return x.style={...I,"--svg":IL(ke),width:tT(Z.width),height:tT(Z.height),...kL,...Me?ig:xE,...R},I2("span",x)};lE(!0);KR("",oL);if(typeof document<"u"&&typeof window<"u"){vE();const h=window;if(h.IconifyPreload!==void 0){const d=h.IconifyPreload,m="Invalid IconifyPreload syntax.";typeof d=="object"&&d!==null&&(d instanceof Array?d:[d]).forEach(x=>{try{(typeof x!="object"||x===null||x instanceof Array||typeof x.icons!="object"||typeof x.prefix!="string"||!UR(x))&&console.error(m)}catch{console.error(m)}})}if(h.IconifyProviders!==void 0){const d=h.IconifyProviders;if(typeof d=="object"&&d!==null)for(let m in d){const x="IconifyProviders["+m+"] is invalid.";try{const T=d[m];if(typeof T!="object"||!T||T.resources===void 0)continue;hE(m,T)||console.error(x)}catch{console.error(x)}}}}const PL={...Od,body:""},hd=Dn({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(h,d){if(typeof h=="object"&&h!==null&&typeof h.body=="string")return this._name="",this.abortLoading(),{data:h};let m;if(typeof h!="string"||(m=Ld(h,!1,!0))===null)return this.abortLoading(),null;const x=jR(m);if(!x)return(!this._loadingIcon||this._loadingIcon.name!==h)&&(this.abortLoading(),this._name="",x!==null&&(this._loadingIcon={name:h,abort:xL([m],()=>{this.counter++})})),null;this.abortLoading(),this._name!==h&&(this._name=h,d&&d(h));const T=["iconify"];return m.prefix!==""&&T.push("iconify--"+m.prefix),m.provider!==""&&T.push("iconify--"+m.provider),{data:x,classes:T}}},render(){this.counter;const h=this.$attrs,d=this.iconMounted?this.getIcon(h.icon,h.onLoad):null;if(!d)return iT(PL,h);let m=h;return d.classes&&(m={...h,class:(typeof h.class=="string"?h.class+" ":"")+d.classes.join(" ")}),iT({...Od,...d.data},m)}});hE("",{resources:["https://icons.ui.kvass.no"]});function DL(h){return!h||typeof h!="object"?!1:typeof h.then=="function"&&typeof h.catch=="function"}const zL=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],RL=(h,d)=>d==="default"?`var(--k-ui-${h})`:`var(--k-ui-${h}-${d})`,rT=h=>{switch(h){case"start":case"end":return`flex-${h}`;default:return h}},LL=(h,d="spacing")=>h.split(" ").map(m=>typeof m=="number"||typeof m=="string"&&m.match(/^\d+$/)?`${m}rem`:typeof m=="string"&&zL.includes(m)?RL(d,m):m).join(" "),OL=(h,d)=>Object.fromEntries(Object.entries(d).map(([m,x])=>[`--k-${h}-${m}`,x])),BL=Dn({__name:"Spinner",props:{size:{default:"medium"}},setup(h){return(d,m)=>(ur(),Cn("span",{class:cg(`k-spinner k-spinner--size-${d.size}`)},null,2))}}),FL={class:"k-button__content"},NL={key:0,class:"k-button__icon k-button__icon--left"},jL={key:1,class:"k-button__icon k-button__icon--right"},VL={key:2,class:"k-button__confirm-label"},bg=Dn({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{type:[String,Object,Function],default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(h,{emit:d}){const m=h,x={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},T=Hr(()=>!ne.value||C.value==="loading"?m.variant:C.value=="confirm"?"warning":x[C.value]||m.variant),I=Hr(()=>m.loading||C.value==="loading"),P=Qo(),R=Hr(()=>{if(C.value)return["error","success"].includes(C.value)||I.value}),C=Qo("idle"),Z=Qo(),ee=Qo(),ne=Hr(()=>C.value||I.value),Te=Hr(()=>["error","success"].includes(C.value)),Me=Hr(()=>C.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function ke(_t){if(!_t)return;ve(),ee.value=_t,P.value=setTimeout(()=>C.value="loading",100);let st=qe=>{ve(),m.stateTimeout?(C.value=qe,Z.value=setTimeout(()=>{ve(),d(qe)},m.stateTimeout)):d(qe)};ee.value.then(()=>st("success")).catch(()=>st("error"))}function ve(){P.value&&clearTimeout(P.value),Z.value&&clearTimeout(Z.value),ee.value=null,C.value="idle"}yT(()=>m.promise,_t=>{_t&&DL(_t)&&ke(_t)});const Xe=Qo(),ut=Hr(()=>C.value==="confirm");function tt(_t){if(m.confirm&&C.value!=="confirm")return C.value="confirm";ve(),d("click",_t)}const yt=oE("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(_t,st)=>(ur(),In(xT(_t.is),hD({type:"button",class:An(yt)({variant:T.value,size:_t.size,isLoading:I.value,isBusy:R.value}),"aria-busy":R.value,inert:R.value},_t.$attrs,{onClick:tt,ref_key:"rootElement",ref:Xe}),{default:vd(()=>[cD(sl("span",FL,[_t.icon||_t.iconLeft||_t.$slots.icon||_t.$slots["icon-left"]?(ur(),Cn("span",NL,[fs(_t.$slots,"icon-left",{},()=>[fs(_t.$slots,"icon",{},()=>[W_(An(hd),{icon:_t.icon||_t.iconLeft},null,8,["icon"])])])])):en("",!0),fs(_t.$slots,"default",{},()=>[vT(Pc(_t.label),1)]),_t.iconRight||_t.$slots["icon-right"]?(ur(),Cn("span",jL,[fs(_t.$slots,"icon-right",{},()=>[W_(An(hd),{icon:_t.iconRight},null,8,["icon"])])])):en("",!0)],512),[[uD,!ut.value]]),I.value?(ur(),In(BL,{key:0})):en("",!0),Te.value?(ur(),In(An(hd),{key:1,class:"k-button__state-indicator",icon:Me.value},null,8,["icon"])):en("",!0),ut.value?(ur(),Cn("span",VL,Pc(_t.confirmLabel),1)):en("",!0)]),_:3},16,["class","aria-busy","inert"]))}}),UL={class:"k-alert__content"},qL={key:0,class:"k-alert__title"},GL={class:"k-alert__icon"},$L=Dn({__name:"Alert",props:{variant:{default:"neutral"},icon:{},title:{},content:{},action:{}},emits:["action"],setup(h,{emit:d}){const m=h,x=oE("k-alert",{variants:{variant:{neutral:"k-alert--neutral",info:"k-alert--info",danger:"k-alert--danger",warning:"k-alert--warning"}}}),T={info:"fa-pro-light:circle-question",warning:"fa-pro-light:exclamation-triangle",danger:"fa-pro-light:exclamation-circle"};return(I,P)=>(ur(),Cn("div",{role:"alert",class:cg(An(x)({...m}))},[sl("div",UL,[I.title||I.$slots.title?(ur(),Cn("div",qL,[fs(I.$slots,"title",{},()=>[sl("strong",null,Pc(I.title),1)])])):en("",!0),fs(I.$slots,"default",{},()=>[sl("span",null,Pc(I.content),1)]),I.action?(ur(),In(bg,{key:1,label:I.action,size:"small",class:"k-alert__action",onClick:P[0]||(P[0]=R=>d("action",{event:R,name:I.action}))},null,8,["label"])):en("",!0)]),sl("div",GL,[fs(I.$slots,"icon",{},()=>[I.icon||T[I.variant]?(ur(),In(An(hd),{key:0,icon:I.icon||T[I.variant]},null,8,["icon"])):en("",!0)])])],2))}});var _s=(h,d=[])=>({parts:(...m)=>{if(WL(d))return _s(h,m);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...m)=>_s(h,[...d,...m]),rename:m=>_s(m,d),keys:()=>d,build:()=>[...new Set(d)].reduce((m,x)=>Object.assign(m,{[x]:{selector:[`&[data-scope="${tl(h)}"][data-part="${tl(x)}"]`,`& [data-scope="${tl(h)}"][data-part="${tl(x)}"]`].join(", "),attrs:{"data-scope":tl(h),"data-part":tl(x)}}}),{})}),tl=h=>h.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),WL=h=>h.length===0,HL=h=>h.nodeType===Node.DOCUMENT_NODE?h:h.ownerDocument??document;function Rc(h){const d={getRootNode:m=>{var x;return((x=m.getRootNode)==null?void 0:x.call(m))??document},getDoc:m=>HL(d.getRootNode(m)),getWin:m=>d.getDoc(m).defaultView??window,getActiveElement:m=>d.getDoc(m).activeElement,getById:(m,x)=>d.getRootNode(m).getElementById(x),setValue:(m,x)=>{m==null||x==null||(m.value=x.toString())}};return{...d,...h}}function bE(h,d){return Array.from(h?.querySelectorAll(d)??[])}var wE=h=>h.ownerDocument.defaultView||window;function ZL(h,d){const{type:m="HTMLInputElement",property:x="value"}=d,T=wE(h)[m].prototype;return Object.getOwnPropertyDescriptor(T,x)??{}}function XL(h,d,m={}){var x;(x=ZL(h,m).set)==null||x.call(h,d)}function TE(h,d){const{value:m,bubbles:x=!0}=d;if(!h)return;const T=wE(h);h instanceof T.HTMLInputElement&&(XL(h,`${m}`),h.dispatchEvent(new T.Event("input",{bubbles:x})))}var YL=_s("checkbox").parts("root","label","control");YL.build();var rd=Rc({getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`checkbox:${h.id}`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`checkbox:${h.id}:label`},getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`checkbox:${h.id}:control`},getHiddenInputId:h=>{var d;return((d=h.ids)==null?void 0:d.hiddenInput)??`checkbox:${h.id}:hidden`},getRootEl:h=>rd.getById(h,rd.getRootId(h)),getHiddenInputEl:h=>rd.getById(h,rd.getHiddenInputId(h))});function KL(h){return new Proxy({},{get(){return h}})}function JL(h){return h.charAt(0).toUpperCase()+h.substr(1).toLowerCase()}var oT={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"};function QL(h){return h in oT?oT[h]:h.startsWith("on")?`on${JL(h.substr(2))}`:h.toLowerCase()}KL(h=>{const d={};for(const m in h){const x=h[m];m==="children"?typeof x=="string"&&(d.innerHTML=x):d[QL(m)]=h[m]}return d});function gs(h){return typeof h=="string"||h instanceof String}function nT(h){var d;return typeof h=="object"&&h!=null&&(h==null||(d=h.constructor)==null?void 0:d.name)==="Object"}function EE(h,d){return Array.isArray(d)?EE(h,(m,x)=>d.includes(x)):Object.entries(h).reduce((m,x)=>{let[T,I]=x;return d(I,T)&&(m[T]=I),m},{})}const Mt={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function eO(h){switch(h){case Mt.LEFT:return Mt.FORCE_LEFT;case Mt.RIGHT:return Mt.FORCE_RIGHT;default:return h}}function O_(h){return h.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ed(h,d){if(d===h)return!0;const m=Array.isArray(d),x=Array.isArray(h);let T;if(m&&x){if(d.length!=h.length)return!1;for(T=0;T<d.length;T++)if(!Ed(d[T],h[T]))return!1;return!0}if(m!=x)return!1;if(d&&h&&typeof d=="object"&&typeof h=="object"){const I=d instanceof Date,P=h instanceof Date;if(I&&P)return d.getTime()==h.getTime();if(I!=P)return!1;const R=d instanceof RegExp,C=h instanceof RegExp;if(R&&C)return d.toString()==h.toString();if(R!=C)return!1;const Z=Object.keys(d);for(T=0;T<Z.length;T++)if(!Object.prototype.hasOwnProperty.call(h,Z[T]))return!1;for(T=0;T<Z.length;T++)if(!Ed(h[Z[T]],d[Z[T]]))return!1;return!0}else if(d&&h&&typeof d=="function"&&typeof h=="function")return d.toString()===h.toString();return!1}class tO{constructor(d){for(Object.assign(this,d);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Mt.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Mt.RIGHT:Mt.LEFT}}function Ht(h,d){return new Ht.InputMask(h,d)}function SE(h){if(h==null)throw new Error("mask property should be defined");return h instanceof RegExp?Ht.MaskedRegExp:gs(h)?Ht.MaskedPattern:h===Date?Ht.MaskedDate:h===Number?Ht.MaskedNumber:Array.isArray(h)||h===Array?Ht.MaskedDynamic:Ht.Masked&&h.prototype instanceof Ht.Masked?h:Ht.Masked&&h instanceof Ht.Masked?h.constructor:h instanceof Function?Ht.MaskedFunction:(console.warn("Mask not found for mask",h),Ht.Masked)}function Sd(h){if(!h)throw new Error("Options in not defined");if(Ht.Masked){if(h.prototype instanceof Ht.Masked)return{mask:h};const{mask:d=void 0,...m}=h instanceof Ht.Masked?{mask:h}:nT(h)&&h.mask instanceof Ht.Masked?h:{};if(d){const x=d.mask;return{...EE(d,(T,I)=>!I.startsWith("_")),mask:d.constructor,_mask:x,...m}}}return nT(h)?{...h}:{mask:h}}function ra(h){if(Ht.Masked&&h instanceof Ht.Masked)return h;const d=Sd(h),m=SE(d.mask);if(!m)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return d.mask===m&&delete d.mask,d._mask&&(d.mask=d._mask,delete d._mask),new m(d)}Ht.createMask=ra;class wg{get selectionStart(){let d;try{d=this._unsafeSelectionStart}catch{}return d??this.value.length}get selectionEnd(){let d;try{d=this._unsafeSelectionEnd}catch{}return d??this.value.length}select(d,m){if(!(d==null||m==null||d===this.selectionStart&&m===this.selectionEnd))try{this._unsafeSelect(d,m)}catch{}}get isActive(){return!1}}Ht.MaskElement=wg;class oa extends wg{constructor(d){super(),this.input=d,this._handlers={}}get rootElement(){var d,m,x;return(d=(m=(x=this.input).getRootNode)==null?void 0:m.call(x))!=null?d:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(d){Object.keys(d).forEach(m=>this._toggleEventHandler(oa.EVENTS_MAP[m],d[m]))}unbindEvents(){Object.keys(this._handlers).forEach(d=>this._toggleEventHandler(d))}_toggleEventHandler(d,m){this._handlers[d]&&(this.input.removeEventListener(d,this._handlers[d]),delete this._handlers[d]),m&&(this.input.addEventListener(d,m),this._handlers[d]=m)}}oa.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"};Ht.HTMLMaskElement=oa;class iO extends oa{constructor(d){super(d),this.input=d,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(d,m){this.input.setSelectionRange(d,m)}get value(){return this.input.value}set value(d){this.input.value=d}}Ht.HTMLMaskElement=oa;class AE extends oa{get _unsafeSelectionStart(){const d=this.rootElement,m=d.getSelection&&d.getSelection(),x=m&&m.anchorOffset,T=m&&m.focusOffset;return T==null||x==null||x<T?x:T}get _unsafeSelectionEnd(){const d=this.rootElement,m=d.getSelection&&d.getSelection(),x=m&&m.anchorOffset,T=m&&m.focusOffset;return T==null||x==null||x>T?x:T}_unsafeSelect(d,m){if(!this.rootElement.createRange)return;const x=this.rootElement.createRange();x.setStart(this.input.firstChild||this.input,d),x.setEnd(this.input.lastChild||this.input,m);const T=this.rootElement,I=T.getSelection&&T.getSelection();I&&(I.removeAllRanges(),I.addRange(x))}get value(){return this.input.textContent||""}set value(d){this.input.textContent=d}}Ht.HTMLContenteditableMaskElement=AE;class rO{constructor(d,m){this.el=d instanceof wg?d:d.isContentEditable&&d.tagName!=="INPUT"&&d.tagName!=="TEXTAREA"?new AE(d):new iO(d),this.masked=ra(m),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(d){var m;return d==null||((m=this.masked)==null?void 0:m.maskEquals(d))}get mask(){return this.masked.mask}set mask(d){if(this.maskEquals(d))return;if(!(d instanceof Ht.Masked)&&this.masked.constructor===SE(d)){this.masked.updateOptions({mask:d});return}const m=d instanceof Ht.Masked?d:ra({mask:d});m.unmaskedValue=this.masked.unmaskedValue,this.masked=m}get value(){return this._value}set value(d){this.value!==d&&(this.masked.value=d,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(d){this.unmaskedValue!==d&&(this.masked.unmaskedValue=d,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(d){this.masked.typedValueEquals(d)||(this.masked.typedValue=d,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(d,m){const x=this._listeners[d];x&&x.forEach(T=>T(m))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(d){!this.el||!this.el.isActive||(this.el.select(d,d),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const d=this.masked.unmaskedValue,m=this.masked.value,x=this.displayValue,T=this.unmaskedValue!==d||this.value!==m;this._unmaskedValue=d,this._value=m,this.el.value!==x&&(this.el.value=x),T&&this._fireChangeEvents()}updateOptions(d){const{mask:m,...x}=d,T=!this.maskEquals(m),I=!Ed(this.masked,x);T&&(this.mask=m),I&&this.masked.updateOptions(x),(T||I)&&this.updateControl()}updateCursor(d){d!=null&&(this.cursorPos=d,this._delayUpdateCursor(d))}_delayUpdateCursor(d){this._abortUpdateCursor(),this._changingCursorPos=d,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Mt.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(d,m){return this._listeners[d]||(this._listeners[d]=[]),this._listeners[d].push(m),this}off(d,m){if(!this._listeners[d])return this;if(!m)return delete this._listeners[d],this;const x=this._listeners[d].indexOf(m);return x>=0&&this._listeners[d].splice(x,1),this}_onInput(d){if(this._inputEvent=d,this._abortUpdateCursor(),!this._selection)return this.updateValue();const m=new tO({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),x=this.masked.rawInputValue,T=this.masked.splice(m.startChangePos,m.removed.length,m.inserted,m.removeDirection,{input:!0,raw:!0}).offset,I=x===this.masked.rawInputValue?m.removeDirection:Mt.NONE;let P=this.masked.nearestInputPos(m.startChangePos+T,I);I!==Mt.NONE&&(P=this.masked.nearestInputPos(P,Mt.NONE)),this.updateControl(),this.updateCursor(P),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(d){d.preventDefault(),d.stopPropagation()}_onFocus(d){this.alignCursorFriendly()}_onClick(d){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Ht.InputMask=rO;class Mi{static normalize(d){return Array.isArray(d)?d:[d,new Mi]}constructor(d){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},d)}aggregate(d){return this.rawInserted+=d.rawInserted,this.skip=this.skip||d.skip,this.inserted+=d.inserted,this.tailShift+=d.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Ht.ChangeDetails=Mi;class Mn{constructor(d,m,x){d===void 0&&(d=""),m===void 0&&(m=0),this.value=d,this.from=m,this.stop=x}toString(){return this.value}extend(d){this.value+=String(d)}appendTo(d){return d.append(this.toString(),{tail:!0}).aggregate(d._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(d){Object.assign(this,d)}unshift(d){if(!this.value.length||d!=null&&this.from>=d)return"";const m=this.value[0];return this.value=this.value.slice(1),m}shift(){if(!this.value.length)return"";const d=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),d}}class ro{constructor(d){this._value="",this._update({...ro.DEFAULTS,...d}),this._initialized=!0}updateOptions(d){Object.keys(d).length&&this.withValueRefresh(this._update.bind(this,d))}_update(d){Object.assign(this,d)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(d){this._value=d._value}reset(){this._value=""}get value(){return this._value}set value(d){this.resolve(d,{input:!0})}resolve(d,m){m===void 0&&(m={input:!0}),this.reset(),this.append(d,m,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(d){this.resolve(d,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(d){this.format?this.value=this.format(d,this):this.unmaskedValue=String(d)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(d){this.resolve(d,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(d,m){return d}totalInputPositions(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),Math.min(this.displayValue.length,m-d)}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),this.displayValue.slice(d,m)}extractTail(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),new Mn(this.extractInput(d,m),d)}appendTail(d){return gs(d)&&(d=new Mn(String(d))),d.appendTo(this)}_appendCharRaw(d,m){return d?(this._value+=d,new Mi({inserted:d,rawInserted:d})):new Mi}_appendChar(d,m,x){m===void 0&&(m={});const T=this.state;let I;if([d,I]=this.doPrepareChar(d,m),I=I.aggregate(this._appendCharRaw(d,m)),I.inserted){let P,R=this.doValidate(m)!==!1;if(R&&x!=null){const C=this.state;this.overwrite===!0&&(P=x.state,x.unshift(this.displayValue.length-I.tailShift));let Z=this.appendTail(x);R=Z.rawInserted===x.toString(),!(R&&Z.inserted)&&this.overwrite==="shift"&&(this.state=C,P=x.state,x.shift(),Z=this.appendTail(x),R=Z.rawInserted===x.toString()),R&&Z.inserted&&(this.state=C)}R||(I=new Mi,this.state=T,x&&P&&(x.state=P))}return I}_appendPlaceholder(){return new Mi}_appendEager(){return new Mi}append(d,m,x){if(!gs(d))throw new Error("value should be string");const T=gs(x)?new Mn(String(x)):x;m!=null&&m.tail&&(m._beforeTailState=this.state);let I;[d,I]=this.doPrepare(d,m);for(let P=0;P<d.length;++P){const R=this._appendChar(d[P],m,T);if(!R.rawInserted&&!this.doSkipInvalid(d[P],m,T))break;I.aggregate(R)}return(this.eager===!0||this.eager==="append")&&m!=null&&m.input&&d&&I.aggregate(this._appendEager()),T!=null&&(I.tailShift+=this.appendTail(T).tailShift),I}remove(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),this._value=this.displayValue.slice(0,d)+this.displayValue.slice(m),new Mi}withValueRefresh(d){if(this._refreshing||!this._initialized)return d();this._refreshing=!0;const m=this.rawInputValue,x=this.value,T=d();return this.rawInputValue=m,this.value&&this.value!==x&&x.indexOf(this.value)===0&&this.append(x.slice(this.displayValue.length),{},""),delete this._refreshing,T}runIsolated(d){if(this._isolated||!this._initialized)return d(this);this._isolated=!0;const m=this.state,x=d(this);return this.state=m,delete this._isolated,x}doSkipInvalid(d,m,x){return!!this.skipInvalid}doPrepare(d,m){return m===void 0&&(m={}),Mi.normalize(this.prepare?this.prepare(d,this,m):d)}doPrepareChar(d,m){return m===void 0&&(m={}),Mi.normalize(this.prepareChar?this.prepareChar(d,this,m):d)}doValidate(d){return(!this.validate||this.validate(this.value,this,d))&&(!this.parent||this.parent.doValidate(d))}doCommit(){this.commit&&this.commit(this.value,this)}splice(d,m,x,T,I){T===void 0&&(T=Mt.NONE),I===void 0&&(I={input:!0});const P=d+m,R=this.extractTail(P),C=this.eager===!0||this.eager==="remove";let Z;C&&(T=eO(T),Z=this.extractInput(0,P,{raw:!0}));let ee=d;const ne=new Mi;if(T!==Mt.NONE&&(ee=this.nearestInputPos(d,m>1&&d!==0&&!C?Mt.NONE:T),ne.tailShift=ee-d),ne.aggregate(this.remove(ee)),C&&T!==Mt.NONE&&Z===this.rawInputValue)if(T===Mt.FORCE_LEFT){let Te;for(;Z===this.rawInputValue&&(Te=this.displayValue.length);)ne.aggregate(new Mi({tailShift:-1})).aggregate(this.remove(Te-1))}else T===Mt.FORCE_RIGHT&&R.unshift();return ne.aggregate(this.append(x,I,R))}maskEquals(d){return this.mask===d}typedValueEquals(d){const m=this.typedValue;return d===m||ro.EMPTY_VALUES.includes(d)&&ro.EMPTY_VALUES.includes(m)||(this.format?this.format(d,this)===this.format(this.typedValue,this):!1)}}ro.DEFAULTS={skipInvalid:!0};ro.EMPTY_VALUES=[void 0,null,""];Ht.Masked=ro;class ea{constructor(d,m){d===void 0&&(d=[]),m===void 0&&(m=0),this.chunks=d,this.from=m}toString(){return this.chunks.map(String).join("")}extend(d){if(!String(d))return;d=gs(d)?new Mn(String(d)):d;const m=this.chunks[this.chunks.length-1],x=m&&(m.stop===d.stop||d.stop==null)&&d.from===m.from+m.toString().length;if(d instanceof Mn)x?m.extend(d.toString()):this.chunks.push(d);else if(d instanceof ea){if(d.stop==null){let T;for(;d.chunks.length&&d.chunks[0].stop==null;)T=d.chunks.shift(),T.from+=d.from,this.extend(T)}d.toString()&&(d.stop=d.blockIndex,this.chunks.push(d))}}appendTo(d){if(!(d instanceof Ht.MaskedPattern))return new Mn(this.toString()).appendTo(d);const m=new Mi;for(let x=0;x<this.chunks.length&&!m.skip;++x){const T=this.chunks[x],I=d._mapPosToBlock(d.displayValue.length),P=T.stop;let R;if(P!=null&&(!I||I.index<=P)){if(T instanceof ea||d._stops.indexOf(P)>=0){const C=d._appendPlaceholder(P);m.aggregate(C)}R=T instanceof ea&&d._blocks[P]}if(R){const C=R.appendTail(T);C.skip=!1,m.aggregate(C),d._value+=C.inserted;const Z=T.toString().slice(C.rawInserted.length);Z&&m.aggregate(d.append(Z,{tail:!0}))}else m.aggregate(d.append(T.toString(),{tail:!0}))}return m}get state(){return{chunks:this.chunks.map(d=>d.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(d){const{chunks:m,...x}=d;Object.assign(this,x),this.chunks=m.map(T=>{const I="chunks"in T?new ea:new Mn;return I.state=T,I})}unshift(d){if(!this.chunks.length||d!=null&&this.from>=d)return"";const m=d!=null?d-this.from:d;let x=0;for(;x<this.chunks.length;){const T=this.chunks[x],I=T.unshift(m);if(T.toString()){if(!I)break;++x}else this.chunks.splice(x,1);if(I)return I}return""}shift(){if(!this.chunks.length)return"";let d=this.chunks.length-1;for(;0<=d;){const m=this.chunks[d],x=m.shift();if(m.toString()){if(!x)break;--d}else this.chunks.splice(d,1);if(x)return x}return""}}class oO{constructor(d,m){this.masked=d,this._log=[];const{offset:x,index:T}=d._mapPosToBlock(m)||(m<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=x,this.index=T,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(d){Object.assign(this,d)}pushState(){this._log.push(this.state)}popState(){const d=this._log.pop();return d&&(this.state=d),d}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(d){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((m=this.block)==null?void 0:m.displayValue.length)||0){var m;if(d())return this.ok=!0}return this.ok=!1}_pushRight(d){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(d())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Mt.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Mt.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Mt.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Mt.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Mt.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Mt.NONE),!0})}}class ME{constructor(d){Object.assign(this,d),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(d,m){return d===void 0&&(d=0),m===void 0&&(m=this._value.length),this._value=this._value.slice(0,d)+this._value.slice(m),this._value||(this._isRawInput=!1),new Mi}nearestInputPos(d,m){m===void 0&&(m=Mt.NONE);const x=0,T=this._value.length;switch(m){case Mt.LEFT:case Mt.FORCE_LEFT:return x;case Mt.NONE:case Mt.RIGHT:case Mt.FORCE_RIGHT:default:return T}}totalInputPositions(d,m){return d===void 0&&(d=0),m===void 0&&(m=this._value.length),this._isRawInput?m-d:0}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this._value.length),x===void 0&&(x={}),x.raw&&this._isRawInput&&this._value.slice(d,m)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(d,m){m===void 0&&(m={});const x=new Mi;if(this.isFilled)return x;const T=this.eager===!0||this.eager==="append",I=this.char===d&&(this.isUnmasking||m.input||m.raw)&&(!m.raw||!T)&&!m.tail;return I&&(x.rawInserted=this.char),this._value=x.inserted=this.char,this._isRawInput=I&&(m.raw||m.input),x}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const d=new Mi;return this.isFilled||(this._value=d.inserted=this.char),d}extractTail(){return new Mn("")}appendTail(d){return gs(d)&&(d=new Mn(String(d))),d.appendTo(this)}append(d,m,x){const T=this._appendChar(d[0],m);return x!=null&&(T.tailShift+=this.appendTail(x).tailShift),T}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(d){this._value=d._value,this._isRawInput=!!d._rawInputValue}}class Ad{constructor(d){const{parent:m,isOptional:x,placeholderChar:T,displayChar:I,lazy:P,eager:R,...C}=d;this.masked=ra(C),Object.assign(this,{parent:m,isOptional:x,placeholderChar:T,displayChar:I,lazy:P,eager:R})}reset(){this.isFilled=!1,this.masked.reset()}remove(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.value.length),d===0&&m>=1?(this.isFilled=!1,this.masked.remove(d,m)):new Mi}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(d,m){if(m===void 0&&(m={}),this.isFilled)return new Mi;const x=this.masked.state,T=this.masked._appendChar(d,this.currentMaskFlags(m));return T.inserted&&this.doValidate(m)===!1&&(T.inserted=T.rawInserted="",this.masked.state=x),!T.inserted&&!this.isOptional&&!this.lazy&&!m.input&&(T.inserted=this.placeholderChar),T.skip=!T.inserted&&!this.isOptional,this.isFilled=!!T.inserted,T}append(d,m,x){return this.masked.append(d,this.currentMaskFlags(m),x)}_appendPlaceholder(){const d=new Mi;return this.isFilled||this.isOptional||(this.isFilled=!0,d.inserted=this.placeholderChar),d}_appendEager(){return new Mi}extractTail(d,m){return this.masked.extractTail(d,m)}appendTail(d){return this.masked.appendTail(d)}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this.value.length),this.masked.extractInput(d,m,x)}nearestInputPos(d,m){m===void 0&&(m=Mt.NONE);const x=0,T=this.value.length,I=Math.min(Math.max(d,x),T);switch(m){case Mt.LEFT:case Mt.FORCE_LEFT:return this.isComplete?I:x;case Mt.RIGHT:case Mt.FORCE_RIGHT:return this.isComplete?I:T;case Mt.NONE:default:return I}}totalInputPositions(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.value.length),this.value.slice(d,m).length}doValidate(d){return this.masked.doValidate(this.currentMaskFlags(d))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(d)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(d){this.masked.state=d.masked,this.isFilled=d.isFilled}currentMaskFlags(d){var m;return{...d,_beforeTailState:(d==null||(m=d._beforeTailState)==null?void 0:m.masked)||d?._beforeTailState}}}Ad.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class nO extends ro{updateOptions(d){super.updateOptions(d)}_update(d){const m=d.mask;m&&(d.validate=x=>x.search(m)>=0),super._update(d)}}Ht.MaskedRegExp=nO;class oo extends ro{constructor(d){super({...oo.DEFAULTS,...d,definitions:Object.assign({},Ad.DEFAULT_DEFINITIONS,d?.definitions)})}updateOptions(d){super.updateOptions(d)}_update(d){d.definitions=Object.assign({},this.definitions,d.definitions),super._update(d),this._rebuildMask()}_rebuildMask(){const d=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const m=this.mask;if(!m||!d)return;let x=!1,T=!1;for(let I=0;I<m.length;++I){if(this.blocks){const Z=m.slice(I),ee=Object.keys(this.blocks).filter(Te=>Z.indexOf(Te)===0);ee.sort((Te,Me)=>Me.length-Te.length);const ne=ee[0];if(ne){const{expose:Te,...Me}=Sd(this.blocks[ne]),ke=ra({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...Me,parent:this});ke&&(this._blocks.push(ke),Te&&(this.exposeBlock=ke),this._maskedBlocks[ne]||(this._maskedBlocks[ne]=[]),this._maskedBlocks[ne].push(this._blocks.length-1)),I+=ne.length-1;continue}}let P=m[I],R=P in d;if(P===oo.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(P==="{"||P==="}"){x=!x;continue}if(P==="["||P==="]"){T=!T;continue}if(P===oo.ESCAPE_CHAR){if(++I,P=m[I],!P)break;R=!1}const C=R?new Ad({isOptional:T,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Sd(d[P]),parent:this}):new ME({char:P,eager:this.eager,isUnmasking:x});this._blocks.push(C)}}get state(){return{...super.state,_blocks:this._blocks.map(d=>d.state)}}set state(d){const{_blocks:m,...x}=d;this._blocks.forEach((T,I)=>T.state=m[I]),super.state=x}reset(){super.reset(),this._blocks.forEach(d=>d.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(d=>d.isComplete)}get isFilled(){return this._blocks.every(d=>d.isFilled)}get isFixed(){return this._blocks.every(d=>d.isFixed)}get isOptional(){return this._blocks.every(d=>d.isOptional)}doCommit(){this._blocks.forEach(d=>d.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((d,m)=>d+=m.unmaskedValue,"")}set unmaskedValue(d){if(this.exposeBlock){const m=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=d,this.appendTail(m),this.doCommit()}else super.unmaskedValue=d}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((d,m)=>d+=m.value,"")}set value(d){if(this.exposeBlock){const m=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=d,this.appendTail(m),this.doCommit()}else super.value=d}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(d){if(this.exposeBlock){const m=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=d,this.appendTail(m),this.doCommit()}else super.typedValue=d}get displayValue(){return this._blocks.reduce((d,m)=>d+=m.displayValue,"")}appendTail(d){return super.appendTail(d).aggregate(this._appendPlaceholder())}_appendEager(){var d;const m=new Mi;let x=(d=this._mapPosToBlock(this.displayValue.length))==null?void 0:d.index;if(x==null)return m;this._blocks[x].isFilled&&++x;for(let T=x;T<this._blocks.length;++T){const I=this._blocks[T]._appendEager();if(!I.inserted)break;m.aggregate(I)}return m}_appendCharRaw(d,m){m===void 0&&(m={});const x=this._mapPosToBlock(this.displayValue.length),T=new Mi;if(!x)return T;for(let P=x.index;;++P){var I;const R=this._blocks[P];if(!R)break;const C=R._appendChar(d,{...m,_beforeTailState:(I=m._beforeTailState)==null||(I=I._blocks)==null?void 0:I[P]}),Z=C.skip;if(T.aggregate(C),Z||C.rawInserted)break}return T}extractTail(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length);const x=new ea;return d===m||this._forEachBlocksInRange(d,m,(T,I,P,R)=>{const C=T.extractTail(P,R);C.stop=this._findStopBefore(I),C.from=this._blockStartPos(I),C instanceof ea&&(C.blockIndex=I),x.extend(C)}),x}extractInput(d,m,x){if(d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),x===void 0&&(x={}),d===m)return"";let T="";return this._forEachBlocksInRange(d,m,(I,P,R,C)=>{T+=I.extractInput(R,C,x)}),T}_findStopBefore(d){let m;for(let x=0;x<this._stops.length;++x){const T=this._stops[x];if(T<=d)m=T;else break}return m}_appendPlaceholder(d){const m=new Mi;if(this.lazy&&d==null)return m;const x=this._mapPosToBlock(this.displayValue.length);if(!x)return m;const T=x.index,I=d??this._blocks.length;return this._blocks.slice(T,I).forEach(P=>{if(!P.lazy||d!=null){var R;const C=P._appendPlaceholder((R=P._blocks)==null?void 0:R.length);this._value+=C.inserted,m.aggregate(C)}}),m}_mapPosToBlock(d){let m="";for(let x=0;x<this._blocks.length;++x){const T=this._blocks[x],I=m.length;if(m+=T.displayValue,d<=m.length)return{index:x,offset:d-I}}}_blockStartPos(d){return this._blocks.slice(0,d).reduce((m,x)=>m+=x.displayValue.length,0)}_forEachBlocksInRange(d,m,x){m===void 0&&(m=this.displayValue.length);const T=this._mapPosToBlock(d);if(T){const I=this._mapPosToBlock(m),P=I&&T.index===I.index,R=T.offset,C=I&&P?I.offset:this._blocks[T.index].displayValue.length;if(x(this._blocks[T.index],T.index,R,C),I&&!P){for(let Z=T.index+1;Z<I.index;++Z)x(this._blocks[Z],Z,0,this._blocks[Z].displayValue.length);x(this._blocks[I.index],I.index,0,I.offset)}}}remove(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length);const x=super.remove(d,m);return this._forEachBlocksInRange(d,m,(T,I,P,R)=>{x.aggregate(T.remove(P,R))}),x}nearestInputPos(d,m){if(m===void 0&&(m=Mt.NONE),!this._blocks.length)return 0;const x=new oO(this,d);if(m===Mt.NONE)return x.pushRightBeforeInput()||(x.popState(),x.pushLeftBeforeInput())?x.pos:this.displayValue.length;if(m===Mt.LEFT||m===Mt.FORCE_LEFT){if(m===Mt.LEFT){if(x.pushRightBeforeFilled(),x.ok&&x.pos===d)return d;x.popState()}if(x.pushLeftBeforeInput(),x.pushLeftBeforeRequired(),x.pushLeftBeforeFilled(),m===Mt.LEFT){if(x.pushRightBeforeInput(),x.pushRightBeforeRequired(),x.ok&&x.pos<=d||(x.popState(),x.ok&&x.pos<=d))return x.pos;x.popState()}return x.ok?x.pos:m===Mt.FORCE_LEFT?0:(x.popState(),x.ok||(x.popState(),x.ok)?x.pos:0)}return m===Mt.RIGHT||m===Mt.FORCE_RIGHT?(x.pushRightBeforeInput(),x.pushRightBeforeRequired(),x.pushRightBeforeFilled()?x.pos:m===Mt.FORCE_RIGHT?this.displayValue.length:(x.popState(),x.ok||(x.popState(),x.ok)?x.pos:this.nearestInputPos(d,Mt.LEFT))):d}totalInputPositions(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length);let x=0;return this._forEachBlocksInRange(d,m,(T,I,P,R)=>{x+=T.totalInputPositions(P,R)}),x}maskedBlock(d){return this.maskedBlocks(d)[0]}maskedBlocks(d){const m=this._maskedBlocks[d];return m?m.map(x=>this._blocks[x]):[]}}oo.DEFAULTS={lazy:!0,placeholderChar:"_"};oo.STOP_CHAR="`";oo.ESCAPE_CHAR="\\";oo.InputDefinition=Ad;oo.FixedDefinition=ME;Ht.MaskedPattern=oo;class dd extends oo{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(d){super(d)}updateOptions(d){super.updateOptions(d)}_update(d){const{to:m=this.to||0,from:x=this.from||0,maxLength:T=this.maxLength||0,autofix:I=this.autofix,...P}=d;this.to=m,this.from=x,this.maxLength=Math.max(String(m).length,T),this.autofix=I;const R=String(this.from).padStart(this.maxLength,"0"),C=String(this.to).padStart(this.maxLength,"0");let Z=0;for(;Z<C.length&&C[Z]===R[Z];)++Z;P.mask=C.slice(0,Z).replace(/0/g,"\\0")+"0".repeat(this.maxLength-Z),super._update(P)}get isComplete(){return super.isComplete&&!!this.value}boundaries(d){let m="",x="";const[,T,I]=d.match(/^(\D*)(\d*)(\D*)/)||[];return I&&(m="0".repeat(T.length)+I,x="9".repeat(T.length)+I),m=m.padEnd(this.maxLength,"0"),x=x.padEnd(this.maxLength,"9"),[m,x]}doPrepareChar(d,m){m===void 0&&(m={});let x;if([d,x]=super.doPrepareChar(d.replace(/\D/g,""),m),!this.autofix||!d)return[d,x];const T=String(this.from).padStart(this.maxLength,"0"),I=String(this.to).padStart(this.maxLength,"0"),P=this.value+d;if(P.length>this.maxLength)return["",x];const[R,C]=this.boundaries(P);return Number(C)<this.from?[T[P.length-1],x]:Number(R)>this.to?this.autofix==="pad"&&P.length<this.maxLength?["",x.aggregate(this.append(T[P.length-1]+d,m))]:[I[P.length-1],x]:[d,x]}doValidate(d){const m=this.value;if(m.search(/[^0]/)===-1&&m.length<=this._matchFrom)return!0;const[x,T]=this.boundaries(m);return this.from<=Number(T)&&Number(x)<=this.to&&super.doValidate(d)}}Ht.MaskedRange=dd;class ta extends oo{constructor(d){const{mask:m,pattern:x,...T}={...ta.DEFAULTS,...d};super({...T,mask:gs(m)?m:x})}updateOptions(d){super.updateOptions(d)}_update(d){const{mask:m,pattern:x,blocks:T,...I}={...ta.DEFAULTS,...d},P=Object.assign({},ta.GET_DEFAULT_BLOCKS());d.min&&(P.Y.from=d.min.getFullYear()),d.max&&(P.Y.to=d.max.getFullYear()),d.min&&d.max&&P.Y.from===P.Y.to&&(P.m.from=d.min.getMonth()+1,P.m.to=d.max.getMonth()+1,P.m.from===P.m.to&&(P.d.from=d.min.getDate(),P.d.to=d.max.getDate())),Object.assign(P,this.blocks,T),Object.keys(P).forEach(R=>{const C=P[R];!("autofix"in C)&&"autofix"in d&&(C.autofix=d.autofix)}),super._update({...I,mask:gs(m)?m:x,blocks:P})}doValidate(d){const m=this.date;return super.doValidate(d)&&(!this.isComplete||this.isDateExist(this.value)&&m!=null&&(this.min==null||this.min<=m)&&(this.max==null||m<=this.max))}isDateExist(d){return this.format(this.parse(d,this),this).indexOf(d)>=0}get date(){return this.typedValue}set date(d){this.typedValue=d}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(d){super.typedValue=d}maskEquals(d){return d===Date||super.maskEquals(d)}}ta.GET_DEFAULT_BLOCKS=()=>({d:{mask:dd,from:1,to:31,maxLength:2},m:{mask:dd,from:1,to:12,maxLength:2},Y:{mask:dd,from:1900,to:9999}});ta.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(h,d)=>{if(!h)return"";const m=String(h.getDate()).padStart(2,"0"),x=String(h.getMonth()+1).padStart(2,"0"),T=h.getFullYear();return[m,x,T].join(".")},parse:(h,d)=>{const[m,x,T]=h.split(".").map(Number);return new Date(T,x-1,m)}};Ht.MaskedDate=ta;class Lc extends ro{constructor(d){super({...Lc.DEFAULTS,...d}),this.currentMask=void 0}updateOptions(d){super.updateOptions(d)}_update(d){super._update(d),"mask"in d&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(d.mask)?d.mask.map(m=>{const{expose:x,...T}=Sd(m),I=ra({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...T});return x&&(this.exposeMask=I),I}):[])}_appendCharRaw(d,m){m===void 0&&(m={});const x=this._applyDispatch(d,m);return this.currentMask&&x.aggregate(this.currentMask._appendChar(d,this.currentMaskFlags(m))),x}_applyDispatch(d,m,x){d===void 0&&(d=""),m===void 0&&(m={}),x===void 0&&(x="");const T=m.tail&&m._beforeTailState!=null?m._beforeTailState._value:this.value,I=this.rawInputValue,P=m.tail&&m._beforeTailState!=null?m._beforeTailState._rawInputValue:I,R=I.slice(P.length),C=this.currentMask,Z=new Mi,ee=C?.state;if(this.currentMask=this.doDispatch(d,{...m},x),this.currentMask)if(this.currentMask!==C){if(this.currentMask.reset(),P){const ne=this.currentMask.append(P,{raw:!0});Z.tailShift=ne.inserted.length-T.length}R&&(Z.tailShift+=this.currentMask.append(R,{raw:!0,tail:!0}).tailShift)}else ee&&(this.currentMask.state=ee);return Z}_appendPlaceholder(){const d=this._applyDispatch();return this.currentMask&&d.aggregate(this.currentMask._appendPlaceholder()),d}_appendEager(){const d=this._applyDispatch();return this.currentMask&&d.aggregate(this.currentMask._appendEager()),d}appendTail(d){const m=new Mi;return d&&m.aggregate(this._applyDispatch("",{},d)),m.aggregate(this.currentMask?this.currentMask.appendTail(d):super.appendTail(d))}currentMaskFlags(d){var m,x;return{...d,_beforeTailState:((m=d._beforeTailState)==null?void 0:m.currentMaskRef)===this.currentMask&&((x=d._beforeTailState)==null?void 0:x.currentMask)||d._beforeTailState}}doDispatch(d,m,x){return m===void 0&&(m={}),x===void 0&&(x=""),this.dispatch(d,this,m,x)}doValidate(d){return super.doValidate(d)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(d)))}doPrepare(d,m){m===void 0&&(m={});let[x,T]=super.doPrepare(d,m);if(this.currentMask){let I;[x,I]=super.doPrepare(x,this.currentMaskFlags(m)),T=T.aggregate(I)}return[x,T]}doPrepareChar(d,m){m===void 0&&(m={});let[x,T]=super.doPrepareChar(d,m);if(this.currentMask){let I;[x,I]=super.doPrepareChar(x,this.currentMaskFlags(m)),T=T.aggregate(I)}return[x,T]}reset(){var d;(d=this.currentMask)==null||d.reset(),this.compiledMasks.forEach(m=>m.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(d){this.exposeMask?(this.exposeMask.value=d,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=d}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(d){this.exposeMask?(this.exposeMask.unmaskedValue=d,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=d}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(d){if(this.exposeMask){this.exposeMask.typedValue=d,this.currentMask=this.exposeMask,this._applyDispatch();return}let m=String(d);this.currentMask&&(this.currentMask.typedValue=d,m=this.currentMask.unmaskedValue),this.unmaskedValue=m}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var d;return!!((d=this.currentMask)!=null&&d.isComplete)}get isFilled(){var d;return!!((d=this.currentMask)!=null&&d.isFilled)}remove(d,m){const x=new Mi;return this.currentMask&&x.aggregate(this.currentMask.remove(d,m)).aggregate(this._applyDispatch()),x}get state(){var d;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(m=>m.state),currentMaskRef:this.currentMask,currentMask:(d=this.currentMask)==null?void 0:d.state}}set state(d){const{compiledMasks:m,currentMaskRef:x,currentMask:T,...I}=d;m&&this.compiledMasks.forEach((P,R)=>P.state=m[R]),x!=null&&(this.currentMask=x,this.currentMask.state=T),super.state=I}extractInput(d,m,x){return this.currentMask?this.currentMask.extractInput(d,m,x):""}extractTail(d,m){return this.currentMask?this.currentMask.extractTail(d,m):super.extractTail(d,m)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(d,m){return this.currentMask?this.currentMask.nearestInputPos(d,m):super.nearestInputPos(d,m)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(d){this._overwrite=d}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(d){this._eager=d}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(d){this._skipInvalid=d}maskEquals(d){return Array.isArray(d)?this.compiledMasks.every((m,x)=>{if(!d[x])return;const{mask:T,...I}=d[x];return Ed(m,I)&&m.maskEquals(T)}):super.maskEquals(d)}typedValueEquals(d){var m;return!!((m=this.currentMask)!=null&&m.typedValueEquals(d))}}Lc.DEFAULTS=void 0;Lc.DEFAULTS={dispatch:(h,d,m,x)=>{if(!d.compiledMasks.length)return;const T=d.rawInputValue,I=d.compiledMasks.map((P,R)=>{const C=d.currentMask===P,Z=C?P.displayValue.length:P.nearestInputPos(P.displayValue.length,Mt.FORCE_LEFT);return P.rawInputValue!==T?(P.reset(),P.append(T,{raw:!0})):C||P.remove(Z),P.append(h,d.currentMaskFlags(m)),P.appendTail(x),{index:R,weight:P.rawInputValue.length,totalInputPositions:P.totalInputPositions(0,Math.max(Z,P.nearestInputPos(P.displayValue.length,Mt.FORCE_LEFT)))}});return I.sort((P,R)=>R.weight-P.weight||R.totalInputPositions-P.totalInputPositions),d.compiledMasks[I[0].index]}};Ht.MaskedDynamic=Lc;class sO extends oo{constructor(d){super(d)}updateOptions(d){super.updateOptions(d)}_update(d){const{enum:m,...x}=d;if(m){const T=m.map(R=>R.length),I=Math.min(...T),P=Math.max(...T)-I;x.mask="*".repeat(I),P&&(x.mask+="["+"*".repeat(P)+"]"),this.enum=m}super._update(x)}doValidate(d){return this.enum.some(m=>m.indexOf(this.unmaskedValue)===0)&&super.doValidate(d)}}Ht.MaskedEnum=sO;class aO extends ro{updateOptions(d){super.updateOptions(d)}_update(d){super._update({...d,validate:d.mask})}}Ht.MaskedFunction=aO;class vo extends ro{constructor(d){super({...vo.DEFAULTS,...d})}updateOptions(d){super.updateOptions(d)}_update(d){super._update(d),this._updateRegExps()}_updateRegExps(){const d="^"+(this.allowNegative?"[+|\\-]?":""),m="\\d*",x=(this.scale?"("+O_(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(d+m+x),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(O_).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(O_(this.thousandsSeparator),"g")}_removeThousandsSeparators(d){return d.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(d){const m=d.split(this.radix);return m[0]=m[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),m.join(this.radix)}doPrepareChar(d,m){m===void 0&&(m={});const[x,T]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(m.input&&m.raw||!m.input&&!m.raw)?d.replace(this._mapToRadixRegExp,this.radix):d),m);return d&&!x&&(T.skip=!0),x&&!this.allowPositive&&!this.value&&x!=="-"&&T.aggregate(this._appendChar("-")),[x,T]}_separatorsCount(d,m){m===void 0&&(m=!1);let x=0;for(let T=0;T<d;++T)this._value.indexOf(this.thousandsSeparator,T)===T&&(++x,m&&(d+=this.thousandsSeparator.length));return x}_separatorsCountFromSlice(d){return d===void 0&&(d=this._value),this._separatorsCount(this._removeThousandsSeparators(d).length,!0)}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),[d,m]=this._adjustRangeWithSeparators(d,m),this._removeThousandsSeparators(super.extractInput(d,m,x))}_appendCharRaw(d,m){if(m===void 0&&(m={}),!this.thousandsSeparator)return super._appendCharRaw(d,m);const x=m.tail&&m._beforeTailState?m._beforeTailState._value:this._value,T=this._separatorsCountFromSlice(x);this._value=this._removeThousandsSeparators(this.value);const I=super._appendCharRaw(d,m);this._value=this._insertThousandsSeparators(this._value);const P=m.tail&&m._beforeTailState?m._beforeTailState._value:this._value,R=this._separatorsCountFromSlice(P);return I.tailShift+=(R-T)*this.thousandsSeparator.length,I.skip=!I.rawInserted&&d===this.thousandsSeparator,I}_findSeparatorAround(d){if(this.thousandsSeparator){const m=d-this.thousandsSeparator.length+1,x=this.value.indexOf(this.thousandsSeparator,m);if(x<=d)return x}return-1}_adjustRangeWithSeparators(d,m){const x=this._findSeparatorAround(d);x>=0&&(d=x);const T=this._findSeparatorAround(m);return T>=0&&(m=T+this.thousandsSeparator.length),[d,m]}remove(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),[d,m]=this._adjustRangeWithSeparators(d,m);const x=this.value.slice(0,d),T=this.value.slice(m),I=this._separatorsCount(x.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(x+T));const P=this._separatorsCountFromSlice(x);return new Mi({tailShift:(P-I)*this.thousandsSeparator.length})}nearestInputPos(d,m){if(!this.thousandsSeparator)return d;switch(m){case Mt.NONE:case Mt.LEFT:case Mt.FORCE_LEFT:{const x=this._findSeparatorAround(d-1);if(x>=0){const T=x+this.thousandsSeparator.length;if(d<T||this.value.length<=T||m===Mt.FORCE_LEFT)return x}break}case Mt.RIGHT:case Mt.FORCE_RIGHT:{const x=this._findSeparatorAround(d);if(x>=0)return x+this.thousandsSeparator.length}}return d}doValidate(d){let m=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(m){const x=this.number;m=m&&!isNaN(x)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return m&&super.doValidate(d)}doCommit(){if(this.value){const d=this.number;let m=d;this.min!=null&&(m=Math.max(m,this.min)),this.max!=null&&(m=Math.min(m,this.max)),m!==d&&(this.unmaskedValue=this.format(m,this));let x=this.value;this.normalizeZeros&&(x=this._normalizeZeros(x)),this.padFractionalZeros&&this.scale>0&&(x=this._padFractionalZeros(x)),this._value=x}super.doCommit()}_normalizeZeros(d){const m=this._removeThousandsSeparators(d).split(this.radix);return m[0]=m[0].replace(/^(\D*)(0*)(\d*)/,(x,T,I,P)=>T+P),d.length&&!/\d$/.test(m[0])&&(m[0]=m[0]+"0"),m.length>1&&(m[1]=m[1].replace(/0*$/,""),m[1].length||(m.length=1)),this._insertThousandsSeparators(m.join(this.radix))}_padFractionalZeros(d){if(!d)return d;const m=d.split(this.radix);return m.length<2&&m.push(""),m[1]=m[1].padEnd(this.scale,"0"),m.join(this.radix)}doSkipInvalid(d,m,x){m===void 0&&(m={});const T=this.scale===0&&d!==this.thousandsSeparator&&(d===this.radix||d===vo.UNMASKED_RADIX||this.mapToRadix.includes(d));return super.doSkipInvalid(d,m,x)&&!T}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,vo.UNMASKED_RADIX)}set unmaskedValue(d){super.unmaskedValue=d}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(d){this.rawInputValue=this.format(d,this).replace(vo.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(d){this.typedValue=d}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(d){return(super.typedValueEquals(d)||vo.EMPTY_VALUES.includes(d)&&vo.EMPTY_VALUES.includes(this.typedValue))&&!(d===0&&this.value==="")}}vo.UNMASKED_RADIX=".";vo.EMPTY_VALUES=[...ro.EMPTY_VALUES,0];vo.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[vo.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:h=>h.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};Ht.MaskedNumber=vo;const rg={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function IE(h,d,m){d===void 0&&(d=rg.MASKED),m===void 0&&(m=rg.MASKED);const x=ra(h);return T=>x.runIsolated(I=>(I[d]=T,I[m]))}function lO(h,d,m,x){return IE(d,m,x)(h)}Ht.PIPE_TYPE=rg;Ht.createPipe=IE;Ht.pipe=lO;try{globalThis.IMask=Ht}catch{}function sT(h){return Math.max(0,Math.min(1,h))}function CE(h,d){const{left:m,top:x,width:T,height:I}=d.getBoundingClientRect(),P={x:h.x-m,y:h.y-x},R={x:sT(P.x/T),y:sT(P.y/I)};function C(Z={}){const{dir:ee="ltr",orientation:ne="horizontal",inverted:Te}=Z,Me=typeof Te=="object"?Te.x:Te,ke=typeof Te=="object"?Te.y:Te;return ne==="horizontal"?ee==="rtl"||Me?1-R.x:R.x:ke?1-R.y:R.y}return{offset:P,percent:R,getPercentValue:C}}function cO(h,d,m){return Math.round((h-d)/m)*m+d}function uO(h,d,m){return Math.min(Math.max(h,d),m)}function hO(h,d,m){return(h-d)/(m-d)}function kE(h,d,m,x){const T=h*(m-d)+d,I=cO(T,d,x);return uO(I,d,m)}function og(h,d){const m={min:h[0],max:h[1]},x={min:d[0],max:d[1]};return function(T){if(m.min===m.max||x.min===x.max)return x.min;const I=(x.max-x.min)/(m.max-m.min);return x.min+I*(T-m.min)}}var dO=_s("slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");dO.build();function pO(h){const{height:d=0}=h.thumbSize??{},m=og([h.min,h.max],[-d/2,d/2]);return parseFloat(m(h.value).toFixed(2))}function fO(h){const{width:d=0}=h.thumbSize??{};if(h.isRtl){const x=og([h.max,h.min],[-d/2,d/2]);return-1*parseFloat(x(h.value).toFixed(2))}const m=og([h.min,h.max],[-d/2,d/2]);return parseFloat(m(h.value).toFixed(2))}function mO(h,d){if(h.thumbAlignment==="center")return`${d}%`;const m=h.isVertical?pO(h):fO(h);return`calc(${d}% - ${m}px)`}function Tg(h){let d=hO(h.value,h.min,h.max)*100;return mO(h,d)}function PE(h){let d="visible";return h.thumbAlignment==="contain"&&!h.hasMeasuredThumbSize&&(d="hidden"),d}function _O(h){const d=h.isVertical?"bottom":"insetInlineStart";return{visibility:PE(h),position:"absolute",transform:"var(--slider-thumb-transform)",[d]:"var(--slider-thumb-offset)"}}function gO(h){let d="0%",m=`${100-h.valuePercent}%`;if(h.origin==="center"){const x=h.valuePercent<50;d=x?`${h.valuePercent}%`:"50%",m=x?"50%":m}return{start:d,end:m}}function yO(h){return h.isVertical?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[h.isRtl?"right":"left"]:"var(--slider-range-start)",[h.isRtl?"left":"right"]:"var(--slider-range-end)"}}function vO(){return{touchAction:"none",userSelect:"none",position:"relative"}}function xO(h){const d=gO(h);return{"--slider-thumb-transform":h.isVertical?"translateY(50%)":h.isRtl?"translateX(50%)":"translateX(-50%)","--slider-thumb-offset":Tg(h),"--slider-range-start":d.start,"--slider-range-end":d.end}}function bO(h,d){return{visibility:PE(h),position:"absolute",pointerEvents:"none",[h.isHorizontal?"insetInlineStart":"bottom"]:Tg({...h,value:d}),translate:"var(--tx) var(--ty)","--tx":h.isHorizontal?h.isRtl?"50%":"-50%":"0%","--ty":h.isHorizontal?"0%":"50%"}}function wO(){return{userSelect:"none"}}function TO(){return{position:"relative"}}function EO(){return{userSelect:"none",pointerEvents:"none",position:"relative"}}var SO={getThumbOffset:Tg,getControlStyle:vO,getThumbStyle:_O,getRangeStyle:yO,getRootStyle:xO,getMarkerStyle:bO,getLabelStyle:wO,getTrackStyle:TO,getMarkerGroupStyle:EO},Ir=Rc({...SO,getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`slider:${h.id}`},getThumbId:h=>{var d;return((d=h.ids)==null?void 0:d.thumb)??`slider:${h.id}:thumb`},getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`slider:${h.id}:control`},getHiddenInputId:h=>{var d;return((d=h.ids)==null?void 0:d.hiddenInput)??`slider:${h.id}:input`},getOutputId:h=>{var d;return((d=h.ids)==null?void 0:d.output)??`slider:${h.id}:output`},getTrackId:h=>{var d;return((d=h.ids)==null?void 0:d.track)??`slider:${h.id}track`},getRangeId:h=>{var d;return((d=h.ids)==null?void 0:d.track)??`slider:${h.id}:range`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`slider:${h.id}:label`},getMarkerId:(h,d)=>`slider:${h.id}:marker:${d}`,getRootEl:h=>Ir.getById(h,Ir.getRootId(h)),getThumbEl:h=>Ir.getById(h,Ir.getThumbId(h)),getControlEl:h=>Ir.getById(h,Ir.getControlId(h)),getHiddenInputEl:h=>Ir.getById(h,Ir.getHiddenInputId(h)),getValueFromPoint(h,d){const m=Ir.getControlEl(h);if(!m)return;const x=CE(d,m).getPercentValue({orientation:h.orientation,dir:h.dir,inverted:{y:!0}});return kE(x,h.min,h.max,h.step)},dispatchChangeEvent(h){const d=Ir.getHiddenInputEl(h);d&&TE(d,{value:h.value})}}),AO=_s("range-slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");AO.build();function MO(h){const d=h[0],m=h[h.length-1];return[d,m]}function IO(h){const[d,m]=MO(h.valuePercent);return{start:`${d}%`,end:`${100-m}%`}}function CO(h){let d="visible";return h.thumbAlignment==="contain"&&!h.hasMeasuredThumbSize&&(d="hidden"),d}function kO(h,d){const m=h.isVertical?"bottom":"insetInlineStart";return{visibility:CO(h),position:"absolute",transform:"var(--slider-thumb-transform)",[m]:`var(--slider-thumb-offset-${d})`}}function PO(h){const d=IO(h);return{...h.value.reduce((m,x,T)=>{const I=Ir.getThumbOffset({...h,value:x});return{...m,[`--slider-thumb-offset-${T}`]:I}},{}),"--slider-thumb-transform":h.isVertical?"translateY(50%)":h.isRtl?"translateX(50%)":"translateX(-50%)","--slider-range-start":d.start,"--slider-range-end":d.end}}var DO={getRootStyle:PO,getControlStyle:Ir.getControlStyle,getThumbStyle:kO,getRangeStyle:Ir.getRangeStyle,getMarkerStyle:Ir.getMarkerStyle,getMarkerGroupStyle:Ir.getMarkerGroupStyle},$r=Rc({...DO,getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`slider:${h.id}`},getThumbId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.thumb)==null?void 0:x.call(m,d))??`slider:${h.id}:thumb:${d}`},getHiddenInputId:(h,d)=>`slider:${h.id}:input:${d}`,getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`slider:${h.id}:control`},getTrackId:h=>{var d;return((d=h.ids)==null?void 0:d.track)??`slider:${h.id}:track`},getRangeId:h=>{var d;return((d=h.ids)==null?void 0:d.range)??`slider:${h.id}:range`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`slider:${h.id}:label`},getOutputId:h=>{var d;return((d=h.ids)==null?void 0:d.output)??`slider:${h.id}:output`},getMarkerId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.marker)==null?void 0:x.call(m,d))??`slider:${h.id}:marker:${d}`},getRootEl:h=>$r.getById(h,$r.getRootId(h)),getThumbEl:(h,d)=>$r.getById(h,$r.getThumbId(h,d)),getHiddenInputEl:(h,d)=>$r.getById(h,$r.getHiddenInputId(h,d)),getControlEl:h=>$r.getById(h,$r.getControlId(h)),getElements:h=>bE($r.getControlEl(h),"[role=slider]"),getFirstEl:h=>$r.getElements(h)[0],getRangeEl:h=>$r.getById(h,$r.getRangeId(h)),getValueFromPoint(h,d){const m=$r.getControlEl(h);if(!m)return;const x=CE(d,m).getPercentValue({orientation:h.orientation,dir:h.dir,inverted:{y:!0}});return kE(x,h.min,h.max,h.step)},dispatchChangeEvent(h){Array.from(h.value).forEach((d,m)=>{const x=$r.getHiddenInputEl(h,m);x&&TE(x,{value:d})})}}),zO=_s("radio-group").parts("root","label","radio","radioLabel","radioControl","indicator");zO.build();var yr=Rc({getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`radio-group:${h.id}`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`radio-group:${h.id}:label`},getRadioId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radio)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:${d}`},getRadioHiddenInputId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radioHiddenInput)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:input:${d}`},getRadioControlId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radioControl)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:control:${d}`},getRadioLabelId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radioLabel)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:label:${d}`},getIndicatorId:h=>{var d;return((d=h.ids)==null?void 0:d.indicator)??`radio-group:${h.id}:indicator`},getRootEl:h=>yr.getById(h,yr.getRootId(h)),getRadioHiddenInputEl:(h,d)=>yr.getById(h,yr.getRadioHiddenInputId(h,d)),getIndicatorEl:h=>yr.getById(h,yr.getIndicatorId(h)),getFirstEnabledInputEl:h=>{var d;return(d=yr.getRootEl(h))==null?void 0:d.querySelector("input:not(:disabled)")},getFirstEnabledAndCheckedInputEl:h=>{var d;return(d=yr.getRootEl(h))==null?void 0:d.querySelector("input:not(:disabled):checked")},getInputEls:h=>{const d=`input[type=radio][data-ownedby='${CSS.escape(yr.getRootId(h))}']:not([disabled])`;return bE(yr.getRootEl(h),d)},getActiveRadioEl:h=>{if(h.value)return yr.getById(h,yr.getRadioId(h,h.value))},getOffsetRect:h=>({left:h?.offsetLeft??0,top:h?.offsetTop??0,width:h?.offsetWidth??0,height:h?.offsetHeight??0}),getRectById:(h,d)=>{const m=yr.getById(h,yr.getRadioId(h,d));if(m)return yr.resolveRect(yr.getOffsetRect(m))},resolveRect:h=>({width:`${h.width}px`,height:`${h.height}px`,left:`${h.left}px`,top:`${h.top}px`})});const RO=Dn({__name:"Flex",props:{is:{type:[Object,Function],default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(h){const d=h,m=Hr(()=>OL("flex",{justify:rT(d.justify)||"initial",align:rT(d.align)||"initial",wrap:d.nowrap?"nowrap":"wrap",gap:LL(d.gap),direction:d.direction}));return(x,T)=>(ur(),In(xT(x.is),{class:"k-flex",style:Dd(m.value)},{default:vd(()=>[fs(x.$slots,"default")]),_:3},8,["style"]))}});var LO=_s("dialog").parts("trigger","backdrop","container","content","title","description","closeTrigger");LO.build();var Ko=Rc({getContainerId:h=>{var d;return((d=h.ids)==null?void 0:d.container)??`dialog:${h.id}:container`},getBackdropId:h=>{var d;return((d=h.ids)==null?void 0:d.backdrop)??`dialog:${h.id}:backdrop`},getContentId:h=>{var d;return((d=h.ids)==null?void 0:d.content)??`dialog:${h.id}:content`},getTriggerId:h=>{var d;return((d=h.ids)==null?void 0:d.trigger)??`dialog:${h.id}:trigger`},getTitleId:h=>{var d;return((d=h.ids)==null?void 0:d.title)??`dialog:${h.id}:title`},getDescriptionId:h=>{var d;return((d=h.ids)==null?void 0:d.description)??`dialog:${h.id}:description`},getCloseTriggerId:h=>{var d;return((d=h.ids)==null?void 0:d.closeTrigger)??`dialog:${h.id}:close`},getContentEl:h=>Ko.getById(h,Ko.getContentId(h)),getTriggerEl:h=>Ko.getById(h,Ko.getTriggerId(h)),getContainerEl:h=>Ko.getById(h,Ko.getContainerId(h)),getTitleEl:h=>Ko.getById(h,Ko.getTitleId(h)),getDescriptionEl:h=>Ko.getById(h,Ko.getDescriptionId(h))});M2({title:{},description:{},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},type:{default:"info"}},{open:{type:Boolean,default:!1}}),M2(["cancel","confirm"],["update:open"]);function Fd(){this._types=Object.create(null),this._extensions=Object.create(null);for(let h=0;h<arguments.length;h++)this.define(arguments[h]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Fd.prototype.define=function(h,d){for(let m in h){let x=h[m].map(function(T){return T.toLowerCase()});m=m.toLowerCase();for(let T=0;T<x.length;T++){const I=x[T];if(I[0]!=="*"){if(!d&&I in this._types)throw new Error('Attempt to change mapping for "'+I+'" extension from "'+this._types[I]+'" to "'+m+'". Pass `force=true` to allow this, otherwise remove "'+I+'" from the list of extensions for "'+m+'".');this._types[I]=m}}if(d||!this._extensions[m]){const T=x[0];this._extensions[m]=T[0]!=="*"?T:T.substr(1)}}};Fd.prototype.getType=function(h){h=String(h);let d=h.replace(/^.*[/\\]/,"").toLowerCase(),m=d.replace(/^.*\./,"").toLowerCase(),x=d.length<h.length;return(m.length<d.length-1||!x)&&this._types[m]||null};Fd.prototype.getExtension=function(h){return h=/^\s*([^;\s]*)/.test(h)&&RegExp.$1,h&&this._extensions[h.toLowerCase()]||null};var OO=Fd,BO={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let FO=OO;new FO(BO);const NO=Dn({__name:"CreateTrigger",props:{label:{}},setup(h){return(d,m)=>(ur(),In(bg,{type:"button",class:"k-media-image-create-trigger",label:d.label,iconRight:"fa6-solid:image"},null,8,["label"]))}}),jO=Dn({__name:"Thumbnail",props:{value:{}},setup(h){const d=h,m=Hr(()=>({backgroundImage:`url(${d.value.url})`}));return(x,T)=>(ur(),Cn("div",{class:"k-media-image__thumbnail",style:Dd(m.value),onClick:T[0]||(T[0]=I=>x.$emit("click"))},null,4))}}),VO=Dn({__name:"Preview",props:{value:{},size:{}},setup(h){const d=h,m=Hr(()=>({padding:d.size==="cover"?"0":"1rem",backgroundSize:d.size,backgroundImage:`url(${d.value.url})`}));return(x,T)=>(ur(),Cn("div",{class:"k-media-image-preview",style:Dd(m.value)},null,4))}});M_(NO),M_(jO),M_(VO);/**!
2030
+ `).join(P_);return"- "+Te+": "+Me});var Z=C.path.join("."),ee=Z===qT?"":" of "+Z;return"The following properties"+ee+" have invalid values:"+P_+P.join(P_)}}};Oi.strictShape=function(h){var d=Oi.shape(h);return function(m){var x=d(m);if(x)return x;var T=Object.keys(m).reduce(function(I,P){return h[P]===void 0&&I.push(P),I},[]);if(T.length!==0)return function(){return"The following keys are invalid: "+T.join(", ")}}};Oi.arrayOf=function(h){return GT(h)};Oi.tuple=function(){var h=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return GT(h)};function GT(h){var d=Array.isArray(h),m=function(x){return d?h[x]:h};return function(x){var T=vs(Oi.plainArray,x);if(T)return T;if(d&&x.length!==h.length)return"an array with "+h.length+" items";for(var I=0;I<x.length;I++)if(T=vs(m(I),x[I]),T)return[I].concat(T)}}Oi.required=function(h){function d(m){return m==null?function(x){return $T(x,WT(x.path)?"cannot be undefined/null.":"is required.")}:h.apply(this,arguments)}return d.__required=!0,d};Oi.oneOfType=function(){var h=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments);return function(d){var m=h.map(function(x){return vs(x,d)}).filter(Boolean);if(m.length===h.length)return m.every(function(x){return x.length===1&&typeof x[0]=="string"})?Nz(m.map(function(x){return x[0]})):m.reduce(function(x,T){return T.length>x.length?T:x})}};Oi.equal=function(h){return function(d){if(d!==h)return JSON.stringify(h)}};Oi.oneOf=function(){var h=Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),d=h.map(function(m){return Oi.equal(m)});return Oi.oneOfType.apply(this,d)};Oi.range=function(h){var d=h[0],m=h[1];return function(x){var T=vs(Oi.number,x);if(T||x<d||x>m)return"number between "+d+" & "+m+" (inclusive)"}};Oi.any=function(){};Oi.boolean=function(h){if(typeof h!="boolean")return"boolean"};Oi.number=function(h){if(typeof h!="number")return"number"};Oi.plainArray=function(h){if(!Array.isArray(h))return"array"};Oi.plainObject=function(h){if(!Bz(h))return"object"};Oi.string=function(h){if(typeof h!="string")return"string"};Oi.func=function(h){if(typeof h!="function")return"function"};function vs(h,d){if(!(d==null&&!h.hasOwnProperty("__required"))){var m=h(d);if(m)return Array.isArray(m)?m:[m]}}function pg(h,d){var m=h.length,x=h[m-1],T=h.slice(0,m-1);return T.length===0&&(T=[qT]),d=Fz(d,{path:T}),typeof x=="function"?x(d):$T(d,jz(x))}function Nz(h){return h.length<2?h[0]:h.length===2?h.join(" or "):h.slice(0,-1).join(", ")+", or "+h.slice(-1)}function jz(h){return"must be "+Vz(h)+"."}function Vz(h){return/^an? /.test(h)?h:/^[aeiou]/i.test(h)?"an "+h:/^[a-z]/i.test(h)?"a "+h:h}function $T(h,d){var m=WT(h.path),x=h.path.join(".")+" "+d,T=m?"Item at position ":"";return T+x}function WT(h){return typeof h[h.length-1]=="number"||typeof h[0]=="number"}function Uz(h){return Object.keys(h||{}).map(function(d){return{key:d,value:h[d]}})}Oi.validate=vs;Oi.processMessage=pg;var qz=Oi,Gz=pl,cl=qz;function $z(h){if(typeof window<"u")return h instanceof Do.Blob||h instanceof Do.ArrayBuffer?void 0:"Blob or ArrayBuffer";if(!(typeof h=="string"||h.pipe!==void 0))return"Filename or Readable stream"}function Wz(h,d){return cl.assert(cl.strictShape(h),d)}function Hz(h){var d="date";if(typeof h=="boolean")return d;try{var m=new Date(h);if(m.getTime&&isNaN(m.getTime()))return d}catch{return d}}function Zz(h){return cl.tuple(cl.number,cl.number)(h)}var Xz=Gz(cl,{file:$z,date:Hz,coordinates:Zz,assertShape:Wz});function Yz(h,d){var m=function(x,T){return d.indexOf(x)!==-1&&T!==void 0};return typeof d=="function"&&(m=d),Object.keys(h).filter(function(x){return m(x,h[x])}).reduce(function(x,T){return x[T]=h[T],x},{})}var Kz=Yz;function Jz(h,d){return Object.keys(h).reduce(function(m,x){return m[x]=d(x,h[x]),m},{})}var Qz=Jz,eR=Qz;function tR(h){return eR(h,function(d,m){return typeof m=="boolean"?JSON.stringify(m):m})}var iR=tR,rR=NT,oR=UT;function nR(h){return function(d){var m;rR.prototype.isPrototypeOf(d)?m=d:m=oR(d);var x=Object.create(h);return x.client=m,x}}var sR=nR,HT=pl,oi=Xz,wd=Kz,ZT=iR,aR=sR,fg={},XT=["country","region","postcode","district","place","locality","neighborhood","address","poi","poi.landmark"];fg.forwardGeocode=function(h){oi.assertShape({query:oi.required(oi.string),mode:oi.oneOf("mapbox.places","mapbox.places-permanent"),countries:oi.arrayOf(oi.string),proximity:oi.oneOf(oi.coordinates,"ip"),types:oi.arrayOf(oi.oneOf(XT)),autocomplete:oi.boolean,bbox:oi.arrayOf(oi.number),limit:oi.number,language:oi.arrayOf(oi.string),routing:oi.boolean,fuzzyMatch:oi.boolean,worldview:oi.string,session_token:oi.string})(h),h.mode=h.mode||"mapbox.places";var d=ZT(HT({country:h.countries},wd(h,["proximity","types","autocomplete","bbox","limit","language","routing","fuzzyMatch","worldview","session_token"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:wd(h,["mode","query"]),query:d})};fg.reverseGeocode=function(h){oi.assertShape({query:oi.required(oi.coordinates),mode:oi.oneOf("mapbox.places","mapbox.places-permanent"),countries:oi.arrayOf(oi.string),types:oi.arrayOf(oi.oneOf(XT)),bbox:oi.arrayOf(oi.number),limit:oi.number,language:oi.arrayOf(oi.string),reverseMode:oi.oneOf("distance","score"),routing:oi.boolean,worldview:oi.string,session_token:oi.string})(h),h.mode=h.mode||"mapbox.places";var d=ZT(HT({country:h.countries},wd(h,["country","types","bbox","limit","language","reverseMode","routing","worldview","session_token"])));return this.client.createRequest({method:"GET",path:"/geocoding/v5/:mode/:query.json",params:wd(h,["mode","query"]),query:d})};var lR=aR(fg);let cR="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",YT=h=>crypto.getRandomValues(new Uint8Array(h)),KT=(h,d,m)=>{let x=(2<<Math.log(h.length-1)/Math.LN2)-1,T=-~(1.6*x*d/h.length);return(I=d)=>{let P="";for(;;){let R=m(T),C=T;for(;C--;)if(P+=h[R[C]&x]||"",P.length===I)return P}}},uR=(h,d=21)=>KT(h,d,YT),hR=(h=21)=>crypto.getRandomValues(new Uint8Array(h)).reduce((d,m)=>(m&=63,m<36?d+=m.toString(36):m<62?d+=(m-26).toString(36).toUpperCase():m>62?d+="-":d+="_",d),"");const dR=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:uR,customRandom:KT,nanoid:hR,random:YT,urlAlphabet:cR},Symbol.toStringTag,{value:"Module"})),pR=fD(dR);var fR=pR.nanoid;function JT(h){this.origin=h.origin||"https://api.mapbox.com",this.endpoint="events/v2",this.access_token=h.accessToken,this.version="0.3.0",this.pluginSessionID=this.generateSessionID(),this.sessionIncrementer=0,this.userAgent=this.getUserAgent(),this.options=h,this.send=this.send.bind(this),this.countries=h.countries?h.countries.split(","):null,this.types=h.types?h.types.split(","):null,this.bbox=h.bbox?h.bbox:null,this.language=h.language?h.language.split(","):null,this.limit=h.limit?+h.limit:null,this.locale=navigator.language||null,this.enableEventLogging=this.shouldEnableLogging(h),this.eventQueue=new Array,this.flushInterval=h.flushInterval||1e3,this.maxQueueSize=h.maxQueueSize||100,this.timer=this.flushInterval?setTimeout(this.flush.bind(this),this.flushInterval):null,this.lastSentInput="",this.lastSentIndex=0}JT.prototype={select:function(h,d){var m=this.getEventPayload("search.select",d,{selectedFeature:h});if(m&&!(m.resultIndex===this.lastSentIndex&&m.queryString===this.lastSentInput||m.resultIndex==-1))return this.lastSentIndex=m.resultIndex,this.lastSentInput=m.queryString,this.push(m)},start:function(h){var d=this.getEventPayload("search.start",h);if(d)return this.push(d)},keyevent:function(h,d){if(h.key&&!(h.metaKey||[9,27,37,39,13,38,40].indexOf(h.keyCode)!==-1)){var m=this.getEventPayload("search.keystroke",d,{key:h.key});if(m)return this.push(m)}},send:function(h,d){if(!this.enableEventLogging)return d?d():void 0;var m=this.getRequestOptions(h);this.request(m,function(x){if(x)return this.handleError(x,d);if(d)return d()}.bind(this))},getRequestOptions:function(h){Array.isArray(h)||(h=[h]);var d={method:"POST",host:this.origin,path:this.endpoint+"?access_token="+this.access_token,headers:{"Content-Type":"application/json"},body:JSON.stringify(h)};return d},getEventPayload:function(h,d,m={}){if(h==="search.select"&&!m.selectedFeature||h==="search.keystroke"&&!m.key)return null;var x;if(!d.options.proximity)x=null;else if(typeof d.options.proximity=="object")x=[d.options.proximity.longitude,d.options.proximity.latitude];else if(d.options.proximity==="ip"){var T=d._headers?d._headers["ip-proximity"]:null;T&&typeof T=="string"?x=T.split(",").map(parseFloat):x=[999,999]}else x=d.options.proximity;var I=d._map?d._map.getZoom():void 0,P={event:h,version:this.getEventSchemaVersion(h),created:+new Date,sessionIdentifier:this.getSessionId(),country:this.countries,userAgent:this.userAgent,language:this.language,bbox:this.bbox,types:this.types,endpoint:"mapbox.places",autocomplete:d.options.autocomplete,fuzzyMatch:d.options.fuzzyMatch,proximity:x,limit:d.options.limit,routing:d.options.routing,worldview:d.options.worldview,mapZoom:I,keyboardLocale:this.locale};if(h==="search.select"?P.queryString=d.inputString:h!="search.select"&&d._inputEl?P.queryString=d._inputEl.value:P.queryString=d.inputString,["search.keystroke","search.select"].includes(h)&&(P.path="geocoding/v5/mapbox.places"),h==="search.keystroke"&&m.key)P.lastAction=m.key;else if(h==="search.select"&&m.selectedFeature){var R=m.selectedFeature,C=this.getSelectedIndex(R,d);if(P.resultIndex=C,P.resultPlaceName=R.place_name,P.resultId=R.id,R.properties&&(P.resultMapboxId=R.properties.mapbox_id),d._typeahead){var Z=d._typeahead.data;Z&&Z.length>0&&(P.suggestionIds=this.getSuggestionIds(Z),P.suggestionNames=this.getSuggestionNames(Z),P.suggestionTypes=this.getSuggestionTypes(Z),P.suggestionSources=this.getSuggestionSources(Z))}}return this.validatePayload(P)?P:null},request:function(h,d){var m=new XMLHttpRequest;m.onreadystatechange=function(){if(this.readyState==4)return this.status==204?d(null):d(this.statusText)},m.open(h.method,h.host+"/"+h.path,!0);for(var x in h.headers){var T=h.headers[x];m.setRequestHeader(x,T)}m.send(h.body)},handleError:function(h,d){if(d)return d(h)},generateSessionID:function(){return fR()},getSessionId:function(){return this.pluginSessionID+"."+this.sessionIncrementer},getUserAgent:function(){return"mapbox-gl-geocoder."+this.version+"."+navigator.userAgent},getSelectedIndex:function(h,d){if(d._typeahead){var m=d._typeahead.data,x=h.id,T=m.map(function(P){return P.id}),I=T.indexOf(x);return I}},getSuggestionIds:function(h){return h.map(function(d){return d.properties?d.properties.mapbox_id||"":d.id||""})},getSuggestionNames:function(h){return h.map(function(d){return d.place_name||""})},getSuggestionTypes:function(h){return h.map(function(d){return d.place_type&&Array.isArray(d.place_type)&&d.place_type[0]||""})},getSuggestionSources:function(h){return h.map(function(d){return d._source||""})},getEventSchemaVersion:function(h){return["search.keystroke","search.select"].includes(h)?"2.2":"2.0"},validatePayload:function(h){if(!h||!h.event)return!1;var d=["event","created","sessionIdentifier","queryString"],m=["event","created","sessionIdentifier","queryString","lastAction"],x=["event","created","sessionIdentifier","queryString","resultIndex","path","suggestionIds"],T=h.event;return T==="search.start"?this.objectHasRequiredProps(h,d):T==="search.keystroke"?this.objectHasRequiredProps(h,m):T==="search.select"?this.objectHasRequiredProps(h,x):!0},objectHasRequiredProps:function(h,d){return d.every(function(m){return m==="queryString"?typeof h[m]=="string"&&h[m].length>0:h[m]!==void 0})},shouldEnableLogging:function(h){return!(h.enableEventLogging===!1||h.origin&&h.origin!=="https://api.mapbox.com")},flush:function(){this.eventQueue.length>0&&(this.send(this.eventQueue),this.eventQueue=new Array),this.timer&&clearTimeout(this.timer),this.flushInterval&&(this.timer=setTimeout(this.flush.bind(this),this.flushInterval))},push:function(h,d){this.eventQueue.push(h),(this.eventQueue.length>=this.maxQueueSize||d)&&this.flush()},remove:function(){this.flush()}};var mR=JT,_R={de:"Suche",it:"Ricerca",en:"Search",nl:"Zoeken",fr:"Chercher",ca:"Cerca",he:"לחפש",ja:"サーチ",lv:"Meklēt",pt:"Procurar",sr:"Претрага",zh:"搜索",cs:"Vyhledávání",hu:"Keresés",ka:"ძიება",nb:"Søke",sk:"Vyhľadávanie",th:"ค้นหา",fi:"Hae",is:"Leita",ko:"수색",pl:"Szukaj",sl:"Iskanje",fa:"جستجو",ru:"Поиск"},gR={placeholder:_R},QT={exports:{}};(function(h){(function(d,m,x){h.exports?h.exports=x():d[m]=x()})(Do,"subtag",function(){var d="",m=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function x(C){return C.match(m)||[]}function T(C){return x(C).filter(function(Z,ee){return Z&&ee})}function I(C){return C=x(C),{language:C[1]||d,extlang:C[2]||d,script:C[3]||d,region:C[4]||d}}function P(C,Z,ee){Object.defineProperty(C,Z,{value:ee,enumerable:!0})}function R(C,Z,ee){function ne(Te){return x(Te)[C]||d}P(ne,"pattern",Z),P(I,ee,ne)}return R(1,/^[a-zA-Z]{2,3}$/,"language"),R(2,/^[a-zA-Z]{3}$/,"extlang"),R(3,/^[a-zA-Z]{4}$/,"script"),R(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),P(I,"split",T),I})})(QT);var yR=QT.exports;function eE(){}eE.prototype={isSupport:function(){return!!window.navigator.geolocation},getCurrentPosition:function(){const h={enableHighAccuracy:!0};return new Promise(function(d,m){window.navigator.geolocation.getCurrentPosition(d,m,h)})}};var vR=eE;function xR(h,d){const m=tE(h),x=["address","street","place","country"];var T;if(typeof d=="function")return d(m);const I=x.indexOf(d);return I===-1?T=x:T=x.slice(I),T.reduce(function(P,R){return m[R]?(P!==""&&(P=P+", "),P+m[R]):P},"")}function tE(h){const d=h.address||"",m=h.text||"",x=h.place_name||"",T={address:x.split(",")[0],houseNumber:d,street:m,placeName:x};return h.context.forEach(function(I){const P=I.id.split(".")[0];T[P]=I.text}),T}const bR=/^[ ]*(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)[ ]*$/;var wR={transformFeatureToGeolocationText:xR,getAddressInfo:tE,REVERSE_GEOCODE_COORD_RGX:bR},TR=TD,ER=VD,Js=pl,SR=ZD.EventEmitter,N2=XD,D_=Rz,z_=lR,AR=mR,MR=gR,IR=yR,CR=vR,j2=wR;const hs={FORWARD:0,LOCAL:1,REVERSE:2};function kR(){var h=document.createElement("div");return h.className="mapboxgl-ctrl-geocoder--powered-by",h.innerHTML='<a href="https://www.mapbox.com/search-service" target="_blank">Powered by Mapbox</a>',h}function iE(h){this._eventEmitter=new SR,this.options=Js({},this.options,h),this.inputString="",this.fresh=!0,this.lastSelected=null,this.geolocation=new CR}iE.prototype={options:{zoom:16,flyTo:!0,trackProximity:!0,minLength:2,reverseGeocode:!1,flipCoordinates:!1,limit:5,origin:"https://api.mapbox.com",enableEventLogging:!0,marker:!0,mapboxgl:null,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,enableGeolocation:!1,addressAccuracy:"street",getItemValue:function(h){return h.place_name},render:function(h){var d=h.place_name.split(",");return'<div class="mapboxgl-ctrl-geocoder--suggestion"><div class="mapboxgl-ctrl-geocoder--suggestion-title">'+d[0]+'</div><div class="mapboxgl-ctrl-geocoder--suggestion-address">'+d.splice(1,d.length).join(",")+"</div></div>"}},_headers:{},addTo:function(h){function d(m,x){if(!document.body.contains(x))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const T=m.onAdd();x.appendChild(T)}if(h._controlContainer)h.addControl(this);else if(h instanceof HTMLElement)d(this,h);else if(typeof h=="string"){const m=document.querySelectorAll(h);if(m.length===0)throw new Error("Element ",h,"not found.");if(m.length>1)throw new Error("Geocoder can only be added to a single html element");d(this,m[0])}else throw new Error("Error: addTo must be a mapbox-gl-js map, an html element, or a CSS selector query for a single html element")},onAdd:function(h){if(h&&typeof h!="string"&&(this._map=h),this.setLanguage(),this.options.localGeocoderOnly||(this.geocoderService=z_(D_({accessToken:this.options.accessToken,origin:this.options.origin}))),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this.eventManager=new AR(this.options),this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this),this._geolocateUser=this._geolocateUser.bind(this);var d=this.container=document.createElement("div");d.className="mapboxgl-ctrl-geocoder mapboxgl-ctrl";var m=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="mapboxgl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",ER(this._onKeyDown,200)),this._inputEl.addEventListener("paste",this._onPaste),this._inputEl.addEventListener("change",this._onChange),this.container.addEventListener("mouseenter",this._showButton),this.container.addEventListener("mouseleave",this._hideButton),this._inputEl.addEventListener("keyup",function(Z){this.eventManager.keyevent(Z,this)}.bind(this));var x=document.createElement("div");x.classList.add("mapboxgl-ctrl-geocoder--pin-right"),this._clearEl=document.createElement("button"),this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this.clear),this._clearEl.className="mapboxgl-ctrl-geocoder--button";var T=this.createIcon("close",'<path d="M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"/>');if(this._clearEl.appendChild(T),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),x.appendChild(this._clearEl),x.appendChild(this._loadingEl),d.appendChild(m),d.appendChild(this._inputEl),d.appendChild(x),this.options.enableGeolocation&&this.geolocation.isSupport()){this._geolocateEl=document.createElement("button"),this._geolocateEl.setAttribute("aria-label","Geolocate"),this._geolocateEl.addEventListener("click",this._geolocateUser),this._geolocateEl.className="mapboxgl-ctrl-geocoder--button";var I=this.createIcon("geolocate",'<path d="M12.999 3.677L2.042 8.269c-.962.403-.747 1.823.29 1.912l5.032.431.431 5.033c.089 1.037 1.509 1.252 1.912.29l4.592-10.957c.345-.822-.477-1.644-1.299-1.299z" fill="#4264fb"/>');this._geolocateEl.appendChild(I),x.appendChild(this._geolocateEl),this._showGeolocateButton()}var P=this._typeahead=new TR(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit});this.setRenderFunction(this.options.render),P.getItemValue=this.options.getItemValue;var R=P.list.draw,C=this._footerNode=kR();return P.list.draw=function(){R.call(this),C.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),C.addEventListener("mouseup",function(){this.selectingListItem=!1}.bind(this)),this.element.appendChild(C)},this.mapMarker=null,this._handleMarker=this._handleMarker.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._mapboxgl=this.options.mapboxgl,!this._mapboxgl&&this.options.marker&&(console.error("No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl."),this.options.marker=!1)),d},_geolocateUser:function(){this._hideGeolocateButton(),this._showLoadingIcon(),this.geolocation.getCurrentPosition().then(function(h){this._hideLoadingIcon();const d={geometry:{type:"Point",coordinates:[h.coords.longitude,h.coords.latitude]}};this._handleMarker(d),this._fly(d),this._typeahead.clear(),this._typeahead.selected=!0,this.lastSelected=JSON.stringify(d),this._showClearButton(),this.fresh=!1;const m={limit:1,language:[this.options.language],query:d.geometry.coordinates,types:["address"]};if(this.options.localGeocoderOnly){const x=d.geometry.coordinates[0]+","+d.geometry.coordinates[1];this._setInputValue(x),this._eventEmitter.emit("result",{result:d})}else this.geocoderService.reverseGeocode(m).send().then(function(x){const T=x.body.features[0];if(T){const I=j2.transformFeatureToGeolocationText(T,this.options.addressAccuracy);this._setInputValue(I),T.user_coordinates=d.geometry.coordinates,this._eventEmitter.emit("result",{result:T})}else this._eventEmitter.emit("result",{result:{user_coordinates:d.geometry.coordinates}})}.bind(this))}.bind(this)).catch(function(h){h.code===1?this._renderUserDeniedGeolocationError():this._renderLocationError(),this._hideLoadingIcon(),this._showGeolocateButton(),this._hideAttribution()}.bind(this))},createIcon:function(h,d){var m=document.createElementNS("http://www.w3.org/2000/svg","svg");return m.setAttribute("class","mapboxgl-ctrl-geocoder--icon mapboxgl-ctrl-geocoder--icon-"+h),m.setAttribute("viewBox","0 0 18 18"),m.setAttribute("xml:space","preserve"),m.setAttribute("width",18),m.setAttribute("height",18),m.innerHTML=d,m},onRemove:function(){return this.container.parentNode.removeChild(this.container),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this},_setInputValue:function(h){this._inputEl.value=h,setTimeout(function(){this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0)}.bind(this),1)},_onPaste:function(h){var d=(h.clipboardData||window.clipboardData).getData("text");d.length>=this.options.minLength&&this._geocode(d)},_onKeyDown:function(h){var d=27,m=9;if(h.keyCode===d&&this.options.clearAndBlurOnEsc)return this._clear(h),this._inputEl.blur();var x=h.target&&h.target.shadowRoot?h.target.shadowRoot.activeElement:h.target,T=x?x.value:"";if(!T)return this.fresh=!0,h.keyCode!==m&&this.clear(h),this._showGeolocateButton(),this._hideClearButton();this._hideGeolocateButton(),!(h.metaKey||[m,d,37,39,13,38,40].indexOf(h.keyCode)!==-1)&&x.value.length>=this.options.minLength&&this._geocode(x.value)},_showButton:function(){this._typeahead.selected&&this._showClearButton()},_hideButton:function(){this._typeahead.selected&&this._hideClearButton()},_showClearButton:function(){this._clearEl.style.display="block"},_hideClearButton:function(){this._clearEl.style.display="none"},_showGeolocateButton:function(){this._geolocateEl&&this.geolocation.isSupport()&&(this._geolocateEl.style.display="block")},_hideGeolocateButton:function(){this._geolocateEl&&(this._geolocateEl.style.display="none")},_showLoadingIcon:function(){this._loadingEl.style.display="block"},_hideLoadingIcon:function(){this._loadingEl.style.display="none"},_showAttribution:function(){this._footerNode.style.display="block"},_hideAttribution:function(){this._footerNode.style.display="none"},_onBlur:function(h){this.options.clearOnBlur&&this._clearOnBlur(h),this.options.collapsed&&this._collapse()},_onChange:function(){var h=this._typeahead.selected;h&&JSON.stringify(h)!==this.lastSelected&&(this._hideClearButton(),this.options.flyTo&&this._fly(h),this.options.marker&&this._mapboxgl&&this._handleMarker(h),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(h),this._eventEmitter.emit("result",{result:h}),this.eventManager.select(h,this))},_fly:function(h){var d;if(h.properties&&N2[h.properties.short_code])d=Js({},this.options.flyTo),this._map&&this._map.fitBounds(N2[h.properties.short_code].bbox,d);else if(h.bbox){var m=h.bbox;d=Js({},this.options.flyTo),this._map&&this._map.fitBounds([[m[0],m[1]],[m[2],m[3]]],d)}else{var x={zoom:this.options.zoom};d=Js({},x,this.options.flyTo),h.center?d.center=h.center:h.geometry&&h.geometry.type&&h.geometry.type==="Point"&&h.geometry.coordinates&&(d.center=h.geometry.coordinates),this._map&&this._map.flyTo(d)}},_requestType:function(h,d){var m;return h.localGeocoderOnly?m=hs.LOCAL:h.reverseGeocode&&j2.REVERSE_GEOCODE_COORD_RGX.test(d)?m=hs.REVERSE:m=hs.FORWARD,m},_setupConfig:function(h,d){const m=["bbox","limit","proximity","countries","types","language","reverseMode","mode","autocomplete","fuzzyMatch","routing","worldview"],x=/[\s,]+/;var T=this,I=m.reduce(function(R,C){if(T.options[C]===void 0||T.options[C]===null)return R;["countries","types","language"].indexOf(C)>-1?R[C]=T.options[C].split(x):R[C]=T.options[C];const Z=typeof T.options[C].longitude=="number"&&typeof T.options[C].latitude=="number";if(C==="proximity"&&Z){const ee=T.options[C].longitude,ne=T.options[C].latitude;R[C]=[ee,ne]}return R},{});switch(h){case hs.REVERSE:{var P=d.split(x).map(function(R){return parseFloat(R,10)});T.options.flipCoordinates||P.reverse(),I.types&&I.types[0],I=Js(I,{query:P,limit:1}),["proximity","autocomplete","fuzzyMatch","bbox"].forEach(function(R){R in I&&delete I[R]})}break;case hs.FORWARD:{const R=d.trim();/^(-?\d{1,3}(\.\d{0,256})?)[, ]+(-?\d{1,3}(\.\d{0,256})?)?$/.test(R)&&(d=d.replace(/,/g," ")),I=Js(I,{query:d})}break}return I.session_token=this.eventManager.getSessionId(),I},_geocode:function(h){this.inputString=h,this._showLoadingIcon(),this._eventEmitter.emit("loading",{query:h});const d=this._requestType(this.options,h),m=this._setupConfig(d,h);var x;switch(d){case hs.LOCAL:x=Promise.resolve();break;case hs.FORWARD:x=this.geocoderService.forwardGeocode(m).send();break;case hs.REVERSE:x=this.geocoderService.reverseGeocode(m).send();break}var T=this.options.localGeocoder?this.options.localGeocoder(h)||[]:[],I=[],P=null;return x.catch(function(R){P=R}.bind(this)).then(function(R){this._hideLoadingIcon();var C={};return R?R.statusCode=="200"&&(C=R.body,C.request=R.request,C.headers=R.headers,this._headers=R.headers):C={type:"FeatureCollection",features:[]},C.config=m,this.fresh&&(this.eventManager.start(this),this.fresh=!1),C.features&&C.features.length&&C.features.map(function(Z){Z._source="mapbox"}),C.features=C.features?T.concat(C.features):T,this.options.externalGeocoder?(I=this.options.externalGeocoder(h,C.features)||Promise.resolve([]),I.then(function(Z){return C.features=C.features?Z.concat(C.features):Z,C},function(){return C})):C}.bind(this)).then(function(R){if(P)throw P;this.options.filter&&R.features.length&&(R.features=R.features.filter(this.options.filter)),R.features.length?(this._showClearButton(),this._hideGeolocateButton(),this._showAttribution(),this._eventEmitter.emit("results",R),this._typeahead.update(R.features)):(this._hideClearButton(),this._hideAttribution(),this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",R))}.bind(this)).catch(function(R){this._hideLoadingIcon(),this._hideAttribution(),T.length&&this.options.localGeocoder||I.length&&this.options.externalGeocoder?(this._showClearButton(),this._hideGeolocateButton(),this._typeahead.update(T)):(this._hideClearButton(),this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:T}),this._eventEmitter.emit("error",{error:R})}.bind(this)),x},_clear:function(h){h&&h.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this.eventManager.sessionIncrementer++,this._onChange(),this._hideClearButton(),this._showGeolocateButton(),this._removeMarker(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0},clear:function(h){this._clear(h),this._inputEl.focus()},_clearOnBlur:function(h){var d=this;h.relatedTarget&&d._clear(h)},_onQueryResult:function(h){var d=h.body;if(d.features.length){var m=d.features[0];this._typeahead.selected=m,this._inputEl.value=m.place_name,this._onChange()}},_updateProximity:function(){if(!(!this._map||!this.options.trackProximity))if(this._map.getZoom()>9){var h=this._map.getCenter().wrap();this.setProximity({longitude:h.lng,latitude:h.lat},!1)}else this.setProximity(null,!1)},_collapse:function(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("mapboxgl-ctrl-geocoder--collapsed")},_unCollapse:function(){this.container.classList.remove("mapboxgl-ctrl-geocoder--collapsed")},query:function(h){return this._geocode(h).then(this._onQueryResult),this},_renderError:function(){var h="<div class='mapbox-gl-geocoder--error'>There was an error reaching the server</div>";this._renderMessage(h)},_renderLocationError:function(){var h="<div class='mapbox-gl-geocoder--error'>A location error has occurred</div>";this._renderMessage(h)},_renderNoResults:function(){var h="<div class='mapbox-gl-geocoder--error mapbox-gl-geocoder--no-results'>No results found</div>";this._renderMessage(h)},_renderUserDeniedGeolocationError:function(){var h="<div class='mapbox-gl-geocoder--error'>Geolocation permission denied</div>";this._renderMessage(h)},_renderMessage:function(h){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(h)},_getPlaceholderText:function(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){var h=this.options.language.split(",")[0],d=IR.language(h),m=MR.placeholder[d];if(m)return m}return"Search"},setInput:function(h,d){return d===void 0&&(d=!1),this._inputEl.value=h,this._typeahead.selected=null,this._typeahead.clear(),h.length>=this.options.minLength&&(d?this._geocode(h):this._onChange()),this},setProximity:function(h,d=!0){return this.options.proximity=h,d&&(this.options.trackProximity=!1),this},getProximity:function(){return this.options.proximity},setRenderFunction:function(h){return h&&typeof h=="function"&&(this._typeahead.render=h),this},getRenderFunction:function(){return this._typeahead.render},setLanguage:function(h){var d=navigator.language||navigator.userLanguage||navigator.browserLanguage;return this.options.language=h||this.options.language||d,this},getLanguage:function(){return this.options.language},getZoom:function(){return this.options.zoom},setZoom:function(h){return this.options.zoom=h,this},getFlyTo:function(){return this.options.flyTo},setFlyTo:function(h){return this.options.flyTo=h,this},getPlaceholder:function(){return this.options.placeholder},setPlaceholder:function(h){return this.options.placeholder=h||this._getPlaceholderText(),this._inputEl.placeholder=this.options.placeholder,this._inputEl.setAttribute("aria-label",this.options.placeholder),this},getBbox:function(){return this.options.bbox},setBbox:function(h){return this.options.bbox=h,this},getCountries:function(){return this.options.countries},setCountries:function(h){return this.options.countries=h,this},getTypes:function(){return this.options.types},setTypes:function(h){return this.options.types=h,this},getMinLength:function(){return this.options.minLength},setMinLength:function(h){return this.options.minLength=h,this._typeahead&&(this._typeahead.options.minLength=h),this},getLimit:function(){return this.options.limit},setLimit:function(h){return this.options.limit=h,this._typeahead&&(this._typeahead.options.limit=h),this},getFilter:function(){return this.options.filter},setFilter:function(h){return this.options.filter=h,this},setOrigin:function(h){return this.options.origin=h,this.geocoderService=z_(D_({accessToken:this.options.accessToken,origin:this.options.origin})),this},getOrigin:function(){return this.options.origin},setAccessToken:function(h){return this.options.accessToken=h,this.geocoderService=z_(D_({accessToken:this.options.accessToken,origin:this.options.origin})),this},setAutocomplete:function(h){return this.options.autocomplete=h,this},getAutocomplete:function(){return this.options.autocomplete},setFuzzyMatch:function(h){return this.options.fuzzyMatch=h,this},getFuzzyMatch:function(){return this.options.fuzzyMatch},setRouting:function(h){return this.options.routing=h,this},getRouting:function(){return this.options.routing},setWorldview:function(h){return this.options.worldview=h,this},getWorldview:function(){return this.options.worldview},_handleMarker:function(h){if(this._map){this._removeMarker();var d={color:"#4668F2"},m=Js({},d,this.options.marker);return this.mapMarker=new this._mapboxgl.Marker(m),h.center?this.mapMarker.setLngLat(h.center).addTo(this._map):h.geometry&&h.geometry.type&&h.geometry.type==="Point"&&h.geometry.coordinates&&this.mapMarker.setLngLat(h.geometry.coordinates).addTo(this._map),this}},_removeMarker:function(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)},on:function(h,d){return this._eventEmitter.on(h,d),this},off:function(h,d){return this._eventEmitter.removeListener(h,d),this.eventManager.remove(),this}};var PR=iE;const DR=bT(PR);function rE(h){var d,m,x="";if(typeof h=="string"||typeof h=="number")x+=h;else if(typeof h=="object")if(Array.isArray(h))for(d=0;d<h.length;d++)h[d]&&(m=rE(h[d]))&&(x&&(x+=" "),x+=m);else for(d in h)h[d]&&(x&&(x+=" "),x+=d);return x}function zR(){for(var h,d,m=0,x="";m<arguments.length;)(h=arguments[m++])&&(d=rE(h))&&(x&&(x+=" "),x+=d);return x}const V2=h=>typeof h=="boolean"?"".concat(h):h===0?"0":h,U2=zR,oE=(h,d)=>m=>{var x;if(d?.variants==null)return U2(h,m?.class,m?.className);const{variants:T,defaultVariants:I}=d,P=Object.keys(T).map(Z=>{const ee=m?.[Z],ne=I?.[Z];if(ee===null)return null;const Te=V2(ee)||V2(ne);return T[Z][Te]}),R=m&&Object.entries(m).reduce((Z,ee)=>{let[ne,Te]=ee;return Te===void 0||(Z[ne]=Te),Z},{}),C=d==null||(x=d.compoundVariants)===null||x===void 0?void 0:x.reduce((Z,ee)=>{let{class:ne,className:Te,...Me}=ee;return Object.entries(Me).every(ke=>{let[ve,Xe]=ke;return Array.isArray(Xe)?Xe.includes({...I,...R}[ve]):{...I,...R}[ve]===Xe})?[...Z,ne,Te]:Z},[]);return U2(h,P,C,m?.class,m?.className)},Sc=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ld=(h,d,m,x="")=>{const T=h.split(":");if(h.slice(0,1)==="@"){if(T.length<2||T.length>3)return null;x=T.shift().slice(1)}if(T.length>3||!T.length)return null;if(T.length>1){const R=T.pop(),C=T.pop(),Z={provider:T.length>0?T[0]:x,prefix:C,name:R};return d&&!cd(Z)?null:Z}const I=T[0],P=I.split("-");if(P.length>1){const R={provider:x,prefix:P.shift(),name:P.join("-")};return d&&!cd(R)?null:R}if(m&&x===""){const R={provider:x,prefix:"",name:I};return d&&!cd(R,m)?null:R}return null},cd=(h,d)=>h?!!((h.provider===""||h.provider.match(Sc))&&(d&&h.prefix===""||h.prefix.match(Sc))&&h.name.match(Sc)):!1,nE=Object.freeze({left:0,top:0,width:16,height:16}),Td=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Od=Object.freeze({...nE,...Td}),X_=Object.freeze({...Od,body:"",hidden:!1});function RR(h,d){const m={};!h.hFlip!=!d.hFlip&&(m.hFlip=!0),!h.vFlip!=!d.vFlip&&(m.vFlip=!0);const x=((h.rotate||0)+(d.rotate||0))%4;return x&&(m.rotate=x),m}function q2(h,d){const m=RR(h,d);for(const x in X_)x in Td?x in h&&!(x in m)&&(m[x]=Td[x]):x in d?m[x]=d[x]:x in h&&(m[x]=h[x]);return m}function LR(h,d){const m=h.icons,x=h.aliases||Object.create(null),T=Object.create(null);function I(P){if(m[P])return T[P]=[];if(!(P in T)){T[P]=null;const R=x[P]&&x[P].parent,C=R&&I(R);C&&(T[P]=[R].concat(C))}return T[P]}return Object.keys(m).concat(Object.keys(x)).forEach(I),T}function OR(h,d,m){const x=h.icons,T=h.aliases||Object.create(null);let I={};function P(R){I=q2(x[R]||T[R],I)}return P(d),m.forEach(P),q2(h,I)}function sE(h,d){const m=[];if(typeof h!="object"||typeof h.icons!="object")return m;h.not_found instanceof Array&&h.not_found.forEach(T=>{d(T,null),m.push(T)});const x=LR(h);for(const T in x){const I=x[T];I&&(d(T,OR(h,T,I)),m.push(T))}return m}const BR={provider:"",aliases:{},not_found:{},...nE};function R_(h,d){for(const m in d)if(m in h&&typeof h[m]!=typeof d[m])return!1;return!0}function aE(h){if(typeof h!="object"||h===null)return null;const d=h;if(typeof d.prefix!="string"||!h.icons||typeof h.icons!="object"||!R_(h,BR))return null;const m=d.icons;for(const T in m){const I=m[T];if(!T.match(Sc)||typeof I.body!="string"||!R_(I,X_))return null}const x=d.aliases||Object.create(null);for(const T in x){const I=x[T],P=I.parent;if(!T.match(Sc)||typeof P!="string"||!m[P]&&!x[P]||!R_(I,X_))return null}return d}const G2=Object.create(null);function FR(h,d){return{provider:h,prefix:d,icons:Object.create(null),missing:new Set}}function ia(h,d){const m=G2[h]||(G2[h]=Object.create(null));return m[d]||(m[d]=FR(h,d))}function mg(h,d){return aE(d)?sE(d,(m,x)=>{x?h.icons[m]=x:h.missing.add(m)}):[]}function NR(h,d,m){try{if(typeof m.body=="string")return h.icons[d]={...m},!0}catch{}return!1}let Dc=!1;function lE(h){return typeof h=="boolean"&&(Dc=h),Dc}function jR(h){const d=typeof h=="string"?Ld(h,!0,Dc):h;if(d){const m=ia(d.provider,d.prefix),x=d.name;return m.icons[x]||(m.missing.has(x)?null:void 0)}}function VR(h,d){const m=Ld(h,!0,Dc);if(!m)return!1;const x=ia(m.provider,m.prefix);return NR(x,m.name,d)}function UR(h,d){if(typeof h!="object")return!1;if(typeof d!="string"&&(d=h.provider||""),Dc&&!d&&!h.prefix){let T=!1;return aE(h)&&(h.prefix="",sE(h,(I,P)=>{P&&VR(I,P)&&(T=!0)})),T}const m=h.prefix;if(!cd({provider:d,prefix:m,name:"a"}))return!1;const x=ia(d,m);return!!mg(x,h)}const cE=Object.freeze({width:null,height:null}),uE=Object.freeze({...cE,...Td}),qR=/(-?[0-9.]*[0-9]+[0-9.]*)/g,GR=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $2(h,d,m){if(d===1)return h;if(m=m||100,typeof h=="number")return Math.ceil(h*d*m)/m;if(typeof h!="string")return h;const x=h.split(qR);if(x===null||!x.length)return h;const T=[];let I=x.shift(),P=GR.test(I);for(;;){if(P){const R=parseFloat(I);isNaN(R)?T.push(I):T.push(Math.ceil(R*d*m)/m)}else T.push(I);if(I=x.shift(),I===void 0)return T.join("");P=!P}}const $R=h=>h==="unset"||h==="undefined"||h==="none";function WR(h,d){const m={...Od,...h},x={...uE,...d},T={left:m.left,top:m.top,width:m.width,height:m.height};let I=m.body;[m,x].forEach(ke=>{const ve=[],Xe=ke.hFlip,ut=ke.vFlip;let tt=ke.rotate;Xe?ut?tt+=2:(ve.push("translate("+(T.width+T.left).toString()+" "+(0-T.top).toString()+")"),ve.push("scale(-1 1)"),T.top=T.left=0):ut&&(ve.push("translate("+(0-T.left).toString()+" "+(T.height+T.top).toString()+")"),ve.push("scale(1 -1)"),T.top=T.left=0);let yt;switch(tt<0&&(tt-=Math.floor(tt/4)*4),tt=tt%4,tt){case 1:yt=T.height/2+T.top,ve.unshift("rotate(90 "+yt.toString()+" "+yt.toString()+")");break;case 2:ve.unshift("rotate(180 "+(T.width/2+T.left).toString()+" "+(T.height/2+T.top).toString()+")");break;case 3:yt=T.width/2+T.left,ve.unshift("rotate(-90 "+yt.toString()+" "+yt.toString()+")");break}tt%2===1&&(T.left!==T.top&&(yt=T.left,T.left=T.top,T.top=yt),T.width!==T.height&&(yt=T.width,T.width=T.height,T.height=yt)),ve.length&&(I='<g transform="'+ve.join(" ")+'">'+I+"</g>")});const P=x.width,R=x.height,C=T.width,Z=T.height;let ee,ne;P===null?(ne=R===null?"1em":R==="auto"?Z:R,ee=$2(ne,C/Z)):(ee=P==="auto"?C:P,ne=R===null?$2(ee,Z/C):R==="auto"?Z:R);const Te={},Me=(ke,ve)=>{$R(ve)||(Te[ke]=ve.toString())};return Me("width",ee),Me("height",ne),Te.viewBox=T.left.toString()+" "+T.top.toString()+" "+C.toString()+" "+Z.toString(),{attributes:Te,body:I}}const HR=/\sid="(\S+)"/g,ZR="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let XR=0;function YR(h,d=ZR){const m=[];let x;for(;x=HR.exec(h);)m.push(x[1]);if(!m.length)return h;const T="suffix"+(Math.random()*16777216|Date.now()).toString(16);return m.forEach(I=>{const P=typeof d=="function"?d(I):d+(XR++).toString(),R=I.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");h=h.replace(new RegExp('([#;"])('+R+')([")]|\\.[a-z])',"g"),"$1"+P+T+"$3")}),h=h.replace(new RegExp(T,"g"),""),h}const Y_=Object.create(null);function KR(h,d){Y_[h]=d}function K_(h){return Y_[h]||Y_[""]}function _g(h){let d;if(typeof h.resources=="string")d=[h.resources];else if(d=h.resources,!(d instanceof Array)||!d.length)return null;return{resources:d,path:h.path||"/",maxURL:h.maxURL||500,rotate:h.rotate||750,timeout:h.timeout||5e3,random:h.random===!0,index:h.index||0,dataAfterTimeout:h.dataAfterTimeout!==!1}}const gg=Object.create(null),td=["https://api.simplesvg.com","https://api.unisvg.com"],J_=[];for(;td.length>0;)td.length===1||Math.random()>.5?J_.push(td.shift()):J_.push(td.pop());gg[""]=_g({resources:["https://api.iconify.design"].concat(J_)});function hE(h,d){const m=_g(d);return m===null?!1:(gg[h]=m,!0)}function yg(h){return gg[h]}const JR=()=>{let h;try{if(h=fetch,typeof h=="function")return h}catch{}};let W2=JR();function QR(h,d){const m=yg(h);if(!m)return 0;let x;if(!m.maxURL)x=0;else{let T=0;m.resources.forEach(P=>{T=Math.max(T,P.length)});const I=d+".json?icons=";x=m.maxURL-T-m.path.length-I.length}return x}function eL(h){return h===404}const tL=(h,d,m)=>{const x=[],T=QR(h,d),I="icons";let P={type:I,provider:h,prefix:d,icons:[]},R=0;return m.forEach((C,Z)=>{R+=C.length+1,R>=T&&Z>0&&(x.push(P),P={type:I,provider:h,prefix:d,icons:[]},R=C.length),P.icons.push(C)}),x.push(P),x};function iL(h){if(typeof h=="string"){const d=yg(h);if(d)return d.path}return"/"}const rL=(h,d,m)=>{if(!W2){m("abort",424);return}let x=iL(d.provider);switch(d.type){case"icons":{const I=d.prefix,P=d.icons.join(","),R=new URLSearchParams({icons:P});x+=I+".json?"+R.toString();break}case"custom":{const I=d.uri;x+=I.slice(0,1)==="/"?I.slice(1):I;break}default:m("abort",400);return}let T=503;W2(h+x).then(I=>{const P=I.status;if(P!==200){setTimeout(()=>{m(eL(P)?"abort":"next",P)});return}return T=501,I.json()}).then(I=>{if(typeof I!="object"||I===null){setTimeout(()=>{I===404?m("abort",I):m("next",T)});return}setTimeout(()=>{m("success",I)})}).catch(()=>{m("next",T)})},oL={prepare:tL,send:rL};function nL(h){const d={loaded:[],missing:[],pending:[]},m=Object.create(null);h.sort((T,I)=>T.provider!==I.provider?T.provider.localeCompare(I.provider):T.prefix!==I.prefix?T.prefix.localeCompare(I.prefix):T.name.localeCompare(I.name));let x={provider:"",prefix:"",name:""};return h.forEach(T=>{if(x.name===T.name&&x.prefix===T.prefix&&x.provider===T.provider)return;x=T;const I=T.provider,P=T.prefix,R=T.name,C=m[I]||(m[I]=Object.create(null)),Z=C[P]||(C[P]=ia(I,P));let ee;R in Z.icons?ee=d.loaded:P===""||Z.missing.has(R)?ee=d.missing:ee=d.pending;const ne={provider:I,prefix:P,name:R};ee.push(ne)}),d}function dE(h,d){h.forEach(m=>{const x=m.loaderCallbacks;x&&(m.loaderCallbacks=x.filter(T=>T.id!==d))})}function sL(h){h.pendingCallbacksFlag||(h.pendingCallbacksFlag=!0,setTimeout(()=>{h.pendingCallbacksFlag=!1;const d=h.loaderCallbacks?h.loaderCallbacks.slice(0):[];if(!d.length)return;let m=!1;const x=h.provider,T=h.prefix;d.forEach(I=>{const P=I.icons,R=P.pending.length;P.pending=P.pending.filter(C=>{if(C.prefix!==T)return!0;const Z=C.name;if(h.icons[Z])P.loaded.push({provider:x,prefix:T,name:Z});else if(h.missing.has(Z))P.missing.push({provider:x,prefix:T,name:Z});else return m=!0,!0;return!1}),P.pending.length!==R&&(m||dE([h],I.id),I.callback(P.loaded.slice(0),P.missing.slice(0),P.pending.slice(0),I.abort))})}))}let aL=0;function lL(h,d,m){const x=aL++,T=dE.bind(null,m,x);if(!d.pending.length)return T;const I={id:x,icons:d,callback:h,abort:T};return m.forEach(P=>{(P.loaderCallbacks||(P.loaderCallbacks=[])).push(I)}),T}function cL(h,d=!0,m=!1){const x=[];return h.forEach(T=>{const I=typeof T=="string"?Ld(T,d,m):T;I&&x.push(I)}),x}var uL={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function hL(h,d,m,x){const T=h.resources.length,I=h.random?Math.floor(Math.random()*T):h.index;let P;if(h.random){let qe=h.resources.slice(0);for(P=[];qe.length>1;){const $t=Math.floor(Math.random()*qe.length);P.push(qe[$t]),qe=qe.slice(0,$t).concat(qe.slice($t+1))}P=P.concat(qe)}else P=h.resources.slice(I).concat(h.resources.slice(0,I));const R=Date.now();let C="pending",Z=0,ee,ne=null,Te=[],Me=[];typeof x=="function"&&Me.push(x);function ke(){ne&&(clearTimeout(ne),ne=null)}function ve(){C==="pending"&&(C="aborted"),ke(),Te.forEach(qe=>{qe.status==="pending"&&(qe.status="aborted")}),Te=[]}function Xe(qe,$t){$t&&(Me=[]),typeof qe=="function"&&Me.push(qe)}function ut(){return{startTime:R,payload:d,status:C,queriesSent:Z,queriesPending:Te.length,subscribe:Xe,abort:ve}}function tt(){C="failed",Me.forEach(qe=>{qe(void 0,ee)})}function yt(){Te.forEach(qe=>{qe.status==="pending"&&(qe.status="aborted")}),Te=[]}function _t(qe,$t,pi){const X=$t!=="success";switch(Te=Te.filter(lt=>lt!==qe),C){case"pending":break;case"failed":if(X||!h.dataAfterTimeout)return;break;default:return}if($t==="abort"){ee=pi,tt();return}if(X){ee=pi,Te.length||(P.length?st():tt());return}if(ke(),yt(),!h.random){const lt=h.resources.indexOf(qe.resource);lt!==-1&&lt!==h.index&&(h.index=lt)}C="completed",Me.forEach(lt=>{lt(pi)})}function st(){if(C!=="pending")return;ke();const qe=P.shift();if(qe===void 0){if(Te.length){ne=setTimeout(()=>{ke(),C==="pending"&&(yt(),tt())},h.timeout);return}tt();return}const $t={status:"pending",resource:qe,callback:(pi,X)=>{_t($t,pi,X)}};Te.push($t),Z++,ne=setTimeout(st,h.rotate),m(qe,d,$t.callback)}return setTimeout(st),ut}function pE(h){const d={...uL,...h};let m=[];function x(){m=m.filter(P=>P().status==="pending")}function T(P,R,C){const Z=hL(d,P,R,(ee,ne)=>{x(),C&&C(ee,ne)});return m.push(Z),Z}function I(P){return m.find(R=>P(R))||null}return{query:T,find:I,setIndex:P=>{d.index=P},getIndex:()=>d.index,cleanup:x}}function H2(){}const L_=Object.create(null);function dL(h){if(!L_[h]){const d=yg(h);if(!d)return;const m=pE(d),x={config:d,redundancy:m};L_[h]=x}return L_[h]}function pL(h,d,m){let x,T;if(typeof h=="string"){const I=K_(h);if(!I)return m(void 0,424),H2;T=I.send;const P=dL(h);P&&(x=P.redundancy)}else{const I=_g(h);if(I){x=pE(I);const P=h.resources?h.resources[0]:"",R=K_(P);R&&(T=R.send)}}return!x||!T?(m(void 0,424),H2):x.query(d,T,m)().abort}const Z2="iconify2",zc="iconify",fE=zc+"-count",X2=zc+"-version",mE=36e5,fL=168;function Q_(h,d){try{return h.getItem(d)}catch{}}function vg(h,d,m){try{return h.setItem(d,m),!0}catch{}}function Y2(h,d){try{h.removeItem(d)}catch{}}function eg(h,d){return vg(h,fE,d.toString())}function tg(h){return parseInt(Q_(h,fE))||0}const Bd={local:!0,session:!0},_E={local:new Set,session:new Set};let xg=!1;function mL(h){xg=h}let id=typeof window>"u"?{}:window;function gE(h){const d=h+"Storage";try{if(id&&id[d]&&typeof id[d].length=="number")return id[d]}catch{}Bd[h]=!1}function yE(h,d){const m=gE(h);if(!m)return;const x=Q_(m,X2);if(x!==Z2){if(x){const R=tg(m);for(let C=0;C<R;C++)Y2(m,zc+C.toString())}vg(m,X2,Z2),eg(m,0);return}const T=Math.floor(Date.now()/mE)-fL,I=R=>{const C=zc+R.toString(),Z=Q_(m,C);if(typeof Z=="string"){try{const ee=JSON.parse(Z);if(typeof ee=="object"&&typeof ee.cached=="number"&&ee.cached>T&&typeof ee.provider=="string"&&typeof ee.data=="object"&&typeof ee.data.prefix=="string"&&d(ee,R))return!0}catch{}Y2(m,C)}};let P=tg(m);for(let R=P-1;R>=0;R--)I(R)||(R===P-1?(P--,eg(m,P)):_E[h].add(R))}function vE(){if(!xg){mL(!0);for(const h in Bd)yE(h,d=>{const m=d.data,x=d.provider,T=m.prefix,I=ia(x,T);if(!mg(I,m).length)return!1;const P=m.lastModified||-1;return I.lastModifiedCached=I.lastModifiedCached?Math.min(I.lastModifiedCached,P):P,!0})}}function _L(h,d){const m=h.lastModifiedCached;if(m&&m>=d)return m===d;if(h.lastModifiedCached=d,m)for(const x in Bd)yE(x,T=>{const I=T.data;return T.provider!==h.provider||I.prefix!==h.prefix||I.lastModified===d});return!0}function gL(h,d){xg||vE();function m(x){let T;if(!Bd[x]||!(T=gE(x)))return;const I=_E[x];let P;if(I.size)I.delete(P=Array.from(I).shift());else if(P=tg(T),!eg(T,P+1))return;const R={cached:Math.floor(Date.now()/mE),provider:h.provider,data:d};return vg(T,zc+P.toString(),JSON.stringify(R))}d.lastModified&&!_L(h,d.lastModified)||Object.keys(d.icons).length&&(d.not_found&&(d=Object.assign({},d),delete d.not_found),m("local")||m("session"))}function K2(){}function yL(h){h.iconsLoaderFlag||(h.iconsLoaderFlag=!0,setTimeout(()=>{h.iconsLoaderFlag=!1,sL(h)}))}function vL(h,d){h.iconsToLoad?h.iconsToLoad=h.iconsToLoad.concat(d).sort():h.iconsToLoad=d,h.iconsQueueFlag||(h.iconsQueueFlag=!0,setTimeout(()=>{h.iconsQueueFlag=!1;const{provider:m,prefix:x}=h,T=h.iconsToLoad;delete h.iconsToLoad;let I;!T||!(I=K_(m))||I.prepare(m,x,T).forEach(P=>{pL(m,P,R=>{if(typeof R!="object")P.icons.forEach(C=>{h.missing.add(C)});else try{const C=mg(h,R);if(!C.length)return;const Z=h.pendingIcons;Z&&C.forEach(ee=>{Z.delete(ee)}),gL(h,R)}catch(C){console.error(C)}yL(h)})})}))}const xL=(h,d)=>{const m=cL(h,!0,lE()),x=nL(m);if(!x.pending.length){let C=!0;return d&&setTimeout(()=>{C&&d(x.loaded,x.missing,x.pending,K2)}),()=>{C=!1}}const T=Object.create(null),I=[];let P,R;return x.pending.forEach(C=>{const{provider:Z,prefix:ee}=C;if(ee===R&&Z===P)return;P=Z,R=ee,I.push(ia(Z,ee));const ne=T[Z]||(T[Z]=Object.create(null));ne[ee]||(ne[ee]=[])}),x.pending.forEach(C=>{const{provider:Z,prefix:ee,name:ne}=C,Te=ia(Z,ee),Me=Te.pendingIcons||(Te.pendingIcons=new Set);Me.has(ne)||(Me.add(ne),T[Z][ee].push(ne))}),I.forEach(C=>{const{provider:Z,prefix:ee}=C;T[Z][ee].length&&vL(C,T[Z][ee])}),d?lL(d,x,I):K2};function bL(h,d){const m={...h};for(const x in d){const T=d[x],I=typeof T;x in cE?(T===null||T&&(I==="string"||I==="number"))&&(m[x]=T):I===typeof m[x]&&(m[x]=x==="rotate"?T%4:T)}return m}const wL=/[\s,]+/;function TL(h,d){d.split(wL).forEach(m=>{switch(m.trim()){case"horizontal":h.hFlip=!0;break;case"vertical":h.vFlip=!0;break}})}function EL(h,d=0){const m=h.replace(/^-?[0-9.]*/,"");function x(T){for(;T<0;)T+=4;return T%4}if(m===""){const T=parseInt(h);return isNaN(T)?0:x(T)}else if(m!==h){let T=0;switch(m){case"%":T=25;break;case"deg":T=90}if(T){let I=parseFloat(h.slice(0,h.length-m.length));return isNaN(I)?0:(I=I/T,I%1===0?x(I):0)}}return d}function SL(h,d){let m=h.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const x in d)m+=" "+x+'="'+d[x]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+m+">"+h+"</svg>"}function AL(h){return h.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ML(h){return"data:image/svg+xml,"+AL(h)}function IL(h){return'url("'+ML(h)+'")'}const J2={...uE,inline:!1},CL={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},kL={display:"inline-block"},ig={backgroundColor:"currentColor"},xE={backgroundColor:"transparent"},Q2={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},eT={webkitMask:ig,mask:ig,background:xE};for(const h in eT){const d=eT[h];for(const m in Q2)d[h+m]=Q2[m]}const ud={};["horizontal","vertical"].forEach(h=>{const d=h.slice(0,1)+"Flip";ud[h+"-flip"]=d,ud[h.slice(0,1)+"-flip"]=d,ud[h+"Flip"]=d});function tT(h){return h+(h.match(/^[-0-9.]+$/)?"px":"")}const iT=(h,d)=>{const m=bL(J2,d),x={...CL},T=d.mode||"svg",I={},P=d.style,R=typeof P=="object"&&!(P instanceof Array)?P:{};for(let ve in d){const Xe=d[ve];if(Xe!==void 0)switch(ve){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":m[ve]=Xe===!0||Xe==="true"||Xe===1;break;case"flip":typeof Xe=="string"&&TL(m,Xe);break;case"color":I.color=Xe;break;case"rotate":typeof Xe=="string"?m[ve]=EL(Xe):typeof Xe=="number"&&(m[ve]=Xe);break;case"ariaHidden":case"aria-hidden":Xe!==!0&&Xe!=="true"&&delete x["aria-hidden"];break;default:{const ut=ud[ve];ut?(Xe===!0||Xe==="true"||Xe===1)&&(m[ut]=!0):J2[ve]===void 0&&(x[ve]=Xe)}}}const C=WR(h,m),Z=C.attributes;if(m.inline&&(I.verticalAlign="-0.125em"),T==="svg"){x.style={...I,...R},Object.assign(x,Z);let ve=0,Xe=d.id;return typeof Xe=="string"&&(Xe=Xe.replace(/-/g,"_")),x.innerHTML=YR(C.body,Xe?()=>Xe+"ID"+ve++:"iconifyVue"),I2("svg",x)}const{body:ee,width:ne,height:Te}=h,Me=T==="mask"||(T==="bg"?!1:ee.indexOf("currentColor")!==-1),ke=SL(ee,{...Z,width:ne+"",height:Te+""});return x.style={...I,"--svg":IL(ke),width:tT(Z.width),height:tT(Z.height),...kL,...Me?ig:xE,...R},I2("span",x)};lE(!0);KR("",oL);if(typeof document<"u"&&typeof window<"u"){vE();const h=window;if(h.IconifyPreload!==void 0){const d=h.IconifyPreload,m="Invalid IconifyPreload syntax.";typeof d=="object"&&d!==null&&(d instanceof Array?d:[d]).forEach(x=>{try{(typeof x!="object"||x===null||x instanceof Array||typeof x.icons!="object"||typeof x.prefix!="string"||!UR(x))&&console.error(m)}catch{console.error(m)}})}if(h.IconifyProviders!==void 0){const d=h.IconifyProviders;if(typeof d=="object"&&d!==null)for(let m in d){const x="IconifyProviders["+m+"] is invalid.";try{const T=d[m];if(typeof T!="object"||!T||T.resources===void 0)continue;hE(m,T)||console.error(x)}catch{console.error(x)}}}}const PL={...Od,body:""},hd=Dn({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(h,d){if(typeof h=="object"&&h!==null&&typeof h.body=="string")return this._name="",this.abortLoading(),{data:h};let m;if(typeof h!="string"||(m=Ld(h,!1,!0))===null)return this.abortLoading(),null;const x=jR(m);if(!x)return(!this._loadingIcon||this._loadingIcon.name!==h)&&(this.abortLoading(),this._name="",x!==null&&(this._loadingIcon={name:h,abort:xL([m],()=>{this.counter++})})),null;this.abortLoading(),this._name!==h&&(this._name=h,d&&d(h));const T=["iconify"];return m.prefix!==""&&T.push("iconify--"+m.prefix),m.provider!==""&&T.push("iconify--"+m.provider),{data:x,classes:T}}},render(){this.counter;const h=this.$attrs,d=this.iconMounted?this.getIcon(h.icon,h.onLoad):null;if(!d)return iT(PL,h);let m=h;return d.classes&&(m={...h,class:(typeof h.class=="string"?h.class+" ":"")+d.classes.join(" ")}),iT({...Od,...d.data},m)}});hE("",{resources:["https://icons.ui.kvass.no"]});function DL(h){return!h||typeof h!="object"?!1:typeof h.then=="function"&&typeof h.catch=="function"}const zL=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],RL=(h,d)=>d==="default"?`var(--k-ui-${h})`:`var(--k-ui-${h}-${d})`,rT=h=>{switch(h){case"start":case"end":return`flex-${h}`;default:return h}},LL=(h,d="spacing")=>h.split(" ").map(m=>typeof m=="number"||typeof m=="string"&&m.match(/^\d+$/)?`${m}rem`:typeof m=="string"&&zL.includes(m)?RL(d,m):m).join(" "),OL=(h,d)=>Object.fromEntries(Object.entries(d).map(([m,x])=>[`--k-${h}-${m}`,x])),BL=Dn({__name:"Spinner",props:{size:{default:"medium"}},setup(h){return(d,m)=>(ur(),Cn("span",{class:cg(`k-spinner k-spinner--size-${d.size}`)},null,2))}}),FL={class:"k-button__content"},NL={key:0,class:"k-button__icon k-button__icon--left"},jL={key:1,class:"k-button__icon k-button__icon--right"},VL={key:2,class:"k-button__confirm-label"},bg=Dn({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{type:[String,Object,Function],default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(h,{emit:d}){const m=h,x={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},T=Hr(()=>!ne.value||C.value==="loading"?m.variant:C.value=="confirm"?"warning":x[C.value]||m.variant),I=Hr(()=>m.loading||C.value==="loading"),P=en(),R=Hr(()=>{if(C.value)return["error","success"].includes(C.value)||I.value}),C=en("idle"),Z=en(),ee=en(),ne=Hr(()=>C.value||I.value),Te=Hr(()=>["error","success"].includes(C.value)),Me=Hr(()=>C.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function ke(_t){if(!_t)return;ve(),ee.value=_t,P.value=setTimeout(()=>C.value="loading",100);let st=qe=>{ve(),m.stateTimeout?(C.value=qe,Z.value=setTimeout(()=>{ve(),d(qe)},m.stateTimeout)):d(qe)};ee.value.then(()=>st("success")).catch(()=>st("error"))}function ve(){P.value&&clearTimeout(P.value),Z.value&&clearTimeout(Z.value),ee.value=null,C.value="idle"}yT(()=>m.promise,_t=>{_t&&DL(_t)&&ke(_t)});const Xe=en(),ut=Hr(()=>C.value==="confirm");function tt(_t){if(m.confirm&&C.value!=="confirm")return C.value="confirm";ve(),d("click",_t)}const yt=oE("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(_t,st)=>(ur(),In(xT(_t.is),hD({type:"button",class:An(yt)({variant:T.value,size:_t.size,isLoading:I.value,isBusy:R.value}),"aria-busy":R.value,inert:R.value},_t.$attrs,{onClick:tt,ref_key:"rootElement",ref:Xe}),{default:vd(()=>[cD(sl("span",FL,[_t.icon||_t.iconLeft||_t.$slots.icon||_t.$slots["icon-left"]?(ur(),Cn("span",NL,[fs(_t.$slots,"icon-left",{},()=>[fs(_t.$slots,"icon",{},()=>[W_(An(hd),{icon:_t.icon||_t.iconLeft},null,8,["icon"])])])])):Qo("",!0),fs(_t.$slots,"default",{},()=>[vT(Pc(_t.label),1)]),_t.iconRight||_t.$slots["icon-right"]?(ur(),Cn("span",jL,[fs(_t.$slots,"icon-right",{},()=>[W_(An(hd),{icon:_t.iconRight},null,8,["icon"])])])):Qo("",!0)],512),[[uD,!ut.value]]),I.value?(ur(),In(BL,{key:0})):Qo("",!0),Te.value?(ur(),In(An(hd),{key:1,class:"k-button__state-indicator",icon:Me.value},null,8,["icon"])):Qo("",!0),ut.value?(ur(),Cn("span",VL,Pc(_t.confirmLabel),1)):Qo("",!0)]),_:3},16,["class","aria-busy","inert"]))}}),UL={class:"k-alert__content"},qL={key:0,class:"k-alert__title"},GL={class:"k-alert__icon"},$L=Dn({__name:"Alert",props:{variant:{default:"neutral"},icon:{},title:{},content:{},action:{}},emits:["action"],setup(h,{emit:d}){const m=h,x=oE("k-alert",{variants:{variant:{neutral:"k-alert--neutral",info:"k-alert--info",danger:"k-alert--danger",warning:"k-alert--warning"}}}),T={info:"fa-pro-light:circle-question",warning:"fa-pro-light:exclamation-triangle",danger:"fa-pro-light:exclamation-circle"};return(I,P)=>(ur(),Cn("div",{role:"alert",class:cg(An(x)({...m}))},[sl("div",UL,[I.title||I.$slots.title?(ur(),Cn("div",qL,[fs(I.$slots,"title",{},()=>[sl("strong",null,Pc(I.title),1)])])):Qo("",!0),fs(I.$slots,"default",{},()=>[sl("span",null,Pc(I.content),1)]),I.action?(ur(),In(bg,{key:1,label:I.action,size:"small",class:"k-alert__action",onClick:P[0]||(P[0]=R=>d("action",{event:R,name:I.action}))},null,8,["label"])):Qo("",!0)]),sl("div",GL,[fs(I.$slots,"icon",{},()=>[I.icon||T[I.variant]?(ur(),In(An(hd),{key:0,icon:I.icon||T[I.variant]},null,8,["icon"])):Qo("",!0)])])],2))}});var _s=(h,d=[])=>({parts:(...m)=>{if(WL(d))return _s(h,m);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...m)=>_s(h,[...d,...m]),rename:m=>_s(m,d),keys:()=>d,build:()=>[...new Set(d)].reduce((m,x)=>Object.assign(m,{[x]:{selector:[`&[data-scope="${tl(h)}"][data-part="${tl(x)}"]`,`& [data-scope="${tl(h)}"][data-part="${tl(x)}"]`].join(", "),attrs:{"data-scope":tl(h),"data-part":tl(x)}}}),{})}),tl=h=>h.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),WL=h=>h.length===0,HL=h=>h.nodeType===Node.DOCUMENT_NODE?h:h.ownerDocument??document;function Rc(h){const d={getRootNode:m=>{var x;return((x=m.getRootNode)==null?void 0:x.call(m))??document},getDoc:m=>HL(d.getRootNode(m)),getWin:m=>d.getDoc(m).defaultView??window,getActiveElement:m=>d.getDoc(m).activeElement,getById:(m,x)=>d.getRootNode(m).getElementById(x),setValue:(m,x)=>{m==null||x==null||(m.value=x.toString())}};return{...d,...h}}function bE(h,d){return Array.from(h?.querySelectorAll(d)??[])}var wE=h=>h.ownerDocument.defaultView||window;function ZL(h,d){const{type:m="HTMLInputElement",property:x="value"}=d,T=wE(h)[m].prototype;return Object.getOwnPropertyDescriptor(T,x)??{}}function XL(h,d,m={}){var x;(x=ZL(h,m).set)==null||x.call(h,d)}function TE(h,d){const{value:m,bubbles:x=!0}=d;if(!h)return;const T=wE(h);h instanceof T.HTMLInputElement&&(XL(h,`${m}`),h.dispatchEvent(new T.Event("input",{bubbles:x})))}var YL=_s("checkbox").parts("root","label","control");YL.build();var rd=Rc({getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`checkbox:${h.id}`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`checkbox:${h.id}:label`},getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`checkbox:${h.id}:control`},getHiddenInputId:h=>{var d;return((d=h.ids)==null?void 0:d.hiddenInput)??`checkbox:${h.id}:hidden`},getRootEl:h=>rd.getById(h,rd.getRootId(h)),getHiddenInputEl:h=>rd.getById(h,rd.getHiddenInputId(h))});function KL(h){return new Proxy({},{get(){return h}})}function JL(h){return h.charAt(0).toUpperCase()+h.substr(1).toLowerCase()}var oT={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"};function QL(h){return h in oT?oT[h]:h.startsWith("on")?`on${JL(h.substr(2))}`:h.toLowerCase()}KL(h=>{const d={};for(const m in h){const x=h[m];m==="children"?typeof x=="string"&&(d.innerHTML=x):d[QL(m)]=h[m]}return d});function gs(h){return typeof h=="string"||h instanceof String}function nT(h){var d;return typeof h=="object"&&h!=null&&(h==null||(d=h.constructor)==null?void 0:d.name)==="Object"}function EE(h,d){return Array.isArray(d)?EE(h,(m,x)=>d.includes(x)):Object.entries(h).reduce((m,x)=>{let[T,I]=x;return d(I,T)&&(m[T]=I),m},{})}const Mt={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function eO(h){switch(h){case Mt.LEFT:return Mt.FORCE_LEFT;case Mt.RIGHT:return Mt.FORCE_RIGHT;default:return h}}function O_(h){return h.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ed(h,d){if(d===h)return!0;const m=Array.isArray(d),x=Array.isArray(h);let T;if(m&&x){if(d.length!=h.length)return!1;for(T=0;T<d.length;T++)if(!Ed(d[T],h[T]))return!1;return!0}if(m!=x)return!1;if(d&&h&&typeof d=="object"&&typeof h=="object"){const I=d instanceof Date,P=h instanceof Date;if(I&&P)return d.getTime()==h.getTime();if(I!=P)return!1;const R=d instanceof RegExp,C=h instanceof RegExp;if(R&&C)return d.toString()==h.toString();if(R!=C)return!1;const Z=Object.keys(d);for(T=0;T<Z.length;T++)if(!Object.prototype.hasOwnProperty.call(h,Z[T]))return!1;for(T=0;T<Z.length;T++)if(!Ed(h[Z[T]],d[Z[T]]))return!1;return!0}else if(d&&h&&typeof d=="function"&&typeof h=="function")return d.toString()===h.toString();return!1}class tO{constructor(d){for(Object.assign(this,d);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Mt.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Mt.RIGHT:Mt.LEFT}}function Ht(h,d){return new Ht.InputMask(h,d)}function SE(h){if(h==null)throw new Error("mask property should be defined");return h instanceof RegExp?Ht.MaskedRegExp:gs(h)?Ht.MaskedPattern:h===Date?Ht.MaskedDate:h===Number?Ht.MaskedNumber:Array.isArray(h)||h===Array?Ht.MaskedDynamic:Ht.Masked&&h.prototype instanceof Ht.Masked?h:Ht.Masked&&h instanceof Ht.Masked?h.constructor:h instanceof Function?Ht.MaskedFunction:(console.warn("Mask not found for mask",h),Ht.Masked)}function Sd(h){if(!h)throw new Error("Options in not defined");if(Ht.Masked){if(h.prototype instanceof Ht.Masked)return{mask:h};const{mask:d=void 0,...m}=h instanceof Ht.Masked?{mask:h}:nT(h)&&h.mask instanceof Ht.Masked?h:{};if(d){const x=d.mask;return{...EE(d,(T,I)=>!I.startsWith("_")),mask:d.constructor,_mask:x,...m}}}return nT(h)?{...h}:{mask:h}}function ra(h){if(Ht.Masked&&h instanceof Ht.Masked)return h;const d=Sd(h),m=SE(d.mask);if(!m)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return d.mask===m&&delete d.mask,d._mask&&(d.mask=d._mask,delete d._mask),new m(d)}Ht.createMask=ra;class wg{get selectionStart(){let d;try{d=this._unsafeSelectionStart}catch{}return d??this.value.length}get selectionEnd(){let d;try{d=this._unsafeSelectionEnd}catch{}return d??this.value.length}select(d,m){if(!(d==null||m==null||d===this.selectionStart&&m===this.selectionEnd))try{this._unsafeSelect(d,m)}catch{}}get isActive(){return!1}}Ht.MaskElement=wg;class oa extends wg{constructor(d){super(),this.input=d,this._handlers={}}get rootElement(){var d,m,x;return(d=(m=(x=this.input).getRootNode)==null?void 0:m.call(x))!=null?d:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(d){Object.keys(d).forEach(m=>this._toggleEventHandler(oa.EVENTS_MAP[m],d[m]))}unbindEvents(){Object.keys(this._handlers).forEach(d=>this._toggleEventHandler(d))}_toggleEventHandler(d,m){this._handlers[d]&&(this.input.removeEventListener(d,this._handlers[d]),delete this._handlers[d]),m&&(this.input.addEventListener(d,m),this._handlers[d]=m)}}oa.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"};Ht.HTMLMaskElement=oa;class iO extends oa{constructor(d){super(d),this.input=d,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(d,m){this.input.setSelectionRange(d,m)}get value(){return this.input.value}set value(d){this.input.value=d}}Ht.HTMLMaskElement=oa;class AE extends oa{get _unsafeSelectionStart(){const d=this.rootElement,m=d.getSelection&&d.getSelection(),x=m&&m.anchorOffset,T=m&&m.focusOffset;return T==null||x==null||x<T?x:T}get _unsafeSelectionEnd(){const d=this.rootElement,m=d.getSelection&&d.getSelection(),x=m&&m.anchorOffset,T=m&&m.focusOffset;return T==null||x==null||x>T?x:T}_unsafeSelect(d,m){if(!this.rootElement.createRange)return;const x=this.rootElement.createRange();x.setStart(this.input.firstChild||this.input,d),x.setEnd(this.input.lastChild||this.input,m);const T=this.rootElement,I=T.getSelection&&T.getSelection();I&&(I.removeAllRanges(),I.addRange(x))}get value(){return this.input.textContent||""}set value(d){this.input.textContent=d}}Ht.HTMLContenteditableMaskElement=AE;class rO{constructor(d,m){this.el=d instanceof wg?d:d.isContentEditable&&d.tagName!=="INPUT"&&d.tagName!=="TEXTAREA"?new AE(d):new iO(d),this.masked=ra(m),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(d){var m;return d==null||((m=this.masked)==null?void 0:m.maskEquals(d))}get mask(){return this.masked.mask}set mask(d){if(this.maskEquals(d))return;if(!(d instanceof Ht.Masked)&&this.masked.constructor===SE(d)){this.masked.updateOptions({mask:d});return}const m=d instanceof Ht.Masked?d:ra({mask:d});m.unmaskedValue=this.masked.unmaskedValue,this.masked=m}get value(){return this._value}set value(d){this.value!==d&&(this.masked.value=d,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(d){this.unmaskedValue!==d&&(this.masked.unmaskedValue=d,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(d){this.masked.typedValueEquals(d)||(this.masked.typedValue=d,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(d,m){const x=this._listeners[d];x&&x.forEach(T=>T(m))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(d){!this.el||!this.el.isActive||(this.el.select(d,d),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const d=this.masked.unmaskedValue,m=this.masked.value,x=this.displayValue,T=this.unmaskedValue!==d||this.value!==m;this._unmaskedValue=d,this._value=m,this.el.value!==x&&(this.el.value=x),T&&this._fireChangeEvents()}updateOptions(d){const{mask:m,...x}=d,T=!this.maskEquals(m),I=!Ed(this.masked,x);T&&(this.mask=m),I&&this.masked.updateOptions(x),(T||I)&&this.updateControl()}updateCursor(d){d!=null&&(this.cursorPos=d,this._delayUpdateCursor(d))}_delayUpdateCursor(d){this._abortUpdateCursor(),this._changingCursorPos=d,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Mt.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(d,m){return this._listeners[d]||(this._listeners[d]=[]),this._listeners[d].push(m),this}off(d,m){if(!this._listeners[d])return this;if(!m)return delete this._listeners[d],this;const x=this._listeners[d].indexOf(m);return x>=0&&this._listeners[d].splice(x,1),this}_onInput(d){if(this._inputEvent=d,this._abortUpdateCursor(),!this._selection)return this.updateValue();const m=new tO({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),x=this.masked.rawInputValue,T=this.masked.splice(m.startChangePos,m.removed.length,m.inserted,m.removeDirection,{input:!0,raw:!0}).offset,I=x===this.masked.rawInputValue?m.removeDirection:Mt.NONE;let P=this.masked.nearestInputPos(m.startChangePos+T,I);I!==Mt.NONE&&(P=this.masked.nearestInputPos(P,Mt.NONE)),this.updateControl(),this.updateCursor(P),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(d){d.preventDefault(),d.stopPropagation()}_onFocus(d){this.alignCursorFriendly()}_onClick(d){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}Ht.InputMask=rO;class Mi{static normalize(d){return Array.isArray(d)?d:[d,new Mi]}constructor(d){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},d)}aggregate(d){return this.rawInserted+=d.rawInserted,this.skip=this.skip||d.skip,this.inserted+=d.inserted,this.tailShift+=d.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}Ht.ChangeDetails=Mi;class Mn{constructor(d,m,x){d===void 0&&(d=""),m===void 0&&(m=0),this.value=d,this.from=m,this.stop=x}toString(){return this.value}extend(d){this.value+=String(d)}appendTo(d){return d.append(this.toString(),{tail:!0}).aggregate(d._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(d){Object.assign(this,d)}unshift(d){if(!this.value.length||d!=null&&this.from>=d)return"";const m=this.value[0];return this.value=this.value.slice(1),m}shift(){if(!this.value.length)return"";const d=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),d}}class ro{constructor(d){this._value="",this._update({...ro.DEFAULTS,...d}),this._initialized=!0}updateOptions(d){Object.keys(d).length&&this.withValueRefresh(this._update.bind(this,d))}_update(d){Object.assign(this,d)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(d){this._value=d._value}reset(){this._value=""}get value(){return this._value}set value(d){this.resolve(d,{input:!0})}resolve(d,m){m===void 0&&(m={input:!0}),this.reset(),this.append(d,m,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(d){this.resolve(d,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(d){this.format?this.value=this.format(d,this):this.unmaskedValue=String(d)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(d){this.resolve(d,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(d,m){return d}totalInputPositions(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),Math.min(this.displayValue.length,m-d)}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),this.displayValue.slice(d,m)}extractTail(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),new Mn(this.extractInput(d,m),d)}appendTail(d){return gs(d)&&(d=new Mn(String(d))),d.appendTo(this)}_appendCharRaw(d,m){return d?(this._value+=d,new Mi({inserted:d,rawInserted:d})):new Mi}_appendChar(d,m,x){m===void 0&&(m={});const T=this.state;let I;if([d,I]=this.doPrepareChar(d,m),I=I.aggregate(this._appendCharRaw(d,m)),I.inserted){let P,R=this.doValidate(m)!==!1;if(R&&x!=null){const C=this.state;this.overwrite===!0&&(P=x.state,x.unshift(this.displayValue.length-I.tailShift));let Z=this.appendTail(x);R=Z.rawInserted===x.toString(),!(R&&Z.inserted)&&this.overwrite==="shift"&&(this.state=C,P=x.state,x.shift(),Z=this.appendTail(x),R=Z.rawInserted===x.toString()),R&&Z.inserted&&(this.state=C)}R||(I=new Mi,this.state=T,x&&P&&(x.state=P))}return I}_appendPlaceholder(){return new Mi}_appendEager(){return new Mi}append(d,m,x){if(!gs(d))throw new Error("value should be string");const T=gs(x)?new Mn(String(x)):x;m!=null&&m.tail&&(m._beforeTailState=this.state);let I;[d,I]=this.doPrepare(d,m);for(let P=0;P<d.length;++P){const R=this._appendChar(d[P],m,T);if(!R.rawInserted&&!this.doSkipInvalid(d[P],m,T))break;I.aggregate(R)}return(this.eager===!0||this.eager==="append")&&m!=null&&m.input&&d&&I.aggregate(this._appendEager()),T!=null&&(I.tailShift+=this.appendTail(T).tailShift),I}remove(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),this._value=this.displayValue.slice(0,d)+this.displayValue.slice(m),new Mi}withValueRefresh(d){if(this._refreshing||!this._initialized)return d();this._refreshing=!0;const m=this.rawInputValue,x=this.value,T=d();return this.rawInputValue=m,this.value&&this.value!==x&&x.indexOf(this.value)===0&&this.append(x.slice(this.displayValue.length),{},""),delete this._refreshing,T}runIsolated(d){if(this._isolated||!this._initialized)return d(this);this._isolated=!0;const m=this.state,x=d(this);return this.state=m,delete this._isolated,x}doSkipInvalid(d,m,x){return!!this.skipInvalid}doPrepare(d,m){return m===void 0&&(m={}),Mi.normalize(this.prepare?this.prepare(d,this,m):d)}doPrepareChar(d,m){return m===void 0&&(m={}),Mi.normalize(this.prepareChar?this.prepareChar(d,this,m):d)}doValidate(d){return(!this.validate||this.validate(this.value,this,d))&&(!this.parent||this.parent.doValidate(d))}doCommit(){this.commit&&this.commit(this.value,this)}splice(d,m,x,T,I){T===void 0&&(T=Mt.NONE),I===void 0&&(I={input:!0});const P=d+m,R=this.extractTail(P),C=this.eager===!0||this.eager==="remove";let Z;C&&(T=eO(T),Z=this.extractInput(0,P,{raw:!0}));let ee=d;const ne=new Mi;if(T!==Mt.NONE&&(ee=this.nearestInputPos(d,m>1&&d!==0&&!C?Mt.NONE:T),ne.tailShift=ee-d),ne.aggregate(this.remove(ee)),C&&T!==Mt.NONE&&Z===this.rawInputValue)if(T===Mt.FORCE_LEFT){let Te;for(;Z===this.rawInputValue&&(Te=this.displayValue.length);)ne.aggregate(new Mi({tailShift:-1})).aggregate(this.remove(Te-1))}else T===Mt.FORCE_RIGHT&&R.unshift();return ne.aggregate(this.append(x,I,R))}maskEquals(d){return this.mask===d}typedValueEquals(d){const m=this.typedValue;return d===m||ro.EMPTY_VALUES.includes(d)&&ro.EMPTY_VALUES.includes(m)||(this.format?this.format(d,this)===this.format(this.typedValue,this):!1)}}ro.DEFAULTS={skipInvalid:!0};ro.EMPTY_VALUES=[void 0,null,""];Ht.Masked=ro;class ea{constructor(d,m){d===void 0&&(d=[]),m===void 0&&(m=0),this.chunks=d,this.from=m}toString(){return this.chunks.map(String).join("")}extend(d){if(!String(d))return;d=gs(d)?new Mn(String(d)):d;const m=this.chunks[this.chunks.length-1],x=m&&(m.stop===d.stop||d.stop==null)&&d.from===m.from+m.toString().length;if(d instanceof Mn)x?m.extend(d.toString()):this.chunks.push(d);else if(d instanceof ea){if(d.stop==null){let T;for(;d.chunks.length&&d.chunks[0].stop==null;)T=d.chunks.shift(),T.from+=d.from,this.extend(T)}d.toString()&&(d.stop=d.blockIndex,this.chunks.push(d))}}appendTo(d){if(!(d instanceof Ht.MaskedPattern))return new Mn(this.toString()).appendTo(d);const m=new Mi;for(let x=0;x<this.chunks.length&&!m.skip;++x){const T=this.chunks[x],I=d._mapPosToBlock(d.displayValue.length),P=T.stop;let R;if(P!=null&&(!I||I.index<=P)){if(T instanceof ea||d._stops.indexOf(P)>=0){const C=d._appendPlaceholder(P);m.aggregate(C)}R=T instanceof ea&&d._blocks[P]}if(R){const C=R.appendTail(T);C.skip=!1,m.aggregate(C),d._value+=C.inserted;const Z=T.toString().slice(C.rawInserted.length);Z&&m.aggregate(d.append(Z,{tail:!0}))}else m.aggregate(d.append(T.toString(),{tail:!0}))}return m}get state(){return{chunks:this.chunks.map(d=>d.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(d){const{chunks:m,...x}=d;Object.assign(this,x),this.chunks=m.map(T=>{const I="chunks"in T?new ea:new Mn;return I.state=T,I})}unshift(d){if(!this.chunks.length||d!=null&&this.from>=d)return"";const m=d!=null?d-this.from:d;let x=0;for(;x<this.chunks.length;){const T=this.chunks[x],I=T.unshift(m);if(T.toString()){if(!I)break;++x}else this.chunks.splice(x,1);if(I)return I}return""}shift(){if(!this.chunks.length)return"";let d=this.chunks.length-1;for(;0<=d;){const m=this.chunks[d],x=m.shift();if(m.toString()){if(!x)break;--d}else this.chunks.splice(d,1);if(x)return x}return""}}class oO{constructor(d,m){this.masked=d,this._log=[];const{offset:x,index:T}=d._mapPosToBlock(m)||(m<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=x,this.index=T,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(d){Object.assign(this,d)}pushState(){this._log.push(this.state)}popState(){const d=this._log.pop();return d&&(this.state=d),d}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(d){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((m=this.block)==null?void 0:m.displayValue.length)||0){var m;if(d())return this.ok=!0}return this.ok=!1}_pushRight(d){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(d())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Mt.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Mt.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Mt.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Mt.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Mt.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Mt.NONE),!0})}}class ME{constructor(d){Object.assign(this,d),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(d,m){return d===void 0&&(d=0),m===void 0&&(m=this._value.length),this._value=this._value.slice(0,d)+this._value.slice(m),this._value||(this._isRawInput=!1),new Mi}nearestInputPos(d,m){m===void 0&&(m=Mt.NONE);const x=0,T=this._value.length;switch(m){case Mt.LEFT:case Mt.FORCE_LEFT:return x;case Mt.NONE:case Mt.RIGHT:case Mt.FORCE_RIGHT:default:return T}}totalInputPositions(d,m){return d===void 0&&(d=0),m===void 0&&(m=this._value.length),this._isRawInput?m-d:0}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this._value.length),x===void 0&&(x={}),x.raw&&this._isRawInput&&this._value.slice(d,m)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(d,m){m===void 0&&(m={});const x=new Mi;if(this.isFilled)return x;const T=this.eager===!0||this.eager==="append",I=this.char===d&&(this.isUnmasking||m.input||m.raw)&&(!m.raw||!T)&&!m.tail;return I&&(x.rawInserted=this.char),this._value=x.inserted=this.char,this._isRawInput=I&&(m.raw||m.input),x}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const d=new Mi;return this.isFilled||(this._value=d.inserted=this.char),d}extractTail(){return new Mn("")}appendTail(d){return gs(d)&&(d=new Mn(String(d))),d.appendTo(this)}append(d,m,x){const T=this._appendChar(d[0],m);return x!=null&&(T.tailShift+=this.appendTail(x).tailShift),T}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(d){this._value=d._value,this._isRawInput=!!d._rawInputValue}}class Ad{constructor(d){const{parent:m,isOptional:x,placeholderChar:T,displayChar:I,lazy:P,eager:R,...C}=d;this.masked=ra(C),Object.assign(this,{parent:m,isOptional:x,placeholderChar:T,displayChar:I,lazy:P,eager:R})}reset(){this.isFilled=!1,this.masked.reset()}remove(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.value.length),d===0&&m>=1?(this.isFilled=!1,this.masked.remove(d,m)):new Mi}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(d,m){if(m===void 0&&(m={}),this.isFilled)return new Mi;const x=this.masked.state,T=this.masked._appendChar(d,this.currentMaskFlags(m));return T.inserted&&this.doValidate(m)===!1&&(T.inserted=T.rawInserted="",this.masked.state=x),!T.inserted&&!this.isOptional&&!this.lazy&&!m.input&&(T.inserted=this.placeholderChar),T.skip=!T.inserted&&!this.isOptional,this.isFilled=!!T.inserted,T}append(d,m,x){return this.masked.append(d,this.currentMaskFlags(m),x)}_appendPlaceholder(){const d=new Mi;return this.isFilled||this.isOptional||(this.isFilled=!0,d.inserted=this.placeholderChar),d}_appendEager(){return new Mi}extractTail(d,m){return this.masked.extractTail(d,m)}appendTail(d){return this.masked.appendTail(d)}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this.value.length),this.masked.extractInput(d,m,x)}nearestInputPos(d,m){m===void 0&&(m=Mt.NONE);const x=0,T=this.value.length,I=Math.min(Math.max(d,x),T);switch(m){case Mt.LEFT:case Mt.FORCE_LEFT:return this.isComplete?I:x;case Mt.RIGHT:case Mt.FORCE_RIGHT:return this.isComplete?I:T;case Mt.NONE:default:return I}}totalInputPositions(d,m){return d===void 0&&(d=0),m===void 0&&(m=this.value.length),this.value.slice(d,m).length}doValidate(d){return this.masked.doValidate(this.currentMaskFlags(d))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(d)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(d){this.masked.state=d.masked,this.isFilled=d.isFilled}currentMaskFlags(d){var m;return{...d,_beforeTailState:(d==null||(m=d._beforeTailState)==null?void 0:m.masked)||d?._beforeTailState}}}Ad.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class nO extends ro{updateOptions(d){super.updateOptions(d)}_update(d){const m=d.mask;m&&(d.validate=x=>x.search(m)>=0),super._update(d)}}Ht.MaskedRegExp=nO;class oo extends ro{constructor(d){super({...oo.DEFAULTS,...d,definitions:Object.assign({},Ad.DEFAULT_DEFINITIONS,d?.definitions)})}updateOptions(d){super.updateOptions(d)}_update(d){d.definitions=Object.assign({},this.definitions,d.definitions),super._update(d),this._rebuildMask()}_rebuildMask(){const d=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const m=this.mask;if(!m||!d)return;let x=!1,T=!1;for(let I=0;I<m.length;++I){if(this.blocks){const Z=m.slice(I),ee=Object.keys(this.blocks).filter(Te=>Z.indexOf(Te)===0);ee.sort((Te,Me)=>Me.length-Te.length);const ne=ee[0];if(ne){const{expose:Te,...Me}=Sd(this.blocks[ne]),ke=ra({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...Me,parent:this});ke&&(this._blocks.push(ke),Te&&(this.exposeBlock=ke),this._maskedBlocks[ne]||(this._maskedBlocks[ne]=[]),this._maskedBlocks[ne].push(this._blocks.length-1)),I+=ne.length-1;continue}}let P=m[I],R=P in d;if(P===oo.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(P==="{"||P==="}"){x=!x;continue}if(P==="["||P==="]"){T=!T;continue}if(P===oo.ESCAPE_CHAR){if(++I,P=m[I],!P)break;R=!1}const C=R?new Ad({isOptional:T,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Sd(d[P]),parent:this}):new ME({char:P,eager:this.eager,isUnmasking:x});this._blocks.push(C)}}get state(){return{...super.state,_blocks:this._blocks.map(d=>d.state)}}set state(d){const{_blocks:m,...x}=d;this._blocks.forEach((T,I)=>T.state=m[I]),super.state=x}reset(){super.reset(),this._blocks.forEach(d=>d.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(d=>d.isComplete)}get isFilled(){return this._blocks.every(d=>d.isFilled)}get isFixed(){return this._blocks.every(d=>d.isFixed)}get isOptional(){return this._blocks.every(d=>d.isOptional)}doCommit(){this._blocks.forEach(d=>d.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((d,m)=>d+=m.unmaskedValue,"")}set unmaskedValue(d){if(this.exposeBlock){const m=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=d,this.appendTail(m),this.doCommit()}else super.unmaskedValue=d}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((d,m)=>d+=m.value,"")}set value(d){if(this.exposeBlock){const m=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=d,this.appendTail(m),this.doCommit()}else super.value=d}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(d){if(this.exposeBlock){const m=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=d,this.appendTail(m),this.doCommit()}else super.typedValue=d}get displayValue(){return this._blocks.reduce((d,m)=>d+=m.displayValue,"")}appendTail(d){return super.appendTail(d).aggregate(this._appendPlaceholder())}_appendEager(){var d;const m=new Mi;let x=(d=this._mapPosToBlock(this.displayValue.length))==null?void 0:d.index;if(x==null)return m;this._blocks[x].isFilled&&++x;for(let T=x;T<this._blocks.length;++T){const I=this._blocks[T]._appendEager();if(!I.inserted)break;m.aggregate(I)}return m}_appendCharRaw(d,m){m===void 0&&(m={});const x=this._mapPosToBlock(this.displayValue.length),T=new Mi;if(!x)return T;for(let P=x.index;;++P){var I;const R=this._blocks[P];if(!R)break;const C=R._appendChar(d,{...m,_beforeTailState:(I=m._beforeTailState)==null||(I=I._blocks)==null?void 0:I[P]}),Z=C.skip;if(T.aggregate(C),Z||C.rawInserted)break}return T}extractTail(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length);const x=new ea;return d===m||this._forEachBlocksInRange(d,m,(T,I,P,R)=>{const C=T.extractTail(P,R);C.stop=this._findStopBefore(I),C.from=this._blockStartPos(I),C instanceof ea&&(C.blockIndex=I),x.extend(C)}),x}extractInput(d,m,x){if(d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),x===void 0&&(x={}),d===m)return"";let T="";return this._forEachBlocksInRange(d,m,(I,P,R,C)=>{T+=I.extractInput(R,C,x)}),T}_findStopBefore(d){let m;for(let x=0;x<this._stops.length;++x){const T=this._stops[x];if(T<=d)m=T;else break}return m}_appendPlaceholder(d){const m=new Mi;if(this.lazy&&d==null)return m;const x=this._mapPosToBlock(this.displayValue.length);if(!x)return m;const T=x.index,I=d??this._blocks.length;return this._blocks.slice(T,I).forEach(P=>{if(!P.lazy||d!=null){var R;const C=P._appendPlaceholder((R=P._blocks)==null?void 0:R.length);this._value+=C.inserted,m.aggregate(C)}}),m}_mapPosToBlock(d){let m="";for(let x=0;x<this._blocks.length;++x){const T=this._blocks[x],I=m.length;if(m+=T.displayValue,d<=m.length)return{index:x,offset:d-I}}}_blockStartPos(d){return this._blocks.slice(0,d).reduce((m,x)=>m+=x.displayValue.length,0)}_forEachBlocksInRange(d,m,x){m===void 0&&(m=this.displayValue.length);const T=this._mapPosToBlock(d);if(T){const I=this._mapPosToBlock(m),P=I&&T.index===I.index,R=T.offset,C=I&&P?I.offset:this._blocks[T.index].displayValue.length;if(x(this._blocks[T.index],T.index,R,C),I&&!P){for(let Z=T.index+1;Z<I.index;++Z)x(this._blocks[Z],Z,0,this._blocks[Z].displayValue.length);x(this._blocks[I.index],I.index,0,I.offset)}}}remove(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length);const x=super.remove(d,m);return this._forEachBlocksInRange(d,m,(T,I,P,R)=>{x.aggregate(T.remove(P,R))}),x}nearestInputPos(d,m){if(m===void 0&&(m=Mt.NONE),!this._blocks.length)return 0;const x=new oO(this,d);if(m===Mt.NONE)return x.pushRightBeforeInput()||(x.popState(),x.pushLeftBeforeInput())?x.pos:this.displayValue.length;if(m===Mt.LEFT||m===Mt.FORCE_LEFT){if(m===Mt.LEFT){if(x.pushRightBeforeFilled(),x.ok&&x.pos===d)return d;x.popState()}if(x.pushLeftBeforeInput(),x.pushLeftBeforeRequired(),x.pushLeftBeforeFilled(),m===Mt.LEFT){if(x.pushRightBeforeInput(),x.pushRightBeforeRequired(),x.ok&&x.pos<=d||(x.popState(),x.ok&&x.pos<=d))return x.pos;x.popState()}return x.ok?x.pos:m===Mt.FORCE_LEFT?0:(x.popState(),x.ok||(x.popState(),x.ok)?x.pos:0)}return m===Mt.RIGHT||m===Mt.FORCE_RIGHT?(x.pushRightBeforeInput(),x.pushRightBeforeRequired(),x.pushRightBeforeFilled()?x.pos:m===Mt.FORCE_RIGHT?this.displayValue.length:(x.popState(),x.ok||(x.popState(),x.ok)?x.pos:this.nearestInputPos(d,Mt.LEFT))):d}totalInputPositions(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length);let x=0;return this._forEachBlocksInRange(d,m,(T,I,P,R)=>{x+=T.totalInputPositions(P,R)}),x}maskedBlock(d){return this.maskedBlocks(d)[0]}maskedBlocks(d){const m=this._maskedBlocks[d];return m?m.map(x=>this._blocks[x]):[]}}oo.DEFAULTS={lazy:!0,placeholderChar:"_"};oo.STOP_CHAR="`";oo.ESCAPE_CHAR="\\";oo.InputDefinition=Ad;oo.FixedDefinition=ME;Ht.MaskedPattern=oo;class dd extends oo{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(d){super(d)}updateOptions(d){super.updateOptions(d)}_update(d){const{to:m=this.to||0,from:x=this.from||0,maxLength:T=this.maxLength||0,autofix:I=this.autofix,...P}=d;this.to=m,this.from=x,this.maxLength=Math.max(String(m).length,T),this.autofix=I;const R=String(this.from).padStart(this.maxLength,"0"),C=String(this.to).padStart(this.maxLength,"0");let Z=0;for(;Z<C.length&&C[Z]===R[Z];)++Z;P.mask=C.slice(0,Z).replace(/0/g,"\\0")+"0".repeat(this.maxLength-Z),super._update(P)}get isComplete(){return super.isComplete&&!!this.value}boundaries(d){let m="",x="";const[,T,I]=d.match(/^(\D*)(\d*)(\D*)/)||[];return I&&(m="0".repeat(T.length)+I,x="9".repeat(T.length)+I),m=m.padEnd(this.maxLength,"0"),x=x.padEnd(this.maxLength,"9"),[m,x]}doPrepareChar(d,m){m===void 0&&(m={});let x;if([d,x]=super.doPrepareChar(d.replace(/\D/g,""),m),!this.autofix||!d)return[d,x];const T=String(this.from).padStart(this.maxLength,"0"),I=String(this.to).padStart(this.maxLength,"0"),P=this.value+d;if(P.length>this.maxLength)return["",x];const[R,C]=this.boundaries(P);return Number(C)<this.from?[T[P.length-1],x]:Number(R)>this.to?this.autofix==="pad"&&P.length<this.maxLength?["",x.aggregate(this.append(T[P.length-1]+d,m))]:[I[P.length-1],x]:[d,x]}doValidate(d){const m=this.value;if(m.search(/[^0]/)===-1&&m.length<=this._matchFrom)return!0;const[x,T]=this.boundaries(m);return this.from<=Number(T)&&Number(x)<=this.to&&super.doValidate(d)}}Ht.MaskedRange=dd;class ta extends oo{constructor(d){const{mask:m,pattern:x,...T}={...ta.DEFAULTS,...d};super({...T,mask:gs(m)?m:x})}updateOptions(d){super.updateOptions(d)}_update(d){const{mask:m,pattern:x,blocks:T,...I}={...ta.DEFAULTS,...d},P=Object.assign({},ta.GET_DEFAULT_BLOCKS());d.min&&(P.Y.from=d.min.getFullYear()),d.max&&(P.Y.to=d.max.getFullYear()),d.min&&d.max&&P.Y.from===P.Y.to&&(P.m.from=d.min.getMonth()+1,P.m.to=d.max.getMonth()+1,P.m.from===P.m.to&&(P.d.from=d.min.getDate(),P.d.to=d.max.getDate())),Object.assign(P,this.blocks,T),Object.keys(P).forEach(R=>{const C=P[R];!("autofix"in C)&&"autofix"in d&&(C.autofix=d.autofix)}),super._update({...I,mask:gs(m)?m:x,blocks:P})}doValidate(d){const m=this.date;return super.doValidate(d)&&(!this.isComplete||this.isDateExist(this.value)&&m!=null&&(this.min==null||this.min<=m)&&(this.max==null||m<=this.max))}isDateExist(d){return this.format(this.parse(d,this),this).indexOf(d)>=0}get date(){return this.typedValue}set date(d){this.typedValue=d}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(d){super.typedValue=d}maskEquals(d){return d===Date||super.maskEquals(d)}}ta.GET_DEFAULT_BLOCKS=()=>({d:{mask:dd,from:1,to:31,maxLength:2},m:{mask:dd,from:1,to:12,maxLength:2},Y:{mask:dd,from:1900,to:9999}});ta.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(h,d)=>{if(!h)return"";const m=String(h.getDate()).padStart(2,"0"),x=String(h.getMonth()+1).padStart(2,"0"),T=h.getFullYear();return[m,x,T].join(".")},parse:(h,d)=>{const[m,x,T]=h.split(".").map(Number);return new Date(T,x-1,m)}};Ht.MaskedDate=ta;class Lc extends ro{constructor(d){super({...Lc.DEFAULTS,...d}),this.currentMask=void 0}updateOptions(d){super.updateOptions(d)}_update(d){super._update(d),"mask"in d&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(d.mask)?d.mask.map(m=>{const{expose:x,...T}=Sd(m),I=ra({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...T});return x&&(this.exposeMask=I),I}):[])}_appendCharRaw(d,m){m===void 0&&(m={});const x=this._applyDispatch(d,m);return this.currentMask&&x.aggregate(this.currentMask._appendChar(d,this.currentMaskFlags(m))),x}_applyDispatch(d,m,x){d===void 0&&(d=""),m===void 0&&(m={}),x===void 0&&(x="");const T=m.tail&&m._beforeTailState!=null?m._beforeTailState._value:this.value,I=this.rawInputValue,P=m.tail&&m._beforeTailState!=null?m._beforeTailState._rawInputValue:I,R=I.slice(P.length),C=this.currentMask,Z=new Mi,ee=C?.state;if(this.currentMask=this.doDispatch(d,{...m},x),this.currentMask)if(this.currentMask!==C){if(this.currentMask.reset(),P){const ne=this.currentMask.append(P,{raw:!0});Z.tailShift=ne.inserted.length-T.length}R&&(Z.tailShift+=this.currentMask.append(R,{raw:!0,tail:!0}).tailShift)}else ee&&(this.currentMask.state=ee);return Z}_appendPlaceholder(){const d=this._applyDispatch();return this.currentMask&&d.aggregate(this.currentMask._appendPlaceholder()),d}_appendEager(){const d=this._applyDispatch();return this.currentMask&&d.aggregate(this.currentMask._appendEager()),d}appendTail(d){const m=new Mi;return d&&m.aggregate(this._applyDispatch("",{},d)),m.aggregate(this.currentMask?this.currentMask.appendTail(d):super.appendTail(d))}currentMaskFlags(d){var m,x;return{...d,_beforeTailState:((m=d._beforeTailState)==null?void 0:m.currentMaskRef)===this.currentMask&&((x=d._beforeTailState)==null?void 0:x.currentMask)||d._beforeTailState}}doDispatch(d,m,x){return m===void 0&&(m={}),x===void 0&&(x=""),this.dispatch(d,this,m,x)}doValidate(d){return super.doValidate(d)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(d)))}doPrepare(d,m){m===void 0&&(m={});let[x,T]=super.doPrepare(d,m);if(this.currentMask){let I;[x,I]=super.doPrepare(x,this.currentMaskFlags(m)),T=T.aggregate(I)}return[x,T]}doPrepareChar(d,m){m===void 0&&(m={});let[x,T]=super.doPrepareChar(d,m);if(this.currentMask){let I;[x,I]=super.doPrepareChar(x,this.currentMaskFlags(m)),T=T.aggregate(I)}return[x,T]}reset(){var d;(d=this.currentMask)==null||d.reset(),this.compiledMasks.forEach(m=>m.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(d){this.exposeMask?(this.exposeMask.value=d,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=d}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(d){this.exposeMask?(this.exposeMask.unmaskedValue=d,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=d}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(d){if(this.exposeMask){this.exposeMask.typedValue=d,this.currentMask=this.exposeMask,this._applyDispatch();return}let m=String(d);this.currentMask&&(this.currentMask.typedValue=d,m=this.currentMask.unmaskedValue),this.unmaskedValue=m}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var d;return!!((d=this.currentMask)!=null&&d.isComplete)}get isFilled(){var d;return!!((d=this.currentMask)!=null&&d.isFilled)}remove(d,m){const x=new Mi;return this.currentMask&&x.aggregate(this.currentMask.remove(d,m)).aggregate(this._applyDispatch()),x}get state(){var d;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(m=>m.state),currentMaskRef:this.currentMask,currentMask:(d=this.currentMask)==null?void 0:d.state}}set state(d){const{compiledMasks:m,currentMaskRef:x,currentMask:T,...I}=d;m&&this.compiledMasks.forEach((P,R)=>P.state=m[R]),x!=null&&(this.currentMask=x,this.currentMask.state=T),super.state=I}extractInput(d,m,x){return this.currentMask?this.currentMask.extractInput(d,m,x):""}extractTail(d,m){return this.currentMask?this.currentMask.extractTail(d,m):super.extractTail(d,m)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(d,m){return this.currentMask?this.currentMask.nearestInputPos(d,m):super.nearestInputPos(d,m)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(d){this._overwrite=d}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(d){this._eager=d}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(d){this._skipInvalid=d}maskEquals(d){return Array.isArray(d)?this.compiledMasks.every((m,x)=>{if(!d[x])return;const{mask:T,...I}=d[x];return Ed(m,I)&&m.maskEquals(T)}):super.maskEquals(d)}typedValueEquals(d){var m;return!!((m=this.currentMask)!=null&&m.typedValueEquals(d))}}Lc.DEFAULTS=void 0;Lc.DEFAULTS={dispatch:(h,d,m,x)=>{if(!d.compiledMasks.length)return;const T=d.rawInputValue,I=d.compiledMasks.map((P,R)=>{const C=d.currentMask===P,Z=C?P.displayValue.length:P.nearestInputPos(P.displayValue.length,Mt.FORCE_LEFT);return P.rawInputValue!==T?(P.reset(),P.append(T,{raw:!0})):C||P.remove(Z),P.append(h,d.currentMaskFlags(m)),P.appendTail(x),{index:R,weight:P.rawInputValue.length,totalInputPositions:P.totalInputPositions(0,Math.max(Z,P.nearestInputPos(P.displayValue.length,Mt.FORCE_LEFT)))}});return I.sort((P,R)=>R.weight-P.weight||R.totalInputPositions-P.totalInputPositions),d.compiledMasks[I[0].index]}};Ht.MaskedDynamic=Lc;class sO extends oo{constructor(d){super(d)}updateOptions(d){super.updateOptions(d)}_update(d){const{enum:m,...x}=d;if(m){const T=m.map(R=>R.length),I=Math.min(...T),P=Math.max(...T)-I;x.mask="*".repeat(I),P&&(x.mask+="["+"*".repeat(P)+"]"),this.enum=m}super._update(x)}doValidate(d){return this.enum.some(m=>m.indexOf(this.unmaskedValue)===0)&&super.doValidate(d)}}Ht.MaskedEnum=sO;class aO extends ro{updateOptions(d){super.updateOptions(d)}_update(d){super._update({...d,validate:d.mask})}}Ht.MaskedFunction=aO;class vo extends ro{constructor(d){super({...vo.DEFAULTS,...d})}updateOptions(d){super.updateOptions(d)}_update(d){super._update(d),this._updateRegExps()}_updateRegExps(){const d="^"+(this.allowNegative?"[+|\\-]?":""),m="\\d*",x=(this.scale?"("+O_(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(d+m+x),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(O_).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(O_(this.thousandsSeparator),"g")}_removeThousandsSeparators(d){return d.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(d){const m=d.split(this.radix);return m[0]=m[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),m.join(this.radix)}doPrepareChar(d,m){m===void 0&&(m={});const[x,T]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(m.input&&m.raw||!m.input&&!m.raw)?d.replace(this._mapToRadixRegExp,this.radix):d),m);return d&&!x&&(T.skip=!0),x&&!this.allowPositive&&!this.value&&x!=="-"&&T.aggregate(this._appendChar("-")),[x,T]}_separatorsCount(d,m){m===void 0&&(m=!1);let x=0;for(let T=0;T<d;++T)this._value.indexOf(this.thousandsSeparator,T)===T&&(++x,m&&(d+=this.thousandsSeparator.length));return x}_separatorsCountFromSlice(d){return d===void 0&&(d=this._value),this._separatorsCount(this._removeThousandsSeparators(d).length,!0)}extractInput(d,m,x){return d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),[d,m]=this._adjustRangeWithSeparators(d,m),this._removeThousandsSeparators(super.extractInput(d,m,x))}_appendCharRaw(d,m){if(m===void 0&&(m={}),!this.thousandsSeparator)return super._appendCharRaw(d,m);const x=m.tail&&m._beforeTailState?m._beforeTailState._value:this._value,T=this._separatorsCountFromSlice(x);this._value=this._removeThousandsSeparators(this.value);const I=super._appendCharRaw(d,m);this._value=this._insertThousandsSeparators(this._value);const P=m.tail&&m._beforeTailState?m._beforeTailState._value:this._value,R=this._separatorsCountFromSlice(P);return I.tailShift+=(R-T)*this.thousandsSeparator.length,I.skip=!I.rawInserted&&d===this.thousandsSeparator,I}_findSeparatorAround(d){if(this.thousandsSeparator){const m=d-this.thousandsSeparator.length+1,x=this.value.indexOf(this.thousandsSeparator,m);if(x<=d)return x}return-1}_adjustRangeWithSeparators(d,m){const x=this._findSeparatorAround(d);x>=0&&(d=x);const T=this._findSeparatorAround(m);return T>=0&&(m=T+this.thousandsSeparator.length),[d,m]}remove(d,m){d===void 0&&(d=0),m===void 0&&(m=this.displayValue.length),[d,m]=this._adjustRangeWithSeparators(d,m);const x=this.value.slice(0,d),T=this.value.slice(m),I=this._separatorsCount(x.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(x+T));const P=this._separatorsCountFromSlice(x);return new Mi({tailShift:(P-I)*this.thousandsSeparator.length})}nearestInputPos(d,m){if(!this.thousandsSeparator)return d;switch(m){case Mt.NONE:case Mt.LEFT:case Mt.FORCE_LEFT:{const x=this._findSeparatorAround(d-1);if(x>=0){const T=x+this.thousandsSeparator.length;if(d<T||this.value.length<=T||m===Mt.FORCE_LEFT)return x}break}case Mt.RIGHT:case Mt.FORCE_RIGHT:{const x=this._findSeparatorAround(d);if(x>=0)return x+this.thousandsSeparator.length}}return d}doValidate(d){let m=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(m){const x=this.number;m=m&&!isNaN(x)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return m&&super.doValidate(d)}doCommit(){if(this.value){const d=this.number;let m=d;this.min!=null&&(m=Math.max(m,this.min)),this.max!=null&&(m=Math.min(m,this.max)),m!==d&&(this.unmaskedValue=this.format(m,this));let x=this.value;this.normalizeZeros&&(x=this._normalizeZeros(x)),this.padFractionalZeros&&this.scale>0&&(x=this._padFractionalZeros(x)),this._value=x}super.doCommit()}_normalizeZeros(d){const m=this._removeThousandsSeparators(d).split(this.radix);return m[0]=m[0].replace(/^(\D*)(0*)(\d*)/,(x,T,I,P)=>T+P),d.length&&!/\d$/.test(m[0])&&(m[0]=m[0]+"0"),m.length>1&&(m[1]=m[1].replace(/0*$/,""),m[1].length||(m.length=1)),this._insertThousandsSeparators(m.join(this.radix))}_padFractionalZeros(d){if(!d)return d;const m=d.split(this.radix);return m.length<2&&m.push(""),m[1]=m[1].padEnd(this.scale,"0"),m.join(this.radix)}doSkipInvalid(d,m,x){m===void 0&&(m={});const T=this.scale===0&&d!==this.thousandsSeparator&&(d===this.radix||d===vo.UNMASKED_RADIX||this.mapToRadix.includes(d));return super.doSkipInvalid(d,m,x)&&!T}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,vo.UNMASKED_RADIX)}set unmaskedValue(d){super.unmaskedValue=d}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(d){this.rawInputValue=this.format(d,this).replace(vo.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(d){this.typedValue=d}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(d){return(super.typedValueEquals(d)||vo.EMPTY_VALUES.includes(d)&&vo.EMPTY_VALUES.includes(this.typedValue))&&!(d===0&&this.value==="")}}vo.UNMASKED_RADIX=".";vo.EMPTY_VALUES=[...ro.EMPTY_VALUES,0];vo.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[vo.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:h=>h.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};Ht.MaskedNumber=vo;const rg={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function IE(h,d,m){d===void 0&&(d=rg.MASKED),m===void 0&&(m=rg.MASKED);const x=ra(h);return T=>x.runIsolated(I=>(I[d]=T,I[m]))}function lO(h,d,m,x){return IE(d,m,x)(h)}Ht.PIPE_TYPE=rg;Ht.createPipe=IE;Ht.pipe=lO;try{globalThis.IMask=Ht}catch{}function sT(h){return Math.max(0,Math.min(1,h))}function CE(h,d){const{left:m,top:x,width:T,height:I}=d.getBoundingClientRect(),P={x:h.x-m,y:h.y-x},R={x:sT(P.x/T),y:sT(P.y/I)};function C(Z={}){const{dir:ee="ltr",orientation:ne="horizontal",inverted:Te}=Z,Me=typeof Te=="object"?Te.x:Te,ke=typeof Te=="object"?Te.y:Te;return ne==="horizontal"?ee==="rtl"||Me?1-R.x:R.x:ke?1-R.y:R.y}return{offset:P,percent:R,getPercentValue:C}}function cO(h,d,m){return Math.round((h-d)/m)*m+d}function uO(h,d,m){return Math.min(Math.max(h,d),m)}function hO(h,d,m){return(h-d)/(m-d)}function kE(h,d,m,x){const T=h*(m-d)+d,I=cO(T,d,x);return uO(I,d,m)}function og(h,d){const m={min:h[0],max:h[1]},x={min:d[0],max:d[1]};return function(T){if(m.min===m.max||x.min===x.max)return x.min;const I=(x.max-x.min)/(m.max-m.min);return x.min+I*(T-m.min)}}var dO=_s("slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");dO.build();function pO(h){const{height:d=0}=h.thumbSize??{},m=og([h.min,h.max],[-d/2,d/2]);return parseFloat(m(h.value).toFixed(2))}function fO(h){const{width:d=0}=h.thumbSize??{};if(h.isRtl){const x=og([h.max,h.min],[-d/2,d/2]);return-1*parseFloat(x(h.value).toFixed(2))}const m=og([h.min,h.max],[-d/2,d/2]);return parseFloat(m(h.value).toFixed(2))}function mO(h,d){if(h.thumbAlignment==="center")return`${d}%`;const m=h.isVertical?pO(h):fO(h);return`calc(${d}% - ${m}px)`}function Tg(h){let d=hO(h.value,h.min,h.max)*100;return mO(h,d)}function PE(h){let d="visible";return h.thumbAlignment==="contain"&&!h.hasMeasuredThumbSize&&(d="hidden"),d}function _O(h){const d=h.isVertical?"bottom":"insetInlineStart";return{visibility:PE(h),position:"absolute",transform:"var(--slider-thumb-transform)",[d]:"var(--slider-thumb-offset)"}}function gO(h){let d="0%",m=`${100-h.valuePercent}%`;if(h.origin==="center"){const x=h.valuePercent<50;d=x?`${h.valuePercent}%`:"50%",m=x?"50%":m}return{start:d,end:m}}function yO(h){return h.isVertical?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[h.isRtl?"right":"left"]:"var(--slider-range-start)",[h.isRtl?"left":"right"]:"var(--slider-range-end)"}}function vO(){return{touchAction:"none",userSelect:"none",position:"relative"}}function xO(h){const d=gO(h);return{"--slider-thumb-transform":h.isVertical?"translateY(50%)":h.isRtl?"translateX(50%)":"translateX(-50%)","--slider-thumb-offset":Tg(h),"--slider-range-start":d.start,"--slider-range-end":d.end}}function bO(h,d){return{visibility:PE(h),position:"absolute",pointerEvents:"none",[h.isHorizontal?"insetInlineStart":"bottom"]:Tg({...h,value:d}),translate:"var(--tx) var(--ty)","--tx":h.isHorizontal?h.isRtl?"50%":"-50%":"0%","--ty":h.isHorizontal?"0%":"50%"}}function wO(){return{userSelect:"none"}}function TO(){return{position:"relative"}}function EO(){return{userSelect:"none",pointerEvents:"none",position:"relative"}}var SO={getThumbOffset:Tg,getControlStyle:vO,getThumbStyle:_O,getRangeStyle:yO,getRootStyle:xO,getMarkerStyle:bO,getLabelStyle:wO,getTrackStyle:TO,getMarkerGroupStyle:EO},Ir=Rc({...SO,getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`slider:${h.id}`},getThumbId:h=>{var d;return((d=h.ids)==null?void 0:d.thumb)??`slider:${h.id}:thumb`},getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`slider:${h.id}:control`},getHiddenInputId:h=>{var d;return((d=h.ids)==null?void 0:d.hiddenInput)??`slider:${h.id}:input`},getOutputId:h=>{var d;return((d=h.ids)==null?void 0:d.output)??`slider:${h.id}:output`},getTrackId:h=>{var d;return((d=h.ids)==null?void 0:d.track)??`slider:${h.id}track`},getRangeId:h=>{var d;return((d=h.ids)==null?void 0:d.track)??`slider:${h.id}:range`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`slider:${h.id}:label`},getMarkerId:(h,d)=>`slider:${h.id}:marker:${d}`,getRootEl:h=>Ir.getById(h,Ir.getRootId(h)),getThumbEl:h=>Ir.getById(h,Ir.getThumbId(h)),getControlEl:h=>Ir.getById(h,Ir.getControlId(h)),getHiddenInputEl:h=>Ir.getById(h,Ir.getHiddenInputId(h)),getValueFromPoint(h,d){const m=Ir.getControlEl(h);if(!m)return;const x=CE(d,m).getPercentValue({orientation:h.orientation,dir:h.dir,inverted:{y:!0}});return kE(x,h.min,h.max,h.step)},dispatchChangeEvent(h){const d=Ir.getHiddenInputEl(h);d&&TE(d,{value:h.value})}}),AO=_s("range-slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");AO.build();function MO(h){const d=h[0],m=h[h.length-1];return[d,m]}function IO(h){const[d,m]=MO(h.valuePercent);return{start:`${d}%`,end:`${100-m}%`}}function CO(h){let d="visible";return h.thumbAlignment==="contain"&&!h.hasMeasuredThumbSize&&(d="hidden"),d}function kO(h,d){const m=h.isVertical?"bottom":"insetInlineStart";return{visibility:CO(h),position:"absolute",transform:"var(--slider-thumb-transform)",[m]:`var(--slider-thumb-offset-${d})`}}function PO(h){const d=IO(h);return{...h.value.reduce((m,x,T)=>{const I=Ir.getThumbOffset({...h,value:x});return{...m,[`--slider-thumb-offset-${T}`]:I}},{}),"--slider-thumb-transform":h.isVertical?"translateY(50%)":h.isRtl?"translateX(50%)":"translateX(-50%)","--slider-range-start":d.start,"--slider-range-end":d.end}}var DO={getRootStyle:PO,getControlStyle:Ir.getControlStyle,getThumbStyle:kO,getRangeStyle:Ir.getRangeStyle,getMarkerStyle:Ir.getMarkerStyle,getMarkerGroupStyle:Ir.getMarkerGroupStyle},$r=Rc({...DO,getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`slider:${h.id}`},getThumbId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.thumb)==null?void 0:x.call(m,d))??`slider:${h.id}:thumb:${d}`},getHiddenInputId:(h,d)=>`slider:${h.id}:input:${d}`,getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`slider:${h.id}:control`},getTrackId:h=>{var d;return((d=h.ids)==null?void 0:d.track)??`slider:${h.id}:track`},getRangeId:h=>{var d;return((d=h.ids)==null?void 0:d.range)??`slider:${h.id}:range`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`slider:${h.id}:label`},getOutputId:h=>{var d;return((d=h.ids)==null?void 0:d.output)??`slider:${h.id}:output`},getMarkerId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.marker)==null?void 0:x.call(m,d))??`slider:${h.id}:marker:${d}`},getRootEl:h=>$r.getById(h,$r.getRootId(h)),getThumbEl:(h,d)=>$r.getById(h,$r.getThumbId(h,d)),getHiddenInputEl:(h,d)=>$r.getById(h,$r.getHiddenInputId(h,d)),getControlEl:h=>$r.getById(h,$r.getControlId(h)),getElements:h=>bE($r.getControlEl(h),"[role=slider]"),getFirstEl:h=>$r.getElements(h)[0],getRangeEl:h=>$r.getById(h,$r.getRangeId(h)),getValueFromPoint(h,d){const m=$r.getControlEl(h);if(!m)return;const x=CE(d,m).getPercentValue({orientation:h.orientation,dir:h.dir,inverted:{y:!0}});return kE(x,h.min,h.max,h.step)},dispatchChangeEvent(h){Array.from(h.value).forEach((d,m)=>{const x=$r.getHiddenInputEl(h,m);x&&TE(x,{value:d})})}}),zO=_s("radio-group").parts("root","label","radio","radioLabel","radioControl","indicator");zO.build();var yr=Rc({getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`radio-group:${h.id}`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`radio-group:${h.id}:label`},getRadioId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radio)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:${d}`},getRadioHiddenInputId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radioHiddenInput)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:input:${d}`},getRadioControlId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radioControl)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:control:${d}`},getRadioLabelId:(h,d)=>{var m,x;return((x=(m=h.ids)==null?void 0:m.radioLabel)==null?void 0:x.call(m,d))??`radio-group:${h.id}:radio:label:${d}`},getIndicatorId:h=>{var d;return((d=h.ids)==null?void 0:d.indicator)??`radio-group:${h.id}:indicator`},getRootEl:h=>yr.getById(h,yr.getRootId(h)),getRadioHiddenInputEl:(h,d)=>yr.getById(h,yr.getRadioHiddenInputId(h,d)),getIndicatorEl:h=>yr.getById(h,yr.getIndicatorId(h)),getFirstEnabledInputEl:h=>{var d;return(d=yr.getRootEl(h))==null?void 0:d.querySelector("input:not(:disabled)")},getFirstEnabledAndCheckedInputEl:h=>{var d;return(d=yr.getRootEl(h))==null?void 0:d.querySelector("input:not(:disabled):checked")},getInputEls:h=>{const d=`input[type=radio][data-ownedby='${CSS.escape(yr.getRootId(h))}']:not([disabled])`;return bE(yr.getRootEl(h),d)},getActiveRadioEl:h=>{if(h.value)return yr.getById(h,yr.getRadioId(h,h.value))},getOffsetRect:h=>({left:h?.offsetLeft??0,top:h?.offsetTop??0,width:h?.offsetWidth??0,height:h?.offsetHeight??0}),getRectById:(h,d)=>{const m=yr.getById(h,yr.getRadioId(h,d));if(m)return yr.resolveRect(yr.getOffsetRect(m))},resolveRect:h=>({width:`${h.width}px`,height:`${h.height}px`,left:`${h.left}px`,top:`${h.top}px`})});const RO=Dn({__name:"Flex",props:{is:{type:[Object,Function],default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(h){const d=h,m=Hr(()=>OL("flex",{justify:rT(d.justify)||"initial",align:rT(d.align)||"initial",wrap:d.nowrap?"nowrap":"wrap",gap:LL(d.gap),direction:d.direction}));return(x,T)=>(ur(),In(xT(x.is),{class:"k-flex",style:Dd(m.value)},{default:vd(()=>[fs(x.$slots,"default")]),_:3},8,["style"]))}});var LO=_s("dialog").parts("trigger","backdrop","container","content","title","description","closeTrigger");LO.build();var Ko=Rc({getContainerId:h=>{var d;return((d=h.ids)==null?void 0:d.container)??`dialog:${h.id}:container`},getBackdropId:h=>{var d;return((d=h.ids)==null?void 0:d.backdrop)??`dialog:${h.id}:backdrop`},getContentId:h=>{var d;return((d=h.ids)==null?void 0:d.content)??`dialog:${h.id}:content`},getTriggerId:h=>{var d;return((d=h.ids)==null?void 0:d.trigger)??`dialog:${h.id}:trigger`},getTitleId:h=>{var d;return((d=h.ids)==null?void 0:d.title)??`dialog:${h.id}:title`},getDescriptionId:h=>{var d;return((d=h.ids)==null?void 0:d.description)??`dialog:${h.id}:description`},getCloseTriggerId:h=>{var d;return((d=h.ids)==null?void 0:d.closeTrigger)??`dialog:${h.id}:close`},getContentEl:h=>Ko.getById(h,Ko.getContentId(h)),getTriggerEl:h=>Ko.getById(h,Ko.getTriggerId(h)),getContainerEl:h=>Ko.getById(h,Ko.getContainerId(h)),getTitleEl:h=>Ko.getById(h,Ko.getTitleId(h)),getDescriptionEl:h=>Ko.getById(h,Ko.getDescriptionId(h))});M2({title:{},description:{},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},type:{default:"info"}},{open:{type:Boolean,default:!1}}),M2(["cancel","confirm"],["update:open"]);function Fd(){this._types=Object.create(null),this._extensions=Object.create(null);for(let h=0;h<arguments.length;h++)this.define(arguments[h]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Fd.prototype.define=function(h,d){for(let m in h){let x=h[m].map(function(T){return T.toLowerCase()});m=m.toLowerCase();for(let T=0;T<x.length;T++){const I=x[T];if(I[0]!=="*"){if(!d&&I in this._types)throw new Error('Attempt to change mapping for "'+I+'" extension from "'+this._types[I]+'" to "'+m+'". Pass `force=true` to allow this, otherwise remove "'+I+'" from the list of extensions for "'+m+'".');this._types[I]=m}}if(d||!this._extensions[m]){const T=x[0];this._extensions[m]=T[0]!=="*"?T:T.substr(1)}}};Fd.prototype.getType=function(h){h=String(h);let d=h.replace(/^.*[/\\]/,"").toLowerCase(),m=d.replace(/^.*\./,"").toLowerCase(),x=d.length<h.length;return(m.length<d.length-1||!x)&&this._types[m]||null};Fd.prototype.getExtension=function(h){return h=/^\s*([^;\s]*)/.test(h)&&RegExp.$1,h&&this._extensions[h.toLowerCase()]||null};var OO=Fd,BO={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let FO=OO;new FO(BO);const NO=Dn({__name:"CreateTrigger",props:{label:{}},setup(h){return(d,m)=>(ur(),In(bg,{type:"button",class:"k-media-image-create-trigger",label:d.label,iconRight:"fa6-solid:image"},null,8,["label"]))}}),jO=Dn({__name:"Thumbnail",props:{value:{}},setup(h){const d=h,m=Hr(()=>({backgroundImage:`url(${d.value.url})`}));return(x,T)=>(ur(),Cn("div",{class:"k-media-image__thumbnail",style:Dd(m.value),onClick:T[0]||(T[0]=I=>x.$emit("click"))},null,4))}}),VO=Dn({__name:"Preview",props:{value:{},size:{}},setup(h){const d=h,m=Hr(()=>({padding:d.size==="cover"?"0":"1rem",backgroundSize:d.size,backgroundImage:`url(${d.value.url})`}));return(x,T)=>(ur(),Cn("div",{class:"k-media-image-preview",style:Dd(m.value)},null,4))}});M_(NO),M_(jO),M_(VO);/**!
2031
2031
  * Sortable 1.14.0
2032
2032
  * @author RubaXa <trash@rubaxa.org>
2033
2033
  * @author owenm <owen23355@gmail.com>
2034
2034
  * @license MIT
2035
- */function aT(h,d){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(h);d&&(x=x.filter(function(T){return Object.getOwnPropertyDescriptor(h,T).enumerable})),m.push.apply(m,x)}return m}function rn(h){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?aT(Object(m),!0).forEach(function(x){UO(h,x,m[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):aT(Object(m)).forEach(function(x){Object.defineProperty(h,x,Object.getOwnPropertyDescriptor(m,x))})}return h}function pd(h){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pd=function(d){return typeof d}:pd=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},pd(h)}function UO(h,d,m){return d in h?Object.defineProperty(h,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[d]=m,h}function Pn(){return Pn=Object.assign||function(h){for(var d=1;d<arguments.length;d++){var m=arguments[d];for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(h[x]=m[x])}return h},Pn.apply(this,arguments)}function qO(h,d){if(h==null)return{};var m={},x=Object.keys(h),T,I;for(I=0;I<x.length;I++)T=x[I],!(d.indexOf(T)>=0)&&(m[T]=h[T]);return m}function GO(h,d){if(h==null)return{};var m=qO(h,d),x,T;if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(h);for(T=0;T<I.length;T++)x=I[T],!(d.indexOf(x)>=0)&&Object.prototype.propertyIsEnumerable.call(h,x)&&(m[x]=h[x])}return m}var $O="1.14.0";function kn(h){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(h)}var zn=kn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Oc=kn(/Edge/i),lT=kn(/firefox/i),Ac=kn(/safari/i)&&!kn(/chrome/i)&&!kn(/android/i),DE=kn(/iP(ad|od|hone)/i),WO=kn(/chrome/i)&&kn(/android/i),zE={capture:!1,passive:!1};function _i(h,d,m){h.addEventListener(d,m,!zn&&zE)}function ci(h,d,m){h.removeEventListener(d,m,!zn&&zE)}function Md(h,d){if(d){if(d[0]===">"&&(d=d.substring(1)),h)try{if(h.matches)return h.matches(d);if(h.msMatchesSelector)return h.msMatchesSelector(d);if(h.webkitMatchesSelector)return h.webkitMatchesSelector(d)}catch{return!1}return!1}}function HO(h){return h.host&&h!==document&&h.host.nodeType?h.host:h.parentNode}function Jo(h,d,m,x){if(h){m=m||document;do{if(d!=null&&(d[0]===">"?h.parentNode===m&&Md(h,d):Md(h,d))||x&&h===m)return h;if(h===m)break}while(h=HO(h))}return null}var cT=/\s+/g;function eo(h,d,m){if(h&&d)if(h.classList)h.classList[m?"add":"remove"](d);else{var x=(" "+h.className+" ").replace(cT," ").replace(" "+d+" "," ");h.className=(x+(m?" "+d:"")).replace(cT," ")}}function Rt(h,d,m){var x=h&&h.style;if(x){if(m===void 0)return document.defaultView&&document.defaultView.getComputedStyle?m=document.defaultView.getComputedStyle(h,""):h.currentStyle&&(m=h.currentStyle),d===void 0?m:m[d];!(d in x)&&d.indexOf("webkit")===-1&&(d="-webkit-"+d),x[d]=m+(typeof m=="string"?"":"px")}}function ul(h,d){var m="";if(typeof h=="string")m=h;else do{var x=Rt(h,"transform");x&&x!=="none"&&(m=x+" "+m)}while(!d&&(h=h.parentNode));var T=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return T&&new T(m)}function RE(h,d,m){if(h){var x=h.getElementsByTagName(d),T=0,I=x.length;if(m)for(;T<I;T++)m(x[T],T);return x}return[]}function tn(){var h=document.scrollingElement;return h||document.documentElement}function cr(h,d,m,x,T){if(!(!h.getBoundingClientRect&&h!==window)){var I,P,R,C,Z,ee,ne;if(h!==window&&h.parentNode&&h!==tn()?(I=h.getBoundingClientRect(),P=I.top,R=I.left,C=I.bottom,Z=I.right,ee=I.height,ne=I.width):(P=0,R=0,C=window.innerHeight,Z=window.innerWidth,ee=window.innerHeight,ne=window.innerWidth),(d||m)&&h!==window&&(T=T||h.parentNode,!zn))do if(T&&T.getBoundingClientRect&&(Rt(T,"transform")!=="none"||m&&Rt(T,"position")!=="static")){var Te=T.getBoundingClientRect();P-=Te.top+parseInt(Rt(T,"border-top-width")),R-=Te.left+parseInt(Rt(T,"border-left-width")),C=P+I.height,Z=R+I.width;break}while(T=T.parentNode);if(x&&h!==window){var Me=ul(T||h),ke=Me&&Me.a,ve=Me&&Me.d;Me&&(P/=ve,R/=ke,ne/=ke,ee/=ve,C=P+ee,Z=R+ne)}return{top:P,left:R,bottom:C,right:Z,width:ne,height:ee}}}function uT(h,d,m){for(var x=ms(h,!0),T=cr(h)[d];x;){var I=cr(x)[m],P=void 0;if(P=T>=I,!P)return x;if(x===tn())break;x=ms(x,!1)}return!1}function dl(h,d,m,x){for(var T=0,I=0,P=h.children;I<P.length;){if(P[I].style.display!=="none"&&P[I]!==Ot.ghost&&(x||P[I]!==Ot.dragged)&&Jo(P[I],m.draggable,h,!1)){if(T===d)return P[I];T++}I++}return null}function Eg(h,d){for(var m=h.lastElementChild;m&&(m===Ot.ghost||Rt(m,"display")==="none"||d&&!Md(m,d));)m=m.previousElementSibling;return m||null}function yo(h,d){var m=0;if(!h||!h.parentNode)return-1;for(;h=h.previousElementSibling;)h.nodeName.toUpperCase()!=="TEMPLATE"&&h!==Ot.clone&&(!d||Md(h,d))&&m++;return m}function hT(h){var d=0,m=0,x=tn();if(h)do{var T=ul(h),I=T.a,P=T.d;d+=h.scrollLeft*I,m+=h.scrollTop*P}while(h!==x&&(h=h.parentNode));return[d,m]}function ZO(h,d){for(var m in h)if(h.hasOwnProperty(m)){for(var x in d)if(d.hasOwnProperty(x)&&d[x]===h[m][x])return Number(m)}return-1}function ms(h,d){if(!h||!h.getBoundingClientRect)return tn();var m=h,x=!1;do if(m.clientWidth<m.scrollWidth||m.clientHeight<m.scrollHeight){var T=Rt(m);if(m.clientWidth<m.scrollWidth&&(T.overflowX=="auto"||T.overflowX=="scroll")||m.clientHeight<m.scrollHeight&&(T.overflowY=="auto"||T.overflowY=="scroll")){if(!m.getBoundingClientRect||m===document.body)return tn();if(x||d)return m;x=!0}}while(m=m.parentNode);return tn()}function XO(h,d){if(h&&d)for(var m in d)d.hasOwnProperty(m)&&(h[m]=d[m]);return h}function B_(h,d){return Math.round(h.top)===Math.round(d.top)&&Math.round(h.left)===Math.round(d.left)&&Math.round(h.height)===Math.round(d.height)&&Math.round(h.width)===Math.round(d.width)}var Mc;function LE(h,d){return function(){if(!Mc){var m=arguments,x=this;m.length===1?h.call(x,m[0]):h.apply(x,m),Mc=setTimeout(function(){Mc=void 0},d)}}}function YO(){clearTimeout(Mc),Mc=void 0}function OE(h,d,m){h.scrollLeft+=d,h.scrollTop+=m}function BE(h){var d=window.Polymer,m=window.jQuery||window.Zepto;return d&&d.dom?d.dom(h).cloneNode(!0):m?m(h).clone(!0)[0]:h.cloneNode(!0)}var io="Sortable"+new Date().getTime();function KO(){var h=[],d;return{captureAnimationState:function(){if(h=[],!!this.options.animation){var m=[].slice.call(this.el.children);m.forEach(function(x){if(!(Rt(x,"display")==="none"||x===Ot.ghost)){h.push({target:x,rect:cr(x)});var T=rn({},h[h.length-1].rect);if(x.thisAnimationDuration){var I=ul(x,!0);I&&(T.top-=I.f,T.left-=I.e)}x.fromRect=T}})}},addAnimationState:function(m){h.push(m)},removeAnimationState:function(m){h.splice(ZO(h,{target:m}),1)},animateAll:function(m){var x=this;if(!this.options.animation){clearTimeout(d),typeof m=="function"&&m();return}var T=!1,I=0;h.forEach(function(P){var R=0,C=P.target,Z=C.fromRect,ee=cr(C),ne=C.prevFromRect,Te=C.prevToRect,Me=P.rect,ke=ul(C,!0);ke&&(ee.top-=ke.f,ee.left-=ke.e),C.toRect=ee,C.thisAnimationDuration&&B_(ne,ee)&&!B_(Z,ee)&&(Me.top-ee.top)/(Me.left-ee.left)===(Z.top-ee.top)/(Z.left-ee.left)&&(R=QO(Me,ne,Te,x.options)),B_(ee,Z)||(C.prevFromRect=Z,C.prevToRect=ee,R||(R=x.options.animation),x.animate(C,Me,ee,R)),R&&(T=!0,I=Math.max(I,R),clearTimeout(C.animationResetTimer),C.animationResetTimer=setTimeout(function(){C.animationTime=0,C.prevFromRect=null,C.fromRect=null,C.prevToRect=null,C.thisAnimationDuration=null},R),C.thisAnimationDuration=R)}),clearTimeout(d),T?d=setTimeout(function(){typeof m=="function"&&m()},I):typeof m=="function"&&m(),h=[]},animate:function(m,x,T,I){if(I){Rt(m,"transition",""),Rt(m,"transform","");var P=ul(this.el),R=P&&P.a,C=P&&P.d,Z=(x.left-T.left)/(R||1),ee=(x.top-T.top)/(C||1);m.animatingX=!!Z,m.animatingY=!!ee,Rt(m,"transform","translate3d("+Z+"px,"+ee+"px,0)"),this.forRepaintDummy=JO(m),Rt(m,"transition","transform "+I+"ms"+(this.options.easing?" "+this.options.easing:"")),Rt(m,"transform","translate3d(0,0,0)"),typeof m.animated=="number"&&clearTimeout(m.animated),m.animated=setTimeout(function(){Rt(m,"transition",""),Rt(m,"transform",""),m.animated=!1,m.animatingX=!1,m.animatingY=!1},I)}}}}function JO(h){return h.offsetWidth}function QO(h,d,m,x){return Math.sqrt(Math.pow(d.top-h.top,2)+Math.pow(d.left-h.left,2))/Math.sqrt(Math.pow(d.top-m.top,2)+Math.pow(d.left-m.left,2))*x.animation}var il=[],F_={initializeByDefault:!0},Bc={mount:function(h){for(var d in F_)F_.hasOwnProperty(d)&&!(d in h)&&(h[d]=F_[d]);il.forEach(function(m){if(m.pluginName===h.pluginName)throw"Sortable: Cannot mount plugin ".concat(h.pluginName," more than once")}),il.push(h)},pluginEvent:function(h,d,m){var x=this;this.eventCanceled=!1,m.cancel=function(){x.eventCanceled=!0};var T=h+"Global";il.forEach(function(I){d[I.pluginName]&&(d[I.pluginName][T]&&d[I.pluginName][T](rn({sortable:d},m)),d.options[I.pluginName]&&d[I.pluginName][h]&&d[I.pluginName][h](rn({sortable:d},m)))})},initializePlugins:function(h,d,m,x){il.forEach(function(P){var R=P.pluginName;if(!(!h.options[R]&&!P.initializeByDefault)){var C=new P(h,d,h.options);C.sortable=h,C.options=h.options,h[R]=C,Pn(m,C.defaults)}});for(var T in h.options)if(h.options.hasOwnProperty(T)){var I=this.modifyOption(h,T,h.options[T]);typeof I<"u"&&(h.options[T]=I)}},getEventProperties:function(h,d){var m={};return il.forEach(function(x){typeof x.eventProperties=="function"&&Pn(m,x.eventProperties.call(d[x.pluginName],h))}),m},modifyOption:function(h,d,m){var x;return il.forEach(function(T){h[T.pluginName]&&T.optionListeners&&typeof T.optionListeners[d]=="function"&&(x=T.optionListeners[d].call(h[T.pluginName],m))}),x}};function eB(h){var d=h.sortable,m=h.rootEl,x=h.name,T=h.targetEl,I=h.cloneEl,P=h.toEl,R=h.fromEl,C=h.oldIndex,Z=h.newIndex,ee=h.oldDraggableIndex,ne=h.newDraggableIndex,Te=h.originalEvent,Me=h.putSortable,ke=h.extraEventProperties;if(d=d||m&&m[io],!!d){var ve,Xe=d.options,ut="on"+x.charAt(0).toUpperCase()+x.substr(1);window.CustomEvent&&!zn&&!Oc?ve=new CustomEvent(x,{bubbles:!0,cancelable:!0}):(ve=document.createEvent("Event"),ve.initEvent(x,!0,!0)),ve.to=P||m,ve.from=R||m,ve.item=T||m,ve.clone=I,ve.oldIndex=C,ve.newIndex=Z,ve.oldDraggableIndex=ee,ve.newDraggableIndex=ne,ve.originalEvent=Te,ve.pullMode=Me?Me.lastPutMode:void 0;var tt=rn(rn({},ke),Bc.getEventProperties(x,d));for(var yt in tt)ve[yt]=tt[yt];m&&m.dispatchEvent(ve),Xe[ut]&&Xe[ut].call(d,ve)}}var tB=["evt"],Wr=function(h,d){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=m.evt,T=GO(m,tB);Bc.pluginEvent.bind(Ot)(h,d,rn({dragEl:$e,parentEl:Zi,ghostEl:Gt,rootEl:Ui,nextEl:Qs,lastDownEl:fd,cloneEl:Xi,cloneHidden:ps,dragStarted:wc,putSortable:_r,activeSortable:Ot.active,originalEvent:x,oldIndex:al,oldDraggableIndex:Ic,newIndex:to,newDraggableIndex:ds,hideGhostForTarget:VE,unhideGhostForTarget:UE,cloneNowHidden:function(){ps=!0},cloneNowShown:function(){ps=!1},dispatchSortableEvent:function(I){Mr({sortable:d,name:I,originalEvent:x})}},T))};function Mr(h){eB(rn({putSortable:_r,cloneEl:Xi,targetEl:$e,rootEl:Ui,oldIndex:al,oldDraggableIndex:Ic,newIndex:to,newDraggableIndex:ds},h))}var $e,Zi,Gt,Ui,Qs,fd,Xi,ps,al,to,Ic,ds,od,_r,nl=!1,Id=!1,Cd=[],Ys,Po,N_,j_,dT,pT,wc,rl,Cc,kc=!1,nd=!1,md,vr,V_=[],ng=!1,kd=[],Nd=typeof document<"u",sd=DE,fT=Oc||zn?"cssFloat":"float",iB=Nd&&!WO&&!DE&&"draggable"in document.createElement("div"),FE=function(){if(Nd){if(zn)return!1;var h=document.createElement("x");return h.style.cssText="pointer-events:auto",h.style.pointerEvents==="auto"}}(),NE=function(h,d){var m=Rt(h),x=parseInt(m.width)-parseInt(m.paddingLeft)-parseInt(m.paddingRight)-parseInt(m.borderLeftWidth)-parseInt(m.borderRightWidth),T=dl(h,0,d),I=dl(h,1,d),P=T&&Rt(T),R=I&&Rt(I),C=P&&parseInt(P.marginLeft)+parseInt(P.marginRight)+cr(T).width,Z=R&&parseInt(R.marginLeft)+parseInt(R.marginRight)+cr(I).width;if(m.display==="flex")return m.flexDirection==="column"||m.flexDirection==="column-reverse"?"vertical":"horizontal";if(m.display==="grid")return m.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(T&&P.float&&P.float!=="none"){var ee=P.float==="left"?"left":"right";return I&&(R.clear==="both"||R.clear===ee)?"vertical":"horizontal"}return T&&(P.display==="block"||P.display==="flex"||P.display==="table"||P.display==="grid"||C>=x&&m[fT]==="none"||I&&m[fT]==="none"&&C+Z>x)?"vertical":"horizontal"},rB=function(h,d,m){var x=m?h.left:h.top,T=m?h.right:h.bottom,I=m?h.width:h.height,P=m?d.left:d.top,R=m?d.right:d.bottom,C=m?d.width:d.height;return x===P||T===R||x+I/2===P+C/2},oB=function(h,d){var m;return Cd.some(function(x){var T=x[io].options.emptyInsertThreshold;if(!(!T||Eg(x))){var I=cr(x),P=h>=I.left-T&&h<=I.right+T,R=d>=I.top-T&&d<=I.bottom+T;if(P&&R)return m=x}}),m},jE=function(h){function d(T,I){return function(P,R,C,Z){var ee=P.options.group.name&&R.options.group.name&&P.options.group.name===R.options.group.name;if(T==null&&(I||ee))return!0;if(T==null||T===!1)return!1;if(I&&T==="clone")return T;if(typeof T=="function")return d(T(P,R,C,Z),I)(P,R,C,Z);var ne=(I?P:R).options.group.name;return T===!0||typeof T=="string"&&T===ne||T.join&&T.indexOf(ne)>-1}}var m={},x=h.group;(!x||pd(x)!="object")&&(x={name:x}),m.name=x.name,m.checkPull=d(x.pull,!0),m.checkPut=d(x.put),m.revertClone=x.revertClone,h.group=m},VE=function(){!FE&&Gt&&Rt(Gt,"display","none")},UE=function(){!FE&&Gt&&Rt(Gt,"display","")};Nd&&document.addEventListener("click",function(h){if(Id)return h.preventDefault(),h.stopPropagation&&h.stopPropagation(),h.stopImmediatePropagation&&h.stopImmediatePropagation(),Id=!1,!1},!0);var Ks=function(h){if($e){h=h.touches?h.touches[0]:h;var d=oB(h.clientX,h.clientY);if(d){var m={};for(var x in h)h.hasOwnProperty(x)&&(m[x]=h[x]);m.target=m.rootEl=d,m.preventDefault=void 0,m.stopPropagation=void 0,d[io]._onDragOver(m)}}},nB=function(h){$e&&$e.parentNode[io]._isOutsideThisEl(h.target)};function Ot(h,d){if(!(h&&h.nodeType&&h.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(h));this.el=h,this.options=d=Pn({},d),h[io]=this;var m={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(h.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return NE(h,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(I,P){I.setData("Text",P.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ot.supportPointer!==!1&&"PointerEvent"in window&&!Ac,emptyInsertThreshold:5};Bc.initializePlugins(this,h,m);for(var x in m)!(x in d)&&(d[x]=m[x]);jE(d);for(var T in this)T.charAt(0)==="_"&&typeof this[T]=="function"&&(this[T]=this[T].bind(this));this.nativeDraggable=d.forceFallback?!1:iB,this.nativeDraggable&&(this.options.touchStartThreshold=1),d.supportPointer?_i(h,"pointerdown",this._onTapStart):(_i(h,"mousedown",this._onTapStart),_i(h,"touchstart",this._onTapStart)),this.nativeDraggable&&(_i(h,"dragover",this),_i(h,"dragenter",this)),Cd.push(this.el),d.store&&d.store.get&&this.sort(d.store.get(this)||[]),Pn(this,KO())}Ot.prototype={constructor:Ot,_isOutsideThisEl:function(h){!this.el.contains(h)&&h!==this.el&&(rl=null)},_getDirection:function(h,d){return typeof this.options.direction=="function"?this.options.direction.call(this,h,d,$e):this.options.direction},_onTapStart:function(h){if(h.cancelable){var d=this,m=this.el,x=this.options,T=x.preventOnFilter,I=h.type,P=h.touches&&h.touches[0]||h.pointerType&&h.pointerType==="touch"&&h,R=(P||h).target,C=h.target.shadowRoot&&(h.path&&h.path[0]||h.composedPath&&h.composedPath()[0])||R,Z=x.filter;if(pB(m),!$e&&!(/mousedown|pointerdown/.test(I)&&h.button!==0||x.disabled)&&!C.isContentEditable&&!(!this.nativeDraggable&&Ac&&R&&R.tagName.toUpperCase()==="SELECT")&&(R=Jo(R,x.draggable,m,!1),!(R&&R.animated)&&fd!==R)){if(al=yo(R),Ic=yo(R,x.draggable),typeof Z=="function"){if(Z.call(this,h,R,this)){Mr({sortable:d,rootEl:C,name:"filter",targetEl:R,toEl:m,fromEl:m}),Wr("filter",d,{evt:h}),T&&h.cancelable&&h.preventDefault();return}}else if(Z&&(Z=Z.split(",").some(function(ee){if(ee=Jo(C,ee.trim(),m,!1),ee)return Mr({sortable:d,rootEl:ee,name:"filter",targetEl:R,fromEl:m,toEl:m}),Wr("filter",d,{evt:h}),!0}),Z)){T&&h.cancelable&&h.preventDefault();return}x.handle&&!Jo(C,x.handle,m,!1)||this._prepareDragStart(h,P,R)}}},_prepareDragStart:function(h,d,m){var x=this,T=x.el,I=x.options,P=T.ownerDocument,R;if(m&&!$e&&m.parentNode===T){var C=cr(m);if(Ui=T,$e=m,Zi=$e.parentNode,Qs=$e.nextSibling,fd=m,od=I.group,Ot.dragged=$e,Ys={target:$e,clientX:(d||h).clientX,clientY:(d||h).clientY},dT=Ys.clientX-C.left,pT=Ys.clientY-C.top,this._lastX=(d||h).clientX,this._lastY=(d||h).clientY,$e.style["will-change"]="all",R=function(){if(Wr("delayEnded",x,{evt:h}),Ot.eventCanceled){x._onDrop();return}x._disableDelayedDragEvents(),!lT&&x.nativeDraggable&&($e.draggable=!0),x._triggerDragStart(h,d),Mr({sortable:x,name:"choose",originalEvent:h}),eo($e,I.chosenClass,!0)},I.ignore.split(",").forEach(function(Z){RE($e,Z.trim(),U_)}),_i(P,"dragover",Ks),_i(P,"mousemove",Ks),_i(P,"touchmove",Ks),_i(P,"mouseup",x._onDrop),_i(P,"touchend",x._onDrop),_i(P,"touchcancel",x._onDrop),lT&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$e.draggable=!0),Wr("delayStart",this,{evt:h}),I.delay&&(!I.delayOnTouchOnly||d)&&(!this.nativeDraggable||!(Oc||zn))){if(Ot.eventCanceled){this._onDrop();return}_i(P,"mouseup",x._disableDelayedDrag),_i(P,"touchend",x._disableDelayedDrag),_i(P,"touchcancel",x._disableDelayedDrag),_i(P,"mousemove",x._delayedDragTouchMoveHandler),_i(P,"touchmove",x._delayedDragTouchMoveHandler),I.supportPointer&&_i(P,"pointermove",x._delayedDragTouchMoveHandler),x._dragStartTimer=setTimeout(R,I.delay)}else R()}},_delayedDragTouchMoveHandler:function(h){var d=h.touches?h.touches[0]:h;Math.max(Math.abs(d.clientX-this._lastX),Math.abs(d.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$e&&U_($e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var h=this.el.ownerDocument;ci(h,"mouseup",this._disableDelayedDrag),ci(h,"touchend",this._disableDelayedDrag),ci(h,"touchcancel",this._disableDelayedDrag),ci(h,"mousemove",this._delayedDragTouchMoveHandler),ci(h,"touchmove",this._delayedDragTouchMoveHandler),ci(h,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(h,d){d=d||h.pointerType=="touch"&&h,!this.nativeDraggable||d?this.options.supportPointer?_i(document,"pointermove",this._onTouchMove):d?_i(document,"touchmove",this._onTouchMove):_i(document,"mousemove",this._onTouchMove):(_i($e,"dragend",this),_i(Ui,"dragstart",this._onDragStart));try{document.selection?_d(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(h,d){if(nl=!1,Ui&&$e){Wr("dragStarted",this,{evt:d}),this.nativeDraggable&&_i(document,"dragover",nB);var m=this.options;!h&&eo($e,m.dragClass,!1),eo($e,m.ghostClass,!0),Ot.active=this,h&&this._appendGhost(),Mr({sortable:this,name:"start",originalEvent:d})}else this._nulling()},_emulateDragOver:function(){if(Po){this._lastX=Po.clientX,this._lastY=Po.clientY,VE();for(var h=document.elementFromPoint(Po.clientX,Po.clientY),d=h;h&&h.shadowRoot&&(h=h.shadowRoot.elementFromPoint(Po.clientX,Po.clientY),h!==d);)d=h;if($e.parentNode[io]._isOutsideThisEl(h),d)do{if(d[io]){var m=void 0;if(m=d[io]._onDragOver({clientX:Po.clientX,clientY:Po.clientY,target:h,rootEl:d}),m&&!this.options.dragoverBubble)break}h=d}while(d=d.parentNode);UE()}},_onTouchMove:function(h){if(Ys){var d=this.options,m=d.fallbackTolerance,x=d.fallbackOffset,T=h.touches?h.touches[0]:h,I=Gt&&ul(Gt,!0),P=Gt&&I&&I.a,R=Gt&&I&&I.d,C=sd&&vr&&hT(vr),Z=(T.clientX-Ys.clientX+x.x)/(P||1)+(C?C[0]-V_[0]:0)/(P||1),ee=(T.clientY-Ys.clientY+x.y)/(R||1)+(C?C[1]-V_[1]:0)/(R||1);if(!Ot.active&&!nl){if(m&&Math.max(Math.abs(T.clientX-this._lastX),Math.abs(T.clientY-this._lastY))<m)return;this._onDragStart(h,!0)}if(Gt){I?(I.e+=Z-(N_||0),I.f+=ee-(j_||0)):I={a:1,b:0,c:0,d:1,e:Z,f:ee};var ne="matrix(".concat(I.a,",").concat(I.b,",").concat(I.c,",").concat(I.d,",").concat(I.e,",").concat(I.f,")");Rt(Gt,"webkitTransform",ne),Rt(Gt,"mozTransform",ne),Rt(Gt,"msTransform",ne),Rt(Gt,"transform",ne),N_=Z,j_=ee,Po=T}h.cancelable&&h.preventDefault()}},_appendGhost:function(){if(!Gt){var h=this.options.fallbackOnBody?document.body:Ui,d=cr($e,!0,sd,!0,h),m=this.options;if(sd){for(vr=h;Rt(vr,"position")==="static"&&Rt(vr,"transform")==="none"&&vr!==document;)vr=vr.parentNode;vr!==document.body&&vr!==document.documentElement?(vr===document&&(vr=tn()),d.top+=vr.scrollTop,d.left+=vr.scrollLeft):vr=tn(),V_=hT(vr)}Gt=$e.cloneNode(!0),eo(Gt,m.ghostClass,!1),eo(Gt,m.fallbackClass,!0),eo(Gt,m.dragClass,!0),Rt(Gt,"transition",""),Rt(Gt,"transform",""),Rt(Gt,"box-sizing","border-box"),Rt(Gt,"margin",0),Rt(Gt,"top",d.top),Rt(Gt,"left",d.left),Rt(Gt,"width",d.width),Rt(Gt,"height",d.height),Rt(Gt,"opacity","0.8"),Rt(Gt,"position",sd?"absolute":"fixed"),Rt(Gt,"zIndex","100000"),Rt(Gt,"pointerEvents","none"),Ot.ghost=Gt,h.appendChild(Gt),Rt(Gt,"transform-origin",dT/parseInt(Gt.style.width)*100+"% "+pT/parseInt(Gt.style.height)*100+"%")}},_onDragStart:function(h,d){var m=this,x=h.dataTransfer,T=m.options;if(Wr("dragStart",this,{evt:h}),Ot.eventCanceled){this._onDrop();return}Wr("setupClone",this),Ot.eventCanceled||(Xi=BE($e),Xi.draggable=!1,Xi.style["will-change"]="",this._hideClone(),eo(Xi,this.options.chosenClass,!1),Ot.clone=Xi),m.cloneId=_d(function(){Wr("clone",m),!Ot.eventCanceled&&(m.options.removeCloneOnHide||Ui.insertBefore(Xi,$e),m._hideClone(),Mr({sortable:m,name:"clone"}))}),!d&&eo($e,T.dragClass,!0),d?(Id=!0,m._loopId=setInterval(m._emulateDragOver,50)):(ci(document,"mouseup",m._onDrop),ci(document,"touchend",m._onDrop),ci(document,"touchcancel",m._onDrop),x&&(x.effectAllowed="move",T.setData&&T.setData.call(m,x,$e)),_i(document,"drop",m),Rt($e,"transform","translateZ(0)")),nl=!0,m._dragStartId=_d(m._dragStarted.bind(m,d,h)),_i(document,"selectstart",m),wc=!0,Ac&&Rt(document.body,"user-select","none")},_onDragOver:function(h){var d=this.el,m=h.target,x,T,I,P=this.options,R=P.group,C=Ot.active,Z=od===R,ee=P.sort,ne=_r||C,Te,Me=this,ke=!1;if(ng)return;function ve(on,nn){Wr(on,Me,rn({evt:h,isOwner:Z,axis:Te?"vertical":"horizontal",revert:I,dragRect:x,targetRect:T,canSort:ee,fromSortable:ne,target:m,completed:ut,onMove:function(zo,kr){return ad(Ui,d,$e,x,zo,cr(zo),h,kr)},changed:tt},nn))}function Xe(){ve("dragOverAnimationCapture"),Me.captureAnimationState(),Me!==ne&&ne.captureAnimationState()}function ut(on){return ve("dragOverCompleted",{insertion:on}),on&&(Z?C._hideClone():C._showClone(Me),Me!==ne&&(eo($e,_r?_r.options.ghostClass:C.options.ghostClass,!1),eo($e,P.ghostClass,!0)),_r!==Me&&Me!==Ot.active?_r=Me:Me===Ot.active&&_r&&(_r=null),ne===Me&&(Me._ignoreWhileAnimating=m),Me.animateAll(function(){ve("dragOverAnimationComplete"),Me._ignoreWhileAnimating=null}),Me!==ne&&(ne.animateAll(),ne._ignoreWhileAnimating=null)),(m===$e&&!$e.animated||m===d&&!m.animated)&&(rl=null),!P.dragoverBubble&&!h.rootEl&&m!==document&&($e.parentNode[io]._isOutsideThisEl(h.target),!on&&Ks(h)),!P.dragoverBubble&&h.stopPropagation&&h.stopPropagation(),ke=!0}function tt(){to=yo($e),ds=yo($e,P.draggable),Mr({sortable:Me,name:"change",toEl:d,newIndex:to,newDraggableIndex:ds,originalEvent:h})}if(h.preventDefault!==void 0&&h.cancelable&&h.preventDefault(),m=Jo(m,P.draggable,d,!0),ve("dragOver"),Ot.eventCanceled)return ke;if($e.contains(h.target)||m.animated&&m.animatingX&&m.animatingY||Me._ignoreWhileAnimating===m)return ut(!1);if(Id=!1,C&&!P.disabled&&(Z?ee||(I=Zi!==Ui):_r===this||(this.lastPutMode=od.checkPull(this,C,$e,h))&&R.checkPut(this,C,$e,h))){if(Te=this._getDirection(h,m)==="vertical",x=cr($e),ve("dragOverValid"),Ot.eventCanceled)return ke;if(I)return Zi=Ui,Xe(),this._hideClone(),ve("revert"),Ot.eventCanceled||(Qs?Ui.insertBefore($e,Qs):Ui.appendChild($e)),ut(!0);var yt=Eg(d,P.draggable);if(!yt||cB(h,Te,this)&&!yt.animated){if(yt===$e)return ut(!1);if(yt&&d===h.target&&(m=yt),m&&(T=cr(m)),ad(Ui,d,$e,x,m,T,h,!!m)!==!1)return Xe(),d.appendChild($e),Zi=d,tt(),ut(!0)}else if(yt&&lB(h,Te,this)){var _t=dl(d,0,P,!0);if(_t===$e)return ut(!1);if(m=_t,T=cr(m),ad(Ui,d,$e,x,m,T,h,!1)!==!1)return Xe(),d.insertBefore($e,_t),Zi=d,tt(),ut(!0)}else if(m.parentNode===d){T=cr(m);var st=0,qe,$t=$e.parentNode!==d,pi=!rB($e.animated&&$e.toRect||x,m.animated&&m.toRect||T,Te),X=Te?"top":"left",lt=uT(m,"top","top")||uT($e,"top","top"),Rn=lt?lt.scrollTop:void 0;rl!==m&&(qe=T[X],kc=!1,nd=!pi&&P.invertSwap||$t),st=uB(h,m,T,Te,pi?1:P.swapThreshold,P.invertedSwapThreshold==null?P.swapThreshold:P.invertedSwapThreshold,nd,rl===m);var hr;if(st!==0){var it=yo($e);do it-=st,hr=Zi.children[it];while(hr&&(Rt(hr,"display")==="none"||hr===Gt))}if(st===0||hr===m)return ut(!1);rl=m,Cc=st;var wi=m.nextElementSibling,no=!1;no=st===1;var Cr=ad(Ui,d,$e,x,m,T,h,no);if(Cr!==!1)return(Cr===1||Cr===-1)&&(no=Cr===1),ng=!0,setTimeout(aB,30),Xe(),no&&!wi?d.appendChild($e):m.parentNode.insertBefore($e,no?wi:m),lt&&OE(lt,0,Rn-lt.scrollTop),Zi=$e.parentNode,qe!==void 0&&!nd&&(md=Math.abs(qe-cr(m)[X])),tt(),ut(!0)}if(d.contains($e))return ut(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ci(document,"mousemove",this._onTouchMove),ci(document,"touchmove",this._onTouchMove),ci(document,"pointermove",this._onTouchMove),ci(document,"dragover",Ks),ci(document,"mousemove",Ks),ci(document,"touchmove",Ks)},_offUpEvents:function(){var h=this.el.ownerDocument;ci(h,"mouseup",this._onDrop),ci(h,"touchend",this._onDrop),ci(h,"pointerup",this._onDrop),ci(h,"touchcancel",this._onDrop),ci(document,"selectstart",this)},_onDrop:function(h){var d=this.el,m=this.options;if(to=yo($e),ds=yo($e,m.draggable),Wr("drop",this,{evt:h}),Zi=$e&&$e.parentNode,to=yo($e),ds=yo($e,m.draggable),Ot.eventCanceled){this._nulling();return}nl=!1,nd=!1,kc=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),sg(this.cloneId),sg(this._dragStartId),this.nativeDraggable&&(ci(document,"drop",this),ci(d,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ac&&Rt(document.body,"user-select",""),Rt($e,"transform",""),h&&(wc&&(h.cancelable&&h.preventDefault(),!m.dropBubble&&h.stopPropagation()),Gt&&Gt.parentNode&&Gt.parentNode.removeChild(Gt),(Ui===Zi||_r&&_r.lastPutMode!=="clone")&&Xi&&Xi.parentNode&&Xi.parentNode.removeChild(Xi),$e&&(this.nativeDraggable&&ci($e,"dragend",this),U_($e),$e.style["will-change"]="",wc&&!nl&&eo($e,_r?_r.options.ghostClass:this.options.ghostClass,!1),eo($e,this.options.chosenClass,!1),Mr({sortable:this,name:"unchoose",toEl:Zi,newIndex:null,newDraggableIndex:null,originalEvent:h}),Ui!==Zi?(to>=0&&(Mr({rootEl:Zi,name:"add",toEl:Zi,fromEl:Ui,originalEvent:h}),Mr({sortable:this,name:"remove",toEl:Zi,originalEvent:h}),Mr({rootEl:Zi,name:"sort",toEl:Zi,fromEl:Ui,originalEvent:h}),Mr({sortable:this,name:"sort",toEl:Zi,originalEvent:h})),_r&&_r.save()):to!==al&&to>=0&&(Mr({sortable:this,name:"update",toEl:Zi,originalEvent:h}),Mr({sortable:this,name:"sort",toEl:Zi,originalEvent:h})),Ot.active&&((to==null||to===-1)&&(to=al,ds=Ic),Mr({sortable:this,name:"end",toEl:Zi,originalEvent:h}),this.save()))),this._nulling()},_nulling:function(){Wr("nulling",this),Ui=$e=Zi=Gt=Qs=Xi=fd=ps=Ys=Po=wc=to=ds=al=Ic=rl=Cc=_r=od=Ot.dragged=Ot.ghost=Ot.clone=Ot.active=null,kd.forEach(function(h){h.checked=!0}),kd.length=N_=j_=0},handleEvent:function(h){switch(h.type){case"drop":case"dragend":this._onDrop(h);break;case"dragenter":case"dragover":$e&&(this._onDragOver(h),sB(h));break;case"selectstart":h.preventDefault();break}},toArray:function(){for(var h=[],d,m=this.el.children,x=0,T=m.length,I=this.options;x<T;x++)d=m[x],Jo(d,I.draggable,this.el,!1)&&h.push(d.getAttribute(I.dataIdAttr)||dB(d));return h},sort:function(h,d){var m={},x=this.el;this.toArray().forEach(function(T,I){var P=x.children[I];Jo(P,this.options.draggable,x,!1)&&(m[T]=P)},this),d&&this.captureAnimationState(),h.forEach(function(T){m[T]&&(x.removeChild(m[T]),x.appendChild(m[T]))}),d&&this.animateAll()},save:function(){var h=this.options.store;h&&h.set&&h.set(this)},closest:function(h,d){return Jo(h,d||this.options.draggable,this.el,!1)},option:function(h,d){var m=this.options;if(d===void 0)return m[h];var x=Bc.modifyOption(this,h,d);typeof x<"u"?m[h]=x:m[h]=d,h==="group"&&jE(m)},destroy:function(){Wr("destroy",this);var h=this.el;h[io]=null,ci(h,"mousedown",this._onTapStart),ci(h,"touchstart",this._onTapStart),ci(h,"pointerdown",this._onTapStart),this.nativeDraggable&&(ci(h,"dragover",this),ci(h,"dragenter",this)),Array.prototype.forEach.call(h.querySelectorAll("[draggable]"),function(d){d.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Cd.splice(Cd.indexOf(this.el),1),this.el=h=null},_hideClone:function(){if(!ps){if(Wr("hideClone",this),Ot.eventCanceled)return;Rt(Xi,"display","none"),this.options.removeCloneOnHide&&Xi.parentNode&&Xi.parentNode.removeChild(Xi),ps=!0}},_showClone:function(h){if(h.lastPutMode!=="clone"){this._hideClone();return}if(ps){if(Wr("showClone",this),Ot.eventCanceled)return;$e.parentNode==Ui&&!this.options.group.revertClone?Ui.insertBefore(Xi,$e):Qs?Ui.insertBefore(Xi,Qs):Ui.appendChild(Xi),this.options.group.revertClone&&this.animate($e,Xi),Rt(Xi,"display",""),ps=!1}}};function sB(h){h.dataTransfer&&(h.dataTransfer.dropEffect="move"),h.cancelable&&h.preventDefault()}function ad(h,d,m,x,T,I,P,R){var C,Z=h[io],ee=Z.options.onMove,ne;return window.CustomEvent&&!zn&&!Oc?C=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(C=document.createEvent("Event"),C.initEvent("move",!0,!0)),C.to=d,C.from=h,C.dragged=m,C.draggedRect=x,C.related=T||d,C.relatedRect=I||cr(d),C.willInsertAfter=R,C.originalEvent=P,h.dispatchEvent(C),ee&&(ne=ee.call(Z,C,P)),ne}function U_(h){h.draggable=!1}function aB(){ng=!1}function lB(h,d,m){var x=cr(dl(m.el,0,m.options,!0)),T=10;return d?h.clientX<x.left-T||h.clientY<x.top&&h.clientX<x.right:h.clientY<x.top-T||h.clientY<x.bottom&&h.clientX<x.left}function cB(h,d,m){var x=cr(Eg(m.el,m.options.draggable)),T=10;return d?h.clientX>x.right+T||h.clientX<=x.right&&h.clientY>x.bottom&&h.clientX>=x.left:h.clientX>x.right&&h.clientY>x.top||h.clientX<=x.right&&h.clientY>x.bottom+T}function uB(h,d,m,x,T,I,P,R){var C=x?h.clientY:h.clientX,Z=x?m.height:m.width,ee=x?m.top:m.left,ne=x?m.bottom:m.right,Te=!1;if(!P){if(R&&md<Z*T){if(!kc&&(Cc===1?C>ee+Z*I/2:C<ne-Z*I/2)&&(kc=!0),kc)Te=!0;else if(Cc===1?C<ee+md:C>ne-md)return-Cc}else if(C>ee+Z*(1-T)/2&&C<ne-Z*(1-T)/2)return hB(d)}return Te=Te||P,Te&&(C<ee+Z*I/2||C>ne-Z*I/2)?C>ee+Z/2?1:-1:0}function hB(h){return yo($e)<yo(h)?1:-1}function dB(h){for(var d=h.tagName+h.className+h.src+h.href+h.textContent,m=d.length,x=0;m--;)x+=d.charCodeAt(m);return x.toString(36)}function pB(h){kd.length=0;for(var d=h.getElementsByTagName("input"),m=d.length;m--;){var x=d[m];x.checked&&kd.push(x)}}function _d(h){return setTimeout(h,0)}function sg(h){return clearTimeout(h)}Nd&&_i(document,"touchmove",function(h){(Ot.active||nl)&&h.cancelable&&h.preventDefault()});Ot.utils={on:_i,off:ci,css:Rt,find:RE,is:function(h,d){return!!Jo(h,d,h,!1)},extend:XO,throttle:LE,closest:Jo,toggleClass:eo,clone:BE,index:yo,nextTick:_d,cancelNextTick:sg,detectDirection:NE,getChild:dl};Ot.get=function(h){return h[io]};Ot.mount=function(){for(var h=arguments.length,d=new Array(h),m=0;m<h;m++)d[m]=arguments[m];d[0].constructor===Array&&(d=d[0]),d.forEach(function(x){if(!x.prototype||!x.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(x));x.utils&&(Ot.utils=rn(rn({},Ot.utils),x.utils)),Bc.mount(x)})};Ot.create=function(h,d){return new Ot(h,d)};Ot.version=$O;var sr=[],Tc,ag,lg=!1,q_,G_,Pd,Ec;function fB(){function h(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var d in this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this))}return h.prototype={dragStarted:function(d){var m=d.originalEvent;this.sortable.nativeDraggable?_i(document,"dragover",this._handleAutoScroll):this.options.supportPointer?_i(document,"pointermove",this._handleFallbackAutoScroll):m.touches?_i(document,"touchmove",this._handleFallbackAutoScroll):_i(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(d){var m=d.originalEvent;!this.options.dragOverBubble&&!m.rootEl&&this._handleAutoScroll(m)},drop:function(){this.sortable.nativeDraggable?ci(document,"dragover",this._handleAutoScroll):(ci(document,"pointermove",this._handleFallbackAutoScroll),ci(document,"touchmove",this._handleFallbackAutoScroll),ci(document,"mousemove",this._handleFallbackAutoScroll)),mT(),gd(),YO()},nulling:function(){Pd=ag=Tc=lg=Ec=q_=G_=null,sr.length=0},_handleFallbackAutoScroll:function(d){this._handleAutoScroll(d,!0)},_handleAutoScroll:function(d,m){var x=this,T=(d.touches?d.touches[0]:d).clientX,I=(d.touches?d.touches[0]:d).clientY,P=document.elementFromPoint(T,I);if(Pd=d,m||this.options.forceAutoScrollFallback||Oc||zn||Ac){$_(d,this.options,P,m);var R=ms(P,!0);lg&&(!Ec||T!==q_||I!==G_)&&(Ec&&mT(),Ec=setInterval(function(){var C=ms(document.elementFromPoint(T,I),!0);C!==R&&(R=C,gd()),$_(d,x.options,C,m)},10),q_=T,G_=I)}else{if(!this.options.bubbleScroll||ms(P,!0)===tn()){gd();return}$_(d,this.options,ms(P,!1),!1)}}},Pn(h,{pluginName:"scroll",initializeByDefault:!0})}function gd(){sr.forEach(function(h){clearInterval(h.pid)}),sr=[]}function mT(){clearInterval(Ec)}var $_=LE(function(h,d,m,x){if(d.scroll){var T=(h.touches?h.touches[0]:h).clientX,I=(h.touches?h.touches[0]:h).clientY,P=d.scrollSensitivity,R=d.scrollSpeed,C=tn(),Z=!1,ee;ag!==m&&(ag=m,gd(),Tc=d.scroll,ee=d.scrollFn,Tc===!0&&(Tc=ms(m,!0)));var ne=0,Te=Tc;do{var Me=Te,ke=cr(Me),ve=ke.top,Xe=ke.bottom,ut=ke.left,tt=ke.right,yt=ke.width,_t=ke.height,st=void 0,qe=void 0,$t=Me.scrollWidth,pi=Me.scrollHeight,X=Rt(Me),lt=Me.scrollLeft,Rn=Me.scrollTop;Me===C?(st=yt<$t&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),qe=_t<pi&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(st=yt<$t&&(X.overflowX==="auto"||X.overflowX==="scroll"),qe=_t<pi&&(X.overflowY==="auto"||X.overflowY==="scroll"));var hr=st&&(Math.abs(tt-T)<=P&&lt+yt<$t)-(Math.abs(ut-T)<=P&&!!lt),it=qe&&(Math.abs(Xe-I)<=P&&Rn+_t<pi)-(Math.abs(ve-I)<=P&&!!Rn);if(!sr[ne])for(var wi=0;wi<=ne;wi++)sr[wi]||(sr[wi]={});(sr[ne].vx!=hr||sr[ne].vy!=it||sr[ne].el!==Me)&&(sr[ne].el=Me,sr[ne].vx=hr,sr[ne].vy=it,clearInterval(sr[ne].pid),(hr!=0||it!=0)&&(Z=!0,sr[ne].pid=setInterval(function(){x&&this.layer===0&&Ot.active._onTouchMove(Pd);var no=sr[this.layer].vy?sr[this.layer].vy*R:0,Cr=sr[this.layer].vx?sr[this.layer].vx*R:0;typeof ee=="function"&&ee.call(Ot.dragged.parentNode[io],Cr,no,h,Pd,sr[this.layer].el)!=="continue"||OE(sr[this.layer].el,Cr,no)}.bind({layer:ne}),24))),ne++}while(d.bubbleScroll&&Te!==C&&(Te=ms(Te,!1)));lg=Z}},30),qE=function(h){var d=h.originalEvent,m=h.putSortable,x=h.dragEl,T=h.activeSortable,I=h.dispatchSortableEvent,P=h.hideGhostForTarget,R=h.unhideGhostForTarget;if(d){var C=m||T;P();var Z=d.changedTouches&&d.changedTouches.length?d.changedTouches[0]:d,ee=document.elementFromPoint(Z.clientX,Z.clientY);R(),C&&!C.el.contains(ee)&&(I("spill"),this.onSpill({dragEl:x,putSortable:m}))}};function Sg(){}Sg.prototype={startIndex:null,dragStart:function(h){var d=h.oldDraggableIndex;this.startIndex=d},onSpill:function(h){var d=h.dragEl,m=h.putSortable;this.sortable.captureAnimationState(),m&&m.captureAnimationState();var x=dl(this.sortable.el,this.startIndex,this.options);x?this.sortable.el.insertBefore(d,x):this.sortable.el.appendChild(d),this.sortable.animateAll(),m&&m.animateAll()},drop:qE};Pn(Sg,{pluginName:"revertOnSpill"});function Ag(){}Ag.prototype={onSpill:function(h){var d=h.dragEl,m=h.putSortable,x=m||this.sortable;x.captureAnimationState(),d.parentNode&&d.parentNode.removeChild(d),x.animateAll()},drop:qE};Pn(Ag,{pluginName:"removeOnSpill"});Ot.mount(new fB);Ot.mount(Ag,Sg);const mB=["Start","Add","Remove","Update","End"],_B=["Choose","Unchoose","Sort","Filter","Clone"],_T={manageAndEmit:mB,emit:_B};[...[..._T.manageAndEmit,..._T.emit].map(h=>h.toLowerCase())];var yd=(h,d=[])=>({parts:(...m)=>{if(gB(d))return yd(h,m);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...m)=>yd(h,[...d,...m]),rename:m=>yd(m,d),keys:()=>d,build:()=>[...new Set(d)].reduce((m,x)=>Object.assign(m,{[x]:{selector:[`&[data-scope="${ol(h)}"][data-part="${ol(x)}"]`,`& [data-scope="${ol(h)}"][data-part="${ol(x)}"]`].join(", "),attrs:{"data-scope":ol(h),"data-part":ol(x)}}}),{})}),ol=h=>h.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),gB=h=>h.length===0,yB=h=>h.nodeType===Node.DOCUMENT_NODE?h:h.ownerDocument??document;function vB(h){const d={getRootNode:m=>{var x;return((x=m.getRootNode)==null?void 0:x.call(m))??document},getDoc:m=>yB(d.getRootNode(m)),getWin:m=>d.getDoc(m).defaultView??window,getActiveElement:m=>d.getDoc(m).activeElement,isActiveElement:(m,x)=>x===d.getActiveElement(m),focus(m,x){x!=null&&(d.isActiveElement(m,x)||x.focus({preventScroll:!0}))},getById:(m,x)=>d.getRootNode(m).getElementById(x),setValue:(m,x)=>{if(m==null||x==null)return;const T=x.toString();m.value!==T&&(m.value=x.toString())}};return{...d,...h}}var xB=yd("switch").parts("root","label","control","thumb");xB.build();var gT=vB({getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`switch:${h.id}`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`switch:${h.id}:label`},getThumbId:h=>{var d;return((d=h.ids)==null?void 0:d.thumb)??`switch:${h.id}:thumb`},getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`switch:${h.id}:control`},getHiddenInputId:h=>{var d;return((d=h.ids)==null?void 0:d.input)??`switch:${h.id}:input`},getHiddenInputEl:h=>gT.getById(h,gT.getHiddenInputId(h))});const wB=Dn({__name:"Selector",props:{coordinates:{},aspectRatio:{default:"2/1"},mapOptions:{},zoom:{default:12},label:{},reset:{type:Boolean,default:!0},mapSelector:{type:Boolean,default:!0},showWarning:{type:Boolean,default:!0},showSelected:{type:Boolean,default:!0},language:{},modelValue:{},placeholder:{},searchFilter:{}},emits:["update:modelValue"],setup(h,{emit:d}){const m=h,x=d,T=Qo(),I=Qo(),P=Qo(),R=Qo(),C={location:{},postcode:"0",county:"",city:"",street:"",formatted:""};function Z(st){return JSON.parse(JSON.stringify(st))}const ee=Qo(Z(C)),ne={warning:{nb:`Posisjon er ikke gyldig, ${m.mapSelector?"dra markøren eller":""} søk opp posisjon`,en:`Position is not valid, ${m.mapSelector?"drag the cursor or":""} search for position`},placeholder:{nb:"Hent posisjon fra kart",en:"Retrieve position from map"},selectedPosition:{nb:"Valgt posisjon",en:"Selected position"}},Te=[10.738616,59.906103],Me=Hr(()=>({center:ee.value?.location?.coordinates||Te,zoom:m.zoom,dragPan:!0,scrollZoom:!1,dragRotate:!1,cooperativeGestures:!1,...m.mapOptions})),ke=Hr(()=>m.language||document.querySelector("html")?.getAttribute("lang")||"auto"),ve=Hr(()=>m.searchFilter||"no");yT(()=>ee.value,st=>{if(!I.value||!P.value)return;const qe=ee.value?.location?.coordinates||Te;I.value.setLngLat(qe),P.value.flyTo({center:qe}),ee.value?.location?.coordinates?.length&&x("update:modelValue",ee.value)},{immediate:!0,deep:!0});function Xe(){ee.value=Z(C),x("update:modelValue",null),R.value.clear()}const ut=Hr(()=>{if(ee?.value?.location?.coordinates?.[0])return ee.value.formatted});async function tt(){fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${ee.value.location?.coordinates?.[0]},${ee.value.location?.coordinates?.[1]}.json?access_token=pk.eyJ1IjoiY3JzdGVuIiwiYSI6ImNrNTZxa3gzMDE3dGszaHBod2RnMXQ0anYifQ.FBWO3jVL_VK4RCznouV-iA&language=${ke.value}`).then(st=>st.json()).then(st=>{const qe=yt(st.features),$t=st.features.find(pi=>pi.id.startsWith("address"));ee.value.street=`${qe.address} ${$t?.address}`,ee.value.city=qe.place,ee.value.county=qe.region||qe.place,ee.value.postcode=qe.postcode,ee.value.formatted=$t?.place_name}).catch(st=>console.error(st))}function yt(st){return st?.length?Object.fromEntries(st.map(qe=>[qe.id.split(".")?.[0],qe.text])):{}}function _t(){T.value&&(P.value=new H_.Map({container:T.value,...Me.value,language:ke.value}),I.value=new H_.Marker({draggable:!0,color:"var(--kvass-location-selector-primary-color)"}).setLngLat(ee.value.location?.coordinates||Te).addTo(P.value),I.value.on("dragend",st=>{st?.target&&(ee.value.location.coordinates=Object.values(st.target?._lngLat||{}),tt())}),P.value.addControl(new k2.FullscreenControl,"top-left"),P.value.addControl(new k2.NavigationControl,"top-left"),R.value=new DR({accessToken:Me.value.accessToken,zoom:4,placeholder:m.placeholder||ne?.placeholder?.[ke.value],filter:function(st){return st.context.some(qe=>{if(ve.value)return qe?.short_code===ve.value})},language:ke.value}),P.value.addControl(R.value),R.value.on("result",st=>{const qe=st.result,$t=yt(qe.context);ee.value.location.coordinates=qe?.geometry?.coordinates,ee.value.street=`${qe.text} ${qe.address}`,ee.value.city=$t.place,ee.value.county=$t.region,ee.value.postcode=$t.postcode,ee.value.formatted=qe?.place_name}))}return dD(()=>{m.modelValue&&(ee.value=m.modelValue),_t()}),pD(()=>{P.value?.remove(),R.value.clear()}),(st,qe)=>(ur(),Cn("div",{class:cg(["kvass-location-selector",{"kvass-location-selector--hide-map":!m.mapSelector}]),style:Dd({"--kvass-location-selector-aspect-ratio":m.aspectRatio})},[sl("div",{ref_key:"mapEl",ref:T,class:"kvass-location-selector__map"},null,512),W_(An(RO),{justify:"space-between"},{default:vd(()=>[(ut.value?m.showSelected:m.showWarning)?(ur(),In(An($L),{key:0,class:"",variant:ut.value?"info":"danger"},{default:vd(()=>[vT(Pc(ut.value?`${ne?.selectedPosition?.[ke.value]}: ${ut.value}`:ne.warning?.[ke.value]),1)]),_:1},8,["variant"])):en("",!0),m.reset?(ur(),In(An(bg),{key:1,icon:"fa-pro-light:arrow-rotate-left",onClick:Xe})):en("",!0)]),_:1})],6))}});export{wB as j};
2035
+ */function aT(h,d){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(h);d&&(x=x.filter(function(T){return Object.getOwnPropertyDescriptor(h,T).enumerable})),m.push.apply(m,x)}return m}function rn(h){for(var d=1;d<arguments.length;d++){var m=arguments[d]!=null?arguments[d]:{};d%2?aT(Object(m),!0).forEach(function(x){UO(h,x,m[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):aT(Object(m)).forEach(function(x){Object.defineProperty(h,x,Object.getOwnPropertyDescriptor(m,x))})}return h}function pd(h){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pd=function(d){return typeof d}:pd=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},pd(h)}function UO(h,d,m){return d in h?Object.defineProperty(h,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[d]=m,h}function Pn(){return Pn=Object.assign||function(h){for(var d=1;d<arguments.length;d++){var m=arguments[d];for(var x in m)Object.prototype.hasOwnProperty.call(m,x)&&(h[x]=m[x])}return h},Pn.apply(this,arguments)}function qO(h,d){if(h==null)return{};var m={},x=Object.keys(h),T,I;for(I=0;I<x.length;I++)T=x[I],!(d.indexOf(T)>=0)&&(m[T]=h[T]);return m}function GO(h,d){if(h==null)return{};var m=qO(h,d),x,T;if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(h);for(T=0;T<I.length;T++)x=I[T],!(d.indexOf(x)>=0)&&Object.prototype.propertyIsEnumerable.call(h,x)&&(m[x]=h[x])}return m}var $O="1.14.0";function kn(h){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(h)}var zn=kn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Oc=kn(/Edge/i),lT=kn(/firefox/i),Ac=kn(/safari/i)&&!kn(/chrome/i)&&!kn(/android/i),DE=kn(/iP(ad|od|hone)/i),WO=kn(/chrome/i)&&kn(/android/i),zE={capture:!1,passive:!1};function _i(h,d,m){h.addEventListener(d,m,!zn&&zE)}function ci(h,d,m){h.removeEventListener(d,m,!zn&&zE)}function Md(h,d){if(d){if(d[0]===">"&&(d=d.substring(1)),h)try{if(h.matches)return h.matches(d);if(h.msMatchesSelector)return h.msMatchesSelector(d);if(h.webkitMatchesSelector)return h.webkitMatchesSelector(d)}catch{return!1}return!1}}function HO(h){return h.host&&h!==document&&h.host.nodeType?h.host:h.parentNode}function Jo(h,d,m,x){if(h){m=m||document;do{if(d!=null&&(d[0]===">"?h.parentNode===m&&Md(h,d):Md(h,d))||x&&h===m)return h;if(h===m)break}while(h=HO(h))}return null}var cT=/\s+/g;function eo(h,d,m){if(h&&d)if(h.classList)h.classList[m?"add":"remove"](d);else{var x=(" "+h.className+" ").replace(cT," ").replace(" "+d+" "," ");h.className=(x+(m?" "+d:"")).replace(cT," ")}}function Rt(h,d,m){var x=h&&h.style;if(x){if(m===void 0)return document.defaultView&&document.defaultView.getComputedStyle?m=document.defaultView.getComputedStyle(h,""):h.currentStyle&&(m=h.currentStyle),d===void 0?m:m[d];!(d in x)&&d.indexOf("webkit")===-1&&(d="-webkit-"+d),x[d]=m+(typeof m=="string"?"":"px")}}function ul(h,d){var m="";if(typeof h=="string")m=h;else do{var x=Rt(h,"transform");x&&x!=="none"&&(m=x+" "+m)}while(!d&&(h=h.parentNode));var T=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return T&&new T(m)}function RE(h,d,m){if(h){var x=h.getElementsByTagName(d),T=0,I=x.length;if(m)for(;T<I;T++)m(x[T],T);return x}return[]}function tn(){var h=document.scrollingElement;return h||document.documentElement}function cr(h,d,m,x,T){if(!(!h.getBoundingClientRect&&h!==window)){var I,P,R,C,Z,ee,ne;if(h!==window&&h.parentNode&&h!==tn()?(I=h.getBoundingClientRect(),P=I.top,R=I.left,C=I.bottom,Z=I.right,ee=I.height,ne=I.width):(P=0,R=0,C=window.innerHeight,Z=window.innerWidth,ee=window.innerHeight,ne=window.innerWidth),(d||m)&&h!==window&&(T=T||h.parentNode,!zn))do if(T&&T.getBoundingClientRect&&(Rt(T,"transform")!=="none"||m&&Rt(T,"position")!=="static")){var Te=T.getBoundingClientRect();P-=Te.top+parseInt(Rt(T,"border-top-width")),R-=Te.left+parseInt(Rt(T,"border-left-width")),C=P+I.height,Z=R+I.width;break}while(T=T.parentNode);if(x&&h!==window){var Me=ul(T||h),ke=Me&&Me.a,ve=Me&&Me.d;Me&&(P/=ve,R/=ke,ne/=ke,ee/=ve,C=P+ee,Z=R+ne)}return{top:P,left:R,bottom:C,right:Z,width:ne,height:ee}}}function uT(h,d,m){for(var x=ms(h,!0),T=cr(h)[d];x;){var I=cr(x)[m],P=void 0;if(P=T>=I,!P)return x;if(x===tn())break;x=ms(x,!1)}return!1}function dl(h,d,m,x){for(var T=0,I=0,P=h.children;I<P.length;){if(P[I].style.display!=="none"&&P[I]!==Ot.ghost&&(x||P[I]!==Ot.dragged)&&Jo(P[I],m.draggable,h,!1)){if(T===d)return P[I];T++}I++}return null}function Eg(h,d){for(var m=h.lastElementChild;m&&(m===Ot.ghost||Rt(m,"display")==="none"||d&&!Md(m,d));)m=m.previousElementSibling;return m||null}function yo(h,d){var m=0;if(!h||!h.parentNode)return-1;for(;h=h.previousElementSibling;)h.nodeName.toUpperCase()!=="TEMPLATE"&&h!==Ot.clone&&(!d||Md(h,d))&&m++;return m}function hT(h){var d=0,m=0,x=tn();if(h)do{var T=ul(h),I=T.a,P=T.d;d+=h.scrollLeft*I,m+=h.scrollTop*P}while(h!==x&&(h=h.parentNode));return[d,m]}function ZO(h,d){for(var m in h)if(h.hasOwnProperty(m)){for(var x in d)if(d.hasOwnProperty(x)&&d[x]===h[m][x])return Number(m)}return-1}function ms(h,d){if(!h||!h.getBoundingClientRect)return tn();var m=h,x=!1;do if(m.clientWidth<m.scrollWidth||m.clientHeight<m.scrollHeight){var T=Rt(m);if(m.clientWidth<m.scrollWidth&&(T.overflowX=="auto"||T.overflowX=="scroll")||m.clientHeight<m.scrollHeight&&(T.overflowY=="auto"||T.overflowY=="scroll")){if(!m.getBoundingClientRect||m===document.body)return tn();if(x||d)return m;x=!0}}while(m=m.parentNode);return tn()}function XO(h,d){if(h&&d)for(var m in d)d.hasOwnProperty(m)&&(h[m]=d[m]);return h}function B_(h,d){return Math.round(h.top)===Math.round(d.top)&&Math.round(h.left)===Math.round(d.left)&&Math.round(h.height)===Math.round(d.height)&&Math.round(h.width)===Math.round(d.width)}var Mc;function LE(h,d){return function(){if(!Mc){var m=arguments,x=this;m.length===1?h.call(x,m[0]):h.apply(x,m),Mc=setTimeout(function(){Mc=void 0},d)}}}function YO(){clearTimeout(Mc),Mc=void 0}function OE(h,d,m){h.scrollLeft+=d,h.scrollTop+=m}function BE(h){var d=window.Polymer,m=window.jQuery||window.Zepto;return d&&d.dom?d.dom(h).cloneNode(!0):m?m(h).clone(!0)[0]:h.cloneNode(!0)}var io="Sortable"+new Date().getTime();function KO(){var h=[],d;return{captureAnimationState:function(){if(h=[],!!this.options.animation){var m=[].slice.call(this.el.children);m.forEach(function(x){if(!(Rt(x,"display")==="none"||x===Ot.ghost)){h.push({target:x,rect:cr(x)});var T=rn({},h[h.length-1].rect);if(x.thisAnimationDuration){var I=ul(x,!0);I&&(T.top-=I.f,T.left-=I.e)}x.fromRect=T}})}},addAnimationState:function(m){h.push(m)},removeAnimationState:function(m){h.splice(ZO(h,{target:m}),1)},animateAll:function(m){var x=this;if(!this.options.animation){clearTimeout(d),typeof m=="function"&&m();return}var T=!1,I=0;h.forEach(function(P){var R=0,C=P.target,Z=C.fromRect,ee=cr(C),ne=C.prevFromRect,Te=C.prevToRect,Me=P.rect,ke=ul(C,!0);ke&&(ee.top-=ke.f,ee.left-=ke.e),C.toRect=ee,C.thisAnimationDuration&&B_(ne,ee)&&!B_(Z,ee)&&(Me.top-ee.top)/(Me.left-ee.left)===(Z.top-ee.top)/(Z.left-ee.left)&&(R=QO(Me,ne,Te,x.options)),B_(ee,Z)||(C.prevFromRect=Z,C.prevToRect=ee,R||(R=x.options.animation),x.animate(C,Me,ee,R)),R&&(T=!0,I=Math.max(I,R),clearTimeout(C.animationResetTimer),C.animationResetTimer=setTimeout(function(){C.animationTime=0,C.prevFromRect=null,C.fromRect=null,C.prevToRect=null,C.thisAnimationDuration=null},R),C.thisAnimationDuration=R)}),clearTimeout(d),T?d=setTimeout(function(){typeof m=="function"&&m()},I):typeof m=="function"&&m(),h=[]},animate:function(m,x,T,I){if(I){Rt(m,"transition",""),Rt(m,"transform","");var P=ul(this.el),R=P&&P.a,C=P&&P.d,Z=(x.left-T.left)/(R||1),ee=(x.top-T.top)/(C||1);m.animatingX=!!Z,m.animatingY=!!ee,Rt(m,"transform","translate3d("+Z+"px,"+ee+"px,0)"),this.forRepaintDummy=JO(m),Rt(m,"transition","transform "+I+"ms"+(this.options.easing?" "+this.options.easing:"")),Rt(m,"transform","translate3d(0,0,0)"),typeof m.animated=="number"&&clearTimeout(m.animated),m.animated=setTimeout(function(){Rt(m,"transition",""),Rt(m,"transform",""),m.animated=!1,m.animatingX=!1,m.animatingY=!1},I)}}}}function JO(h){return h.offsetWidth}function QO(h,d,m,x){return Math.sqrt(Math.pow(d.top-h.top,2)+Math.pow(d.left-h.left,2))/Math.sqrt(Math.pow(d.top-m.top,2)+Math.pow(d.left-m.left,2))*x.animation}var il=[],F_={initializeByDefault:!0},Bc={mount:function(h){for(var d in F_)F_.hasOwnProperty(d)&&!(d in h)&&(h[d]=F_[d]);il.forEach(function(m){if(m.pluginName===h.pluginName)throw"Sortable: Cannot mount plugin ".concat(h.pluginName," more than once")}),il.push(h)},pluginEvent:function(h,d,m){var x=this;this.eventCanceled=!1,m.cancel=function(){x.eventCanceled=!0};var T=h+"Global";il.forEach(function(I){d[I.pluginName]&&(d[I.pluginName][T]&&d[I.pluginName][T](rn({sortable:d},m)),d.options[I.pluginName]&&d[I.pluginName][h]&&d[I.pluginName][h](rn({sortable:d},m)))})},initializePlugins:function(h,d,m,x){il.forEach(function(P){var R=P.pluginName;if(!(!h.options[R]&&!P.initializeByDefault)){var C=new P(h,d,h.options);C.sortable=h,C.options=h.options,h[R]=C,Pn(m,C.defaults)}});for(var T in h.options)if(h.options.hasOwnProperty(T)){var I=this.modifyOption(h,T,h.options[T]);typeof I<"u"&&(h.options[T]=I)}},getEventProperties:function(h,d){var m={};return il.forEach(function(x){typeof x.eventProperties=="function"&&Pn(m,x.eventProperties.call(d[x.pluginName],h))}),m},modifyOption:function(h,d,m){var x;return il.forEach(function(T){h[T.pluginName]&&T.optionListeners&&typeof T.optionListeners[d]=="function"&&(x=T.optionListeners[d].call(h[T.pluginName],m))}),x}};function eB(h){var d=h.sortable,m=h.rootEl,x=h.name,T=h.targetEl,I=h.cloneEl,P=h.toEl,R=h.fromEl,C=h.oldIndex,Z=h.newIndex,ee=h.oldDraggableIndex,ne=h.newDraggableIndex,Te=h.originalEvent,Me=h.putSortable,ke=h.extraEventProperties;if(d=d||m&&m[io],!!d){var ve,Xe=d.options,ut="on"+x.charAt(0).toUpperCase()+x.substr(1);window.CustomEvent&&!zn&&!Oc?ve=new CustomEvent(x,{bubbles:!0,cancelable:!0}):(ve=document.createEvent("Event"),ve.initEvent(x,!0,!0)),ve.to=P||m,ve.from=R||m,ve.item=T||m,ve.clone=I,ve.oldIndex=C,ve.newIndex=Z,ve.oldDraggableIndex=ee,ve.newDraggableIndex=ne,ve.originalEvent=Te,ve.pullMode=Me?Me.lastPutMode:void 0;var tt=rn(rn({},ke),Bc.getEventProperties(x,d));for(var yt in tt)ve[yt]=tt[yt];m&&m.dispatchEvent(ve),Xe[ut]&&Xe[ut].call(d,ve)}}var tB=["evt"],Wr=function(h,d){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=m.evt,T=GO(m,tB);Bc.pluginEvent.bind(Ot)(h,d,rn({dragEl:$e,parentEl:Zi,ghostEl:Gt,rootEl:Ui,nextEl:Qs,lastDownEl:fd,cloneEl:Xi,cloneHidden:ps,dragStarted:wc,putSortable:_r,activeSortable:Ot.active,originalEvent:x,oldIndex:al,oldDraggableIndex:Ic,newIndex:to,newDraggableIndex:ds,hideGhostForTarget:VE,unhideGhostForTarget:UE,cloneNowHidden:function(){ps=!0},cloneNowShown:function(){ps=!1},dispatchSortableEvent:function(I){Mr({sortable:d,name:I,originalEvent:x})}},T))};function Mr(h){eB(rn({putSortable:_r,cloneEl:Xi,targetEl:$e,rootEl:Ui,oldIndex:al,oldDraggableIndex:Ic,newIndex:to,newDraggableIndex:ds},h))}var $e,Zi,Gt,Ui,Qs,fd,Xi,ps,al,to,Ic,ds,od,_r,nl=!1,Id=!1,Cd=[],Ys,Po,N_,j_,dT,pT,wc,rl,Cc,kc=!1,nd=!1,md,vr,V_=[],ng=!1,kd=[],Nd=typeof document<"u",sd=DE,fT=Oc||zn?"cssFloat":"float",iB=Nd&&!WO&&!DE&&"draggable"in document.createElement("div"),FE=function(){if(Nd){if(zn)return!1;var h=document.createElement("x");return h.style.cssText="pointer-events:auto",h.style.pointerEvents==="auto"}}(),NE=function(h,d){var m=Rt(h),x=parseInt(m.width)-parseInt(m.paddingLeft)-parseInt(m.paddingRight)-parseInt(m.borderLeftWidth)-parseInt(m.borderRightWidth),T=dl(h,0,d),I=dl(h,1,d),P=T&&Rt(T),R=I&&Rt(I),C=P&&parseInt(P.marginLeft)+parseInt(P.marginRight)+cr(T).width,Z=R&&parseInt(R.marginLeft)+parseInt(R.marginRight)+cr(I).width;if(m.display==="flex")return m.flexDirection==="column"||m.flexDirection==="column-reverse"?"vertical":"horizontal";if(m.display==="grid")return m.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(T&&P.float&&P.float!=="none"){var ee=P.float==="left"?"left":"right";return I&&(R.clear==="both"||R.clear===ee)?"vertical":"horizontal"}return T&&(P.display==="block"||P.display==="flex"||P.display==="table"||P.display==="grid"||C>=x&&m[fT]==="none"||I&&m[fT]==="none"&&C+Z>x)?"vertical":"horizontal"},rB=function(h,d,m){var x=m?h.left:h.top,T=m?h.right:h.bottom,I=m?h.width:h.height,P=m?d.left:d.top,R=m?d.right:d.bottom,C=m?d.width:d.height;return x===P||T===R||x+I/2===P+C/2},oB=function(h,d){var m;return Cd.some(function(x){var T=x[io].options.emptyInsertThreshold;if(!(!T||Eg(x))){var I=cr(x),P=h>=I.left-T&&h<=I.right+T,R=d>=I.top-T&&d<=I.bottom+T;if(P&&R)return m=x}}),m},jE=function(h){function d(T,I){return function(P,R,C,Z){var ee=P.options.group.name&&R.options.group.name&&P.options.group.name===R.options.group.name;if(T==null&&(I||ee))return!0;if(T==null||T===!1)return!1;if(I&&T==="clone")return T;if(typeof T=="function")return d(T(P,R,C,Z),I)(P,R,C,Z);var ne=(I?P:R).options.group.name;return T===!0||typeof T=="string"&&T===ne||T.join&&T.indexOf(ne)>-1}}var m={},x=h.group;(!x||pd(x)!="object")&&(x={name:x}),m.name=x.name,m.checkPull=d(x.pull,!0),m.checkPut=d(x.put),m.revertClone=x.revertClone,h.group=m},VE=function(){!FE&&Gt&&Rt(Gt,"display","none")},UE=function(){!FE&&Gt&&Rt(Gt,"display","")};Nd&&document.addEventListener("click",function(h){if(Id)return h.preventDefault(),h.stopPropagation&&h.stopPropagation(),h.stopImmediatePropagation&&h.stopImmediatePropagation(),Id=!1,!1},!0);var Ks=function(h){if($e){h=h.touches?h.touches[0]:h;var d=oB(h.clientX,h.clientY);if(d){var m={};for(var x in h)h.hasOwnProperty(x)&&(m[x]=h[x]);m.target=m.rootEl=d,m.preventDefault=void 0,m.stopPropagation=void 0,d[io]._onDragOver(m)}}},nB=function(h){$e&&$e.parentNode[io]._isOutsideThisEl(h.target)};function Ot(h,d){if(!(h&&h.nodeType&&h.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(h));this.el=h,this.options=d=Pn({},d),h[io]=this;var m={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(h.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return NE(h,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(I,P){I.setData("Text",P.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ot.supportPointer!==!1&&"PointerEvent"in window&&!Ac,emptyInsertThreshold:5};Bc.initializePlugins(this,h,m);for(var x in m)!(x in d)&&(d[x]=m[x]);jE(d);for(var T in this)T.charAt(0)==="_"&&typeof this[T]=="function"&&(this[T]=this[T].bind(this));this.nativeDraggable=d.forceFallback?!1:iB,this.nativeDraggable&&(this.options.touchStartThreshold=1),d.supportPointer?_i(h,"pointerdown",this._onTapStart):(_i(h,"mousedown",this._onTapStart),_i(h,"touchstart",this._onTapStart)),this.nativeDraggable&&(_i(h,"dragover",this),_i(h,"dragenter",this)),Cd.push(this.el),d.store&&d.store.get&&this.sort(d.store.get(this)||[]),Pn(this,KO())}Ot.prototype={constructor:Ot,_isOutsideThisEl:function(h){!this.el.contains(h)&&h!==this.el&&(rl=null)},_getDirection:function(h,d){return typeof this.options.direction=="function"?this.options.direction.call(this,h,d,$e):this.options.direction},_onTapStart:function(h){if(h.cancelable){var d=this,m=this.el,x=this.options,T=x.preventOnFilter,I=h.type,P=h.touches&&h.touches[0]||h.pointerType&&h.pointerType==="touch"&&h,R=(P||h).target,C=h.target.shadowRoot&&(h.path&&h.path[0]||h.composedPath&&h.composedPath()[0])||R,Z=x.filter;if(pB(m),!$e&&!(/mousedown|pointerdown/.test(I)&&h.button!==0||x.disabled)&&!C.isContentEditable&&!(!this.nativeDraggable&&Ac&&R&&R.tagName.toUpperCase()==="SELECT")&&(R=Jo(R,x.draggable,m,!1),!(R&&R.animated)&&fd!==R)){if(al=yo(R),Ic=yo(R,x.draggable),typeof Z=="function"){if(Z.call(this,h,R,this)){Mr({sortable:d,rootEl:C,name:"filter",targetEl:R,toEl:m,fromEl:m}),Wr("filter",d,{evt:h}),T&&h.cancelable&&h.preventDefault();return}}else if(Z&&(Z=Z.split(",").some(function(ee){if(ee=Jo(C,ee.trim(),m,!1),ee)return Mr({sortable:d,rootEl:ee,name:"filter",targetEl:R,fromEl:m,toEl:m}),Wr("filter",d,{evt:h}),!0}),Z)){T&&h.cancelable&&h.preventDefault();return}x.handle&&!Jo(C,x.handle,m,!1)||this._prepareDragStart(h,P,R)}}},_prepareDragStart:function(h,d,m){var x=this,T=x.el,I=x.options,P=T.ownerDocument,R;if(m&&!$e&&m.parentNode===T){var C=cr(m);if(Ui=T,$e=m,Zi=$e.parentNode,Qs=$e.nextSibling,fd=m,od=I.group,Ot.dragged=$e,Ys={target:$e,clientX:(d||h).clientX,clientY:(d||h).clientY},dT=Ys.clientX-C.left,pT=Ys.clientY-C.top,this._lastX=(d||h).clientX,this._lastY=(d||h).clientY,$e.style["will-change"]="all",R=function(){if(Wr("delayEnded",x,{evt:h}),Ot.eventCanceled){x._onDrop();return}x._disableDelayedDragEvents(),!lT&&x.nativeDraggable&&($e.draggable=!0),x._triggerDragStart(h,d),Mr({sortable:x,name:"choose",originalEvent:h}),eo($e,I.chosenClass,!0)},I.ignore.split(",").forEach(function(Z){RE($e,Z.trim(),U_)}),_i(P,"dragover",Ks),_i(P,"mousemove",Ks),_i(P,"touchmove",Ks),_i(P,"mouseup",x._onDrop),_i(P,"touchend",x._onDrop),_i(P,"touchcancel",x._onDrop),lT&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$e.draggable=!0),Wr("delayStart",this,{evt:h}),I.delay&&(!I.delayOnTouchOnly||d)&&(!this.nativeDraggable||!(Oc||zn))){if(Ot.eventCanceled){this._onDrop();return}_i(P,"mouseup",x._disableDelayedDrag),_i(P,"touchend",x._disableDelayedDrag),_i(P,"touchcancel",x._disableDelayedDrag),_i(P,"mousemove",x._delayedDragTouchMoveHandler),_i(P,"touchmove",x._delayedDragTouchMoveHandler),I.supportPointer&&_i(P,"pointermove",x._delayedDragTouchMoveHandler),x._dragStartTimer=setTimeout(R,I.delay)}else R()}},_delayedDragTouchMoveHandler:function(h){var d=h.touches?h.touches[0]:h;Math.max(Math.abs(d.clientX-this._lastX),Math.abs(d.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$e&&U_($e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var h=this.el.ownerDocument;ci(h,"mouseup",this._disableDelayedDrag),ci(h,"touchend",this._disableDelayedDrag),ci(h,"touchcancel",this._disableDelayedDrag),ci(h,"mousemove",this._delayedDragTouchMoveHandler),ci(h,"touchmove",this._delayedDragTouchMoveHandler),ci(h,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(h,d){d=d||h.pointerType=="touch"&&h,!this.nativeDraggable||d?this.options.supportPointer?_i(document,"pointermove",this._onTouchMove):d?_i(document,"touchmove",this._onTouchMove):_i(document,"mousemove",this._onTouchMove):(_i($e,"dragend",this),_i(Ui,"dragstart",this._onDragStart));try{document.selection?_d(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(h,d){if(nl=!1,Ui&&$e){Wr("dragStarted",this,{evt:d}),this.nativeDraggable&&_i(document,"dragover",nB);var m=this.options;!h&&eo($e,m.dragClass,!1),eo($e,m.ghostClass,!0),Ot.active=this,h&&this._appendGhost(),Mr({sortable:this,name:"start",originalEvent:d})}else this._nulling()},_emulateDragOver:function(){if(Po){this._lastX=Po.clientX,this._lastY=Po.clientY,VE();for(var h=document.elementFromPoint(Po.clientX,Po.clientY),d=h;h&&h.shadowRoot&&(h=h.shadowRoot.elementFromPoint(Po.clientX,Po.clientY),h!==d);)d=h;if($e.parentNode[io]._isOutsideThisEl(h),d)do{if(d[io]){var m=void 0;if(m=d[io]._onDragOver({clientX:Po.clientX,clientY:Po.clientY,target:h,rootEl:d}),m&&!this.options.dragoverBubble)break}h=d}while(d=d.parentNode);UE()}},_onTouchMove:function(h){if(Ys){var d=this.options,m=d.fallbackTolerance,x=d.fallbackOffset,T=h.touches?h.touches[0]:h,I=Gt&&ul(Gt,!0),P=Gt&&I&&I.a,R=Gt&&I&&I.d,C=sd&&vr&&hT(vr),Z=(T.clientX-Ys.clientX+x.x)/(P||1)+(C?C[0]-V_[0]:0)/(P||1),ee=(T.clientY-Ys.clientY+x.y)/(R||1)+(C?C[1]-V_[1]:0)/(R||1);if(!Ot.active&&!nl){if(m&&Math.max(Math.abs(T.clientX-this._lastX),Math.abs(T.clientY-this._lastY))<m)return;this._onDragStart(h,!0)}if(Gt){I?(I.e+=Z-(N_||0),I.f+=ee-(j_||0)):I={a:1,b:0,c:0,d:1,e:Z,f:ee};var ne="matrix(".concat(I.a,",").concat(I.b,",").concat(I.c,",").concat(I.d,",").concat(I.e,",").concat(I.f,")");Rt(Gt,"webkitTransform",ne),Rt(Gt,"mozTransform",ne),Rt(Gt,"msTransform",ne),Rt(Gt,"transform",ne),N_=Z,j_=ee,Po=T}h.cancelable&&h.preventDefault()}},_appendGhost:function(){if(!Gt){var h=this.options.fallbackOnBody?document.body:Ui,d=cr($e,!0,sd,!0,h),m=this.options;if(sd){for(vr=h;Rt(vr,"position")==="static"&&Rt(vr,"transform")==="none"&&vr!==document;)vr=vr.parentNode;vr!==document.body&&vr!==document.documentElement?(vr===document&&(vr=tn()),d.top+=vr.scrollTop,d.left+=vr.scrollLeft):vr=tn(),V_=hT(vr)}Gt=$e.cloneNode(!0),eo(Gt,m.ghostClass,!1),eo(Gt,m.fallbackClass,!0),eo(Gt,m.dragClass,!0),Rt(Gt,"transition",""),Rt(Gt,"transform",""),Rt(Gt,"box-sizing","border-box"),Rt(Gt,"margin",0),Rt(Gt,"top",d.top),Rt(Gt,"left",d.left),Rt(Gt,"width",d.width),Rt(Gt,"height",d.height),Rt(Gt,"opacity","0.8"),Rt(Gt,"position",sd?"absolute":"fixed"),Rt(Gt,"zIndex","100000"),Rt(Gt,"pointerEvents","none"),Ot.ghost=Gt,h.appendChild(Gt),Rt(Gt,"transform-origin",dT/parseInt(Gt.style.width)*100+"% "+pT/parseInt(Gt.style.height)*100+"%")}},_onDragStart:function(h,d){var m=this,x=h.dataTransfer,T=m.options;if(Wr("dragStart",this,{evt:h}),Ot.eventCanceled){this._onDrop();return}Wr("setupClone",this),Ot.eventCanceled||(Xi=BE($e),Xi.draggable=!1,Xi.style["will-change"]="",this._hideClone(),eo(Xi,this.options.chosenClass,!1),Ot.clone=Xi),m.cloneId=_d(function(){Wr("clone",m),!Ot.eventCanceled&&(m.options.removeCloneOnHide||Ui.insertBefore(Xi,$e),m._hideClone(),Mr({sortable:m,name:"clone"}))}),!d&&eo($e,T.dragClass,!0),d?(Id=!0,m._loopId=setInterval(m._emulateDragOver,50)):(ci(document,"mouseup",m._onDrop),ci(document,"touchend",m._onDrop),ci(document,"touchcancel",m._onDrop),x&&(x.effectAllowed="move",T.setData&&T.setData.call(m,x,$e)),_i(document,"drop",m),Rt($e,"transform","translateZ(0)")),nl=!0,m._dragStartId=_d(m._dragStarted.bind(m,d,h)),_i(document,"selectstart",m),wc=!0,Ac&&Rt(document.body,"user-select","none")},_onDragOver:function(h){var d=this.el,m=h.target,x,T,I,P=this.options,R=P.group,C=Ot.active,Z=od===R,ee=P.sort,ne=_r||C,Te,Me=this,ke=!1;if(ng)return;function ve(on,nn){Wr(on,Me,rn({evt:h,isOwner:Z,axis:Te?"vertical":"horizontal",revert:I,dragRect:x,targetRect:T,canSort:ee,fromSortable:ne,target:m,completed:ut,onMove:function(zo,kr){return ad(Ui,d,$e,x,zo,cr(zo),h,kr)},changed:tt},nn))}function Xe(){ve("dragOverAnimationCapture"),Me.captureAnimationState(),Me!==ne&&ne.captureAnimationState()}function ut(on){return ve("dragOverCompleted",{insertion:on}),on&&(Z?C._hideClone():C._showClone(Me),Me!==ne&&(eo($e,_r?_r.options.ghostClass:C.options.ghostClass,!1),eo($e,P.ghostClass,!0)),_r!==Me&&Me!==Ot.active?_r=Me:Me===Ot.active&&_r&&(_r=null),ne===Me&&(Me._ignoreWhileAnimating=m),Me.animateAll(function(){ve("dragOverAnimationComplete"),Me._ignoreWhileAnimating=null}),Me!==ne&&(ne.animateAll(),ne._ignoreWhileAnimating=null)),(m===$e&&!$e.animated||m===d&&!m.animated)&&(rl=null),!P.dragoverBubble&&!h.rootEl&&m!==document&&($e.parentNode[io]._isOutsideThisEl(h.target),!on&&Ks(h)),!P.dragoverBubble&&h.stopPropagation&&h.stopPropagation(),ke=!0}function tt(){to=yo($e),ds=yo($e,P.draggable),Mr({sortable:Me,name:"change",toEl:d,newIndex:to,newDraggableIndex:ds,originalEvent:h})}if(h.preventDefault!==void 0&&h.cancelable&&h.preventDefault(),m=Jo(m,P.draggable,d,!0),ve("dragOver"),Ot.eventCanceled)return ke;if($e.contains(h.target)||m.animated&&m.animatingX&&m.animatingY||Me._ignoreWhileAnimating===m)return ut(!1);if(Id=!1,C&&!P.disabled&&(Z?ee||(I=Zi!==Ui):_r===this||(this.lastPutMode=od.checkPull(this,C,$e,h))&&R.checkPut(this,C,$e,h))){if(Te=this._getDirection(h,m)==="vertical",x=cr($e),ve("dragOverValid"),Ot.eventCanceled)return ke;if(I)return Zi=Ui,Xe(),this._hideClone(),ve("revert"),Ot.eventCanceled||(Qs?Ui.insertBefore($e,Qs):Ui.appendChild($e)),ut(!0);var yt=Eg(d,P.draggable);if(!yt||cB(h,Te,this)&&!yt.animated){if(yt===$e)return ut(!1);if(yt&&d===h.target&&(m=yt),m&&(T=cr(m)),ad(Ui,d,$e,x,m,T,h,!!m)!==!1)return Xe(),d.appendChild($e),Zi=d,tt(),ut(!0)}else if(yt&&lB(h,Te,this)){var _t=dl(d,0,P,!0);if(_t===$e)return ut(!1);if(m=_t,T=cr(m),ad(Ui,d,$e,x,m,T,h,!1)!==!1)return Xe(),d.insertBefore($e,_t),Zi=d,tt(),ut(!0)}else if(m.parentNode===d){T=cr(m);var st=0,qe,$t=$e.parentNode!==d,pi=!rB($e.animated&&$e.toRect||x,m.animated&&m.toRect||T,Te),X=Te?"top":"left",lt=uT(m,"top","top")||uT($e,"top","top"),Rn=lt?lt.scrollTop:void 0;rl!==m&&(qe=T[X],kc=!1,nd=!pi&&P.invertSwap||$t),st=uB(h,m,T,Te,pi?1:P.swapThreshold,P.invertedSwapThreshold==null?P.swapThreshold:P.invertedSwapThreshold,nd,rl===m);var hr;if(st!==0){var it=yo($e);do it-=st,hr=Zi.children[it];while(hr&&(Rt(hr,"display")==="none"||hr===Gt))}if(st===0||hr===m)return ut(!1);rl=m,Cc=st;var wi=m.nextElementSibling,no=!1;no=st===1;var Cr=ad(Ui,d,$e,x,m,T,h,no);if(Cr!==!1)return(Cr===1||Cr===-1)&&(no=Cr===1),ng=!0,setTimeout(aB,30),Xe(),no&&!wi?d.appendChild($e):m.parentNode.insertBefore($e,no?wi:m),lt&&OE(lt,0,Rn-lt.scrollTop),Zi=$e.parentNode,qe!==void 0&&!nd&&(md=Math.abs(qe-cr(m)[X])),tt(),ut(!0)}if(d.contains($e))return ut(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ci(document,"mousemove",this._onTouchMove),ci(document,"touchmove",this._onTouchMove),ci(document,"pointermove",this._onTouchMove),ci(document,"dragover",Ks),ci(document,"mousemove",Ks),ci(document,"touchmove",Ks)},_offUpEvents:function(){var h=this.el.ownerDocument;ci(h,"mouseup",this._onDrop),ci(h,"touchend",this._onDrop),ci(h,"pointerup",this._onDrop),ci(h,"touchcancel",this._onDrop),ci(document,"selectstart",this)},_onDrop:function(h){var d=this.el,m=this.options;if(to=yo($e),ds=yo($e,m.draggable),Wr("drop",this,{evt:h}),Zi=$e&&$e.parentNode,to=yo($e),ds=yo($e,m.draggable),Ot.eventCanceled){this._nulling();return}nl=!1,nd=!1,kc=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),sg(this.cloneId),sg(this._dragStartId),this.nativeDraggable&&(ci(document,"drop",this),ci(d,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ac&&Rt(document.body,"user-select",""),Rt($e,"transform",""),h&&(wc&&(h.cancelable&&h.preventDefault(),!m.dropBubble&&h.stopPropagation()),Gt&&Gt.parentNode&&Gt.parentNode.removeChild(Gt),(Ui===Zi||_r&&_r.lastPutMode!=="clone")&&Xi&&Xi.parentNode&&Xi.parentNode.removeChild(Xi),$e&&(this.nativeDraggable&&ci($e,"dragend",this),U_($e),$e.style["will-change"]="",wc&&!nl&&eo($e,_r?_r.options.ghostClass:this.options.ghostClass,!1),eo($e,this.options.chosenClass,!1),Mr({sortable:this,name:"unchoose",toEl:Zi,newIndex:null,newDraggableIndex:null,originalEvent:h}),Ui!==Zi?(to>=0&&(Mr({rootEl:Zi,name:"add",toEl:Zi,fromEl:Ui,originalEvent:h}),Mr({sortable:this,name:"remove",toEl:Zi,originalEvent:h}),Mr({rootEl:Zi,name:"sort",toEl:Zi,fromEl:Ui,originalEvent:h}),Mr({sortable:this,name:"sort",toEl:Zi,originalEvent:h})),_r&&_r.save()):to!==al&&to>=0&&(Mr({sortable:this,name:"update",toEl:Zi,originalEvent:h}),Mr({sortable:this,name:"sort",toEl:Zi,originalEvent:h})),Ot.active&&((to==null||to===-1)&&(to=al,ds=Ic),Mr({sortable:this,name:"end",toEl:Zi,originalEvent:h}),this.save()))),this._nulling()},_nulling:function(){Wr("nulling",this),Ui=$e=Zi=Gt=Qs=Xi=fd=ps=Ys=Po=wc=to=ds=al=Ic=rl=Cc=_r=od=Ot.dragged=Ot.ghost=Ot.clone=Ot.active=null,kd.forEach(function(h){h.checked=!0}),kd.length=N_=j_=0},handleEvent:function(h){switch(h.type){case"drop":case"dragend":this._onDrop(h);break;case"dragenter":case"dragover":$e&&(this._onDragOver(h),sB(h));break;case"selectstart":h.preventDefault();break}},toArray:function(){for(var h=[],d,m=this.el.children,x=0,T=m.length,I=this.options;x<T;x++)d=m[x],Jo(d,I.draggable,this.el,!1)&&h.push(d.getAttribute(I.dataIdAttr)||dB(d));return h},sort:function(h,d){var m={},x=this.el;this.toArray().forEach(function(T,I){var P=x.children[I];Jo(P,this.options.draggable,x,!1)&&(m[T]=P)},this),d&&this.captureAnimationState(),h.forEach(function(T){m[T]&&(x.removeChild(m[T]),x.appendChild(m[T]))}),d&&this.animateAll()},save:function(){var h=this.options.store;h&&h.set&&h.set(this)},closest:function(h,d){return Jo(h,d||this.options.draggable,this.el,!1)},option:function(h,d){var m=this.options;if(d===void 0)return m[h];var x=Bc.modifyOption(this,h,d);typeof x<"u"?m[h]=x:m[h]=d,h==="group"&&jE(m)},destroy:function(){Wr("destroy",this);var h=this.el;h[io]=null,ci(h,"mousedown",this._onTapStart),ci(h,"touchstart",this._onTapStart),ci(h,"pointerdown",this._onTapStart),this.nativeDraggable&&(ci(h,"dragover",this),ci(h,"dragenter",this)),Array.prototype.forEach.call(h.querySelectorAll("[draggable]"),function(d){d.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Cd.splice(Cd.indexOf(this.el),1),this.el=h=null},_hideClone:function(){if(!ps){if(Wr("hideClone",this),Ot.eventCanceled)return;Rt(Xi,"display","none"),this.options.removeCloneOnHide&&Xi.parentNode&&Xi.parentNode.removeChild(Xi),ps=!0}},_showClone:function(h){if(h.lastPutMode!=="clone"){this._hideClone();return}if(ps){if(Wr("showClone",this),Ot.eventCanceled)return;$e.parentNode==Ui&&!this.options.group.revertClone?Ui.insertBefore(Xi,$e):Qs?Ui.insertBefore(Xi,Qs):Ui.appendChild(Xi),this.options.group.revertClone&&this.animate($e,Xi),Rt(Xi,"display",""),ps=!1}}};function sB(h){h.dataTransfer&&(h.dataTransfer.dropEffect="move"),h.cancelable&&h.preventDefault()}function ad(h,d,m,x,T,I,P,R){var C,Z=h[io],ee=Z.options.onMove,ne;return window.CustomEvent&&!zn&&!Oc?C=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(C=document.createEvent("Event"),C.initEvent("move",!0,!0)),C.to=d,C.from=h,C.dragged=m,C.draggedRect=x,C.related=T||d,C.relatedRect=I||cr(d),C.willInsertAfter=R,C.originalEvent=P,h.dispatchEvent(C),ee&&(ne=ee.call(Z,C,P)),ne}function U_(h){h.draggable=!1}function aB(){ng=!1}function lB(h,d,m){var x=cr(dl(m.el,0,m.options,!0)),T=10;return d?h.clientX<x.left-T||h.clientY<x.top&&h.clientX<x.right:h.clientY<x.top-T||h.clientY<x.bottom&&h.clientX<x.left}function cB(h,d,m){var x=cr(Eg(m.el,m.options.draggable)),T=10;return d?h.clientX>x.right+T||h.clientX<=x.right&&h.clientY>x.bottom&&h.clientX>=x.left:h.clientX>x.right&&h.clientY>x.top||h.clientX<=x.right&&h.clientY>x.bottom+T}function uB(h,d,m,x,T,I,P,R){var C=x?h.clientY:h.clientX,Z=x?m.height:m.width,ee=x?m.top:m.left,ne=x?m.bottom:m.right,Te=!1;if(!P){if(R&&md<Z*T){if(!kc&&(Cc===1?C>ee+Z*I/2:C<ne-Z*I/2)&&(kc=!0),kc)Te=!0;else if(Cc===1?C<ee+md:C>ne-md)return-Cc}else if(C>ee+Z*(1-T)/2&&C<ne-Z*(1-T)/2)return hB(d)}return Te=Te||P,Te&&(C<ee+Z*I/2||C>ne-Z*I/2)?C>ee+Z/2?1:-1:0}function hB(h){return yo($e)<yo(h)?1:-1}function dB(h){for(var d=h.tagName+h.className+h.src+h.href+h.textContent,m=d.length,x=0;m--;)x+=d.charCodeAt(m);return x.toString(36)}function pB(h){kd.length=0;for(var d=h.getElementsByTagName("input"),m=d.length;m--;){var x=d[m];x.checked&&kd.push(x)}}function _d(h){return setTimeout(h,0)}function sg(h){return clearTimeout(h)}Nd&&_i(document,"touchmove",function(h){(Ot.active||nl)&&h.cancelable&&h.preventDefault()});Ot.utils={on:_i,off:ci,css:Rt,find:RE,is:function(h,d){return!!Jo(h,d,h,!1)},extend:XO,throttle:LE,closest:Jo,toggleClass:eo,clone:BE,index:yo,nextTick:_d,cancelNextTick:sg,detectDirection:NE,getChild:dl};Ot.get=function(h){return h[io]};Ot.mount=function(){for(var h=arguments.length,d=new Array(h),m=0;m<h;m++)d[m]=arguments[m];d[0].constructor===Array&&(d=d[0]),d.forEach(function(x){if(!x.prototype||!x.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(x));x.utils&&(Ot.utils=rn(rn({},Ot.utils),x.utils)),Bc.mount(x)})};Ot.create=function(h,d){return new Ot(h,d)};Ot.version=$O;var sr=[],Tc,ag,lg=!1,q_,G_,Pd,Ec;function fB(){function h(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var d in this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this))}return h.prototype={dragStarted:function(d){var m=d.originalEvent;this.sortable.nativeDraggable?_i(document,"dragover",this._handleAutoScroll):this.options.supportPointer?_i(document,"pointermove",this._handleFallbackAutoScroll):m.touches?_i(document,"touchmove",this._handleFallbackAutoScroll):_i(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(d){var m=d.originalEvent;!this.options.dragOverBubble&&!m.rootEl&&this._handleAutoScroll(m)},drop:function(){this.sortable.nativeDraggable?ci(document,"dragover",this._handleAutoScroll):(ci(document,"pointermove",this._handleFallbackAutoScroll),ci(document,"touchmove",this._handleFallbackAutoScroll),ci(document,"mousemove",this._handleFallbackAutoScroll)),mT(),gd(),YO()},nulling:function(){Pd=ag=Tc=lg=Ec=q_=G_=null,sr.length=0},_handleFallbackAutoScroll:function(d){this._handleAutoScroll(d,!0)},_handleAutoScroll:function(d,m){var x=this,T=(d.touches?d.touches[0]:d).clientX,I=(d.touches?d.touches[0]:d).clientY,P=document.elementFromPoint(T,I);if(Pd=d,m||this.options.forceAutoScrollFallback||Oc||zn||Ac){$_(d,this.options,P,m);var R=ms(P,!0);lg&&(!Ec||T!==q_||I!==G_)&&(Ec&&mT(),Ec=setInterval(function(){var C=ms(document.elementFromPoint(T,I),!0);C!==R&&(R=C,gd()),$_(d,x.options,C,m)},10),q_=T,G_=I)}else{if(!this.options.bubbleScroll||ms(P,!0)===tn()){gd();return}$_(d,this.options,ms(P,!1),!1)}}},Pn(h,{pluginName:"scroll",initializeByDefault:!0})}function gd(){sr.forEach(function(h){clearInterval(h.pid)}),sr=[]}function mT(){clearInterval(Ec)}var $_=LE(function(h,d,m,x){if(d.scroll){var T=(h.touches?h.touches[0]:h).clientX,I=(h.touches?h.touches[0]:h).clientY,P=d.scrollSensitivity,R=d.scrollSpeed,C=tn(),Z=!1,ee;ag!==m&&(ag=m,gd(),Tc=d.scroll,ee=d.scrollFn,Tc===!0&&(Tc=ms(m,!0)));var ne=0,Te=Tc;do{var Me=Te,ke=cr(Me),ve=ke.top,Xe=ke.bottom,ut=ke.left,tt=ke.right,yt=ke.width,_t=ke.height,st=void 0,qe=void 0,$t=Me.scrollWidth,pi=Me.scrollHeight,X=Rt(Me),lt=Me.scrollLeft,Rn=Me.scrollTop;Me===C?(st=yt<$t&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),qe=_t<pi&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(st=yt<$t&&(X.overflowX==="auto"||X.overflowX==="scroll"),qe=_t<pi&&(X.overflowY==="auto"||X.overflowY==="scroll"));var hr=st&&(Math.abs(tt-T)<=P&&lt+yt<$t)-(Math.abs(ut-T)<=P&&!!lt),it=qe&&(Math.abs(Xe-I)<=P&&Rn+_t<pi)-(Math.abs(ve-I)<=P&&!!Rn);if(!sr[ne])for(var wi=0;wi<=ne;wi++)sr[wi]||(sr[wi]={});(sr[ne].vx!=hr||sr[ne].vy!=it||sr[ne].el!==Me)&&(sr[ne].el=Me,sr[ne].vx=hr,sr[ne].vy=it,clearInterval(sr[ne].pid),(hr!=0||it!=0)&&(Z=!0,sr[ne].pid=setInterval(function(){x&&this.layer===0&&Ot.active._onTouchMove(Pd);var no=sr[this.layer].vy?sr[this.layer].vy*R:0,Cr=sr[this.layer].vx?sr[this.layer].vx*R:0;typeof ee=="function"&&ee.call(Ot.dragged.parentNode[io],Cr,no,h,Pd,sr[this.layer].el)!=="continue"||OE(sr[this.layer].el,Cr,no)}.bind({layer:ne}),24))),ne++}while(d.bubbleScroll&&Te!==C&&(Te=ms(Te,!1)));lg=Z}},30),qE=function(h){var d=h.originalEvent,m=h.putSortable,x=h.dragEl,T=h.activeSortable,I=h.dispatchSortableEvent,P=h.hideGhostForTarget,R=h.unhideGhostForTarget;if(d){var C=m||T;P();var Z=d.changedTouches&&d.changedTouches.length?d.changedTouches[0]:d,ee=document.elementFromPoint(Z.clientX,Z.clientY);R(),C&&!C.el.contains(ee)&&(I("spill"),this.onSpill({dragEl:x,putSortable:m}))}};function Sg(){}Sg.prototype={startIndex:null,dragStart:function(h){var d=h.oldDraggableIndex;this.startIndex=d},onSpill:function(h){var d=h.dragEl,m=h.putSortable;this.sortable.captureAnimationState(),m&&m.captureAnimationState();var x=dl(this.sortable.el,this.startIndex,this.options);x?this.sortable.el.insertBefore(d,x):this.sortable.el.appendChild(d),this.sortable.animateAll(),m&&m.animateAll()},drop:qE};Pn(Sg,{pluginName:"revertOnSpill"});function Ag(){}Ag.prototype={onSpill:function(h){var d=h.dragEl,m=h.putSortable,x=m||this.sortable;x.captureAnimationState(),d.parentNode&&d.parentNode.removeChild(d),x.animateAll()},drop:qE};Pn(Ag,{pluginName:"removeOnSpill"});Ot.mount(new fB);Ot.mount(Ag,Sg);const mB=["Start","Add","Remove","Update","End"],_B=["Choose","Unchoose","Sort","Filter","Clone"],_T={manageAndEmit:mB,emit:_B};[...[..._T.manageAndEmit,..._T.emit].map(h=>h.toLowerCase())];var yd=(h,d=[])=>({parts:(...m)=>{if(gB(d))return yd(h,m);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...m)=>yd(h,[...d,...m]),rename:m=>yd(m,d),keys:()=>d,build:()=>[...new Set(d)].reduce((m,x)=>Object.assign(m,{[x]:{selector:[`&[data-scope="${ol(h)}"][data-part="${ol(x)}"]`,`& [data-scope="${ol(h)}"][data-part="${ol(x)}"]`].join(", "),attrs:{"data-scope":ol(h),"data-part":ol(x)}}}),{})}),ol=h=>h.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),gB=h=>h.length===0,yB=h=>h.nodeType===Node.DOCUMENT_NODE?h:h.ownerDocument??document;function vB(h){const d={getRootNode:m=>{var x;return((x=m.getRootNode)==null?void 0:x.call(m))??document},getDoc:m=>yB(d.getRootNode(m)),getWin:m=>d.getDoc(m).defaultView??window,getActiveElement:m=>d.getDoc(m).activeElement,isActiveElement:(m,x)=>x===d.getActiveElement(m),focus(m,x){x!=null&&(d.isActiveElement(m,x)||x.focus({preventScroll:!0}))},getById:(m,x)=>d.getRootNode(m).getElementById(x),setValue:(m,x)=>{if(m==null||x==null)return;const T=x.toString();m.value!==T&&(m.value=x.toString())}};return{...d,...h}}var xB=yd("switch").parts("root","label","control","thumb");xB.build();var gT=vB({getRootId:h=>{var d;return((d=h.ids)==null?void 0:d.root)??`switch:${h.id}`},getLabelId:h=>{var d;return((d=h.ids)==null?void 0:d.label)??`switch:${h.id}:label`},getThumbId:h=>{var d;return((d=h.ids)==null?void 0:d.thumb)??`switch:${h.id}:thumb`},getControlId:h=>{var d;return((d=h.ids)==null?void 0:d.control)??`switch:${h.id}:control`},getHiddenInputId:h=>{var d;return((d=h.ids)==null?void 0:d.input)??`switch:${h.id}:input`},getHiddenInputEl:h=>gT.getById(h,gT.getHiddenInputId(h))});const wB=Dn({__name:"Selector",props:{coordinates:{},aspectRatio:{default:"2/1"},mapOptions:{},zoom:{default:12},label:{},reset:{type:Boolean,default:!0},mapSelector:{type:Boolean,default:!0},showWarning:{type:Boolean,default:!0},showSelected:{type:Boolean,default:!0},language:{},modelValue:{},placeholder:{},searchFilter:{}},emits:["update:modelValue"],setup(h,{emit:d}){const m=h,x=d,T=en(),I=en(),P=en(),R=en(),C={location:{},postcode:"0",county:"",city:"",street:"",formatted:""};function Z(st){return JSON.parse(JSON.stringify(st))}const ee=en(Z(C)),ne={warning:{nb:`Posisjon er ikke gyldig, ${m.mapSelector?"dra markøren eller":""} søk opp posisjon`,en:`Position is not valid, ${m.mapSelector?"drag the cursor or":""} search for position`},placeholder:{nb:"Hent posisjon fra kart",en:"Retrieve position from map"},selectedPosition:{nb:"Valgt posisjon",en:"Selected position"}},Te=[10.738616,59.906103],Me=Hr(()=>({center:ee.value?.location?.coordinates||Te,zoom:m.zoom,dragPan:!0,scrollZoom:!1,dragRotate:!1,cooperativeGestures:!1,...m.mapOptions})),ke=Hr(()=>m.language||document.querySelector("html")?.getAttribute("lang")||"auto"),ve=Hr(()=>m.searchFilter||"no");yT(()=>ee.value,st=>{if(!I.value||!P.value)return;const qe=ee.value?.location?.coordinates||Te;I.value.setLngLat(qe),P.value.flyTo({center:qe}),ee.value?.location?.coordinates?.length&&x("update:modelValue",ee.value)},{immediate:!0,deep:!0});function Xe(){ee.value=Z(C),x("update:modelValue",null),R.value.clear()}const ut=Hr(()=>{if(ee?.value?.location?.coordinates?.[0])return ee.value.formatted});async function tt(){fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${ee.value.location?.coordinates?.[0]},${ee.value.location?.coordinates?.[1]}.json?access_token=pk.eyJ1IjoiY3JzdGVuIiwiYSI6ImNrNTZxa3gzMDE3dGszaHBod2RnMXQ0anYifQ.FBWO3jVL_VK4RCznouV-iA&language=${ke.value}`).then(st=>st.json()).then(st=>{const qe=yt(st.features),$t=st.features.find(pi=>pi.id.startsWith("address"));ee.value.street=`${qe.address} ${$t?.address}`,ee.value.city=qe.place,ee.value.county=qe.region||qe.place,ee.value.postcode=qe.postcode,ee.value.formatted=$t?.place_name}).catch(st=>console.error(st))}function yt(st){return st?.length?Object.fromEntries(st.map(qe=>[qe.id.split(".")?.[0],qe.text])):{}}function _t(){T.value&&(P.value=new H_.Map({container:T.value,...Me.value,language:ke.value}),I.value=new H_.Marker({draggable:!0,color:"var(--kvass-location-selector-primary-color)"}).setLngLat(ee.value.location?.coordinates||Te).addTo(P.value),I.value.on("dragend",st=>{st?.target&&(ee.value.location.coordinates=Object.values(st.target?._lngLat||{}),tt())}),P.value.addControl(new k2.FullscreenControl,"top-left"),P.value.addControl(new k2.NavigationControl,"top-left"),R.value=new DR({accessToken:Me.value.accessToken,zoom:4,placeholder:m.placeholder||ne?.placeholder?.[ke.value],filter:function(st){return st.context.some(qe=>{if(ve.value)return qe?.short_code===ve.value})},language:ke.value}),P.value.addControl(R.value),R.value.on("result",st=>{const qe=st.result,$t=yt(qe.context);ee.value.location.coordinates=qe?.geometry?.coordinates,ee.value.street=`${qe.text} ${qe.address}`,ee.value.city=$t.place,ee.value.county=$t.region,ee.value.postcode=$t.postcode,ee.value.formatted=qe?.place_name}))}return dD(()=>{m.modelValue&&(ee.value=m.modelValue),_t()}),pD(()=>{P.value?.remove(),R.value.clear()}),(st,qe)=>(ur(),Cn("div",{class:cg(["kvass-location-selector",{"kvass-location-selector--hide-map":!m.mapSelector}]),style:Dd({"--kvass-location-selector-aspect-ratio":m.aspectRatio})},[sl("div",{ref_key:"mapEl",ref:T,class:"kvass-location-selector__map"},null,512),W_(An(RO),{justify:"space-between"},{default:vd(()=>[(ut.value?m.showSelected:m.showWarning)?(ur(),In(An($L),{key:0,class:"",variant:ut.value?"info":"danger"},{default:vd(()=>[vT(Pc(ut.value?`${ne?.selectedPosition?.[ke.value]}: ${ut.value}`:ne.warning?.[ke.value]),1)]),_:1},8,["variant"])):Qo("",!0),m.reset?(ur(),In(An(bg),{key:1,icon:"fa-pro-light:arrow-rotate-left",onClick:Xe})):Qo("",!0)]),_:1})],6))}});export{wB as j};