@opengis/gis 0.0.3 → 0.0.4

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.
@@ -1,4 +1,4 @@
1
- "use strict";var av=Object.defineProperty;var lv=(p,d,_)=>d in p?av(p,d,{enumerable:!0,configurable:!0,writable:!0,value:_}):p[d]=_;var Lr=(p,d,_)=>lv(p,typeof d!="symbol"?d+"":d,_);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("vue");function xg(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var $u={exports:{}};/**
1
+ "use strict";var av=Object.defineProperty;var lv=(p,d,_)=>d in p?av(p,d,{enumerable:!0,configurable:!0,writable:!0,value:_}):p[d]=_;var Lr=(p,d,_)=>lv(p,typeof d!="symbol"?d+"":d,_);const A=require("vue");function xg(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var $u={exports:{}};/**
2
2
  * MapLibre GL JS
3
3
  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.5.0/LICENSE.txt
4
4
  */var cv=$u.exports,nm;function uv(){return nm||(nm=1,function(p,d){(function(_,b){p.exports=b()})(cv,function(){var _={},b={};function k(v,o,B){if(b[v]=B,v==="index"){var D="var sharedModule = {}; ("+b.shared+")(sharedModule); ("+b.worker+")(sharedModule);",L={};return b.shared(L),b.index(_,L),typeof window<"u"&&_.setWorkerUrl(window.URL.createObjectURL(new Blob([D],{type:"text/javascript"}))),_}}k("shared",["exports"],function(v){function o(n,t,i,s){return new(i||(i=Promise))(function(c,f){function m(E){try{w(s.next(E))}catch(R){f(R)}}function y(E){try{w(s.throw(E))}catch(R){f(R)}}function w(E){var R;E.done?c(E.value):(R=E.value,R instanceof i?R:new i(function(V){V(R)})).then(m,y)}w((s=s.apply(n,t||[])).next())})}function B(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var D,L;function H(){if(L)return D;function n(t,i){this.x=t,this.y=i}return L=1,D=n,n.prototype={clone:function(){return new n(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,i){return this.clone()._rotateAround(t,i)},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 i=t.x-this.x,s=t.y-this.y;return i*i+s*s},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,i){return Math.atan2(this.x*i-this.y*t,this.x*t+this.y*i)},_matMult:function(t){var i=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=i,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 i=Math.cos(t),s=Math.sin(t),c=s*this.x+i*this.y;return this.x=i*this.x-s*this.y,this.y=c,this},_rotateAround:function(t,i){var s=Math.cos(t),c=Math.sin(t),f=i.y+c*(this.x-i.x)+s*(this.y-i.y);return this.x=i.x+s*(this.x-i.x)-c*(this.y-i.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t},D}typeof SuppressedError=="function"&&SuppressedError;var M,C,T=B(H()),N=function(){if(C)return M;function n(t,i,s,c){this.cx=3*t,this.bx=3*(s-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(c-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=s,this.p2y=c}return C=1,M=n,n.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,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var s=t,c=0;c<8;c++){var f=this.sampleCurveX(s)-t;if(Math.abs(f)<i)return s;var m=this.sampleCurveDerivativeX(s);if(Math.abs(m)<1e-6)break;s-=f/m}var y=0,w=1;for(s=t,c=0;c<20&&(f=this.sampleCurveX(s),!(Math.abs(f-t)<i));c++)t>f?y=s:w=s,s=.5*(w-y)+y;return s},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},M}(),G=B(N);let ie,le;function Ee(){return ie==null&&(ie=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ie}function te(){if(le==null&&(le=!1,Ee())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let s=0;s<5*5;s++){const c=4*s;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(s%5,Math.floor(s/5),1,1)}const i=t.getImageData(0,0,5,5).data;for(let s=0;s<5*5*4;s++)if(s%4!=3&&i[s]!==s){le=!0;break}}}return le||!1}var me=1e-6,De=typeof Float32Array<"u"?Float32Array:Array;function qe(){var n=new De(9);return De!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function rt(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function At(){var n=new De(3);return De!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function _t(n){return Math.hypot(n[0],n[1],n[2])}function lt(n,t,i){var s=new De(3);return s[0]=n,s[1]=t,s[2]=i,s}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});var vt,qt=_t;function Xt(n,t,i){var s=t[0],c=t[1],f=t[2],m=t[3];return n[0]=i[0]*s+i[4]*c+i[8]*f+i[12]*m,n[1]=i[1]*s+i[5]*c+i[9]*f+i[13]*m,n[2]=i[2]*s+i[6]*c+i[10]*f+i[14]*m,n[3]=i[3]*s+i[7]*c+i[11]*f+i[15]*m,n}function kr(){var n=new De(4);return De!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function xr(){var n=new De(2);return De!=Float32Array&&(n[0]=0,n[1]=0),n}function ni(n,t){var i=new De(2);return i[0]=n,i[1]=t,i}At(),vt=new De(4),De!=Float32Array&&(vt[0]=0,vt[1]=0,vt[2]=0,vt[3]=0),At(),lt(1,0,0),lt(0,1,0),kr(),kr(),qe(),xr();const ir=8192;function Wi(n,t,i){return t*(ir/(n.tileSize*Math.pow(2,i-n.tileID.overscaledZ)))}function Rr(n,t){return(n%t+t)%t}function Zi(n,t,i){return n*(1-i)+t*i}function Dr(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,i=t*n;return 4*(n<.5?i:3*(n-t)+i-.75)}function on(n,t,i,s){const c=new G(n,t,i,s);return f=>c.solve(f)}const Si=on(.25,.1,.25,1);function Wr(n,t,i){return Math.min(i,Math.max(t,n))}function Ki(n,t,i){const s=i-t,c=((n-t)%s+s)%s+t;return c===t?i:c}function Yr(n,...t){for(const i of t)for(const s in i)n[s]=i[s];return n}let Gi=1;function Mi(n,t,i){const s={};for(const c in n)s[c]=t.call(this,n[c],c,n);return s}function Tn(n,t,i){const s={};for(const c in n)t.call(this,n[c],c,n)&&(s[c]=n[c]);return s}function fi(n){return Array.isArray(n)?n.map(fi):typeof n=="object"&&n?Mi(n,fi):n}const yt={};function xt(n){yt[n]||(typeof console<"u"&&console.warn(n),yt[n]=!0)}function ct(n,t,i){return(i.y-n.y)*(t.x-n.x)>(t.y-n.y)*(i.x-n.x)}function Bt(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let Ht=null;function Ot(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const pr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Nt(n,t,i,s,c){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const f=new VideoFrame(n,{timestamp:0});try{const m=f==null?void 0:f.format;if(!m||!m.startsWith("BGR")&&!m.startsWith("RGB"))throw new Error(`Unrecognized format ${m}`);const y=m.startsWith("BGR"),w=new Uint8ClampedArray(s*c*4);if(yield f.copyTo(w,function(E,R,V,q,j){const W=4*Math.max(1,0),X=(Math.max(0,V)-V)*q*4+W,re=4*q,ae=Math.max(0,R),Se=Math.max(0,V);return{rect:{x:ae,y:Se,width:Math.min(E.width,R+q)-ae,height:Math.min(E.height,V+j)-Se},layout:[{offset:X,stride:re}]}}(n,t,i,s,c)),y)for(let E=0;E<w.length;E+=4){const R=w[E];w[E]=w[E+2],w[E+2]=R}return w}finally{f.close()}})}let mr,Ur;function mi(n,t,i,s){return n.addEventListener(t,i,s),{unsubscribe:()=>{n.removeEventListener(t,i,s)}}}function Ir(n){return n*Math.PI/180}function gi(n){return n/Math.PI*180}const Bi={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},hr={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},lr="AbortError";function Ft(){return new Error(lr)}const br={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function dr(n){return br.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const Jt="global-dispatcher";class fr extends Error{constructor(t,i,s,c){super(`AJAXError: ${i} (${t}): ${s}`),this.status=t,this.statusText=i,this.url=s,this.body=c}}const It=()=>Bt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,wt=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const s=dr(n.url);if(s)return s(n,t);if(Bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:Jt},t)}if(!(/^file:/.test(i=n.url)||/^file:/.test(It())&&!/^\w+:/.test(i))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(s,c){return o(this,void 0,void 0,function*(){const f=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:It(),signal:c.signal});let m,y;s.type!=="json"||f.headers.has("Accept")||f.headers.set("Accept","application/json");try{m=yield fetch(f)}catch(E){throw new fr(0,E.message,s.url,new Blob)}if(!m.ok){const E=yield m.blob();throw new fr(m.status,m.statusText,s.url,E)}y=s.type==="arrayBuffer"||s.type==="image"?m.arrayBuffer():s.type==="json"?m.json():m.text();const w=yield y;if(c.signal.aborted)throw Ft();return{data:w,cacheControl:m.headers.get("Cache-Control"),expires:m.headers.get("Expires")}})}(n,t);if(Bt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:Jt},t)}var i;return function(s,c){return new Promise((f,m)=>{var y;const w=new XMLHttpRequest;w.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(w.responseType="arraybuffer");for(const E in s.headers)w.setRequestHeader(E,s.headers[E]);s.type==="json"&&(w.responseType="text",!((y=s.headers)===null||y===void 0)&&y.Accept||w.setRequestHeader("Accept","application/json")),w.withCredentials=s.credentials==="include",w.onerror=()=>{m(new Error(w.statusText))},w.onload=()=>{if(!c.signal.aborted)if((w.status>=200&&w.status<300||w.status===0)&&w.response!==null){let E=w.response;if(s.type==="json")try{E=JSON.parse(w.response)}catch(R){return void m(R)}f({data:E,cacheControl:w.getResponseHeader("Cache-Control"),expires:w.getResponseHeader("Expires")})}else{const E=new Blob([w.response],{type:w.getResponseHeader("Content-Type")});m(new fr(w.status,w.statusText,s.url,E))}},c.signal.addEventListener("abort",()=>{w.abort(),m(Ft())}),w.send(s.body)})}(n,t)};function Ae(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),i=window.location;return t.protocol===i.protocol&&t.host===i.host}function K(n,t,i){i[n]&&i[n].indexOf(t)!==-1||(i[n]=i[n]||[],i[n].push(t))}function Q(n,t,i){if(i&&i[n]){const s=i[n].indexOf(t);s!==-1&&i[n].splice(s,1)}}class ee{constructor(t,i={}){Yr(this,i),this.type=t}}class he extends ee{constructor(t,i={}){super("error",Yr({error:t},i))}}class be{on(t,i){return this._listeners=this._listeners||{},K(t,i,this._listeners),{unsubscribe:()=>{this.off(t,i)}}}off(t,i){return Q(t,i,this._listeners),Q(t,i,this._oneTimeListeners),this}once(t,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},K(t,i,this._oneTimeListeners),this):new Promise(s=>this.once(t,s))}fire(t,i){typeof t=="string"&&(t=new ee(t,i||{}));const s=t.type;if(this.listens(s)){t.target=this;const c=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const y of c)y.call(this,t);const f=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const y of f)Q(s,y,this._oneTimeListeners),y.call(this,t);const m=this._eventedParent;m&&(Yr(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),m.fire(t))}else t instanceof he&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,i){return this._eventedParent=t,this._eventedParentData=i,this}}var $={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Me=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Te(n,t){const i={};for(const s in n)s!=="ref"&&(i[s]=n[s]);return Me.forEach(s=>{s in t&&(i[s]=t[s])}),i}function Ie(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let i=0;i<n.length;i++)if(!Ie(n[i],t[i]))return!1;return!0}if(typeof n=="object"&&n!==null&&t!==null){if(typeof t!="object"||Object.keys(n).length!==Object.keys(t).length)return!1;for(const i in n)if(!Ie(n[i],t[i]))return!1;return!0}return n===t}function Ve(n,t){n.push(t)}function Pe(n,t,i){Ve(i,{command:"addSource",args:[n,t[n]]})}function Qe(n,t,i){Ve(t,{command:"removeSource",args:[n]}),i[n]=!0}function ut(n,t,i,s){Qe(n,i,s),Pe(n,t,i)}function gt(n,t,i){let s;for(s in n[i])if(Object.prototype.hasOwnProperty.call(n[i],s)&&s!=="data"&&!Ie(n[i][s],t[i][s]))return!1;for(s in t[i])if(Object.prototype.hasOwnProperty.call(t[i],s)&&s!=="data"&&!Ie(n[i][s],t[i][s]))return!1;return!0}function Et(n,t,i,s,c,f){n=n||{},t=t||{};for(const m in n)Object.prototype.hasOwnProperty.call(n,m)&&(Ie(n[m],t[m])||i.push({command:f,args:[s,m,t[m],c]}));for(const m in t)Object.prototype.hasOwnProperty.call(t,m)&&!Object.prototype.hasOwnProperty.call(n,m)&&(Ie(n[m],t[m])||i.push({command:f,args:[s,m,t[m],c]}))}function jt(n){return n.id}function Rt(n,t){return n[t.id]=t,n}class Ue{constructor(t,i,s,c){this.message=(t?`${t}: `:"")+s,c&&(this.identifier=c),i!=null&&i.__line__&&(this.line=i.__line__)}}function ar(n,...t){for(const i of t)for(const s in i)n[s]=i[s];return n}class Qt extends Error{constructor(t,i){super(i),this.message=i,this.key=t}}class or{constructor(t,i=[]){this.parent=t,this.bindings={};for(const[s,c]of i)this.bindings[s]=c}concat(t){return new or(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const Dt={kind:"null"},Xe={kind:"number"},Mt={kind:"string"},Wt={kind:"boolean"},Tr={kind:"color"},gr={kind:"projectionDefinition"},yi={kind:"object"},Kt={kind:"value"},Vi={kind:"collator"},co={kind:"formatted"},yn={kind:"padding"},Cn={kind:"colorArray"},Li={kind:"numberArray"},_n={kind:"resolvedImage"},Mr={kind:"variableAnchorOffsetCollection"};function _i(n,t){return{kind:"array",itemType:n,N:t}}function yr(n){if(n.kind==="array"){const t=yr(n.itemType);return typeof n.N=="number"?`array<${t}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const Zn=[Dt,Xe,Mt,Wt,Tr,gr,co,yi,_i(Kt),yn,Li,Cn,_n,Mr];function sn(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!sn(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const i of Zn)if(!sn(i,t))return null}}return`Expected ${yr(n)} but found ${yr(t)} instead.`}function uo(n,t){return t.some(i=>i.kind===n.kind)}function En(n,t){return t.some(i=>i==="null"?n===null:i==="array"?Array.isArray(n):i==="object"?n&&!Array.isArray(n)&&typeof n=="object":i===typeof n)}function Ri(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const es=.96422,Mo=.82521,Zs=4/29,Kn=6/29,ts=3*Kn*Kn,Ks=Kn*Kn*Kn,Gs=Math.PI/180,Js=180/Math.PI;function rs(n){return(n%=360)<0&&(n+=360),n}function is([n,t,i,s]){let c,f;const m=ns((.2225045*(n=Pn(n))+.7168786*(t=Pn(t))+.0606169*(i=Pn(i)))/1);n===t&&t===i?c=f=m:(c=ns((.4360747*n+.3850649*t+.1430804*i)/es),f=ns((.0139322*n+.0971045*t+.7141733*i)/Mo));const y=116*m-16;return[y<0?0:y,500*(c-m),200*(m-f),s]}function Pn(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function ns(n){return n>Ks?Math.pow(n,1/3):n/ts+Zs}function Xs([n,t,i,s]){let c=(n+16)/116,f=isNaN(t)?c:c+t/500,m=isNaN(i)?c:c-i/200;return c=1*os(c),f=es*os(f),m=Mo*os(m),[In(3.1338561*f-1.6168667*c-.4906146*m),In(-.9787684*f+1.9161415*c+.033454*m),In(.0719453*f-.2289914*c+1.4052427*m),s]}function In(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function os(n){return n>Kn?n*n*n:ts*(n-Zs)}const tl=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function Gn(n,t){return tl(n,t)?n[t]:void 0}function Jn(n){return parseInt(n.padEnd(2,n),16)/255}function ss(n,t){return oi(t?n/100:n,0,1)}function oi(n,t,i){return Math.min(Math.max(t,n),i)}function tr(n){return!n.some(Number.isNaN)}const Mn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function si(n,t,i){return n+i*(t-n)}function Ln(n,t,i){return n.map((s,c)=>si(s,t[c],i))}class Vt{constructor(t,i,s,c=1,f=!0){this.r=t,this.g=i,this.b=s,this.a=c,f||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,i,s,c]))}static parse(t){if(t instanceof Vt)return t;if(typeof t!="string")return;const i=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=Gn(Mn,s);if(c){const[m,y,w]=c;return[m/255,y/255,w/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const m=s.length<6?1:2;let y=1;return[Jn(s.slice(y,y+=m)),Jn(s.slice(y,y+=m)),Jn(s.slice(y,y+=m)),Jn(s.slice(y,y+m)||"ff")]}if(s.startsWith("rgb")){const m=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(m){const[y,w,E,R,V,q,j,W,X,re,ae,Se]=m,fe=[R||" ",j||" ",re].join("");if(fe===" "||fe===" /"||fe===",,"||fe===",,,"){const U=[E,q,X].join(""),Y=U==="%%%"?100:U===""?255:0;if(Y){const ge=[oi(+w/Y,0,1),oi(+V/Y,0,1),oi(+W/Y,0,1),ae?ss(+ae,Se):1];if(tr(ge))return ge}}return}}const f=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(f){const[m,y,w,E,R,V,q,j,W]=f,X=[w||" ",R||" ",q].join("");if(X===" "||X===" /"||X===",,"||X===",,,"){const re=[+y,oi(+E,0,100),oi(+V,0,100),j?ss(+j,W):1];if(tr(re))return function([ae,Se,fe,U]){function Y(ge){const Re=(ge+ae/30)%12,$e=Se*Math.min(fe,1-fe);return fe-$e*Math.max(-1,Math.min(Re-3,9-Re,1))}return ae=rs(ae),Se/=100,fe/=100,[Y(0),Y(8),Y(4),U]}(re)}}}(t);return i?new Vt(...i,!1):void 0}get rgb(){const{r:t,g:i,b:s,a:c}=this,f=c||1/0;return this.overwriteGetter("rgb",[t/f,i/f,s/f,c])}get hcl(){return this.overwriteGetter("hcl",function(t){const[i,s,c,f]=is(t),m=Math.sqrt(s*s+c*c);return[Math.round(1e4*m)?rs(Math.atan2(c,s)*Js):NaN,m,i,f]}(this.rgb))}get lab(){return this.overwriteGetter("lab",is(this.rgb))}overwriteGetter(t,i){return Object.defineProperty(this,t,{value:i}),i}toString(){const[t,i,s,c]=this.rgb;return`rgba(${[t,i,s].map(f=>Math.round(255*f)).join(",")},${c})`}static interpolate(t,i,s,c="rgb"){switch(c){case"rgb":{const[f,m,y,w]=Ln(t.rgb,i.rgb,s);return new Vt(f,m,y,w,!1)}case"hcl":{const[f,m,y,w]=t.hcl,[E,R,V,q]=i.hcl;let j,W;if(isNaN(f)||isNaN(E))isNaN(f)?isNaN(E)?j=NaN:(j=E,y!==1&&y!==0||(W=R)):(j=f,V!==1&&V!==0||(W=m));else{let fe=E-f;E>f&&fe>180?fe-=360:E<f&&f-E>180&&(fe+=360),j=f+s*fe}const[X,re,ae,Se]=function([fe,U,Y,ge]){return fe=isNaN(fe)?0:fe*Gs,Xs([Y,Math.cos(fe)*U,Math.sin(fe)*U,ge])}([j,W??si(m,R,s),si(y,V,s),si(w,q,s)]);return new Vt(X,re,ae,Se,!1)}case"lab":{const[f,m,y,w]=Xs(Ln(t.lab,i.lab,s));return new Vt(f,m,y,w,!1)}}}}Vt.black=new Vt(0,0,0,1),Vt.white=new Vt(1,1,1,1),Vt.transparent=new Vt(0,0,0,0),Vt.red=new Vt(1,0,0,1);class vn{constructor(t,i,s){this.sensitivity=t?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,i){return this.collator.compare(t,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Oi=["bottom","center","top"];class ce{constructor(t,i,s,c,f,m){this.text=t,this.image=i,this.scale=s,this.fontStack=c,this.textColor=f,this.verticalAlign=m}}class ue{constructor(t){this.sections=t}static fromString(t){return new ue([new ce(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof ue?t:ue.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class pe{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof pe)return t;if(typeof t=="number")return new pe([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const i of t)if(typeof i!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new pe(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){return new pe(Ln(t.values,i.values,s))}}class ve{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof ve)return t;if(typeof t=="number")return new ve([t]);if(Array.isArray(t)){for(const i of t)if(typeof i!="number")return;return new ve(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){return new ve(Ln(t.values,i.values,s))}}class Ce{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Ce)return t;if(typeof t=="string"){const s=Vt.parse(t);return s?new Ce([s]):void 0}if(!Array.isArray(t))return;const i=[];for(const s of t){if(typeof s!="string")return;const c=Vt.parse(s);if(!c)return;i.push(c)}return new Ce(i)}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s,c="rgb"){const f=[];if(t.values.length!=i.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${i.values.length}), cannot interpolate.`);for(let m=0;m<t.values.length;m++)f.push(Vt.interpolate(t.values[m],i.values[m],s,c));return new Ce(f)}}class Be extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const st=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Je{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Je)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let i=0;i<t.length;i+=2){const s=t[i],c=t[i+1];if(typeof s!="string"||!st.has(s)||!Array.isArray(c)||c.length!==2||typeof c[0]!="number"||typeof c[1]!="number")return}return new Je(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){const c=t.values,f=i.values;if(c.length!==f.length)throw new Be(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${i.toString()}`);const m=[];for(let y=0;y<c.length;y+=2){if(c[y]!==f[y])throw new Be(`Cannot interpolate values containing mismatched anchors. from[${y}]: ${c[y]}, to[${y}]: ${f[y]}`);m.push(c[y]);const[w,E]=c[y+1],[R,V]=f[y+1];m.push([si(w,R,s),si(E,V,s)])}return new Je(m)}}class it{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new it({name:t,available:!1}):null}}class ze{constructor(t,i,s){this.from=t,this.to=i,this.transition=s}static interpolate(t,i,s){return new ze(t,i,s)}static parse(t){return t instanceof ze?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new ze(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new ze(t.from,t.to,t.transition):typeof t=="string"?new ze(t,t,1):void 0}}function Ke(n,t,i,s){return typeof n=="number"&&n>=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof i=="number"&&i>=0&&i<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[n,t,i,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[n,t,i,s]:[n,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ye(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof ze||n instanceof Vt||n instanceof vn||n instanceof ue||n instanceof pe||n instanceof ve||n instanceof Ce||n instanceof Je||n instanceof it)return!0;if(Array.isArray(n)){for(const t of n)if(!Ye(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!Ye(n[t]))return!1;return!0}return!1}function ft(n){if(n===null)return Dt;if(typeof n=="string")return Mt;if(typeof n=="boolean")return Wt;if(typeof n=="number")return Xe;if(n instanceof Vt)return Tr;if(n instanceof ze)return gr;if(n instanceof vn)return Vi;if(n instanceof ue)return co;if(n instanceof pe)return yn;if(n instanceof ve)return Li;if(n instanceof Ce)return Cn;if(n instanceof Je)return Mr;if(n instanceof it)return _n;if(Array.isArray(n)){const t=n.length;let i;for(const s of n){const c=ft(s);if(i){if(i===c)continue;i=Kt;break}i=c}return _i(i||Kt,t)}return yi}function ht(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof Vt||n instanceof ze||n instanceof ue||n instanceof pe||n instanceof ve||n instanceof Ce||n instanceof Je||n instanceof it?n.toString():JSON.stringify(n)}class nt{constructor(t,i){this.type=t,this.value=i}static parse(t,i){if(t.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Ye(t[1]))return i.error("invalid value");const s=t[1];let c=ft(s);const f=i.expectedType;return c.kind!=="array"||c.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(c=f),new nt(c,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Zt={string:Mt,number:Xe,boolean:Wt,object:yi};class dt{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let s,c=1;const f=t[0];if(f==="array"){let y,w;if(t.length>2){const E=t[1];if(typeof E!="string"||!(E in Zt)||E==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);y=Zt[E],c++}else y=Kt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return i.error('The length argument to "array" must be a positive integer literal',2);w=t[2],c++}s=_i(y,w)}else{if(!Zt[f])throw new Error(`Types doesn't contain name = ${f}`);s=Zt[f]}const m=[];for(;c<t.length;c++){const y=i.parse(t[c],c,Kt);if(!y)return null;m.push(y)}return new dt(s,m)}evaluate(t){for(let i=0;i<this.args.length;i++){const s=this.args[i].evaluate(t);if(!sn(this.type,ft(s)))return s;if(i===this.args.length-1)throw new Be(`Expected value to be of type ${yr(this.type)}, but found ${yr(ft(s))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Ut={"to-boolean":Wt,"to-color":Tr,"to-number":Xe,"to-string":Mt};class wr{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const s=t[0];if(!Ut[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&t.length!==2)return i.error("Expected one argument.");const c=Ut[s],f=[];for(let m=1;m<t.length;m++){const y=i.parse(t[m],m,Kt);if(!y)return null;f.push(y)}return new wr(c,f)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let i,s;for(const c of this.args){if(i=c.evaluate(t),s=null,i instanceof Vt)return i;if(typeof i=="string"){const f=t.parseColor(i);if(f)return f}else if(Array.isArray(i)&&(s=i.length<3||i.length>4?`Invalid rgba value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ke(i[0],i[1],i[2],i[3]),!s))return new Vt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Be(s||`Could not parse color from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"padding":{let i;for(const s of this.args){i=s.evaluate(t);const c=pe.parse(i);if(c)return c}throw new Be(`Could not parse padding from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"numberArray":{let i;for(const s of this.args){i=s.evaluate(t);const c=ve.parse(i);if(c)return c}throw new Be(`Could not parse numberArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"colorArray":{let i;for(const s of this.args){i=s.evaluate(t);const c=Ce.parse(i);if(c)return c}throw new Be(`Could not parse colorArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"variableAnchorOffsetCollection":{let i;for(const s of this.args){i=s.evaluate(t);const c=Je.parse(i);if(c)return c}throw new Be(`Could not parse variableAnchorOffsetCollection from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"number":{let i=null;for(const s of this.args){if(i=s.evaluate(t),i===null)return 0;const c=Number(i);if(!isNaN(c))return c}throw new Be(`Could not convert ${JSON.stringify(i)} to number.`)}case"formatted":return ue.fromString(ht(this.args[0].evaluate(t)));case"resolvedImage":return it.fromString(ht(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return ht(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const ho=["Unknown","Point","LineString","Polygon"];class Rn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ho[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let i=this._parseColorCache.get(t);return i||(i=Vt.parse(t),this._parseColorCache.set(t,i)),i}}class an{constructor(t,i,s=[],c,f=new or,m=[]){this.registry=t,this.path=s,this.key=s.map(y=>`[${y}]`).join(""),this.scope=f,this.errors=m,this.expectedType=c,this._isConstant=i}parse(t,i,s,c,f={}){return i?this.concat(i,s,c)._parse(t,f):this._parse(t,f)}_parse(t,i){function s(c,f,m){return m==="assert"?new dt(f,[c]):m==="coerce"?new wr(f,[c]):c}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const f=this.registry[c];if(f){let m=f.parse(t,this);if(!m)return null;if(this.expectedType){const y=this.expectedType,w=m.type;if(y.kind!=="string"&&y.kind!=="number"&&y.kind!=="boolean"&&y.kind!=="object"&&y.kind!=="array"||w.kind!=="value"){if(y.kind==="projectionDefinition"&&["string","array"].includes(w.kind)||["color","formatted","resolvedImage"].includes(y.kind)&&["value","string"].includes(w.kind)||["padding","numberArray"].includes(y.kind)&&["value","number","array"].includes(w.kind)||y.kind==="colorArray"&&["value","string","array"].includes(w.kind)||y.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(w.kind))m=s(m,y,i.typeAnnotation||"coerce");else if(this.checkSubtype(y,w))return null}else m=s(m,y,i.typeAnnotation||"assert")}if(!(m instanceof nt)&&m.type.kind!=="resolvedImage"&&this._isConstant(m)){const y=new Rn;try{m=new nt(m.type,m.evaluate(y))}catch(w){return this.error(w.message),null}}return m}return this.error(`Unknown expression "${c}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,i,s){const c=typeof t=="number"?this.path.concat(t):this.path,f=s?this.scope.concat(s):this.scope;return new an(this.registry,this._isConstant,c,i||null,f,this.errors)}error(t,...i){const s=`${this.key}${i.map(c=>`[${c}]`).join("")}`;this.errors.push(new Qt(s,t))}checkSubtype(t,i){const s=sn(t,i);return s&&this.error(s),s}}class Dn{constructor(t,i){this.type=i.type,this.bindings=[].concat(t),this.result=i}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const i of this.bindings)t(i[1]);t(this.result)}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const s=[];for(let f=1;f<t.length-1;f+=2){const m=t[f];if(typeof m!="string")return i.error(`Expected string, but found ${typeof m} instead.`,f);if(/[^a-zA-Z0-9_]/.test(m))return i.error("Variable names must contain only alphanumeric characters or '_'.",f);const y=i.parse(t[f+1],f+1);if(!y)return null;s.push([m,y])}const c=i.parse(t[t.length-1],t.length-1,i.expectedType,s);return c?new Dn(s,c):null}outputDefined(){return this.result.outputDefined()}}class po{constructor(t,i){this.type=i.type,this.name=t,this.boundExpression=i}static parse(t,i){if(t.length!==2||typeof t[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const s=t[1];return i.scope.has(s)?new po(s,i.scope.get(s)):i.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class as{constructor(t,i,s){this.type=t,this.index=i,this.input=s}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Xe),c=i.parse(t[2],2,_i(i.expectedType||Kt));return s&&c?new as(c.type.itemType,s,c):null}evaluate(t){const i=this.index.evaluate(t),s=this.input.evaluate(t);if(i<0)throw new Be(`Array index out of bounds: ${i} < 0.`);if(i>=s.length)throw new Be(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i!==Math.floor(i))throw new Be(`Array index must be an integer, but found ${i} instead.`);return s[i]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class Qs{constructor(t,i){this.type=Wt,this.needle=t,this.haystack=i}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Kt),c=i.parse(t[2],2,Kt);return s&&c?uo(s.type,[Wt,Mt,Xe,Dt,Kt])?new Qs(s,c):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${yr(s.type)} instead`):null}evaluate(t){const i=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!s)return!1;if(!En(i,["boolean","string","number","null"]))throw new Be(`Expected first argument to be of type boolean, string, number or null, but found ${yr(ft(i))} instead.`);if(!En(s,["string","array"]))throw new Be(`Expected second argument to be of type array or string, but found ${yr(ft(s))} instead.`);return s.indexOf(i)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class ls{constructor(t,i,s){this.type=Xe,this.needle=t,this.haystack=i,this.fromIndex=s}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Kt),c=i.parse(t[2],2,Kt);if(!s||!c)return null;if(!uo(s.type,[Wt,Mt,Xe,Dt,Kt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${yr(s.type)} instead`);if(t.length===4){const f=i.parse(t[3],3,Xe);return f?new ls(s,c,f):null}return new ls(s,c)}evaluate(t){const i=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!En(i,["boolean","string","number","null"]))throw new Be(`Expected first argument to be of type boolean, string, number or null, but found ${yr(ft(i))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),En(s,["string"])){const f=s.indexOf(i,c);return f===-1?-1:[...s.slice(0,f)].length}if(En(s,["array"]))return s.indexOf(i,c);throw new Be(`Expected second argument to be of type array or string, but found ${yr(ft(s))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class fo{constructor(t,i,s,c,f,m){this.inputType=t,this.type=i,this.input=s,this.cases=c,this.outputs=f,this.otherwise=m}static parse(t,i){if(t.length<5)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return i.error("Expected an even number of arguments.");let s,c;i.expectedType&&i.expectedType.kind!=="value"&&(c=i.expectedType);const f={},m=[];for(let E=2;E<t.length-1;E+=2){let R=t[E];const V=t[E+1];Array.isArray(R)||(R=[R]);const q=i.concat(E);if(R.length===0)return q.error("Expected at least one branch label.");for(const W of R){if(typeof W!="number"&&typeof W!="string")return q.error("Branch labels must be numbers or strings.");if(typeof W=="number"&&Math.abs(W)>Number.MAX_SAFE_INTEGER)return q.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof W=="number"&&Math.floor(W)!==W)return q.error("Numeric branch labels must be integer values.");if(s){if(q.checkSubtype(s,ft(W)))return null}else s=ft(W);if(f[String(W)]!==void 0)return q.error("Branch labels must be unique.");f[String(W)]=m.length}const j=i.parse(V,E,c);if(!j)return null;c=c||j.type,m.push(j)}const y=i.parse(t[1],1,Kt);if(!y)return null;const w=i.parse(t[t.length-1],t.length-1,c);return w?y.type.kind!=="value"&&i.concat(1).checkSubtype(s,y.type)?null:new fo(s,c,y,f,m,w):null}evaluate(t){const i=this.input.evaluate(t);return(ft(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class ai{constructor(t,i,s){this.type=t,this.branches=i,this.otherwise=s}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return i.error("Expected an odd number of arguments.");let s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const c=[];for(let m=1;m<t.length-1;m+=2){const y=i.parse(t[m],m,Wt);if(!y)return null;const w=i.parse(t[m+1],m+1,s);if(!w)return null;c.push([y,w]),s=s||w.type}const f=i.parse(t[t.length-1],t.length-1,s);if(!f)return null;if(!s)throw new Error("Can't infer output type");return new ai(s,c,f)}evaluate(t){for(const[i,s]of this.branches)if(i.evaluate(t))return s.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[i,s]of this.branches)t(i),t(s);t(this.otherwise)}outputDefined(){return this.branches.every(([t,i])=>i.outputDefined())&&this.otherwise.outputDefined()}}class mo{constructor(t,i,s,c){this.type=t,this.input=i,this.beginIndex=s,this.endIndex=c}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Kt),c=i.parse(t[2],2,Xe);if(!s||!c)return null;if(!uo(s.type,[_i(Kt),Mt,Kt]))return i.error(`Expected first argument to be of type array or string, but found ${yr(s.type)} instead`);if(t.length===4){const f=i.parse(t[3],3,Xe);return f?new mo(s.type,s,c,f):null}return new mo(s.type,s,c)}evaluate(t){const i=this.input.evaluate(t),s=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),En(i,["string"]))return[...i].slice(s,c).join("");if(En(i,["array"]))return i.slice(s,c);throw new Be(`Expected first argument to be of type array or string, but found ${yr(ft(i))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function cs(n,t){const i=n.length-1;let s,c,f=0,m=i,y=0;for(;f<=m;)if(y=Math.floor((f+m)/2),s=n[y],c=n[y+1],s<=t){if(y===i||t<c)return y;f=y+1}else{if(!(s>t))throw new Be("Input is not a number.");m=y-1}return 0}class Xn{constructor(t,i,s){this.type=t,this.input=i,this.labels=[],this.outputs=[];for(const[c,f]of s)this.labels.push(c),this.outputs.push(f)}static parse(t,i){if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");const s=i.parse(t[1],1,Xe);if(!s)return null;const c=[];let f=null;i.expectedType&&i.expectedType.kind!=="value"&&(f=i.expectedType);for(let m=1;m<t.length;m+=2){const y=m===1?-1/0:t[m],w=t[m+1],E=m,R=m+1;if(typeof y!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',E);if(c.length&&c[c.length-1][0]>=y)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',E);const V=i.parse(w,R,f);if(!V)return null;f=f||V.type,c.push([y,V])}return new Xn(f,s,c)}evaluate(t){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(t);const c=this.input.evaluate(t);if(c<=i[0])return s[0].evaluate(t);const f=i.length;return c>=i[f-1]?s[f-1].evaluate(t):s[cs(i,c)].evaluate(t)}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function li(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ys,$s,_c=function(){if($s)return Ys;function n(t,i,s,c){this.cx=3*t,this.bx=3*(s-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(c-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=s,this.p2y=c}return $s=1,Ys=n,n.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,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var s=t,c=0;c<8;c++){var f=this.sampleCurveX(s)-t;if(Math.abs(f)<i)return s;var m=this.sampleCurveDerivativeX(s);if(Math.abs(m)<1e-6)break;s-=f/m}var y=0,w=1;for(s=t,c=0;c<20&&(f=this.sampleCurveX(s),!(Math.abs(f-t)<i));c++)t>f?y=s:w=s,s=.5*(w-y)+y;return s},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},Ys}(),xh=li(_c);class Ai{constructor(t,i,s,c,f){this.type=t,this.operator=i,this.interpolation=s,this.input=c,this.labels=[],this.outputs=[];for(const[m,y]of f)this.labels.push(m),this.outputs.push(y)}static interpolationFactor(t,i,s,c){let f=0;if(t.name==="exponential")f=us(i,t.base,s,c);else if(t.name==="linear")f=us(i,1,s,c);else if(t.name==="cubic-bezier"){const m=t.controlPoints;f=new xh(m[0],m[1],m[2],m[3]).solve(us(i,1,s,c))}return f}static parse(t,i){let[s,c,f,...m]=t;if(!Array.isArray(c)||c.length===0)return i.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const E=c[1];if(typeof E!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:E}}else{if(c[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const E=c.slice(1);if(E.length!==4||E.some(R=>typeof R!="number"||R<0||R>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:E}}}if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(f=i.parse(f,2,Xe),!f)return null;const y=[];let w=null;s!=="interpolate-hcl"&&s!=="interpolate-lab"||i.expectedType==Cn?i.expectedType&&i.expectedType.kind!=="value"&&(w=i.expectedType):w=Tr;for(let E=0;E<m.length;E+=2){const R=m[E],V=m[E+1],q=E+3,j=E+4;if(typeof R!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',q);if(y.length&&y[y.length-1][0]>=R)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',q);const W=i.parse(V,j,w);if(!W)return null;w=w||W.type,y.push([R,W])}return Ri(w,Xe)||Ri(w,gr)||Ri(w,Tr)||Ri(w,yn)||Ri(w,Li)||Ri(w,Cn)||Ri(w,Mr)||Ri(w,_i(Xe))?new Ai(w,s,c,f,y):i.error(`Type ${yr(w)} is not interpolatable.`)}evaluate(t){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(t);const c=this.input.evaluate(t);if(c<=i[0])return s[0].evaluate(t);const f=i.length;if(c>=i[f-1])return s[f-1].evaluate(t);const m=cs(i,c),y=Ai.interpolationFactor(this.interpolation,c,i[m],i[m+1]),w=s[m].evaluate(t),E=s[m+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return si(w,E,y);case"color":return Vt.interpolate(w,E,y);case"padding":return pe.interpolate(w,E,y);case"colorArray":return Ce.interpolate(w,E,y);case"numberArray":return ve.interpolate(w,E,y);case"variableAnchorOffsetCollection":return Je.interpolate(w,E,y);case"array":return Ln(w,E,y);case"projectionDefinition":return ze.interpolate(w,E,y)}case"interpolate-hcl":switch(this.type.kind){case"color":return Vt.interpolate(w,E,y,"hcl");case"colorArray":return Ce.interpolate(w,E,y,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Vt.interpolate(w,E,y,"lab");case"colorArray":return Ce.interpolate(w,E,y,"lab")}}}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function us(n,t,i,s){const c=s-i,f=n-i;return c===0?0:t===1?f/c:(Math.pow(t,f)-1)/(Math.pow(t,c)-1)}const xn={color:Vt.interpolate,number:si,padding:pe.interpolate,numberArray:ve.interpolate,colorArray:Ce.interpolate,variableAnchorOffsetCollection:Je.interpolate,array:Ln};class go{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let s=null;const c=i.expectedType;c&&c.kind!=="value"&&(s=c);const f=[];for(const y of t.slice(1)){const w=i.parse(y,1+f.length,s,void 0,{typeAnnotation:"omit"});if(!w)return null;s=s||w.type,f.push(w)}if(!s)throw new Error("No output type");const m=c&&f.some(y=>sn(c,y.type));return new go(m?Kt:s,f)}evaluate(t){let i,s=null,c=0;for(const f of this.args)if(c++,s=f.evaluate(t),s&&s instanceof it&&!s.available&&(i||(i=s.name),s=null,c===this.args.length&&(s=i)),s!==null)break;return s}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function hs(n,t){return n==="=="||n==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Ji(n,t,i,s){return s.compare(t,i)===0}function yo(n,t,i){const s=n!=="=="&&n!=="!=";return class bg{constructor(f,m,y){this.type=Wt,this.lhs=f,this.rhs=m,this.collator=y,this.hasUntypedArgument=f.type.kind==="value"||m.type.kind==="value"}static parse(f,m){if(f.length!==3&&f.length!==4)return m.error("Expected two or three arguments.");const y=f[0];let w=m.parse(f[1],1,Kt);if(!w)return null;if(!hs(y,w.type))return m.concat(1).error(`"${y}" comparisons are not supported for type '${yr(w.type)}'.`);let E=m.parse(f[2],2,Kt);if(!E)return null;if(!hs(y,E.type))return m.concat(2).error(`"${y}" comparisons are not supported for type '${yr(E.type)}'.`);if(w.type.kind!==E.type.kind&&w.type.kind!=="value"&&E.type.kind!=="value")return m.error(`Cannot compare types '${yr(w.type)}' and '${yr(E.type)}'.`);s&&(w.type.kind==="value"&&E.type.kind!=="value"?w=new dt(E.type,[w]):w.type.kind!=="value"&&E.type.kind==="value"&&(E=new dt(w.type,[E])));let R=null;if(f.length===4){if(w.type.kind!=="string"&&E.type.kind!=="string"&&w.type.kind!=="value"&&E.type.kind!=="value")return m.error("Cannot use collator to compare non-string types.");if(R=m.parse(f[3],3,Vi),!R)return null}return new bg(w,E,R)}evaluate(f){const m=this.lhs.evaluate(f),y=this.rhs.evaluate(f);if(s&&this.hasUntypedArgument){const w=ft(m),E=ft(y);if(w.kind!==E.kind||w.kind!=="string"&&w.kind!=="number")throw new Be(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${w.kind}, ${E.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const w=ft(m),E=ft(y);if(w.kind!=="string"||E.kind!=="string")return t(f,m,y)}return this.collator?i(f,m,y,this.collator.evaluate(f)):t(f,m,y)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}}}const ea=yo("==",function(n,t,i){return t===i},Ji),bh=yo("!=",function(n,t,i){return t!==i},function(n,t,i,s){return!Ji(0,t,i,s)}),rl=yo("<",function(n,t,i){return t<i},function(n,t,i,s){return s.compare(t,i)<0}),wh=yo(">",function(n,t,i){return t>i},function(n,t,i,s){return s.compare(t,i)>0}),Sh=yo("<=",function(n,t,i){return t<=i},function(n,t,i,s){return s.compare(t,i)<=0}),Ah=yo(">=",function(n,t,i){return t>=i},function(n,t,i,s){return s.compare(t,i)>=0});class ta{constructor(t,i,s){this.type=Vi,this.locale=s,this.caseSensitive=t,this.diacriticSensitive=i}static parse(t,i){if(t.length!==2)return i.error("Expected one argument.");const s=t[1];if(typeof s!="object"||Array.isArray(s))return i.error("Collator options argument must be an object.");const c=i.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,Wt);if(!c)return null;const f=i.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,Wt);if(!f)return null;let m=null;return s.locale&&(m=i.parse(s.locale,1,Mt),!m)?null:new ta(c,f,m)}evaluate(t){return new vn(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class Lo{constructor(t,i,s,c,f){this.type=Mt,this.number=t,this.locale=i,this.currency=s,this.minFractionDigits=c,this.maxFractionDigits=f}static parse(t,i){if(t.length!==3)return i.error("Expected two arguments.");const s=i.parse(t[1],1,Xe);if(!s)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return i.error("NumberFormat options argument must be an object.");let f=null;if(c.locale&&(f=i.parse(c.locale,1,Mt),!f))return null;let m=null;if(c.currency&&(m=i.parse(c.currency,1,Mt),!m))return null;let y=null;if(c["min-fraction-digits"]&&(y=i.parse(c["min-fraction-digits"],1,Xe),!y))return null;let w=null;return c["max-fraction-digits"]&&(w=i.parse(c["max-fraction-digits"],1,Xe),!w)?null:new Lo(s,f,m,y,w)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class ra{constructor(t){this.type=co,this.sections=t}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const s=t[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");const c=[];let f=!1;for(let m=1;m<=t.length-1;++m){const y=t[m];if(f&&typeof y=="object"&&!Array.isArray(y)){f=!1;let w=null;if(y["font-scale"]&&(w=i.parse(y["font-scale"],1,Xe),!w))return null;let E=null;if(y["text-font"]&&(E=i.parse(y["text-font"],1,_i(Mt)),!E))return null;let R=null;if(y["text-color"]&&(R=i.parse(y["text-color"],1,Tr),!R))return null;let V=null;if(y["vertical-align"]){if(typeof y["vertical-align"]=="string"&&!Oi.includes(y["vertical-align"]))return i.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${y["vertical-align"]}' instead.`);if(V=i.parse(y["vertical-align"],1,Mt),!V)return null}const q=c[c.length-1];q.scale=w,q.font=E,q.textColor=R,q.verticalAlign=V}else{const w=i.parse(t[m],1,Kt);if(!w)return null;const E=w.type.kind;if(E!=="string"&&E!=="value"&&E!=="null"&&E!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,c.push({content:w,scale:null,font:null,textColor:null,verticalAlign:null})}}return new ra(c)}evaluate(t){return new ue(this.sections.map(i=>{const s=i.content.evaluate(t);return ft(s)===_n?new ce("",s,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(t):null):new ce(ht(s),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null,i.verticalAlign?i.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const i of this.sections)t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor),i.verticalAlign&&t(i.verticalAlign)}outputDefined(){return!1}}class ia{constructor(t){this.type=_n,this.input=t}static parse(t,i){if(t.length!==2)return i.error("Expected two arguments.");const s=i.parse(t[1],1,Mt);return s?new ia(s):i.error("No image name provided.")}evaluate(t){const i=this.input.evaluate(t),s=it.fromString(i);return s&&t.availableImages&&(s.available=t.availableImages.indexOf(i)>-1),s}eachChild(t){t(this.input)}outputDefined(){return!1}}class na{constructor(t){this.type=Xe,this.input=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=i.parse(t[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${yr(s.type)} instead.`):new na(s):null}evaluate(t){const i=this.input.evaluate(t);if(typeof i=="string")return[...i].length;if(Array.isArray(i))return i.length;throw new Be(`Expected value to be of type string or array, but found ${yr(ft(i))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const bn=8192;function vc(n,t){const i=(180+n[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(i*c*bn),Math.round(s*c*bn)]}function il(n,t){const i=Math.pow(2,t.z);return[(c=(n[0]/bn+t.x)/i,360*c-180),(s=(n[1]/bn+t.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,c}function ps(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function ds(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function kh(n,t,i){const s=n[0]-t[0],c=n[1]-t[1],f=n[0]-i[0],m=n[1]-i[1];return s*m-f*c==0&&s*f<=0&&c*m<=0}function oa(n,t,i,s){return(c=[s[0]-i[0],s[1]-i[1]])[0]*(f=[t[0]-n[0],t[1]-n[1]])[1]-c[1]*f[0]!=0&&!(!Sc(n,t,i,s)||!Sc(i,s,n,t));var c,f}function xc(n,t,i){for(const s of i)for(let c=0;c<s.length-1;++c)if(oa(n,t,s[c],s[c+1]))return!0;return!1}function _o(n,t,i=!1){let s=!1;for(const y of t)for(let w=0;w<y.length-1;w++){if(kh(n,y[w],y[w+1]))return i;(f=y[w])[1]>(c=n)[1]!=(m=y[w+1])[1]>c[1]&&c[0]<(m[0]-f[0])*(c[1]-f[1])/(m[1]-f[1])+f[0]&&(s=!s)}var c,f,m;return s}function bc(n,t){for(const i of t)if(_o(n,i))return!0;return!1}function wc(n,t){for(const i of n)if(!_o(i,t))return!1;for(let i=0;i<n.length-1;++i)if(xc(n[i],n[i+1],t))return!1;return!0}function Th(n,t){for(const i of t)if(wc(n,i))return!0;return!1}function Sc(n,t,i,s){const c=s[0]-i[0],f=s[1]-i[1],m=(n[0]-i[0])*f-c*(n[1]-i[1]),y=(t[0]-i[0])*f-c*(t[1]-i[1]);return m>0&&y<0||m<0&&y>0}function fs(n,t,i){const s=[];for(let c=0;c<n.length;c++){const f=[];for(let m=0;m<n[c].length;m++){const y=vc(n[c][m],i);ps(t,y),f.push(y)}s.push(f)}return s}function Ac(n,t,i){const s=[];for(let c=0;c<n.length;c++){const f=fs(n[c],t,i);s.push(f)}return s}function kc(n,t,i,s){if(n[0]<i[0]||n[0]>i[2]){const c=.5*s;let f=n[0]-i[0]>c?-s:i[0]-n[0]>c?s:0;f===0&&(f=n[0]-i[2]>c?-s:i[2]-n[0]>c?s:0),n[0]+=f}ps(t,n)}function Tc(n,t,i,s){const c=Math.pow(2,s.z)*bn,f=[s.x*bn,s.y*bn],m=[];for(const y of n)for(const w of y){const E=[w.x+f[0],w.y+f[1]];kc(E,t,i,c),m.push(E)}return m}function nl(n,t,i,s){const c=Math.pow(2,s.z)*bn,f=[s.x*bn,s.y*bn],m=[];for(const w of n){const E=[];for(const R of w){const V=[R.x+f[0],R.y+f[1]];ps(t,V),E.push(V)}m.push(E)}if(t[2]-t[0]<=c/2){(y=t)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(const w of m)for(const E of w)kc(E,t,i,c)}var y;return m}class Qn{constructor(t,i){this.type=Wt,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ye(t[1])){const s=t[1];if(s.type==="FeatureCollection"){const c=[];for(const f of s.features){const{type:m,coordinates:y}=f.geometry;m==="Polygon"&&c.push(y),m==="MultiPolygon"&&c.push(...y)}if(c.length)return new Qn(s,{type:"MultiPolygon",coordinates:c})}else if(s.type==="Feature"){const c=s.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new Qn(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new Qn(s,s)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,s){const c=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],m=i.canonicalID();if(s.type==="Polygon"){const y=fs(s.coordinates,f,m),w=Tc(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of w)if(!_o(E,y))return!1}if(s.type==="MultiPolygon"){const y=Ac(s.coordinates,f,m),w=Tc(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of w)if(!bc(E,y))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,s){const c=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],m=i.canonicalID();if(s.type==="Polygon"){const y=fs(s.coordinates,f,m),w=nl(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of w)if(!wc(E,y))return!1}if(s.type==="MultiPolygon"){const y=Ac(s.coordinates,f,m),w=nl(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of w)if(!Th(E,y))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Cc=class{constructor(n=[],t=(i,s)=>i<s?-1:i>s?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:i}=this,s=t[n];for(;n>0;){const c=n-1>>1,f=t[c];if(i(s,f)>=0)break;t[n]=f,n=c}t[n]=s}_down(n){const{data:t,compare:i}=this,s=this.length>>1,c=t[n];for(;n<s;){let f=1+(n<<1);const m=f+1;if(m<this.length&&i(t[m],t[f])<0&&(f=m),i(t[f],c)>=0)break;t[n]=t[f],n=f}t[n]=c}};function Ec(n,t,i=0,s=n.length-1,c=Pc){for(;s>i;){if(s-i>600){const w=s-i+1,E=t-i+1,R=Math.log(w),V=.5*Math.exp(2*R/3),q=.5*Math.sqrt(R*V*(w-V)/w)*(E-w/2<0?-1:1);Ec(n,t,Math.max(i,Math.floor(t-E*V/w+q)),Math.min(s,Math.floor(t+(w-E)*V/w+q)),c)}const f=n[t];let m=i,y=s;for(Ro(n,i,t),c(n[s],f)>0&&Ro(n,i,s);m<y;){for(Ro(n,m,y),m++,y--;c(n[m],f)<0;)m++;for(;c(n[y],f)>0;)y--}c(n[i],f)===0?Ro(n,i,y):(y++,Ro(n,y,s)),y<=t&&(i=y+1),t<=y&&(s=y-1)}}function Ro(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}function Pc(n,t){return n<t?-1:n>t?1:0}function sa(n,t){if(n.length<=1)return[n];const i=[];let s,c;for(const f of n){const m=Eh(f);m!==0&&(f.area=Math.abs(m),c===void 0&&(c=m<0),c===m<0?(s&&i.push(s),s=[f]):s.push(f))}if(s&&i.push(s),t>1)for(let f=0;f<i.length;f++)i[f].length<=t||(Ec(i[f],t,1,i[f].length-1,Ch),i[f]=i[f].slice(0,t));return i}function Ch(n,t){return t.area-n.area}function Eh(n){let t=0;for(let i,s,c=0,f=n.length,m=f-1;c<f;m=c++)i=n[c],s=n[m],t+=(s.x-i.x)*(i.y+s.y);return t}const ol=1/298.257223563,Ic=ol*(2-ol),Mc=Math.PI/180;class sl{constructor(t){const i=6378.137*Mc*1e3,s=Math.cos(t*Mc),c=1/(1-Ic*(1-s*s)),f=Math.sqrt(c);this.kx=i*f*s,this.ky=i*f*c*(1-Ic)}distance(t,i){const s=this.wrap(t[0]-i[0])*this.kx,c=(t[1]-i[1])*this.ky;return Math.sqrt(s*s+c*c)}pointOnLine(t,i){let s,c,f,m,y=1/0;for(let w=0;w<t.length-1;w++){let E=t[w][0],R=t[w][1],V=this.wrap(t[w+1][0]-E)*this.kx,q=(t[w+1][1]-R)*this.ky,j=0;V===0&&q===0||(j=(this.wrap(i[0]-E)*this.kx*V+(i[1]-R)*this.ky*q)/(V*V+q*q),j>1?(E=t[w+1][0],R=t[w+1][1]):j>0&&(E+=V/this.kx*j,R+=q/this.ky*j)),V=this.wrap(i[0]-E)*this.kx,q=(i[1]-R)*this.ky;const W=V*V+q*q;W<y&&(y=W,s=E,c=R,f=w,m=j)}return{point:[s,c],index:f,t:Math.max(0,Math.min(1,m))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function Lc(n,t){return t[0]-n[0]}function sr(n){return n[1]-n[0]+1}function zn(n,t){return n[1]>=n[0]&&n[1]<t}function al(n,t){if(n[0]>n[1])return[null,null];const i=sr(n);if(t){if(i===2)return[n,null];const c=Math.floor(i/2);return[[n[0],n[0]+c],[n[0]+c,n[1]]]}if(i===1)return[n,null];const s=Math.floor(i/2)-1;return[[n[0],n[0]+s],[n[0]+s+1,n[1]]]}function ll(n,t){if(!zn(t,n.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let s=t[0];s<=t[1];++s)ps(i,n[s]);return i}function cl(n){const t=[1/0,1/0,-1/0,-1/0];for(const i of n)for(const s of i)ps(t,s);return t}function Rc(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function ul(n,t,i){if(!Rc(n)||!Rc(t))return NaN;let s=0,c=0;return n[2]<t[0]&&(s=t[0]-n[2]),n[0]>t[2]&&(s=n[0]-t[2]),n[1]>t[3]&&(c=n[1]-t[3]),n[3]<t[1]&&(c=t[1]-n[3]),i.distance([0,0],[s,c])}function vo(n,t,i){const s=i.pointOnLine(t,n);return i.distance(n,s.point)}function hl(n,t,i,s,c){const f=Math.min(vo(n,[i,s],c),vo(t,[i,s],c)),m=Math.min(vo(i,[n,t],c),vo(s,[n,t],c));return Math.min(f,m)}function Ph(n,t,i,s,c){if(!zn(t,n.length)||!zn(s,i.length))return 1/0;let f=1/0;for(let m=t[0];m<t[1];++m){const y=n[m],w=n[m+1];for(let E=s[0];E<s[1];++E){const R=i[E],V=i[E+1];if(oa(y,w,R,V))return 0;f=Math.min(f,hl(y,w,R,V,c))}}return f}function Ih(n,t,i,s,c){if(!zn(t,n.length)||!zn(s,i.length))return NaN;let f=1/0;for(let m=t[0];m<=t[1];++m)for(let y=s[0];y<=s[1];++y)if(f=Math.min(f,c.distance(n[m],i[y])),f===0)return f;return f}function Mh(n,t,i){if(_o(n,t,!0))return 0;let s=1/0;for(const c of t){const f=c[0],m=c[c.length-1];if(f!==m&&(s=Math.min(s,vo(n,[m,f],i)),s===0))return s;const y=i.pointOnLine(c,n);if(s=Math.min(s,i.distance(n,y.point)),s===0)return s}return s}function Lh(n,t,i,s){if(!zn(t,n.length))return NaN;for(let f=t[0];f<=t[1];++f)if(_o(n[f],i,!0))return 0;let c=1/0;for(let f=t[0];f<t[1];++f){const m=n[f],y=n[f+1];for(const w of i)for(let E=0,R=w.length,V=R-1;E<R;V=E++){const q=w[V],j=w[E];if(oa(m,y,q,j))return 0;c=Math.min(c,hl(m,y,q,j,s))}}return c}function Dc(n,t){for(const i of n)for(const s of i)if(_o(s,t,!0))return!0;return!1}function Rh(n,t,i,s=1/0){const c=cl(n),f=cl(t);if(s!==1/0&&ul(c,f,i)>=s)return s;if(ds(c,f)){if(Dc(n,t))return 0}else if(Dc(t,n))return 0;let m=1/0;for(const y of n)for(let w=0,E=y.length,R=E-1;w<E;R=w++){const V=y[R],q=y[w];for(const j of t)for(let W=0,X=j.length,re=X-1;W<X;re=W++){const ae=j[re],Se=j[W];if(oa(V,q,ae,Se))return 0;m=Math.min(m,hl(V,q,ae,Se,i))}}return m}function zc(n,t,i,s,c,f){if(!f)return;const m=ul(ll(s,f),c,i);m<t&&n.push([m,f,[0,0]])}function aa(n,t,i,s,c,f,m){if(!f||!m)return;const y=ul(ll(s,f),ll(c,m),i);y<t&&n.push([y,f,m])}function la(n,t,i,s,c=1/0){let f=Math.min(s.distance(n[0],i[0][0]),c);if(f===0)return f;const m=new Cc([[0,[0,n.length-1],[0,0]]],Lc),y=cl(i);for(;m.length>0;){const w=m.pop();if(w[0]>=f)continue;const E=w[1],R=t?50:100;if(sr(E)<=R){if(!zn(E,n.length))return NaN;if(t){const V=Lh(n,E,i,s);if(isNaN(V)||V===0)return V;f=Math.min(f,V)}else for(let V=E[0];V<=E[1];++V){const q=Mh(n[V],i,s);if(f=Math.min(f,q),f===0)return 0}}else{const V=al(E,t);zc(m,f,s,n,y,V[0]),zc(m,f,s,n,y,V[1])}}return f}function ca(n,t,i,s,c,f=1/0){let m=Math.min(f,c.distance(n[0],i[0]));if(m===0)return m;const y=new Cc([[0,[0,n.length-1],[0,i.length-1]]],Lc);for(;y.length>0;){const w=y.pop();if(w[0]>=m)continue;const E=w[1],R=w[2],V=t?50:100,q=s?50:100;if(sr(E)<=V&&sr(R)<=q){if(!zn(E,n.length)&&zn(R,i.length))return NaN;let j;if(t&&s)j=Ph(n,E,i,R,c),m=Math.min(m,j);else if(t&&!s){const W=n.slice(E[0],E[1]+1);for(let X=R[0];X<=R[1];++X)if(j=vo(i[X],W,c),m=Math.min(m,j),m===0)return m}else if(!t&&s){const W=i.slice(R[0],R[1]+1);for(let X=E[0];X<=E[1];++X)if(j=vo(n[X],W,c),m=Math.min(m,j),m===0)return m}else j=Ih(n,E,i,R,c),m=Math.min(m,j)}else{const j=al(E,t),W=al(R,s);aa(y,m,c,n,i,j[0],W[0]),aa(y,m,c,n,i,j[0],W[1]),aa(y,m,c,n,i,j[1],W[0]),aa(y,m,c,n,i,j[1],W[1])}}return m}function pl(n){return n.type==="MultiPolygon"?n.coordinates.map(t=>({type:"Polygon",coordinates:t})):n.type==="MultiLineString"?n.coordinates.map(t=>({type:"LineString",coordinates:t})):n.type==="MultiPoint"?n.coordinates.map(t=>({type:"Point",coordinates:t})):[n]}class xo{constructor(t,i){this.type=Xe,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ye(t[1])){const s=t[1];if(s.type==="FeatureCollection")return new xo(s,s.features.map(c=>pl(c.geometry)).flat());if(s.type==="Feature")return new xo(s,pl(s.geometry));if("type"in s&&"coordinates"in s)return new xo(s,pl(s))}return i.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,s){const c=i.geometry(),f=c.flat().map(w=>il([w.x,w.y],i.canonical));if(c.length===0)return NaN;const m=new sl(f[0][1]);let y=1/0;for(const w of s){switch(w.type){case"Point":y=Math.min(y,ca(f,!1,[w.coordinates],!1,m,y));break;case"LineString":y=Math.min(y,ca(f,!1,w.coordinates,!0,m,y));break;case"Polygon":y=Math.min(y,la(f,!1,w.coordinates,m,y))}if(y===0)return y}return y}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,s){const c=i.geometry(),f=c.flat().map(w=>il([w.x,w.y],i.canonical));if(c.length===0)return NaN;const m=new sl(f[0][1]);let y=1/0;for(const w of s){switch(w.type){case"Point":y=Math.min(y,ca(f,!0,[w.coordinates],!1,m,y));break;case"LineString":y=Math.min(y,ca(f,!0,w.coordinates,!0,m,y));break;case"Polygon":y=Math.min(y,la(f,!0,w.coordinates,m,y))}if(y===0)return y}return y}(t,this.geometries);if(t.geometryType()==="Polygon")return function(i,s){const c=i.geometry();if(c.length===0||c[0].length===0)return NaN;const f=sa(c,0).map(w=>w.map(E=>E.map(R=>il([R.x,R.y],i.canonical)))),m=new sl(f[0][0][0][1]);let y=1/0;for(const w of s)for(const E of f){switch(w.type){case"Point":y=Math.min(y,la([w.coordinates],!1,E,m,y));break;case"LineString":y=Math.min(y,la(w.coordinates,!0,E,m,y));break;case"Polygon":y=Math.min(y,Rh(E,w.coordinates,m,y))}if(y===0)return y}return y}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class ua{constructor(t){this.type=Kt,this.key=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=t[1];return s==null?i.error("Global state property must be defined."):typeof s!="string"?i.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new ua(s)}evaluate(t){var i;const s=(i=t.globals)===null||i===void 0?void 0:i.globalState;return s&&Object.keys(s).length!==0?Gn(s,this.key):null}eachChild(){}outputDefined(){return!1}}const Do={"==":ea,"!=":bh,">":wh,"<":rl,">=":Ah,"<=":Sh,array:dt,at:as,boolean:dt,case:ai,coalesce:go,collator:ta,format:ra,image:ia,in:Qs,"index-of":ls,interpolate:Ai,"interpolate-hcl":Ai,"interpolate-lab":Ai,length:na,let:Dn,literal:nt,match:fo,number:dt,"number-format":Lo,object:dt,slice:mo,step:Xn,string:dt,"to-boolean":wr,"to-color":wr,"to-number":wr,"to-string":wr,var:po,within:Qn,distance:xo,"global-state":ua};class Xi{constructor(t,i,s,c){this.name=t,this.type=i,this._evaluate=s,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,i){const s=t[0],c=Xi.definitions[s];if(!c)return i.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const f=Array.isArray(c)?c[0]:c.type,m=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,y=m.filter(([E])=>!Array.isArray(E)||E.length===t.length-1);let w=null;for(const[E,R]of y){w=new an(i.registry,ha,i.path,null,i.scope);const V=[];let q=!1;for(let j=1;j<t.length;j++){const W=t[j],X=Array.isArray(E)?E[j-1]:E.type,re=w.parse(W,1+V.length,X);if(!re){q=!0;break}V.push(re)}if(!q)if(Array.isArray(E)&&E.length!==V.length)w.error(`Expected ${E.length} arguments, but found ${V.length} instead.`);else{for(let j=0;j<V.length;j++){const W=Array.isArray(E)?E[j]:E.type,X=V[j];w.concat(j+1).checkSubtype(W,X.type)}if(w.errors.length===0)return new Xi(s,f,R,V)}}if(y.length===1)i.errors.push(...w.errors);else{const E=(y.length?y:m).map(([V])=>{return q=V,Array.isArray(q)?`(${q.map(yr).join(", ")})`:`(${yr(q.type)}...)`;var q}).join(" | "),R=[];for(let V=1;V<t.length;V++){const q=i.parse(t[V],1+R.length);if(!q)return null;R.push(yr(q.type))}i.error(`Expected arguments of type ${E}, but found (${R.join(", ")}) instead.`)}return null}static register(t,i){Xi.definitions=i;for(const s in i)t[s]=Xi}}function Bc(n,[t,i,s,c]){t=t.evaluate(n),i=i.evaluate(n),s=s.evaluate(n);const f=c?c.evaluate(n):1,m=Ke(t,i,s,f);if(m)throw new Be(m);return new Vt(t/255,i/255,s/255,f,!1)}function Vc(n,t){return n in t}function dl(n,t){const i=t[n];return i===void 0?null:i}function bo(n){return{type:n}}function ha(n){if(n instanceof po)return ha(n.boundExpression);if(n instanceof Xi&&n.name==="error"||n instanceof ta||n instanceof Qn||n instanceof xo||n instanceof ua)return!1;const t=n instanceof wr||n instanceof dt;let i=!0;return n.eachChild(s=>{i=t?i&&ha(s):i&&s instanceof nt}),!!i&&pa(n)&&da(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function pa(n){if(n instanceof Xi&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof Qn||n instanceof xo)return!1;let t=!0;return n.eachChild(i=>{t&&!pa(i)&&(t=!1)}),t}function ms(n){if(n instanceof Xi&&n.name==="feature-state")return!1;let t=!0;return n.eachChild(i=>{t&&!ms(i)&&(t=!1)}),t}function da(n,t){if(n instanceof Xi&&t.indexOf(n.name)>=0)return!1;let i=!0;return n.eachChild(s=>{i&&!da(s,t)&&(i=!1)}),i}function fa(n){return{result:"success",value:n}}function zo(n){return{result:"error",value:n}}function Bo(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function Oc(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function ma(n){return!!n.expression&&n.expression.interpolated}function Yt(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function ga(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&ft(n)===yi}function ya(n){return n}function fl(n,t){const i=n.stops&&typeof n.stops[0][0]=="object",s=i||!(i||n.property!==void 0),c=n.type||(ma(t)?"exponential":"interval"),f=function(R){switch(R.type){case"color":return Vt.parse;case"padding":return pe.parse;case"numberArray":return ve.parse;case"colorArray":return Ce.parse;default:return null}}(t);if(f&&((n=ar({},n)).stops&&(n.stops=n.stops.map(R=>[R[0],f(R[1])])),n.default=f(n.default?n.default:t.default)),n.colorSpace&&(m=n.colorSpace)!=="rgb"&&m!=="hcl"&&m!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var m;const y=function(R){switch(R){case"exponential":return Fc;case"interval":return zh;case"categorical":return Dh;case"identity":return Bh;default:throw new Error(`Unknown function type "${R}"`)}}(c);let w,E;if(c==="categorical"){w=Object.create(null);for(const R of n.stops)w[R[0]]=R[1];E=typeof n.stops[0][0]}if(i){const R={},V=[];for(let W=0;W<n.stops.length;W++){const X=n.stops[W],re=X[0].zoom;R[re]===void 0&&(R[re]={zoom:re,type:n.type,property:n.property,default:n.default,stops:[]},V.push(re)),R[re].stops.push([X[0].value,X[1]])}const q=[];for(const W of V)q.push([R[W].zoom,fl(R[W],t)]);const j={name:"linear"};return{kind:"composite",interpolationType:j,interpolationFactor:Ai.interpolationFactor.bind(void 0,j),zoomStops:q.map(W=>W[0]),evaluate:({zoom:W},X)=>Fc({stops:q,base:n.base},t,W).evaluate(W,X)}}if(s){const R=c==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:R,interpolationFactor:Ai.interpolationFactor.bind(void 0,R),zoomStops:n.stops.map(V=>V[0]),evaluate:({zoom:V})=>y(n,t,V,w,E)}}return{kind:"source",evaluate(R,V){const q=V&&V.properties?V.properties[n.property]:void 0;return q===void 0?gs(n.default,t.default):y(n,t,q,w,E)}}}function gs(n,t,i){return n!==void 0?n:t!==void 0?t:i!==void 0?i:void 0}function Dh(n,t,i,s,c){return gs(typeof i===c?s[i]:void 0,n.default,t.default)}function zh(n,t,i){if(Yt(i)!=="number")return gs(n.default,t.default);const s=n.stops.length;if(s===1||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[s-1][0])return n.stops[s-1][1];const c=cs(n.stops.map(f=>f[0]),i);return n.stops[c][1]}function Fc(n,t,i){const s=n.base!==void 0?n.base:1;if(Yt(i)!=="number")return gs(n.default,t.default);const c=n.stops.length;if(c===1||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[c-1][0])return n.stops[c-1][1];const f=cs(n.stops.map(R=>R[0]),i),m=function(R,V,q,j){const W=j-q,X=R-q;return W===0?0:V===1?X/W:(Math.pow(V,X)-1)/(Math.pow(V,W)-1)}(i,s,n.stops[f][0],n.stops[f+1][0]),y=n.stops[f][1],w=n.stops[f+1][1],E=xn[t.type]||ya;return typeof y.evaluate=="function"?{evaluate(...R){const V=y.evaluate.apply(void 0,R),q=w.evaluate.apply(void 0,R);if(V!==void 0&&q!==void 0)return E(V,q,m,n.colorSpace)}}:E(y,w,m,n.colorSpace)}function Bh(n,t,i){switch(t.type){case"color":i=Vt.parse(i);break;case"formatted":i=ue.fromString(i.toString());break;case"resolvedImage":i=it.fromString(i.toString());break;case"padding":i=pe.parse(i);break;case"colorArray":i=Ce.parse(i);break;case"numberArray":i=ve.parse(i);break;default:Yt(i)===t.type||t.type==="enum"&&t.values[i]||(i=void 0)}return gs(i,n.default,t.default)}Xi.register(Do,{error:[{kind:"error"},[Mt],(n,[t])=>{throw new Be(t.evaluate(n))}],typeof:[Mt,[Kt],(n,[t])=>yr(ft(t.evaluate(n)))],"to-rgba":[_i(Xe,4),[Tr],(n,[t])=>{const[i,s,c,f]=t.evaluate(n).rgb;return[255*i,255*s,255*c,f]}],rgb:[Tr,[Xe,Xe,Xe],Bc],rgba:[Tr,[Xe,Xe,Xe,Xe],Bc],has:{type:Wt,overloads:[[[Mt],(n,[t])=>Vc(t.evaluate(n),n.properties())],[[Mt,yi],(n,[t,i])=>Vc(t.evaluate(n),i.evaluate(n))]]},get:{type:Kt,overloads:[[[Mt],(n,[t])=>dl(t.evaluate(n),n.properties())],[[Mt,yi],(n,[t,i])=>dl(t.evaluate(n),i.evaluate(n))]]},"feature-state":[Kt,[Mt],(n,[t])=>dl(t.evaluate(n),n.featureState||{})],properties:[yi,[],n=>n.properties()],"geometry-type":[Mt,[],n=>n.geometryType()],id:[Kt,[],n=>n.id()],zoom:[Xe,[],n=>n.globals.zoom],"heatmap-density":[Xe,[],n=>n.globals.heatmapDensity||0],"line-progress":[Xe,[],n=>n.globals.lineProgress||0],accumulated:[Kt,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Xe,bo(Xe),(n,t)=>{let i=0;for(const s of t)i+=s.evaluate(n);return i}],"*":[Xe,bo(Xe),(n,t)=>{let i=1;for(const s of t)i*=s.evaluate(n);return i}],"-":{type:Xe,overloads:[[[Xe,Xe],(n,[t,i])=>t.evaluate(n)-i.evaluate(n)],[[Xe],(n,[t])=>-t.evaluate(n)]]},"/":[Xe,[Xe,Xe],(n,[t,i])=>t.evaluate(n)/i.evaluate(n)],"%":[Xe,[Xe,Xe],(n,[t,i])=>t.evaluate(n)%i.evaluate(n)],ln2:[Xe,[],()=>Math.LN2],pi:[Xe,[],()=>Math.PI],e:[Xe,[],()=>Math.E],"^":[Xe,[Xe,Xe],(n,[t,i])=>Math.pow(t.evaluate(n),i.evaluate(n))],sqrt:[Xe,[Xe],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))],log2:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[Xe,[Xe],(n,[t])=>Math.sin(t.evaluate(n))],cos:[Xe,[Xe],(n,[t])=>Math.cos(t.evaluate(n))],tan:[Xe,[Xe],(n,[t])=>Math.tan(t.evaluate(n))],asin:[Xe,[Xe],(n,[t])=>Math.asin(t.evaluate(n))],acos:[Xe,[Xe],(n,[t])=>Math.acos(t.evaluate(n))],atan:[Xe,[Xe],(n,[t])=>Math.atan(t.evaluate(n))],min:[Xe,bo(Xe),(n,t)=>Math.min(...t.map(i=>i.evaluate(n)))],max:[Xe,bo(Xe),(n,t)=>Math.max(...t.map(i=>i.evaluate(n)))],abs:[Xe,[Xe],(n,[t])=>Math.abs(t.evaluate(n))],round:[Xe,[Xe],(n,[t])=>{const i=t.evaluate(n);return i<0?-Math.round(-i):Math.round(i)}],floor:[Xe,[Xe],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[Xe,[Xe],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[Wt,[Mt,Kt],(n,[t,i])=>n.properties()[t.value]===i.value],"filter-id-==":[Wt,[Kt],(n,[t])=>n.id()===t.value],"filter-type-==":[Wt,[Mt],(n,[t])=>n.geometryType()===t.value],"filter-<":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s<c}],"filter-id-<":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i<s}],"filter->":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s>c}],"filter-id->":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i>s}],"filter-<=":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s<=c}],"filter-id-<=":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i<=s}],"filter->=":[Wt,[Mt,Kt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s>=c}],"filter-id->=":[Wt,[Kt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i>=s}],"filter-has":[Wt,[Kt],(n,[t])=>t.value in n.properties()],"filter-has-id":[Wt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Wt,[_i(Mt)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[Wt,[_i(Kt)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[Wt,[Mt,_i(Kt)],(n,[t,i])=>i.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[Wt,[Mt,_i(Kt)],(n,[t,i])=>function(s,c,f,m){for(;f<=m;){const y=f+m>>1;if(c[y]===s)return!0;c[y]>s?m=y-1:f=y+1}return!1}(n.properties()[t.value],i.value,0,i.value.length-1)],all:{type:Wt,overloads:[[[Wt,Wt],(n,[t,i])=>t.evaluate(n)&&i.evaluate(n)],[bo(Wt),(n,t)=>{for(const i of t)if(!i.evaluate(n))return!1;return!0}]]},any:{type:Wt,overloads:[[[Wt,Wt],(n,[t,i])=>t.evaluate(n)||i.evaluate(n)],[bo(Wt),(n,t)=>{for(const i of t)if(i.evaluate(n))return!0;return!1}]]},"!":[Wt,[Wt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[Wt,[Mt],(n,[t])=>{const i=n.globals&&n.globals.isSupportedScript;return!i||i(t.evaluate(n))}],upcase:[Mt,[Mt],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[Mt,[Mt],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[Mt,bo(Kt),(n,t)=>t.map(i=>ht(i.evaluate(n))).join("")],"resolved-locale":[Mt,[Vi],(n,[t])=>t.evaluate(n).resolvedLocale()]});class _a{constructor(t,i){this.expression=t,this._warningHistory={},this._evaluator=new Rn,this._defaultValue=i?function(s){if(s.type==="color"&&ga(s.default))return new Vt(0,0,0,0);switch(s.type){case"color":return Vt.parse(s.default)||null;case"padding":return pe.parse(s.default)||null;case"numberArray":return ve.parse(s.default)||null;case"colorArray":return Ce.parse(s.default)||null;case"variableAnchorOffsetCollection":return Je.parse(s.default)||null;case"projectionDefinition":return ze.parse(s.default)||null;default:return s.default===void 0?null:s.default}}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(t,i,s,c,f,m){return this._evaluator.globals=t,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=c,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=m,this.expression.evaluate(this._evaluator)}evaluate(t,i,s,c,f,m){this._evaluator.globals=t,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=c,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=m||null;try{const y=this.expression.evaluate(this._evaluator);if(y==null||typeof y=="number"&&y!=y)return this._defaultValue;if(this._enumValues&&!(y in this._enumValues))throw new Be(`Expected value to be one of ${Object.keys(this._enumValues).map(w=>JSON.stringify(w)).join(", ")}, but found ${JSON.stringify(y)} instead.`);return y}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}}}function ys(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Do}function va(n,t){const i=new an(Do,ha,[],t?function(c){const f={color:Tr,string:Mt,number:Xe,enum:Mt,boolean:Wt,formatted:co,padding:yn,numberArray:Li,colorArray:Cn,projectionDefinition:gr,resolvedImage:_n,variableAnchorOffsetCollection:Mr};return c.type==="array"?_i(f[c.value]||Kt,c.length):f[c.type]}(t):void 0),s=i.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?fa(new _a(s,t)):zo(i.errors)}class ml{constructor(t,i){this.kind=t,this._styleExpression=i,this.isStateDependent=t!=="constant"&&!ms(i.expression)}evaluateWithoutErrorHandling(t,i,s,c,f,m){return this._styleExpression.evaluateWithoutErrorHandling(t,i,s,c,f,m)}evaluate(t,i,s,c,f,m){return this._styleExpression.evaluate(t,i,s,c,f,m)}}class xa{constructor(t,i,s,c){this.kind=t,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=t!=="camera"&&!ms(i.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,i,s,c,f,m){return this._styleExpression.evaluateWithoutErrorHandling(t,i,s,c,f,m)}evaluate(t,i,s,c,f,m){return this._styleExpression.evaluate(t,i,s,c,f,m)}interpolationFactor(t,i,s){return this.interpolationType?Ai.interpolationFactor(this.interpolationType,t,i,s):0}}function gl(n,t){const i=va(n,t);if(i.result==="error")return i;const s=i.value.expression,c=pa(s);if(!c&&!Bo(t))return zo([new Qt("","data expressions not supported")]);const f=da(s,["zoom"]);if(!f&&!Oc(t))return zo([new Qt("","zoom expressions not supported")]);const m=vs(s);return m||f?m instanceof Qt?zo([m]):m instanceof Ai&&!ma(t)?zo([new Qt("",'"interpolate" expressions cannot be used with this property')]):fa(m?new xa(c?"camera":"composite",i.value,m.labels,m instanceof Ai?m.interpolation:void 0):new ml(c?"constant":"source",i.value)):zo([new Qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class _s{constructor(t,i){this._parameters=t,this._specification=i,ar(this,fl(this._parameters,this._specification))}static deserialize(t){return new _s(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function vs(n){let t=null;if(n instanceof Dn)t=vs(n.result);else if(n instanceof go){for(const i of n.args)if(t=vs(i),t)break}else(n instanceof Xn||n instanceof Ai)&&n.input instanceof Xi&&n.input.name==="zoom"&&(t=n);return t instanceof Qt||n.eachChild(i=>{const s=vs(i);s instanceof Qt?t=s:!t&&s?t=new Qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new Qt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function xs(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!xs(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const yl={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function bs(n){if(n==null)return{filter:()=>!0,needGeometry:!1};xs(n)||(n=wa(n));const t=va(n,yl);if(t.result==="error")throw new Error(t.value.map(i=>`${i.key}: ${i.message}`).join(", "));return{filter:(i,s,c)=>t.value.evaluate(i,s,{},c),needGeometry:Nc(n)}}function ba(n,t){return n<t?-1:n>t?1:0}function Nc(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t<n.length;t++)if(Nc(n[t]))return!0;return!1}function wa(n){if(!n)return!0;const t=n[0];return n.length<=1?t!=="any":t==="=="?_l(n[1],n[2],"=="):t==="!="?Sa(_l(n[1],n[2],"==")):t==="<"||t===">"||t==="<="||t===">="?_l(n[1],n[2],t):t==="any"?(i=n.slice(1),["any"].concat(i.map(wa))):t==="all"?["all"].concat(n.slice(1).map(wa)):t==="none"?["all"].concat(n.slice(1).map(wa).map(Sa)):t==="in"?qc(n[1],n.slice(2)):t==="!in"?Sa(qc(n[1],n.slice(2))):t==="has"?Uc(n[1]):t!=="!has"||Sa(Uc(n[1]));var i}function _l(n,t,i){switch(n){case"$type":return[`filter-type-${i}`,t];case"$id":return[`filter-id-${i}`,t];default:return[`filter-${i}`,n,t]}}function qc(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(i=>typeof i!=typeof t[0])?["filter-in-large",n,["literal",t.sort(ba)]]:["filter-in-small",n,["literal",t]]}}function Uc(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function Sa(n){return["!",n]}function Aa(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let c="[";for(const f of n)c+=`${Aa(f)},`;return`${c}]`}const i=Object.keys(n).sort();let s="{";for(let c=0;c<i.length;c++)s+=`${JSON.stringify(i[c])}:${Aa(n[i[c]])},`;return`${s}}`}function jc(n){let t="";for(const i of Me)t+=`/${Aa(n[i])}`;return t}function ws(n){const t=n.value;return t?[new Ue(n.key,t,"constants have been deprecated as of v8")]:[]}function jr(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function Yn(n){if(Array.isArray(n))return n.map(Yn);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const t={};for(const i in n)t[i]=Yn(n[i]);return t}return jr(n)}function Fi(n){const t=n.key,i=n.value,s=n.valueSpec||{},c=n.objectElementValidators||{},f=n.style,m=n.styleSpec,y=n.validateSpec;let w=[];const E=Yt(i);if(E!=="object")return[new Ue(t,i,`object expected, ${E} found`)];for(const R in i){const V=R.split(".")[0],q=Gn(s,V)||s["*"];let j;if(Gn(c,V))j=c[V];else if(Gn(s,V))j=y;else if(c["*"])j=c["*"];else{if(!s["*"]){w.push(new Ue(t,i[R],`unknown property "${R}"`));continue}j=y}w=w.concat(j({key:(t&&`${t}.`)+R,value:i[R],valueSpec:q,style:f,styleSpec:m,object:i,objectKey:R,validateSpec:y},i))}for(const R in s)c[R]||s[R].required&&s[R].default===void 0&&i[R]===void 0&&w.push(new Ue(t,i,`missing required property "${R}"`));return w}function vl(n){const t=n.value,i=n.valueSpec,s=n.style,c=n.styleSpec,f=n.key,m=n.arrayElementValidator||n.validateSpec;if(Yt(t)!=="array")return[new Ue(f,t,`array expected, ${Yt(t)} found`)];if(i.length&&t.length!==i.length)return[new Ue(f,t,`array length ${i.length} expected, length ${t.length} found`)];if(i["min-length"]&&t.length<i["min-length"])return[new Ue(f,t,`array length at least ${i["min-length"]} expected, length ${t.length} found`)];let y={type:i.value,values:i.values};c.$version<7&&(y.function=i.function),Yt(i.value)==="object"&&(y=i.value);let w=[];for(let E=0;E<t.length;E++)w=w.concat(m({array:t,arrayIndex:E,value:t[E],valueSpec:y,validateSpec:n.validateSpec,style:s,styleSpec:c,key:`${f}[${E}]`}));return w}function Ss(n){const t=n.key,i=n.value,s=n.valueSpec;let c=Yt(i);return c==="number"&&i!=i&&(c="NaN"),c!=="number"?[new Ue(t,i,`number expected, ${c} found`)]:"minimum"in s&&i<s.minimum?[new Ue(t,i,`${i} is less than the minimum value ${s.minimum}`)]:"maximum"in s&&i>s.maximum?[new Ue(t,i,`${i} is greater than the maximum value ${s.maximum}`)]:[]}function xl(n){const t=n.valueSpec,i=jr(n.value.type);let s,c,f,m={};const y=i!=="categorical"&&n.value.property===void 0,w=!y,E=Yt(n.value.stops)==="array"&&Yt(n.value.stops[0])==="array"&&Yt(n.value.stops[0][0])==="object",R=Fi({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(j){if(i==="identity")return[new Ue(j.key,j.value,'identity function may not have a "stops" property')];let W=[];const X=j.value;return W=W.concat(vl({key:j.key,value:X,valueSpec:j.valueSpec,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec,arrayElementValidator:V})),Yt(X)==="array"&&X.length===0&&W.push(new Ue(j.key,X,"array must have at least one stop")),W},default:function(j){return j.validateSpec({key:j.key,value:j.value,valueSpec:t,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec})}}});return i==="identity"&&y&&R.push(new Ue(n.key,n.value,'missing required property "property"')),i==="identity"||n.value.stops||R.push(new Ue(n.key,n.value,'missing required property "stops"')),i==="exponential"&&n.valueSpec.expression&&!ma(n.valueSpec)&&R.push(new Ue(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(w&&!Bo(n.valueSpec)?R.push(new Ue(n.key,n.value,"property functions not supported")):y&&!Oc(n.valueSpec)&&R.push(new Ue(n.key,n.value,"zoom functions not supported"))),i!=="categorical"&&!E||n.value.property!==void 0||R.push(new Ue(n.key,n.value,'"property" property is required')),R;function V(j){let W=[];const X=j.value,re=j.key;if(Yt(X)!=="array")return[new Ue(re,X,`array expected, ${Yt(X)} found`)];if(X.length!==2)return[new Ue(re,X,`array length 2 expected, length ${X.length} found`)];if(E){if(Yt(X[0])!=="object")return[new Ue(re,X,`object expected, ${Yt(X[0])} found`)];if(X[0].zoom===void 0)return[new Ue(re,X,"object stop key must have zoom")];if(X[0].value===void 0)return[new Ue(re,X,"object stop key must have value")];if(f&&f>jr(X[0].zoom))return[new Ue(re,X[0].zoom,"stop zoom values must appear in ascending order")];jr(X[0].zoom)!==f&&(f=jr(X[0].zoom),c=void 0,m={}),W=W.concat(Fi({key:`${re}[0]`,value:X[0],valueSpec:{zoom:{}},validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec,objectElementValidators:{zoom:Ss,value:q}}))}else W=W.concat(q({key:`${re}[0]`,value:X[0],validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec},X));return ys(Yn(X[1]))?W.concat([new Ue(`${re}[1]`,X[1],"expressions are not allowed in function stops.")]):W.concat(j.validateSpec({key:`${re}[1]`,value:X[1],valueSpec:t,validateSpec:j.validateSpec,style:j.style,styleSpec:j.styleSpec}))}function q(j,W){const X=Yt(j.value),re=jr(j.value),ae=j.value!==null?j.value:W;if(s){if(X!==s)return[new Ue(j.key,ae,`${X} stop domain type must match previous stop domain type ${s}`)]}else s=X;if(X!=="number"&&X!=="string"&&X!=="boolean")return[new Ue(j.key,ae,"stop domain value must be a number, string, or boolean")];if(X!=="number"&&i!=="categorical"){let Se=`number expected, ${X} found`;return Bo(t)&&i===void 0&&(Se+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(j.key,ae,Se)]}return i!=="categorical"||X!=="number"||isFinite(re)&&Math.floor(re)===re?i!=="categorical"&&X==="number"&&c!==void 0&&re<c?[new Ue(j.key,ae,"stop domain values must appear in ascending order")]:(c=re,i==="categorical"&&re in m?[new Ue(j.key,ae,"stop domain values must be unique")]:(m[re]=!0,[])):[new Ue(j.key,ae,`integer expected, found ${re}`)]}}function wn(n){const t=(n.expressionContext==="property"?gl:va)(Yn(n.value),n.valueSpec);if(t.result==="error")return t.value.map(s=>new Ue(`${n.key}${s.key}`,n.value,s.message));const i=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!i.outputDefined())return[new Ue(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!ms(i))return[new Ue(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!ms(i))return[new Ue(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!da(i,["zoom","feature-state"]))return[new Ue(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!pa(i))return[new Ue(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function bl(n){const t=n.key,i=n.value,s=Yt(i);return s!=="string"?[new Ue(t,i,`color expected, ${s} found`)]:Vt.parse(String(i))?[]:[new Ue(t,i,`color expected, "${i}" found`)]}function As(n){const t=n.key,i=n.value,s=n.valueSpec,c=[];return Array.isArray(s.values)?s.values.indexOf(jr(i))===-1&&c.push(new Ue(t,i,`expected one of [${s.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(s.values).indexOf(jr(i))===-1&&c.push(new Ue(t,i,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(i)} found`)),c}function wl(n){return xs(Yn(n.value))?wn(ar({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Hc(n)}function Hc(n){const t=n.value,i=n.key;if(Yt(t)!=="array")return[new Ue(i,t,`array expected, ${Yt(t)} found`)];const s=n.styleSpec;let c,f=[];if(t.length<1)return[new Ue(i,t,"filter array must have at least 1 element")];switch(f=f.concat(As({key:`${i}[0]`,value:t[0],valueSpec:s.filter_operator,style:n.style,styleSpec:n.styleSpec})),jr(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&jr(t[1])==="$type"&&f.push(new Ue(i,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&f.push(new Ue(i,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=Yt(t[1]),c!=="string"&&f.push(new Ue(`${i}[1]`,t[1],`string expected, ${c} found`)));for(let m=2;m<t.length;m++)c=Yt(t[m]),jr(t[1])==="$type"?f=f.concat(As({key:`${i}[${m}]`,value:t[m],valueSpec:s.geometry_type,style:n.style,styleSpec:n.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&f.push(new Ue(`${i}[${m}]`,t[m],`string, number, or boolean expected, ${c} found`));break;case"any":case"all":case"none":for(let m=1;m<t.length;m++)f=f.concat(Hc({key:`${i}[${m}]`,value:t[m],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":c=Yt(t[1]),t.length!==2?f.push(new Ue(i,t,`filter array for "${t[0]}" operator must have 2 elements`)):c!=="string"&&f.push(new Ue(`${i}[1]`,t[1],`string expected, ${c} found`))}return f}function Wc(n,t){const i=n.key,s=n.validateSpec,c=n.style,f=n.styleSpec,m=n.value,y=n.objectKey,w=f[`${t}_${n.layerType}`];if(!w)return[];const E=y.match(/^(.*)-transition$/);if(t==="paint"&&E&&w[E[1]]&&w[E[1]].transition)return s({key:i,value:m,valueSpec:f.transition,style:c,styleSpec:f});const R=n.valueSpec||w[y];if(!R)return[new Ue(i,m,`unknown property "${y}"`)];let V;if(Yt(m)==="string"&&Bo(R)&&!R.tokens&&(V=/^{([^}]+)}$/.exec(m)))return[new Ue(i,m,`"${y}" does not support interpolation syntax
@@ -743,7 +743,7 @@ ${Z.shaderPreludeCode.vertexSource}`,define:Z.shaderDefine},defaultProjectionDat
743
743
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(d){return d instanceof this?d:new this(d)}static concat(d,..._){const b=new this(d);return _.forEach(k=>b.set(k)),b}static accessor(d){const b=(this[cm]=this[cm]={accessors:{}}).accessors,k=this.prototype;function P(v){const o=ic(v);b[o]||(hx(k,v),b[o]=!0)}return Ge.isArray(d)?d.forEach(P):P(d),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(rn.prototype,({value:p},d)=>{let _=d[0].toUpperCase()+d.slice(1);return{get:()=>p,set(b){this[_]=b}}});Ge.freezeMethods(rn);function zp(p,d){const _=this||mc,b=d||_,k=rn.from(b.headers);let P=b.data;return Ge.forEach(p,function(o){P=o.call(_,P,k.normalize(),d?d.status:void 0)}),k.normalize(),P}function Ug(p){return!!(p&&p.__CANCEL__)}function el(p,d,_){er.call(this,p??"canceled",er.ERR_CANCELED,d,_),this.name="CanceledError"}Ge.inherits(el,er,{__CANCEL__:!0});function jg(p,d,_){const b=_.config.validateStatus;!_.status||!b||b(_.status)?p(_):d(new er("Request failed with status code "+_.status,[er.ERR_BAD_REQUEST,er.ERR_BAD_RESPONSE][Math.floor(_.status/100)-4],_.config,_.request,_))}function px(p){const d=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p);return d&&d[1]||""}function dx(p,d){p=p||10;const _=new Array(p),b=new Array(p);let k=0,P=0,v;return d=d!==void 0?d:1e3,function(B){const D=Date.now(),L=b[P];v||(v=D),_[k]=B,b[k]=D;let H=P,M=0;for(;H!==k;)M+=_[H++],H=H%p;if(k=(k+1)%p,k===P&&(P=(P+1)%p),D-v<d)return;const C=L&&D-L;return C?Math.round(M*1e3/C):void 0}}function fx(p,d){let _=0,b=1e3/d,k,P;const v=(D,L=Date.now())=>{_=L,k=null,P&&(clearTimeout(P),P=null),p.apply(null,D)};return[(...D)=>{const L=Date.now(),H=L-_;H>=b?v(D,L):(k=D,P||(P=setTimeout(()=>{P=null,v(k)},b-H)))},()=>k&&v(k)]}const nh=(p,d,_=3)=>{let b=0;const k=dx(50,250);return fx(P=>{const v=P.loaded,o=P.lengthComputable?P.total:void 0,B=v-b,D=k(B),L=v<=o;b=v;const H={loaded:v,total:o,progress:o?v/o:void 0,bytes:B,rate:D||void 0,estimated:D&&o&&L?(o-v)/D:void 0,event:P,lengthComputable:o!=null,[d?"download":"upload"]:!0};p(H)},_)},um=(p,d)=>{const _=p!=null;return[b=>d[0]({lengthComputable:_,total:p,loaded:b}),d[1]]},hm=p=>(...d)=>Ge.asap(()=>p(...d)),mx=zi.hasStandardBrowserEnv?((p,d)=>_=>(_=new URL(_,zi.origin),p.protocol===_.protocol&&p.host===_.host&&(d||p.port===_.port)))(new URL(zi.origin),zi.navigator&&/(msie|trident)/i.test(zi.navigator.userAgent)):()=>!0,gx=zi.hasStandardBrowserEnv?{write(p,d,_,b,k,P){const v=[p+"="+encodeURIComponent(d)];Ge.isNumber(_)&&v.push("expires="+new Date(_).toGMTString()),Ge.isString(b)&&v.push("path="+b),Ge.isString(k)&&v.push("domain="+k),P===!0&&v.push("secure"),document.cookie=v.join("; ")},read(p){const d=document.cookie.match(new RegExp("(^|;\\s*)("+p+")=([^;]*)"));return d?decodeURIComponent(d[3]):null},remove(p){this.write(p,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function yx(p){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(p)}function _x(p,d){return d?p.replace(/\/?\/$/,"")+"/"+d.replace(/^\/+/,""):p}function Hg(p,d,_){let b=!yx(d);return p&&(b||_==!1)?_x(p,d):d}const pm=p=>p instanceof rn?{...p}:p;function js(p,d){d=d||{};const _={};function b(D,L,H,M){return Ge.isPlainObject(D)&&Ge.isPlainObject(L)?Ge.merge.call({caseless:M},D,L):Ge.isPlainObject(L)?Ge.merge({},L):Ge.isArray(L)?L.slice():L}function k(D,L,H,M){if(Ge.isUndefined(L)){if(!Ge.isUndefined(D))return b(void 0,D,H,M)}else return b(D,L,H,M)}function P(D,L){if(!Ge.isUndefined(L))return b(void 0,L)}function v(D,L){if(Ge.isUndefined(L)){if(!Ge.isUndefined(D))return b(void 0,D)}else return b(void 0,L)}function o(D,L,H){if(H in d)return b(D,L);if(H in p)return b(void 0,D)}const B={url:P,method:P,data:P,baseURL:v,transformRequest:v,transformResponse:v,paramsSerializer:v,timeout:v,timeoutMessage:v,withCredentials:v,withXSRFToken:v,adapter:v,responseType:v,xsrfCookieName:v,xsrfHeaderName:v,onUploadProgress:v,onDownloadProgress:v,decompress:v,maxContentLength:v,maxBodyLength:v,beforeRedirect:v,transport:v,httpAgent:v,httpsAgent:v,cancelToken:v,socketPath:v,responseEncoding:v,validateStatus:o,headers:(D,L,H)=>k(pm(D),pm(L),H,!0)};return Ge.forEach(Object.keys(Object.assign({},p,d)),function(L){const H=B[L]||k,M=H(p[L],d[L],L);Ge.isUndefined(M)&&H!==o||(_[L]=M)}),_}const Wg=p=>{const d=js({},p);let{data:_,withXSRFToken:b,xsrfHeaderName:k,xsrfCookieName:P,headers:v,auth:o}=d;d.headers=v=rn.from(v),d.url=Fg(Hg(d.baseURL,d.url,d.allowAbsoluteUrls),p.params,p.paramsSerializer),o&&v.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let B;if(Ge.isFormData(_)){if(zi.hasStandardBrowserEnv||zi.hasStandardBrowserWebWorkerEnv)v.setContentType(void 0);else if((B=v.getContentType())!==!1){const[D,...L]=B?B.split(";").map(H=>H.trim()).filter(Boolean):[];v.setContentType([D||"multipart/form-data",...L].join("; "))}}if(zi.hasStandardBrowserEnv&&(b&&Ge.isFunction(b)&&(b=b(d)),b||b!==!1&&mx(d.url))){const D=k&&P&&gx.read(P);D&&v.set(k,D)}return d},vx=typeof XMLHttpRequest<"u",xx=vx&&function(p){return new Promise(function(_,b){const k=Wg(p);let P=k.data;const v=rn.from(k.headers).normalize();let{responseType:o,onUploadProgress:B,onDownloadProgress:D}=k,L,H,M,C,T;function N(){C&&C(),T&&T(),k.cancelToken&&k.cancelToken.unsubscribe(L),k.signal&&k.signal.removeEventListener("abort",L)}let G=new XMLHttpRequest;G.open(k.method.toUpperCase(),k.url,!0),G.timeout=k.timeout;function ie(){if(!G)return;const Ee=rn.from("getAllResponseHeaders"in G&&G.getAllResponseHeaders()),me={data:!o||o==="text"||o==="json"?G.responseText:G.response,status:G.status,statusText:G.statusText,headers:Ee,config:p,request:G};jg(function(qe){_(qe),N()},function(qe){b(qe),N()},me),G=null}"onloadend"in G?G.onloadend=ie:G.onreadystatechange=function(){!G||G.readyState!==4||G.status===0&&!(G.responseURL&&G.responseURL.indexOf("file:")===0)||setTimeout(ie)},G.onabort=function(){G&&(b(new er("Request aborted",er.ECONNABORTED,p,G)),G=null)},G.onerror=function(){b(new er("Network Error",er.ERR_NETWORK,p,G)),G=null},G.ontimeout=function(){let te=k.timeout?"timeout of "+k.timeout+"ms exceeded":"timeout exceeded";const me=k.transitional||Ng;k.timeoutErrorMessage&&(te=k.timeoutErrorMessage),b(new er(te,me.clarifyTimeoutError?er.ETIMEDOUT:er.ECONNABORTED,p,G)),G=null},P===void 0&&v.setContentType(null),"setRequestHeader"in G&&Ge.forEach(v.toJSON(),function(te,me){G.setRequestHeader(me,te)}),Ge.isUndefined(k.withCredentials)||(G.withCredentials=!!k.withCredentials),o&&o!=="json"&&(G.responseType=k.responseType),D&&([M,T]=nh(D,!0),G.addEventListener("progress",M)),B&&G.upload&&([H,C]=nh(B),G.upload.addEventListener("progress",H),G.upload.addEventListener("loadend",C)),(k.cancelToken||k.signal)&&(L=Ee=>{G&&(b(!Ee||Ee.type?new el(null,p,G):Ee),G.abort(),G=null)},k.cancelToken&&k.cancelToken.subscribe(L),k.signal&&(k.signal.aborted?L():k.signal.addEventListener("abort",L)));const le=px(k.url);if(le&&zi.protocols.indexOf(le)===-1){b(new er("Unsupported protocol "+le+":",er.ERR_BAD_REQUEST,p));return}G.send(P||null)})},bx=(p,d)=>{const{length:_}=p=p?p.filter(Boolean):[];if(d||_){let b=new AbortController,k;const P=function(D){if(!k){k=!0,o();const L=D instanceof Error?D:this.reason;b.abort(L instanceof er?L:new el(L instanceof Error?L.message:L))}};let v=d&&setTimeout(()=>{v=null,P(new er(`timeout ${d} of ms exceeded`,er.ETIMEDOUT))},d);const o=()=>{p&&(v&&clearTimeout(v),v=null,p.forEach(D=>{D.unsubscribe?D.unsubscribe(P):D.removeEventListener("abort",P)}),p=null)};p.forEach(D=>D.addEventListener("abort",P));const{signal:B}=b;return B.unsubscribe=()=>Ge.asap(o),B}},wx=function*(p,d){let _=p.byteLength;if(_<d){yield p;return}let b=0,k;for(;b<_;)k=b+d,yield p.slice(b,k),b=k},Sx=async function*(p,d){for await(const _ of Ax(p))yield*wx(_,d)},Ax=async function*(p){if(p[Symbol.asyncIterator]){yield*p;return}const d=p.getReader();try{for(;;){const{done:_,value:b}=await d.read();if(_)break;yield b}}finally{await d.cancel()}},dm=(p,d,_,b)=>{const k=Sx(p,d);let P=0,v,o=B=>{v||(v=!0,b&&b(B))};return new ReadableStream({async pull(B){try{const{done:D,value:L}=await k.next();if(D){o(),B.close();return}let H=L.byteLength;if(_){let M=P+=H;_(M)}B.enqueue(new Uint8Array(L))}catch(D){throw o(D),D}},cancel(B){return o(B),k.return()}},{highWaterMark:2})},gh=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Zg=gh&&typeof ReadableStream=="function",kx=gh&&(typeof TextEncoder=="function"?(p=>d=>p.encode(d))(new TextEncoder):async p=>new Uint8Array(await new Response(p).arrayBuffer())),Kg=(p,...d)=>{try{return!!p(...d)}catch{return!1}},Tx=Zg&&Kg(()=>{let p=!1;const d=new Request(zi.origin,{body:new ReadableStream,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!d}),fm=64*1024,Xp=Zg&&Kg(()=>Ge.isReadableStream(new Response("").body)),oh={stream:Xp&&(p=>p.body)};gh&&(p=>{["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!oh[d]&&(oh[d]=Ge.isFunction(p[d])?_=>_[d]():(_,b)=>{throw new er(`Response type '${d}' is not supported`,er.ERR_NOT_SUPPORT,b)})})})(new Response);const Cx=async p=>{if(p==null)return 0;if(Ge.isBlob(p))return p.size;if(Ge.isSpecCompliantForm(p))return(await new Request(zi.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(Ge.isArrayBufferView(p)||Ge.isArrayBuffer(p))return p.byteLength;if(Ge.isURLSearchParams(p)&&(p=p+""),Ge.isString(p))return(await kx(p)).byteLength},Ex=async(p,d)=>{const _=Ge.toFiniteNumber(p.getContentLength());return _??Cx(d)},Px=gh&&(async p=>{let{url:d,method:_,data:b,signal:k,cancelToken:P,timeout:v,onDownloadProgress:o,onUploadProgress:B,responseType:D,headers:L,withCredentials:H="same-origin",fetchOptions:M}=Wg(p);D=D?(D+"").toLowerCase():"text";let C=bx([k,P&&P.toAbortSignal()],v),T;const N=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let G;try{if(B&&Tx&&_!=="get"&&_!=="head"&&(G=await Ex(L,b))!==0){let me=new Request(d,{method:"POST",body:b,duplex:"half"}),De;if(Ge.isFormData(b)&&(De=me.headers.get("content-type"))&&L.setContentType(De),me.body){const[qe,rt]=um(G,nh(hm(B)));b=dm(me.body,fm,qe,rt)}}Ge.isString(H)||(H=H?"include":"omit");const ie="credentials"in Request.prototype;T=new Request(d,{...M,signal:C,method:_.toUpperCase(),headers:L.normalize().toJSON(),body:b,duplex:"half",credentials:ie?H:void 0});let le=await fetch(T);const Ee=Xp&&(D==="stream"||D==="response");if(Xp&&(o||Ee&&N)){const me={};["status","statusText","headers"].forEach(At=>{me[At]=le[At]});const De=Ge.toFiniteNumber(le.headers.get("content-length")),[qe,rt]=o&&um(De,nh(hm(o),!0))||[];le=new Response(dm(le.body,fm,qe,()=>{rt&&rt(),N&&N()}),me)}D=D||"text";let te=await oh[Ge.findKey(oh,D)||"text"](le,p);return!Ee&&N&&N(),await new Promise((me,De)=>{jg(me,De,{data:te,headers:rn.from(le.headers),status:le.status,statusText:le.statusText,config:p,request:T})})}catch(ie){throw N&&N(),ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)?Object.assign(new er("Network Error",er.ERR_NETWORK,p,T),{cause:ie.cause||ie}):er.from(ie,ie&&ie.code,p,T)}}),Qp={http:H0,xhr:xx,fetch:Px};Ge.forEach(Qp,(p,d)=>{if(p){try{Object.defineProperty(p,"name",{value:d})}catch{}Object.defineProperty(p,"adapterName",{value:d})}});const mm=p=>`- ${p}`,Ix=p=>Ge.isFunction(p)||p===null||p===!1,Gg={getAdapter:p=>{p=Ge.isArray(p)?p:[p];const{length:d}=p;let _,b;const k={};for(let P=0;P<d;P++){_=p[P];let v;if(b=_,!Ix(_)&&(b=Qp[(v=String(_)).toLowerCase()],b===void 0))throw new er(`Unknown adapter '${v}'`);if(b)break;k[v||"#"+P]=b}if(!b){const P=Object.entries(k).map(([o,B])=>`adapter ${o} `+(B===!1?"is not supported by the environment":"is not available in the build"));let v=d?P.length>1?`since :
744
744
  `+P.map(mm).join(`
745
745
  `):" "+mm(P[0]):"as no adapter specified";throw new er("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return b},adapters:Qp};function Bp(p){if(p.cancelToken&&p.cancelToken.throwIfRequested(),p.signal&&p.signal.aborted)throw new el(null,p)}function gm(p){return Bp(p),p.headers=rn.from(p.headers),p.data=zp.call(p,p.transformRequest),["post","put","patch"].indexOf(p.method)!==-1&&p.headers.setContentType("application/x-www-form-urlencoded",!1),Gg.getAdapter(p.adapter||mc.adapter)(p).then(function(b){return Bp(p),b.data=zp.call(p,p.transformResponse,b),b.headers=rn.from(b.headers),b},function(b){return Ug(b)||(Bp(p),b&&b.response&&(b.response.data=zp.call(p,p.transformResponse,b.response),b.response.headers=rn.from(b.response.headers))),Promise.reject(b)})}const Jg="1.9.0",yh={};["object","boolean","number","function","string","symbol"].forEach((p,d)=>{yh[p]=function(b){return typeof b===p||"a"+(d<1?"n ":" ")+p}});const ym={};yh.transitional=function(d,_,b){function k(P,v){return"[Axios v"+Jg+"] Transitional option '"+P+"'"+v+(b?". "+b:"")}return(P,v,o)=>{if(d===!1)throw new er(k(v," has been removed"+(_?" in "+_:"")),er.ERR_DEPRECATED);return _&&!ym[v]&&(ym[v]=!0,console.warn(k(v," has been deprecated since v"+_+" and will be removed in the near future"))),d?d(P,v,o):!0}};yh.spelling=function(d){return(_,b)=>(console.warn(`${b} is likely a misspelling of ${d}`),!0)};function Mx(p,d,_){if(typeof p!="object")throw new er("options must be an object",er.ERR_BAD_OPTION_VALUE);const b=Object.keys(p);let k=b.length;for(;k-- >0;){const P=b[k],v=d[P];if(v){const o=p[P],B=o===void 0||v(o,P,p);if(B!==!0)throw new er("option "+P+" must be "+B,er.ERR_BAD_OPTION_VALUE);continue}if(_!==!0)throw new er("Unknown option "+P,er.ERR_BAD_OPTION)}}const rh={assertOptions:Mx,validators:yh},ao=rh.validators;let Us=class{constructor(d){this.defaults=d||{},this.interceptors={request:new lm,response:new lm}}async request(d,_){try{return await this._request(d,_)}catch(b){if(b instanceof Error){let k={};Error.captureStackTrace?Error.captureStackTrace(k):k=new Error;const P=k.stack?k.stack.replace(/^.+\n/,""):"";try{b.stack?P&&!String(b.stack).endsWith(P.replace(/^.+\n.+\n/,""))&&(b.stack+=`
746
- `+P):b.stack=P}catch{}}throw b}}_request(d,_){typeof d=="string"?(_=_||{},_.url=d):_=d||{},_=js(this.defaults,_);const{transitional:b,paramsSerializer:k,headers:P}=_;b!==void 0&&rh.assertOptions(b,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),k!=null&&(Ge.isFunction(k)?_.paramsSerializer={serialize:k}:rh.assertOptions(k,{encode:ao.function,serialize:ao.function},!0)),_.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?_.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:_.allowAbsoluteUrls=!0),rh.assertOptions(_,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),_.method=(_.method||this.defaults.method||"get").toLowerCase();let v=P&&Ge.merge(P.common,P[_.method]);P&&Ge.forEach(["delete","get","head","post","put","patch","common"],T=>{delete P[T]}),_.headers=rn.concat(v,P);const o=[];let B=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(_)===!1||(B=B&&N.synchronous,o.unshift(N.fulfilled,N.rejected))});const D=[];this.interceptors.response.forEach(function(N){D.push(N.fulfilled,N.rejected)});let L,H=0,M;if(!B){const T=[gm.bind(this),void 0];for(T.unshift.apply(T,o),T.push.apply(T,D),M=T.length,L=Promise.resolve(_);H<M;)L=L.then(T[H++],T[H++]);return L}M=o.length;let C=_;for(H=0;H<M;){const T=o[H++],N=o[H++];try{C=T(C)}catch(G){N.call(this,G);break}}try{L=gm.call(this,C)}catch(T){return Promise.reject(T)}for(H=0,M=D.length;H<M;)L=L.then(D[H++],D[H++]);return L}getUri(d){d=js(this.defaults,d);const _=Hg(d.baseURL,d.url,d.allowAbsoluteUrls);return Fg(_,d.params,d.paramsSerializer)}};Ge.forEach(["delete","get","head","options"],function(d){Us.prototype[d]=function(_,b){return this.request(js(b||{},{method:d,url:_,data:(b||{}).data}))}});Ge.forEach(["post","put","patch"],function(d){function _(b){return function(P,v,o){return this.request(js(o||{},{method:d,headers:b?{"Content-Type":"multipart/form-data"}:{},url:P,data:v}))}}Us.prototype[d]=_(),Us.prototype[d+"Form"]=_(!0)});let Lx=class Xg{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let _;this.promise=new Promise(function(P){_=P});const b=this;this.promise.then(k=>{if(!b._listeners)return;let P=b._listeners.length;for(;P-- >0;)b._listeners[P](k);b._listeners=null}),this.promise.then=k=>{let P;const v=new Promise(o=>{b.subscribe(o),P=o}).then(k);return v.cancel=function(){b.unsubscribe(P)},v},d(function(P,v,o){b.reason||(b.reason=new el(P,v,o),_(b.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const _=this._listeners.indexOf(d);_!==-1&&this._listeners.splice(_,1)}toAbortSignal(){const d=new AbortController,_=b=>{d.abort(b)};return this.subscribe(_),d.signal.unsubscribe=()=>this.unsubscribe(_),d.signal}static source(){let d;return{token:new Xg(function(k){d=k}),cancel:d}}};function Rx(p){return function(_){return p.apply(null,_)}}function Dx(p){return Ge.isObject(p)&&p.isAxiosError===!0}const Yp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yp).forEach(([p,d])=>{Yp[d]=p});function Qg(p){const d=new Us(p),_=Cg(Us.prototype.request,d);return Ge.extend(_,Us.prototype,d,{allOwnKeys:!0}),Ge.extend(_,d,null,{allOwnKeys:!0}),_.create=function(k){return Qg(js(p,k))},_}const Kr=Qg(mc);Kr.Axios=Us;Kr.CanceledError=el;Kr.CancelToken=Lx;Kr.isCancel=Ug;Kr.VERSION=Jg;Kr.toFormData=mh;Kr.AxiosError=er;Kr.Cancel=Kr.CanceledError;Kr.all=function(d){return Promise.all(d)};Kr.spread=Rx;Kr.isAxiosError=Dx;Kr.mergeConfig=js;Kr.AxiosHeaders=rn;Kr.formToJSON=p=>qg(Ge.isHTMLForm(p)?new FormData(p):p);Kr.getAdapter=Gg.getAdapter;Kr.HttpStatusCode=Yp;Kr.default=Kr;const{Axios:cA,AxiosError:uA,CanceledError:hA,isCancel:pA,CancelToken:dA,VERSION:fA,all:mA,Cancel:gA,isAxiosError:yA,spread:_A,toFormData:vA,AxiosHeaders:xA,HttpStatusCode:bA,formToJSON:wA,getAdapter:SA,mergeConfig:AA}=Kr,zx={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden"},Bx={key:0,class:"p-5 pb-3 flex justify-between items-center"},Vx={class:"inline-block font-semibold text-lg text-gray-800"},Ox={key:1,class:"flex"},Fx={class:"flex items-center mx-[8px]"},Nx={class:"min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg"},qx={class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},Ux={class:"flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},jx={key:0,class:"text-center"},Hx={key:1,class:"text-red-500"},Wx={key:2},Zx=["innerHTML"],Kx={key:1,class:"flow-root"},Gx={class:"-my-3 divide-y divide-gray-100 text-sm"},Jx={class:"font-medium text-gray-900"},Xx={class:"text-gray-700 sm:col-span-2"},Qx={key:2,class:"vs-map-card-info__nodata"},Yg={__name:"vs-card-widget",props:{config:{type:Object,required:!0},cardValues:{type:Object,required:!0}},emits:["close","content-resize"],setup(p,{emit:d}){const _=p,b=d,k=A.computed(()=>{var G;return((G=_.config)==null?void 0:G.title)||""}),P=A.ref([]),v=A.ref(!1),o=A.ref(null),B=A.ref(0),D=A.computed(()=>B.value+1),L=A.computed(()=>{var G;return((G=_.info)==null?void 0:G.length)||0}),H=A.computed(()=>P.value[B.value]),M=A.computed(()=>{if(!H.value)return{};const{rows:G,columns:ie}=H.value;return!G||!ie?{}:ie.reduce((le,Ee)=>(!Ee.hide&&!["geom","geodata","id"].includes(Ee.name)&&(le[Ee.ua]=G[Ee.name]??"-"),le),{})});async function C(){var G,ie,le;v.value=!0,o.value=null;try{const Ee={id:(G=_.cardValues)==null?void 0:G.id,layer:(ie=_.cardValues)==null?void 0:ie.layer,map:(le=_.cardValues)==null?void 0:le.map},te=await Kr.get("/api/map-format",{params:Ee});P.value[B.value]=te.data}catch(Ee){o.value=(Ee==null?void 0:Ee.message)||"Помилка запиту"}finally{v.value=!1,await A.nextTick(),b("content-resize")}}function T(){B.value<_.info.length-1&&(B.value+=1,P.value[B.value]||C())}function N(){B.value>0&&(B.value-=1,P.value[B.value]||C())}return A.onMounted(async()=>{await A.nextTick(),C()}),A.watch(()=>_.info,()=>{B.value=0,C(),b("content-resize")},{deep:!0}),A.watch([()=>_.cardValues,()=>_.config],async()=>{await A.nextTick(),C(),b("content-resize")}),(G,ie)=>{var le;return A.openBlock(),A.createElementBlock("div",zx,[k.value?(A.openBlock(),A.createElementBlock("div",Bx,[A.createElementVNode("h2",Vx,A.toDisplayString(k.value),1),A.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600 ml-2",onClick:ie[0]||(ie[0]=Ee=>b("close"))},ie[1]||(ie[1]=[A.createElementVNode("svg",{class:"shrink-0 size-4 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[A.createElementVNode("path",{d:"M18 6 6 18"}),A.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))])):A.createCommentVNode("",!0),L.value>1?(A.openBlock(),A.createElementBlock("div",Ox,[A.createElementVNode("button",{type:"button",class:A.normalizeClass([{"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none":D.value===1},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]),onClick:N}," ◀ ",2),A.createElementVNode("div",Fx,[A.createElementVNode("span",Nx,A.toDisplayString(D.value),1),ie[2]||(ie[2]=A.createElementVNode("span",{class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),A.createElementVNode("span",qx,A.toDisplayString(L.value),1)]),A.createElementVNode("button",{type:"button",onClick:T,class:A.normalizeClass([{"opacity-50 pointer-events-none":D.value===L.value},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])}," ▶ ",2)])):A.createCommentVNode("",!0),A.createElementVNode("div",Ux,[v.value?(A.openBlock(),A.createElementBlock("div",jx,"Завантаження даних...")):o.value?(A.openBlock(),A.createElementBlock("div",Hx,"Помилка завантаження даних")):(A.openBlock(),A.createElementBlock("div",Wx,[(le=H.value)!=null&&le.html?(A.openBlock(),A.createElementBlock("div",{key:0,innerHTML:H.value.html,class:"custom-table-html border-b"},null,8,Zx)):Object.keys(M.value).length?(A.openBlock(),A.createElementBlock("div",Kx,[A.createElementVNode("dl",Gx,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(M.value,(Ee,te)=>(A.openBlock(),A.createElementBlock("div",{key:te,class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},[A.createElementVNode("dt",Jx,A.toDisplayString(te),1),A.createElementVNode("dd",Xx,A.toDisplayString(Ee),1)]))),128))])])):(A.openBlock(),A.createElementBlock("div",Qx,"Даних не знайдено."))]))])])}}},Yx={class:"size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},$x={key:0,class:"p-5 pb-0 items-center"},eb={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},tb={class:"h-full p-5"},rb={class:"h-full flex flex-col justify-between space-y-4"},ib={class:"space-y-4"},nb={key:0,class:"flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"},ob=["aria-valuenow"],sb={class:"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center rounded-lg group hover:bg-gray-100"},ab=["for"],lb={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},cb=["id","onUpdate:modelValue"],ub={class:"ms-2 text-gray-800 dark:text-neutral-200"},hb={key:0,class:"ms-auto text-xs text-gray-500 dark:text-neutral-500"},pb={__name:"vs-attributre-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0}},setup(p){const d=p,_=A.computed(()=>{var B;return((B=d.config)==null?void 0:B.title)||""}),b=A.ref([]),k=A.computed(()=>d.config.layer.style.rules.some(B=>B.count!==void 0)),P=A.computed(()=>d.config.layer.style.rules.reduce((B,D)=>B+(D.count||0),0)),v=B=>!B||P.value===0?0:Math.round(B/P.value*100),o=()=>{const D=d.config.layer.style.rules.filter((L,H)=>b.value[H]).map(L=>L.id||L.value).join(",");if(d.config.layer.id){const L=d.map.getSource(d.config.layer.id);if(L){const M=L.tiles[0].split("?filter=")[0],C=D?`${M}?filter=${d.config.layer.style.attribute}=${D}`:M;L.setTiles([C])}}};return A.onMounted(()=>{var B;(B=d.config)!=null&&B.layer&&($o(d.map,d.config.layer),b.value=new Array(d.config.layer.style.rules.length).fill(!1))}),(B,D)=>(A.openBlock(),A.createElementBlock("div",Yx,[_.value?(A.openBlock(),A.createElementBlock("div",$x,[A.createElementVNode("div",null,[A.createElementVNode("h2",eb,A.toDisplayString(_.value),1)])])):A.createCommentVNode("",!0),A.createElementVNode("div",tb,[A.createElementVNode("div",rb,[A.createElementVNode("div",ib,[k.value?(A.openBlock(),A.createElementBlock("div",nb,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.config.layer.style.rules,(L,H)=>(A.openBlock(),A.createElementBlock("div",{key:H,class:"flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",style:A.normalizeStyle({width:`${v(L.count)}%`,backgroundColor:L.color}),role:"progressbar","aria-valuenow":v(L.count),"aria-valuemin":"0","aria-valuemax":"100"},null,12,ob))),128))])):A.createCommentVNode("",!0),A.createElementVNode("ul",null,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.config.layer.style.rules,(L,H)=>(A.openBlock(),A.createElementBlock("li",{key:H},[A.createElementVNode("div",sb,[A.createElementVNode("label",{for:`filter-${H}`,class:"flex items-center w-full cursor-pointer"},[A.createElementVNode("div",{class:"w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",style:A.normalizeStyle({background:b.value[H]?L.color||"#2563eb":"#fff",borderColor:b.value[H]?L.color||"#2563eb":L.color||"#d9d9d9"})},[b.value[H]?(A.openBlock(),A.createElementBlock("img",lb)):A.createCommentVNode("",!0)],4),A.withDirectives(A.createElementVNode("input",{type:"checkbox",id:`filter-${H}`,"onUpdate:modelValue":M=>b.value[H]=M,onChange:o,class:"hidden",disabled:!1},null,40,cb),[[A.vModelCheckbox,b.value[H]]]),A.createElementVNode("span",ub,A.toDisplayString(L.label||L.text),1),k.value?(A.openBlock(),A.createElementBlock("span",hb,"("+A.toDisplayString(L.count)+")",1)):A.createCommentVNode("",!0)],8,ab)])]))),128))])])])])]))}},db={class:"hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]"},fb=["for"],mb={class:"custom-checkbox-wrapper"},gb=["id","checked"],yb={class:"custom-checkbox"},_b={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},vb={class:"flex items-center justify-between ml-2 w-full"},xb=["title"],bb={key:0,class:"text-xs opacity-60 text-[#4b5563]"},wb={__name:"vs-map-catalog-item",props:{layer:{type:Object,required:!0},map:{type:Object,default:()=>null},selectedLayers:{type:Array,default:()=>[]}},emits:["select","remove"],setup(p,{emit:d}){const _=p,b=d,k=A.computed(()=>_.selectedLayers.some(o=>o.id===_.layer.id)),P=o=>Intl.NumberFormat("uk",{notation:"compact"}).format(o),v=o=>{b(o?"select":"remove",_.layer)};return(o,B)=>{var D,L,H,M,C;return A.openBlock(),A.createElementBlock("div",db,[A.createElementVNode("label",{class:"flex items-center w-full cursor-pointer",for:p.layer.id},[A.createElementVNode("div",mb,[A.createElementVNode("input",{id:p.layer.id,type:"checkbox",checked:k.value,onChange:B[0]||(B[0]=T=>v(T.target.checked)),class:"custom-checkbox-input"},null,40,gb),A.createElementVNode("div",yb,[k.value?(A.openBlock(),A.createElementBlock("svg",_b,B[1]||(B[1]=[A.createElementVNode("path",{d:"M10.6663 1L4.24967 7.41667L1.33301 4.5",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):A.createCommentVNode("",!0)])]),A.createElementVNode("div",vb,[A.createElementVNode("div",{class:"whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",title:(D=p.layer)==null?void 0:D.name},A.toDisplayString(((L=p.layer)==null?void 0:L.name)||((H=p.layer)==null?void 0:H.title)),9,xb),isNaN(P((M=p.layer)==null?void 0:M.count))?A.createCommentVNode("",!0):(A.openBlock(),A.createElementBlock("div",bb,A.toDisplayString(P((C=p.layer)==null?void 0:C.count)),1))])],8,fb)])}}},Sb=Hr(wb,[["__scopeId","data-v-b96f3537"]]),Ab={},kb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-zoom-in"};function Tb(p,d){return A.openBlock(),A.createElementBlock("svg",kb,d[0]||(d[0]=[A.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),A.createElementVNode("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"},null,-1),A.createElementVNode("line",{x1:"11",x2:"11",y1:"8",y2:"14"},null,-1),A.createElementVNode("line",{x1:"8",x2:"14",y1:"11",y2:"11"},null,-1)]))}const Cb=Hr(Ab,[["render",Tb]]),Eb={},Pb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-info"};function Ib(p,d){return A.openBlock(),A.createElementBlock("svg",Pb,d[0]||(d[0]=[A.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),A.createElementVNode("path",{d:"M12 16v-4"},null,-1),A.createElementVNode("path",{d:"M12 8h.01"},null,-1)]))}const Mb=Hr(Eb,[["render",Ib]]),Lb={},Rb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-table"};function Db(p,d){return A.openBlock(),A.createElementBlock("svg",Rb,d[0]||(d[0]=[A.createElementVNode("path",{d:"M12 3v18"},null,-1),A.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),A.createElementVNode("path",{d:"M3 9h18"},null,-1),A.createElementVNode("path",{d:"M3 15h18"},null,-1)]))}const zb=Hr(Lb,[["render",Db]]),Bb={},Vb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-trash2"};function Ob(p,d){return A.openBlock(),A.createElementBlock("svg",Vb,d[0]||(d[0]=[A.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const Fb=Hr(Bb,[["render",Ob]]),Nb={},qb={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-more-vertical text-gray-600"};function Ub(p,d){return A.openBlock(),A.createElementBlock("svg",qb,d[0]||(d[0]=[A.createElementVNode("circle",{cx:"12",cy:"12",r:"1"},null,-1),A.createElementVNode("circle",{cx:"12",cy:"5",r:"1"},null,-1),A.createElementVNode("circle",{cx:"12",cy:"19",r:"1"},null,-1)]))}const jb=Hr(Nb,[["render",Ub]]),Hb={},Wb={width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zb(p,d){return A.openBlock(),A.createElementBlock("svg",Wb,d[0]||(d[0]=[A.createElementVNode("path",{d:"M1 9L5 5L1 1",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Kb=Hr(Hb,[["render",Zb]]);var cc={exports:{}},Gb=cc.exports,_m;function Jb(){return _m||(_m=1,function(p,d){(function(_,b){b(d)})(Gb,function(_){var b,k,P="smooth-dnd-container-instance",v="smooth-dnd-draggable-wrapper",o="animated",B="__smooth_dnd_draggable_translation_value",D="__smooth_dnd_draggable_visibility_value",L="smooth-dnd-ghost",H="smooth-dnd-container",M="smooth-dnd-extra-size-for-insertion",C="smooth-dnd-stretcher-element",T="smooth-dnd-stretcher-instance",N="smooth-dnd-disable-touch-action",G="smooth-dnd-no-user-select",ie="smooth-dnd-prevent-auto-scroll-class",le="smooth-dnd-drop-preview-default-class",Ee="smooth-dnd-drop-preview-inner-class",te="smooth-dnd-drop-preview-constant-class",me="smooth-dnd-drop-preview-flex-container-class",De=Object.freeze({containerInstance:P,defaultGroupName:"@@smooth-dnd-default-group@@",wrapperClass:v,defaultGrabHandleClass:"smooth-dnd-default-grap-handle",animationClass:o,translationValue:B,visibilityValue:D,ghostClass:L,containerClass:H,extraSizeForInsertion:M,stretcherElementClass:C,stretcherElementInstance:T,isDraggableDetached:"smoth-dnd-is-draggable-detached",disbaleTouchActions:N,noUserSelectClass:G,preventAutoScrollClass:ie,dropPlaceholderDefaultClass:le,dropPlaceholderInnerClass:Ee,dropPlaceholderWrapperClass:te,dropPlaceholderFlexContainerClass:me}),qe={groupName:void 0,behaviour:"move",orientation:"vertical",getChildPayload:void 0,animationDuration:250,autoScrollEnabled:!0,shouldAcceptDrop:void 0,shouldAnimateDrop:void 0};function rt(ce){return(rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(ce)}function At(ce,ue,pe){return ue in ce?Object.defineProperty(ce,ue,{value:pe,enumerable:!0,configurable:!0,writable:!0}):ce[ue]=pe,ce}function _t(ce){return function(ue){if(Array.isArray(ue)){for(var pe=0,ve=new Array(ue.length);pe<ue.length;pe++)ve[pe]=ue[pe];return ve}}(ce)||function(ue){if(Symbol.iterator in Object(ue)||Object.prototype.toString.call(ue)==="[object Arguments]")return Array.from(ue)}(ce)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(k=b||(b={})).x="x",k.y="y",k.xy="xy";function lt(ce,ue,pe){return pe==="x"?{left:Math.max(ce.left,ue.left),top:ce.top,right:Math.min(ce.right,ue.right),bottom:ce.bottom}:{left:ce.left,top:Math.max(ce.top,ue.top),right:ce.right,bottom:Math.min(ce.bottom,ue.bottom)}}function vt(ce){var ue=window.getComputedStyle(ce),pe=ue.overflow;if(pe==="auto"||pe==="scroll")return b.xy;var ve=ue["overflow-x"],Ce=ve==="auto"||ve==="scroll",Be=ue["overflow-y"],st=Be==="auto"||Be==="scroll";return Ce&&st?b.xy:Ce?b.x:st?b.y:null}function qt(ce,ue){var pe=window.getComputedStyle(ce),ve=pe.overflow,Ce=pe["overflow-".concat(ue)];return ve==="auto"||ve==="scroll"||Ce==="auto"||Ce==="scroll"}var Xt=function(ce,ue){return{left:Math.max(ce.left,ue.left),top:Math.max(ce.top,ue.top),right:Math.min(ce.right,ue.right),bottom:Math.min(ce.bottom,ue.bottom)}},kr=function(ce){var ue=ce.getBoundingClientRect(),pe={left:ue.left,right:ue.right,top:ue.top,bottom:ue.bottom};if(ni(ce,"x")&&!xr(ce,"x")){var ve=pe.right-pe.left;pe.right=pe.right+ce.scrollWidth-ve}if(ni(ce,"y")&&!xr(ce,"y")){var Ce=pe.bottom-pe.top;pe.bottom=pe.bottom+ce.scrollHeight-Ce}return pe},xr=function(ce,ue){var pe=window.getComputedStyle(ce),ve=pe.overflow,Ce=pe["overflow-".concat(ue)];return ve==="auto"||ve==="scroll"||ve==="hidden"||Ce==="auto"||Ce==="scroll"||Ce==="hidden"},ni=function(ce,ue){return ue==="x"?ce.scrollWidth>ce.clientWidth:ce.scrollHeight>ce.clientHeight},ir=function(ce,ue){var pe=ce,ve=ue||kr(ce);for(pe=ce.parentElement;pe;)ni(pe,"x")&&xr(pe,"x")&&(ve=lt(ve,pe.getBoundingClientRect(),"x")),ni(pe,"y")&&xr(pe,"y")&&(ve=lt(ve,pe.getBoundingClientRect(),"y")),pe=pe.parentElement;return ve},Wi=function(ce,ue){for(var pe=ce;pe;){if(pe[P]){var ve=function(){var Ce=pe[P];if(ue.some(function(Be){return Be===Ce}))return{v:Ce}}();if(rt(ve)==="object")return ve.v}pe=pe.parentElement}return null},Rr=function(ce,ue){for(var pe=ce;pe;){if(pe.matches(ue))return pe;pe=pe.parentElement}return null},Zi=function(ce,ue){return-1<ce.className.split(" ").map(function(pe){return pe}).indexOf(ue)},Dr=function(ce,ue){if(ce){var pe=ce.className.split(" ").filter(function(ve){return ve});pe.indexOf(ue)===-1&&(pe.unshift(ue),ce.className=pe.join(" "))}},on=function(ce,ue){if(ce){var pe=ce.className.split(" ").filter(function(ve){return ve&&ve!==ue});ce.className=pe.join(" ")}},Si=function(ce,ue){return ce.removeChild(ce.children[ue])},Wr=function(ce,ue,pe){pe>=ce.children.length?ce.appendChild(ue):ce.insertBefore(ue,ce.children[pe])},Ki=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():window.document.selection&&window.document.selection.empty()},Yr=function(ce){if(ce){var ue=window.getComputedStyle(ce);if(ue)return ue.cursor}return null};function Gi(ce){return!(ce.bottom<=ce.top||ce.right<=ce.left)}function Mi(ce){var ue=ce.element,pe=ce.draggables;return function(ve,Ce){var Be=ve,st=Be.removedIndex,Je=Be.addedIndex,it=Be.droppedElement,ze=null;if(st!==null&&(ze=Si(ue,st),pe.splice(st,1)),Je!==null){var Ke=window.document.createElement("div");Ke.className="".concat(v),Ke.appendChild(ze&&ze.firstElementChild?ze.firstElementChild:it),Wr(ue,Ke,Je),Je>=pe.length?pe.push(Ke):pe.splice(Je,0,Ke)}Ce&&Ce(ve)}}var Tn=Object.freeze({domDropHandler:Mi,reactDropHandler:function(){return{handler:function(){return function(ce,ue){ue&&ue(ce)}}}}}),fi={size:"offsetWidth",distanceToParent:"offsetLeft",translate:"transform",begin:"left",end:"right",dragPosition:"x",scrollSize:"scrollWidth",offsetSize:"offsetWidth",scrollValue:"scrollLeft",scale:"scaleX",setSize:"width",setters:{translate:function(ce){return"translate3d(".concat(ce,"px, 0, 0)")}}},yt={size:"offsetHeight",distanceToParent:"offsetTop",translate:"transform",begin:"top",end:"bottom",dragPosition:"y",scrollSize:"scrollHeight",offsetSize:"offsetHeight",scrollValue:"scrollTop",scale:"scaleY",setSize:"height",setters:{translate:function(ce){return"translate3d(0,".concat(ce,"px, 0)")}}};function xt(ce,ue,pe){ce[M]=0;var ve=function(ze){return{get:function(Ke,Ye){return Ke[ze[Ye]||Ye]},set:function(Ke,Ye,ft){Ke[ze[Ye]]=ze.setters[Ye]?ze.setters[Ye](ft):ft}}}(ue==="horizontal"?fi:yt),Ce={translation:0};function Be(){st(ce),function(ze){var Ke=ze.getBoundingClientRect();Ce.scaleX=ze.offsetWidth?(Ke.right-Ke.left)/ze.offsetWidth:1,Ce.scaleY=ze.offsetHeight?(Ke.bottom-Ke.top)/ze.offsetHeight:1}(ce)}function st(ze){Ce.rect=kr(ze);var Ke=ir(ze,Ce.rect);Gi(Ke)&&(Ce.lastVisibleRect=Ce.visibleRect),Ce.visibleRect=Ke}function Je(ze){var Ke=ze;if(Ke.tagName){var Ye=Ke.getBoundingClientRect();return ue==="vertical"?Ye.bottom-Ye.top:Ye.right-Ye.left}return ve.get(ze,"size")*ve.get(Ce,"scale")}function it(ze){return ve.get(ze,"dragPosition")}return window.addEventListener("resize",function(){st(ce)}),setTimeout(function(){Be()},10),{getSize:Je,getContainerRectangles:function(){return{rect:Ce.rect,visibleRect:Ce.visibleRect,lastVisibleRect:Ce.lastVisibleRect}},getBeginEndOfDOMRect:function(ze){return{begin:ve.get(ze,"begin"),end:ve.get(ze,"end")}},getBeginEndOfContainer:function(){return{begin:ve.get(Ce.rect,"begin")+Ce.translation,end:ve.get(Ce.rect,"end")+Ce.translation}},getBeginEndOfContainerVisibleRect:function(){return{begin:ve.get(Ce.visibleRect,"begin")+Ce.translation,end:ve.get(Ce.visibleRect,"end")+Ce.translation}},getBeginEnd:function(ze){var Ke=function(Ye){return(ve.get(Ye,"distanceToParent")+(Ye[B]||0))*ve.get(Ce,"scale")}(ze)+(ve.get(Ce.rect,"begin")+Ce.translation)-ve.get(ce,"scrollValue");return{begin:Ke,end:Ke+Je(ze)*ve.get(Ce,"scale")}},getAxisValue:it,setTranslation:function(ze,Ke){Ke?ve.set(ze.style,"translate",Ke):ze.style.removeProperty("transform"),ze[B]=Ke},getTranslation:function(ze){return ze[B]},setVisibility:function(ze,Ke){ze[D]!==void 0&&ze[D]===Ke||(Ke?ze.style.removeProperty("visibility"):ze.style.visibility="hidden",ze[D]=Ke)},isVisible:function(ze){return ze[D]===void 0||ze[D]},isInVisibleRect:function(ze,Ke){var Ye=Ce.visibleRect,ft=Ye.left,ht=Ye.top,nt=Ye.right,Zt=Ye.bottom;Zt-ht<2&&(Zt=ht+30);var dt=Ce.rect;return ue==="vertical"?ze>dt.left&&ze<dt.right&&ht<Ke&&Ke<Zt:ft<ze&&ze<nt&&Ke>dt.top&&Ke<dt.bottom},setSize:function(ze,Ke){ve.set(ze,"setSize",Ke)},getTopLeftOfElementBegin:function(ze){var Ke=0;return{top:ue==="horizontal"?(Ke=ze,Ce.rect.top):(Ke=Ce.rect.left,ze),left:Ke}},getScrollSize:function(ze){return ve.get(ze,"scrollSize")},getScrollValue:function(ze){return ve.get(ze,"scrollValue")},setScrollValue:function(ze,Ke){return ve.set(ze,"scrollValue",Ke)},invalidate:Be,invalidateRects:function(){st(ce)},getPosition:function(ze){return it(ze)},setBegin:function(ze,Ke){ve.set(ze,"begin",Ke)}}}function ct(ce,ue,pe){var ve,Ce,Be,st=pe.left,Je=pe.right,it=pe.top,ze=pe.bottom,Ke=ce.x,Ye=ce.y;if(Ke<st||Je<Ke||Ye<it||ze<Ye)return null;Be=ue==="x"?(ve=st,Ce=Je,Ke):(ve=it,Ce=ze,Ye);var ft=Ce-ve,ht=400<ft?100:ft/4;return Ce-Be<ht?{direction:"end",speedFactor:(ht-(Ce-Be))/ht}:Be-ve<ht?{direction:"begin",speedFactor:(ht-(Be-ve))/ht}:null}function Bt(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"y",pe=null,ve=null,Ce=null,Be=null;return{animate:function(st,Je){Ce=st,Be=Je,function it(){pe===null&&(pe=requestAnimationFrame(function(ze){ve===null&&(ve=ze);var Ke=ze-ve;ve=ze;var Ye,ft,ht,nt=Ke/1e3*Be;ft=ue,ht=nt=Ce==="begin"?0-nt:nt,(Ye=ce)&&(Ye!==window?ft==="x"?Ye.scrollLeft+=ht:Ye.scrollTop+=ht:ft==="x"?Ye.scrollBy(ht,0):Ye.scrollBy(0,ht)),pe=null,it()}))}()},stop:function(){pe!==null&&(cancelAnimationFrame(pe),pe=null),ve=null}}}function Ht(ce){return function(){return ir(ce,ce.getBoundingClientRect())}}var Ot,pr,Nt,mr=function(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1500,pe=ce.reduce(function(ve,Ce){var Be=function(st){for(var Je=[],it=st.element;it;){var ze=vt(it);if(ze&&!Zi(it,ie)){var Ke={};switch(ze){case b.xy:Ke.x={animator:Bt(it,"x")},Ke.y={animator:Bt(it,"y")};break;case b.x:Ke.x={animator:Bt(it,"x")};break;case b.y:Ke.y={animator:Bt(it,"y")}}Je.push({axisAnimations:Ke,getRect:Ht(it),scrollerElement:it})}it=it.parentElement}return Je}(Ce).filter(function(st){return!ve.find(function(Je){return Je.scrollerElement===st.scrollerElement})});return[].concat(_t(ve),_t(Be))},[]);return function(ve){var Ce=ve.draggableInfo;if(ve.reset)pe.forEach(function(Je){Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop()});else if(Ce){(function(Je,it){Je.forEach(function(ze){var Ke=ze.axisAnimations,Ye=(0,ze.getRect)();Ke.x&&(Ke.x.scrollParams=ct(it,"x",Ye),ze.cachedRect=Ye),Ke.y&&(Ke.y.scrollParams=ct(it,"y",Ye),ze.cachedRect=Ye)})})(pe,Ce.mousePosition),pe.forEach(function(Je){var it=Je.axisAnimations,ze=it.x,Ke=it.y;if(ze)if(ze.scrollParams){var Ye=ze.scrollParams,ft=Ye.direction,ht=Ye.speedFactor;ze.animator.animate(ft,ht*ue)}else ze.animator.stop();if(Ke)if(Ke.scrollParams){var nt=Ke.scrollParams,Zt=nt.direction,dt=nt.speedFactor;Ke.animator.animate(Zt,dt*ue)}else Ke.animator.stop()});var Be=pe.filter(function(Je){return Je.cachedRect});if(Be.length&&1<Be.length){var st=function(Je,it){for(var ze=document.elementFromPoint(it.x,it.y);ze;){var Ke=Je.find(function(Ye){return Ye.scrollerElement===ze});if(Ke)return Ke;ze=ze.parentElement}return null}(Be,Ce.mousePosition);st&&Be.forEach(function(Je){Je!==st&&(Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop())})}}}};typeof window<"u"&&((Ot=Element)&&Ot.prototype&&!Ot.prototype.matches&&(Ot.prototype.matches=Ot.prototype.matchesSelector||Ot.prototype.mozMatchesSelector||Ot.prototype.msMatchesSelector||Ot.prototype.oMatchesSelector||Ot.prototype.webkitMatchesSelector||function(ce){for(var ue=(this.document||this.ownerDocument).querySelectorAll(ce),pe=ue.length;0<=--pe&&ue.item(pe)!==this;);return-1<pe}),(pr=Node||Element)&&pr.prototype&&pr.prototype.firstElementChild==null&&Object.defineProperty(pr.prototype,"firstElementChild",{get:function(){for(var ce,ue=this.childNodes,pe=0;ce=ue[pe++];)if(ce.nodeType===1)return ce;return null}}),Array.prototype.some||(Array.prototype.some=function(ce){if(this==null)throw new TypeError("Array.prototype.some called on null or undefined");if(typeof ce!="function")throw new TypeError;for(var ue=Object(this),pe=ue.length>>>0,ve=2<=arguments.length?arguments[1]:void 0,Ce=0;Ce<pe;Ce++)if(Ce in ue&&ce.call(ve,ue[Ce],Ce,ue))return!0;return!1}));var Ur={overflow:"hidden",display:"block"},mi={height:"100%",display:"table-cell","vertical-align":"top"},Ir=(At(Nt={},".".concat(H),{position:"relative","min-height":"30px","min-width":"30px"}),At(Nt,".".concat(H,".horizontal"),{display:"table"}),At(Nt,".".concat(H,".horizontal > .").concat(C),{display:"inline-block"}),At(Nt,".".concat(H,".horizontal > .").concat(v),mi),At(Nt,".".concat(H,".vertical > .").concat(v),Ur),At(Nt,".".concat(v),{"box-sizing":"border-box"}),At(Nt,".".concat(v,".horizontal"),mi),At(Nt,".".concat(v,".vertical"),Ur),At(Nt,".".concat(v,".animated"),{transition:"transform ease"}),At(Nt,".".concat(L),{"box-sizing":"border-box"}),At(Nt,".".concat(L,".animated"),{transition:"all ease-in-out"}),At(Nt,".".concat(L," *"),{"pointer-events":"none"}),At(Nt,".".concat(N," *"),{"touch-action":"none","-ms-touch-action":"none"}),At(Nt,".".concat(G),{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"}),At(Nt,".".concat(Ee),{flex:"1"}),At(Nt,".".concat(H,".horizontal > .").concat(te),{height:"100%",overflow:"hidden",display:"table-cell","vertical-align":"top"}),At(Nt,".".concat(H,".vertical > .").concat(te),{overflow:"hidden",display:"block",width:"100%"}),At(Nt,".".concat(me),{width:"100%",height:"100%",display:"flex","justify-content":"stretch","align-items":"stretch"}),At(Nt,".".concat(le),{"background-color":"rgba(150, 150, 150, 0.1)",border:"1px solid #ccc"}),Nt);function gi(ce){return Object.keys(ce).reduce(function(ue,pe){var ve=ce[pe];return rt(ve)==="object"?"".concat(ue).concat(pe,"{").concat(gi(ve),"}"):"".concat(ue).concat(pe,":").concat(ve,";")},"")}function Bi(ce){if(ce&&typeof window<"u"){var ue=window.document.head||window.document.getElementsByTagName("head")[0],pe=window.document.createElement("style"),ve=gi({"body *":{cursor:"".concat(ce," !important")}});return pe.type="text/css",pe.styleSheet?pe.styleSheet.cssText=ve:pe.appendChild(window.document.createTextNode(ve)),ue.appendChild(pe),pe}return null}var hr,lr,Ft=["mousedown","touchstart"],br=["mousemove","touchmove"],dr=["mouseup","touchend"],Jt=null,fr=null,It=null,wt=null,Ae=[],K=!1,Q=!1,ee=!1,he=!1,be=null,$=null,Me=null,Te=null,Ie=(hr=null,lr=!1,{start:function(){lr||(lr=!0,function ce(){hr=requestAnimationFrame(function(){Jt.forEach(function(ue){return ue.layout.invalidateRects()}),setTimeout(function(){hr!==null&&ce()},50)})}())},stop:function(){hr!==null&&(cancelAnimationFrame(hr),hr=null),lr=!1}}),Ve=typeof window<"u"&&!!(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));function Pe(){typeof window<"u"&&Ft.forEach(function(ce){window.document.addEventListener(ce,Wt,{passive:!1})})}function Qe(){return wt&&wt.ghostParent?wt.ghostParent:fr&&fr.parentElement||window.document.body}var ut,gt,Et,jt,Rt,Ue,ar=(jt=null,Rt=1,Ue=5,function(ce,ue,pe){ut=Li(ce),Et=pe,(gt=typeof ue=="number"?ue:Ve?200:0)&&(jt=setTimeout(Mt,gt)),br.forEach(function(ve){return window.document.addEventListener(ve,Qt)},{passive:!1}),dr.forEach(function(ve){return window.document.addEventListener(ve,or)},{passive:!1}),window.document.addEventListener("drag",Dt,{passive:!1})});function Qt(ce){var ue=Li(ce),pe=ue.clientX,ve=ue.clientY;if(gt)(Math.abs(ut.clientX-pe)>Ue||Math.abs(ut.clientY-ve)>Ue)&&Xe();else if(Math.abs(ut.clientX-pe)>Rt||Math.abs(ut.clientY-ve)>Rt)return Mt()}function or(){Xe()}function Dt(){Xe()}function Xe(){clearTimeout(jt),br.forEach(function(ce){return window.document.removeEventListener(ce,Qt)},{passive:!1}),dr.forEach(function(ce){return window.document.removeEventListener(ce,or)},{passive:!1}),window.document.removeEventListener("drag",Dt,{passive:!1})}function Mt(){clearTimeout(jt),Xe(),Et()}function Wt(ce){var ue=Li(ce);if(!K&&(ue.button===void 0||ue.button===0)&&(fr=Rr(ue.target,"."+v))){var pe=Rr(fr,"."+H),ve=Ae.filter(function(Je){return Je.element===pe})[0],Ce=ve.getOptions().dragHandleSelector,Be=ve.getOptions().nonDragAreaSelector,st=!0;Ce&&!Rr(ue.target,Ce)&&(st=!1),Be&&Rr(ue.target,Be)&&(st=!1),st&&(ve.layout.invalidate(),Dr(window.document.body,N),Dr(window.document.body,G),window.document.addEventListener("mouseup",function Je(){on(window.document.body,N),on(window.document.body,G),window.document.removeEventListener("mouseup",Je)})),st&&ar(ue,ve.getOptions().dragBeginDelay,function(){Ki(),Zn(ue,Yr(ce.target)),br.forEach(function(Je){window.document.addEventListener(Je,Tr,{passive:!1})}),dr.forEach(function(Je){window.document.addEventListener(Je,Cn,{passive:!1})})})}}function Tr(ce){ce.preventDefault();var ue=Li(ce);if(wt){var pe=wt.container.getOptions();pe.behaviour==="contain"?function(ve){var Ce,Be,st,Je,it=ve.clientX,ze=ve.clientY,Ke=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"vertical",Ye=wt.container.layout.getBeginEndOfContainerVisibleRect();Je=Ke==="vertical"?(Ce=ze,Be="y",st="top",wt.size.offsetHeight):(Ce=it,Be="x",st="left",wt.size.offsetWidth);var ft=Ye.begin,ht=Ye.end-Je,nt=Math.max(ft,Math.min(ht,Ce+It.positionDelta[st]));It.topLeft[Be]=nt,wt.position[Be]=Math.max(Ye.begin,Math.min(Ye.end,Ce+It.centerDelta[Be])),wt.mousePosition[Be]=Math.max(Ye.begin,Math.min(Ye.end,Ce)),wt.position[Be]<Ye.begin+Je/2&&(wt.position[Be]=Ye.begin+2),wt.position[Be]>Ye.end-Je/2&&(wt.position[Be]=Ye.end-2)}(ue,pe.orientation):Me?Me==="y"?(It.topLeft.y=ue.clientY+It.positionDelta.top,wt.position.y=ue.clientY+It.centerDelta.y,wt.mousePosition.y=ue.clientY):Me==="x"&&(It.topLeft.x=ue.clientX+It.positionDelta.left,wt.position.x=ue.clientX+It.centerDelta.x,wt.mousePosition.x=ue.clientX):(It.topLeft.x=ue.clientX+It.positionDelta.left,It.topLeft.y=ue.clientY+It.positionDelta.top,wt.position.x=ue.clientX+It.centerDelta.x,wt.position.y=ue.clientY+It.centerDelta.y,wt.mousePosition.x=ue.clientX,wt.mousePosition.y=ue.clientY),uo(),(he=!be(wt))&&co()}else Zn(ue,Yr(ce.target))}var gr,yi,Kt,Vi,co=(gr=yn,Kt=!(yi=20),Vi=null,function(){for(var ce=arguments.length,ue=new Array(ce),pe=0;pe<ce;pe++)ue[pe]=arguments[pe];Vi&&clearTimeout(Vi),Kt&&!Vi?gr.call.apply(gr,[null].concat(ue)):Vi=setTimeout(function(){Vi=null,gr.call.apply(gr,[null].concat(ue))},yi)});function yn(){he&&(he=!1,_n(wt,Jt))}function Cn(){br.forEach(function(ce){window.document.removeEventListener(ce,Tr,{passive:!1})}),dr.forEach(function(ce){window.document.removeEventListener(ce,Cn,{passive:!1})}),$({reset:!0}),Te&&(function(ce){ce&&typeof window<"u"&&(window.document.head||window.document.getElementsByTagName("head")[0]).removeChild(ce)}(Te),Te=null),wt&&(Ie.stop(),yn(),ee=!0,function(ce){function ue(){on(It.ghost,"animated"),It.ghost.style.transitionDuration=null,Qe().removeChild(It.ghost),ce()}function pe(dt,Ut,wr){var ho=dt.top,Rn=dt.left;Dr(It.ghost,"animated"),wr&&Dr(It.ghost.firstElementChild,wr),It.topLeft.x=Rn,It.topLeft.y=ho,uo(Ut),setTimeout(function(){ue()},Ut+20)}function ve(dt,Ut){Dr(It.ghost,"animated"),uo(dt,.9,!0),setTimeout(function(){Ut()},dt+20)}if(wt.targetElement){var Ce=Ae.filter(function(dt){return dt.element===wt.targetElement})[0];!(Zt=Ce.getOptions()).shouldAnimateDrop||Zt.shouldAnimateDrop(wt.container.getOptions(),wt.payload)?pe(Ce.getDragResult().shadowBeginEnd.rect,Math.max(150,Ce.getOptions().animationDuration/2),Ce.getOptions().dropClass):ue()}else{var Be=Ae.filter(function(dt){return dt===wt.container})[0];if(Be){var st=Be.getOptions(),Je=st.behaviour,it=st.removeOnDropOut;if(Je!=="move"&&Je!=="contain"||!Q&&it||!Be.getDragResult())ve(Be.getOptions().animationDuration,ue);else{var ze=Be.layout.getContainerRectangles();if(!Gi(ze.visibleRect)&&Gi(ze.lastVisibleRect))pe({top:ze.lastVisibleRect.top,left:ze.lastVisibleRect.left},Be.getOptions().animationDuration,Be.getOptions().dropClass);else{var Ke=Be.getDragResult(),Ye=Ke.removedIndex,ft=Ke.elementSize,ht=Be.layout;Be.getTranslateCalculator({dragResult:{removedIndex:Ye,addedIndex:Ye,elementSize:ft,pos:void 0,shadowBeginEnd:void 0}});var nt=0<Ye?ht.getBeginEnd(Be.draggables[Ye-1]).end:ht.getBeginEndOfContainer().begin;pe(ht.getTopLeftOfElementBegin(nt),Be.getOptions().animationDuration,Be.getOptions().dropClass)}}}else ve(qe.animationDuration,ue)}var Zt}(function(){yr(K=!1);for(var ce=Jt||[],ue=ce.shift();ue!==void 0;)ue.handleDrop(wt),ue=ce.shift();be=Me=wt=It=fr=Jt=null,ee=!1}))}function Li(ce){return ce.touches?ce.touches[0]:ce}function _n(ce,ue){var pe=!1;ue.forEach(function(ve){var Ce=ve.handleDrag(ce);pe=!!Ce.containerBoxChanged||!1,Ce.containerBoxChanged=!1}),pe&&(pe=!1,requestAnimationFrame(function(){Ae.forEach(function(ve){ve.layout.invalidateRects(),ve.onTranslated()})}))}function Mr(ce){var ue=ce,pe=null;return function(ve){return!(pe!==null||!K||ee)&&(pe=requestAnimationFrame(function(){K&&!ee&&(_n(ve,ue),$({draggableInfo:ve})),pe=null}),!0)}}function _i(ce,ue){return ce.getOptions().autoScrollEnabled?mr(ue,ce.getScrollMaxSpeed()):function(pe){return null}}function yr(ce){Ae.forEach(function(ue){var pe=ce?ue.getOptions().onDragStart:ue.getOptions().onDragEnd;if(pe){var ve={isSource:ue===wt.container,payload:wt.payload};ue.isDragRelevant(wt.container,wt.payload)?ve.willAcceptDrop=!0:ve.willAcceptDrop=!1,pe(ve)}})}function Zn(ce,ue){if(fr!==null){K=!0;var pe=Ae.filter(function(ve){return fr.parentElement===ve.element})[0];pe.setDraggables(),Me=pe.getOptions().lockAxis?pe.getOptions().lockAxis.toLowerCase():null,wt=function(ve){var Ce=Ae.filter(function(it){return ve.parentElement===it.element})[0],Be=Ce.draggables.indexOf(ve),st=Ce.getOptions().getGhostParent,Je=ve.getBoundingClientRect();return{container:Ce,element:ve,size:{offsetHeight:Je.bottom-Je.top,offsetWidth:Je.right-Je.left},elementIndex:Be,payload:Ce.getOptions().getChildPayload?Ce.getOptions().getChildPayload(Be):void 0,targetElement:null,position:{x:0,y:0},groupName:Ce.getOptions().groupName,ghostParent:st?st():null,invalidateShadow:null,mousePosition:null,relevantContainers:null}}(fr),It=function(ve,Ce,Be,st){var Je=Ce.x,it=Ce.y,ze=ve.getBoundingClientRect(),Ke=ze.left,Ye=ze.top,ft=ze.right,ht=ze.bottom,nt=Xt(Be.layout.getContainerRectangles().visibleRect,ze),Zt=nt.left+(nt.right-nt.left)/2,dt=nt.top+(nt.bottom-nt.top)/2,Ut=ve.cloneNode(!0);return Ut.style.zIndex="1000",Ut.style.boxSizing="border-box",Ut.style.position="fixed",Ut.style.top="0px",Ut.style.left="0px",Ut.style.transform=null,Ut.style.removeProperty("transform"),Be.shouldUseTransformForGhost()?Ut.style.transform="translate3d(".concat(Ke,"px, ").concat(Ye,"px, 0)"):(Ut.style.top="".concat(Ye,"px"),Ut.style.left="".concat(Ke,"px")),Ut.style.width=ft-Ke+"px",Ut.style.height=ht-Ye+"px",Ut.style.overflow="visible",Ut.style.transition=null,Ut.style.removeProperty("transition"),Ut.style.pointerEvents="none",Ut.style.userSelect="none",Be.getOptions().dragClass?setTimeout(function(){Dr(Ut.firstElementChild,Be.getOptions().dragClass);var wr=window.getComputedStyle(Ut.firstElementChild).cursor;Te=Bi(wr)}):Te=Bi(st),Dr(Ut,Be.getOptions().orientation||"vertical"),Dr(Ut,L),{ghost:Ut,centerDelta:{x:Zt-Je,y:dt-it},positionDelta:{left:Ke-Je,top:Ye-it},topLeft:{x:Ke,y:Ye}}}(fr,{x:ce.clientX,y:ce.clientY},wt.container,ue),wt.position={x:ce.clientX+It.centerDelta.x,y:ce.clientY+It.centerDelta.y},wt.mousePosition={x:ce.clientX,y:ce.clientY},Jt=Ae.filter(function(ve){return ve.isDragRelevant(pe,wt.payload)}),wt.relevantContainers=Jt,be=Mr(Jt),$&&$({reset:!0,draggableInfo:void 0}),$=_i(pe,Jt),Jt.forEach(function(ve){return ve.prepareDrag(ve,Jt)}),yr(!0),be(wt),Qe().appendChild(It.ghost),Ie.start()}}var sn=null;function uo(){var ce=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1,pe=2<arguments.length&&arguments[2]!==void 0&&arguments[2],ve=It,Ce=ve.ghost,Be=ve.topLeft,st=Be.x,Je=Be.y,it=!wt.container||wt.container.shouldUseTransformForGhost(),ze=it?"translate3d(".concat(st,"px,").concat(Je,"px, 0)"):null;if(ue!==1&&(ze=ze?"".concat(ze," scale(").concat(ue,")"):"scale(".concat(ue,")")),0<ce)return It.ghost.style.transitionDuration=ce+"ms",void requestAnimationFrame(function(){ze&&(Ce.style.transform=ze),it||(Ce.style.left=st+"px",Ce.style.top=Je+"px"),sn=null,pe&&(Ce.style.opacity="0")});sn===null&&(sn=requestAnimationFrame(function(){ze&&(Ce.style.transform=ze),it||(Ce.style.left=st+"px",Ce.style.top=Je+"px"),sn=null,pe&&(Ce.style.opacity="0")}))}function En(){if(K&&!Q&&!ee){he=!(Q=!0);var ce=Object.assign({},wt,{targetElement:null,position:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},mousePosition:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER}});Jt.forEach(function(ue){ue.handleDrag(ce)}),wt.targetElement=null,wt.cancelDrop=!0,Cn(),Q=!1}}typeof window<"u"&&function(){if(typeof window<"u"){var ce=window.document.head||window.document.getElementsByTagName("head")[0],ue=window.document.createElement("style");ue.id="smooth-dnd-style-definitions";var pe=gi(Ir);ue.type="text/css",ue.styleSheet?ue.styleSheet.cssText=pe:ue.appendChild(window.document.createTextNode(pe)),ce.appendChild(ue)}}();var Ri=(Pe(),{register:function(ce){(function(ue){Ae.push(ue),K&&wt&&ue.isDragRelevant(wt.container,wt.payload)&&(Jt.push(ue),ue.prepareDrag(ue,Jt),$&&$({reset:!0,draggableInfo:void 0}),$=_i(ue,Jt),be=Mr(Jt),ue.handleDrag(wt))})(ce)},unregister:function(ce){(function(ue){if(Ae.splice(Ae.indexOf(ue),1),K&&wt){wt.container===ue&&ue.fireRemoveElement(),wt.targetElement===ue.element&&(wt.targetElement=null);var pe=Jt.indexOf(ue);-1<pe&&(Jt.splice(pe,1),$&&$({reset:!0,draggableInfo:void 0}),$=_i(ue,Jt),be=Mr(Jt))}})(ce)},isDragging:function(){return K},cancelDrag:En});function es(ce,ue){var pe=2<arguments.length&&arguments[2]!==void 0?arguments[2]:qe.animationDuration;ue?(Dr(ce,o),ce.style.transitionDuration=pe+"ms"):(on(ce,o),ce.style.removeProperty("transition-duration"))}function Mo(ce){var ue=[];return Array.prototype.forEach.call(ce.children,function(pe){if(pe.nodeType===Node.ELEMENT_NODE){var ve=pe;Zi(pe,v)||(ve=function(Ce){if(Vt.wrapChild){var Be=window.document.createElement("div");return Be.className="".concat(v),Ce.parentElement.insertBefore(Be,Ce),Be.appendChild(Ce),Be}return Ce}(pe)),ve[B]=0,ue.push(ve)}else ce.removeChild(pe)}),ue}function Zs(ce){var ue=ce.layout;return function(pe,ve){var Ce=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return function Be(st,Je,it,ze){var Ke=4<arguments.length&&arguments[4]!==void 0&&arguments[4];if(ze<it)return it;if(it===ze){var Ye=ue.getBeginEnd(st[it]),ft=Ye.begin,ht=Ye.end;return Ke?Je<(ht+ft)/2?it:it+1:it}var nt=Math.floor((ze+it)/2),Zt=ue.getBeginEnd(st[nt]),dt=Zt.begin,Ut=Zt.end;return Je<dt?Be(st,Je,it,nt-1,Ke):Ut<Je?Be(st,Je,nt+1,ze,Ke):Ke?Je<(Ut+dt)/2?nt:nt+1:nt}(pe,ve,0,pe.length-1,Ce)}}function Kn(ce){var ue=ce.element,pe=ce.draggables,ve=ce.layout,Ce=ce.getOptions,Be=function(Je){var it=Je.element,ze=Je.draggables,Ke=Je.layout;return function(){ze.forEach(function(Ye){es(Ye,!1),Ke.setTranslation(Ye,0),Ke.setVisibility(Ye,!0)}),it[T]&&(it[T].parentNode.removeChild(it[T]),it[T]=null)}}({element:ue,draggables:pe,layout:ve}),st=(Vt.dropHandler||Mi)({element:ue,draggables:pe,layout:ve,getOptions:Ce});return function(Je,it){var ze=it.addedIndex,Ke=it.removedIndex,Ye=2<arguments.length&&arguments[2]!==void 0&&arguments[2];if(Be(),!Je.cancelDrop&&(Je.targetElement||Ce().removeOnDropOut||Ye)){var ft={removedIndex:Ke,addedIndex:ze!==null?Ke!==null&&Ke<ze?ze-1:ze:null,payload:Je.payload};st(ft,Ce().onDrop)}}}function ts(ce){var ue=ce.element,pe=ce.getOptions,ve=null;return function(Ce){var Be=Ce.draggableInfo,st=ve;return ve==null&&Be.container.element===ue&&pe().behaviour!=="copy"&&(st=ve=Be.elementIndex),{removedIndex:st}}}function Ks(ce){var ue=ce.draggables,pe=ce.layout;return function(ve){var Ce=ve.dragResult;Ce.removedIndex!==null&&pe.setVisibility(ue[Ce.removedIndex],!1)}}function Gs(ce){var ue=ce.element,pe=ce.layout;return function(ve){var Ce=ve.draggableInfo,Be=document.elementFromPoint(Ce.position.x,Ce.position.y);if(Be){var st=Wi(Be,Ce.relevantContainers);if(st&&st.element===ue)return{pos:pe.getPosition(Ce.position)}}return{pos:null}}}function Js(ce){var ue=ce.layout,pe=null;return function(ve){var Ce=ve.draggableInfo;return ve.dragResult.pos===null?pe=null:{elementSize:pe=pe||ue.getSize(Ce.size)}}}function rs(ce){var ue=ce.element;return function(pe){var ve=pe.draggableInfo,Ce=pe.dragResult;(function(Be,st){var Je=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];st&&Je?Be.targetElement=st:Be.targetElement===st&&(Be.targetElement=null)})(ve,ue,!!Ce.pos)}}function is(){return function(ce){return ce.dragResult.pos!==null?{addedIndex:0}:{addedIndex:null}}}function Pn(ce){var ue=ce.layout,pe=null;return function(ve){var Ce=ve.dragResult.addedIndex;if(Ce===pe)return null;pe=Ce;var Be=ue.getBeginEndOfContainer(),st=Be.begin;return Be.end,{shadowBeginEnd:{rect:ue.getTopLeftOfElementBegin(st)}}}}function ns(ce){var ue=ce.layout,pe=ce.element,ve=ce.getOptions,Ce=null;return function(Be){var st=Be.dragResult,Je=st.elementSize,it=st.shadowBeginEnd,ze=st.addedIndex,Ke=st.dropPlaceholderContainer,Ye=ve();if(Ye.dropPlaceholder){var ft=typeof Ye.dropPlaceholder=="boolean"?{}:Ye.dropPlaceholder,ht=ft.animationDuration,nt=ft.className,Zt=ft.showOnTop;if(ze===null)return Ke&&Ce!==null&&pe.removeChild(Ke),Ce=null,{dropPlaceholderContainer:void 0};if(!Ke){var dt=document.createElement("div"),Ut=document.createElement("div");Ut.className=me,dt.className="".concat(Ee," ").concat(nt||le),(Ke=document.createElement("div")).className="".concat(te),Ke.style.position="absolute",ht!==void 0&&(Ke.style.transition="all ".concat(ht,"ms ease")),Ke.appendChild(Ut),Ut.appendChild(dt),ue.setSize(Ke.style,Je+"px"),Ke.style.pointerEvents="none",Zt?pe.appendChild(Ke):pe.insertBefore(Ke,pe.firstElementChild)}return Ce!==ze&&it.dropArea&&ue.setBegin(Ke.style,it.dropArea.begin-ue.getBeginEndOfContainer().begin+"px"),Ce=ze,{dropPlaceholderContainer:Ke}}return null}}function Xs(ce){var ue=Jn(ce);return function(pe){var ve=pe.draggableInfo,Ce=pe.dragResult;return ve.invalidateShadow?ue({draggableInfo:ve,dragResult:Ce}):null}}function In(ce){var ue=function(pe){var ve=pe.draggables,Ce=Zs({layout:pe.layout});return function(Be){var st=Be.dragResult,Je=st.shadowBeginEnd,it=st.pos;if(Je)return Je.begin+Je.beginAdjustment<=it&&Je.end>=it?null:it<Je.begin+Je.beginAdjustment?Ce(ve,it):it>Je.end?Ce(ve,it)+1:ve.length;var ze=Ce(ve,it,!0);return ze!==null?ze:ve.length}}(ce);return function(pe){var ve=pe.dragResult,Ce=null;return ve.pos!==null&&(Ce=ue({dragResult:ve}))===null&&(Ce=ve.addedIndex),{addedIndex:Ce}}}function os(){var ce=null;return function(ue){var pe=ue.dragResult,ve=pe.addedIndex,Ce=pe.shadowBeginEnd;ve!==ce&&ce!==null&&Ce&&(Ce.beginAdjustment=0),ce=ve}}function tl(ce){var ue=ce.element,pe=ce.draggables,ve=ce.layout,Ce=ce.getOptions,Be=null;return function(st){var Je=st.dragResult,it=Je.addedIndex,ze=Je.removedIndex,Ke=Je.elementSize;if(ze===null){if(it!==null){if(!Be){var Ye=ve.getBeginEndOfContainer();Ye.end=Ye.begin+ve.getSize(ue);var ft=ve.getScrollSize(ue)>ve.getSize(ue)?Ye.begin+ve.getScrollSize(ue)-ve.getScrollValue(ue):Ye.end,ht=0<pe.length?ve.getBeginEnd(pe[pe.length-1]).end-pe[pe.length-1][B]:Ye.begin;if(ft<ht+Ke){(Be=window.document.createElement("div")).className=C+" "+Ce().orientation;var nt=0<pe.length?Ke+ht-ft:Ke;return ve.setSize(Be.style,"".concat(nt,"px")),ue.appendChild(Be),ue[T]=Be,{containerBoxChanged:!0}}}}else if(Be){ve.setTranslation(Be,0);var Zt=Be;return Be=null,ue.removeChild(Zt),{containerBoxChanged:!(ue[T]=null)}}}}}function Gn(ce){var ue=ce.draggables,pe=ce.layout,ve=null,Ce=null;return function(Be){var st=Be.dragResult,Je=st.addedIndex,it=st.removedIndex,ze=st.elementSize;if(Je!==ve||it!==Ce){for(var Ke=0;Ke<ue.length;Ke++)if(Ke!==it){var Ye=ue[Ke],ft=0;it!==null&&it<Ke&&(ft-=ze),Je!==null&&Je<=Ke&&(ft+=ze),pe.setTranslation(Ye,ft)}return{addedIndex:ve=Je,removedIndex:Ce=it}}}}function Jn(ce){var ue=ce.draggables,pe=ce.layout,ve=null;return function(Ce){var Be=Ce.draggableInfo,st=Ce.dragResult,Je=st.addedIndex,it=st.removedIndex,ze=st.elementSize,Ke=st.pos,Ye=st.shadowBeginEnd;if(Ke===null)return{shadowBeginEnd:ve=null};if(Je===null||!Be.invalidateShadow&&Je===ve)return null;var ft=Je-1,ht=Number.MIN_SAFE_INTEGER,nt=0,Zt=0,dt=null,Ut=null;if(ft===it&&ft--,-1<ft){var wr=pe.getSize(ue[ft]);if(Ut=pe.getBeginEnd(ue[ft]),ze<wr){var ho=(wr-ze)/2;ht=Ut.end-ho}else ht=Ut.end;nt=Ut.end}else Ut={end:pe.getBeginEndOfContainer().begin},nt=pe.getBeginEndOfContainer().begin;var Rn=Number.MAX_SAFE_INTEGER,an=Je;if(an===it&&an++,an<ue.length){var Dn=pe.getSize(ue[an]);if(dt=pe.getBeginEnd(ue[an]),ze<Dn){var po=(Dn-ze)/2;Rn=dt.begin+po}else Rn=dt.begin;Zt=dt.begin}else dt={begin:pe.getContainerRectangles().rect.end},Zt=pe.getContainerRectangles().rect.end-pe.getContainerRectangles().rect.begin;var as=Ut&&dt?pe.getTopLeftOfElementBegin(Ut.end):null;return ve=Je,{shadowBeginEnd:{dropArea:{begin:nt,end:Zt},begin:ht,end:Rn,rect:as,beginAdjustment:Ye?Ye.beginAdjustment:0}}}}function ss(){var ce=null;return function(ue){var pe=ue.dragResult,ve=pe.pos,Ce=pe.addedIndex,Be=pe.shadowBeginEnd;if(ve!==null){if(Ce!=null&&ce===null){if(ve<Be.begin){var st=ve-Be.begin-5;Be.beginAdjustment=st}ce=Ce}}else ce=null}}function oi(ce){var ue=ce.getOptions,pe=!1,ve=ue();return function(Ce){var Be=!!Ce.dragResult.pos;Be!==pe&&((pe=Be)?ve.onDragEnter&&ve.onDragEnter():ve.onDragLeave&&ve.onDragLeave())}}function tr(ce){var ue=ce.getOptions,pe=null,ve=ue();return function(Ce){var Be=Ce.dragResult,st=Be.addedIndex,Je=Be.removedIndex,it=Ce.draggableInfo,ze=it.payload,Ke=it.element;if(ve.onDropReady&&st!==null&&pe!==st){var Ye=pe=st;Je!==null&&Je<st&&Ye--,ve.onDropReady({addedIndex:Ye,removedIndex:Je,payload:ze,element:Ke?Ke.firstElementChild:void 0})}}}function Mn(ce){return ce.getOptions().behaviour==="drop-zone"?si(ce)(ts,Ks,Gs,Js,rs,is,Pn,oi,tr):si(ce)(ts,Ks,Gs,Js,rs,Xs,In,os,tl,Gn,Jn,ns,ss,oi,tr)}function si(ce){return function(){for(var ue=arguments.length,pe=new Array(ue),ve=0;ve<ue;ve++)pe[ve]=arguments[ve];var Ce=pe.map(function(st){return st(ce)}),Be=null;return function(st){return Be=Ce.reduce(function(Je,it){return Object.assign(Je,it({draggableInfo:st,dragResult:Je}))},Be||{addedIndex:null,removedIndex:null,elementSize:null,pos:null,shadowBeginEnd:null})}}}function Ln(ce){return function(ue){var pe=Object.assign({},qe,ue),ve=null,Ce=null,Be=function(ft,ht){var nt=Mo(ft),Zt=ht();return Dr(ft,"".concat(H," ").concat(Zt.orientation)),{element:ft,draggables:nt,getOptions:ht,layout:xt(ft,Zt.orientation,Zt.animationDuration)}}(ce,Ye),st=Mn(Be),Je=Kn(Be),it=function(ft,ht){var nt=[];function Zt(){nt&&(nt.forEach(function(dt){return dt.removeEventListener("scroll",ht)}),window.removeEventListener("scroll",ht))}return function(){for(var dt=ft;dt;)(qt(dt,"x")||qt(dt,"y"))&&nt.push(dt),dt=dt.parentElement}(),{dispose:function(){Zt(),nt=null},start:function(){nt&&(nt.forEach(function(dt){return dt.addEventListener("scroll",ht)}),window.addEventListener("scroll",ht))},stop:Zt}}(ce,function(){Be.layout.invalidateRects(),ze()});function ze(){Ce!==null&&(Ce.invalidateShadow=!0,ve=st(Ce),Ce.invalidateShadow=!1)}function Ke(ft,ht){for(var nt=Mo(ht),Zt=0;Zt<nt.length;Zt++)ft[Zt]=nt[Zt];for(var dt=0;dt<ft.length-nt.length;dt++)ft.pop()}function Ye(){return pe}return{element:ce,draggables:Be.draggables,isDragRelevant:function(ft){var ht=ft.element,nt=ft.getOptions;return function(Zt,dt){var Ut=nt();if(Ut.shouldAcceptDrop)return Ut.shouldAcceptDrop(Zt.getOptions(),dt);var wr=Zt.getOptions();return Ut.behaviour!=="copy"&&Rr(ht,"."+v)!==Zt.element&&(Zt.element===ht||!(!wr.groupName||wr.groupName!==Ut.groupName))}}(Be),layout:Be.layout,dispose:function(ft){it.dispose(),function(ht){Vt.wrapChild&&Array.prototype.forEach.call(ht.children,function(nt){nt.nodeType===Node.ELEMENT_NODE&&Zi(nt,v)&&(ht.insertBefore(nt.firstElementChild,nt),ht.removeChild(nt))})}(ft.element)},prepareDrag:function(ft,ht){var nt=ft.element,Zt=Be.draggables;Ke(Zt,nt),ft.layout.invalidateRects(),Zt.forEach(function(dt){return es(dt,!0,Ye().animationDuration)}),it.start()},handleDrag:function(ft){return ve=st(Ce=ft)},handleDrop:function(ft){it.stop(),ve&&ve.dropPlaceholderContainer&&ce.removeChild(ve.dropPlaceholderContainer),Ce=null,st=Mn(Be),Je(ft,ve),ve=null},fireRemoveElement:function(){Je(Ce,Object.assign({},ve,{addedIndex:null}),!0),ve=null},getDragResult:function(){return ve},getTranslateCalculator:function(ft){return Gn(Be)(ft)},onTranslated:function(){ze()},setDraggables:function(){Ke(Be.draggables,ce)},getScrollMaxSpeed:function(){return Vt.maxScrollSpeed},shouldUseTransformForGhost:function(){return Vt.useTransformForGhost===!0},getOptions:Ye,setOptions:function(ft){var ht=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];pe=ht===!1?Object.assign({},qe,ft):Object.assign({},qe,pe,ft)}}}}var Vt=function(ce,ue){var pe=Ln(ce)(ue);return ce[P]=pe,Ri.register(pe),{dispose:function(){Ri.unregister(pe),pe.dispose(pe)},setOptions:function(ve,Ce){pe.setOptions(ve,Ce)}}};function vn(ce,ue,pe){Object.defineProperty(ce,pe,{set:function(ve){ue[pe]=ve},get:function(){return ue[pe]}})}Vt.wrapChild=!0,Vt.cancelDrag=function(){Ri.cancelDrag()},Vt.isDragging=function(){return Ri.isDragging()};function Oi(ce,ue){return console.warn('default export is deprecated. please use named export "smoothDnD"'),Vt(ce,ue)}Oi.cancelDrag=function(){Vt.cancelDrag()},Oi.isDragging=function(){return Vt.isDragging()},vn(Oi,Vt,"useTransformForGhost"),vn(Oi,Vt,"maxScrollSpeed"),vn(Oi,Vt,"wrapChild"),vn(Oi,Vt,"dropHandler"),_.smoothDnD=Vt,_.constants=De,_.dropHandlers=Tn,_.default=Oi,Object.defineProperty(_,"__esModule",{value:!0})})}(cc,cc.exports)),cc.exports}var dc=Jb();function $g(p){return p?typeof p=="string"||typeof p=="object"&&(typeof p.value=="string"||typeof p.value=="function"||typeof p.value=="object"):!0}function ey(p,d){const _=p.$props.tag;if(_){if(typeof _=="string"){const b={value:_};return d&&(b.props={class:d}),b}else if(typeof _=="object"){const b={value:_.value||"div",props:_.props||{}};return d&&(b.props.class?Array.isArray(b.props.class)?b.props.class.push(d):b.props.class=[d,b.props.class]:b.props.class=d),b}}return{value:"div"}}dc.smoothDnD.dropHandler=dc.dropHandlers.reactDropHandler().handler;dc.smoothDnD.wrapChild=!1;const vm={"drag-start":"onDragStart","drag-end":"onDragEnd",drop:"onDrop","drag-enter":"onDragEnter","drag-leave":"onDragLeave","drop-ready":"onDropReady"};var Xb=A.defineComponent({name:"Container",mounted(){const p=Object.assign({},this.$props);for(const d in vm)p[vm[d]]=_=>{this.$emit(d,_)};this.containerElement=this.$refs.container||this.$el,this.container=dc.smoothDnD(this.containerElement,p)},unmounted(){if(this.container)try{this.container.dispose()}catch{}},emits:["drop","drag-start","drag-end","drag-enter","drag-leave","drop-ready"],props:{orientation:{type:String,default:"vertical"},removeOnDropOut:{type:Boolean,default:!1},autoScrollEnabled:{type:Boolean,default:!0},animationDuration:{type:Number,default:250},behaviour:String,groupName:String,dragHandleSelector:String,nonDragAreaSelector:String,lockAxis:String,dragClass:String,dropClass:String,dragBeginDelay:Number,getChildPayload:Function,shouldAnimateDrop:Function,shouldAcceptDrop:Function,getGhostParent:Function,dropPlaceholder:[Object,Boolean],tag:{validator:$g,default:"div"}},render(){const p=ey(this);return A.h(p.value,Object.assign({},{ref:"container"},p.props),this.$slots.default())}}),Qb=A.defineComponent({name:"Draggable",props:{tag:{validator:$g,default:"div"}},render:function(){const p=ey(this,dc.constants.wrapperClass);return A.h(p.value,Object.assign({},p.props),this.$slots.default())}});function Yb(){const d=new URLSearchParams(window.location.search).get("layers");return d?d.split(","):[]}function $b(p){const d=new URLSearchParams(window.location.search);p.length>0?d.set("layers",p.join(",")):d.delete("layers");const _=`${window.location.pathname}?${d.toString()}`;window.history.replaceState({},"",_)}const e1={components:{VsLayersItem:Sb,ZoomInIcon:Cb,InfoIcon:Mb,TableIcon:zb,TrashIcon:Fb,DotsIcon:jb,ChevronRightIcon:Kb,Container:Xb,Draggable:Qb},props:{center:{type:Array,default:()=>[26.2516,50.6199]},zoom:{type:Number,default:12},map:{type:Object,default:()=>null},history:{type:Boolean,default:!1}},emits:["content-resize"],data(){return{layers:null,rawCatalog:null,categories:null,selectedCategory:"",search:"",activeView:"catalog",selectedLayers:[]}},computed:{searchedLayers(){return this.layers.filter(({name:p})=>p==null?void 0:p.toLowerCase().match(this.search.toLowerCase()))}},async mounted(){if(await this.getLayers(),this.categories=this.layersCategories(),this.history){const p=Yb();p.length>0&&this.layers&&(p.forEach(d=>{const _=this.layers.find(b=>String(b.id)===d);if(_&&!this.selectedLayers.find(b=>b.id===_.id)){const b={..._,visible:!0,opacity:100};this.selectedLayers.push(b),$o(this.map,b)}}),this.activeView="selected")}this._resizeObserver=new window.ResizeObserver(()=>{this.$emit("content-resize")}),this.$nextTick(()=>{const p=this.$el;p&&this._resizeObserver.observe(p)})},beforeUnmount(){this._resizeObserver&&this._resizeObserver.disconnect()},watch:{selectedLayers:{handler(p){this.history&&$b(p.map(d=>d.id))},deep:!0}},methods:{async getLayers(){try{const p=await Kr.get("/api/map-catalog"),d=(p.data.services||[]).filter(_=>_.service_type!=="other");this.layers=[...d,...p.data.rasters||[]],this.rawCatalog={...p.data,services:d}}catch(p){console.error("Помилка завантаження шарів:",p)}},layersCategories(){return this.rawCatalog?{Сервіси:this.rawCatalog.services||[],Растри:this.rawCatalog.rasters||[]}:{}},selectCategory(p){this.selectedCategory=this.selectedCategory===p?"":p},formatNumber(p){return Intl.NumberFormat("uk",{notation:"compact"}).format(p)},onEnter(){this.layers.filter(({name:p})=>p==null?void 0:p.toLowerCase().match(this.search.toLowerCase()))},clearSearch(){this.search=""},addToSelected(p){if(!this.selectedLayers.find(d=>d.id===p.id)){const d={...p,visible:!0,opacity:100};this.selectedLayers.unshift(d),$o(this.map,d)}},deleteLayer(p){const d=this.selectedLayers.findIndex(_=>_.id===p.id);d!==-1&&this.selectedLayers.splice(d,1),Qa(this.map,p.id)},async toggleLayerVisibility(p){try{p.visible?await $o(this.map,p):await Qa(this.map,p.id)}catch(d){console.error("Error toggling layer visibility:",d),p.visible=!p.visible}},onLayerOpacityChange(p){this.updateLayerOpacity(p)},updateLayerOpacity(p){if(this.map){const d=this.map.getStyle().layers.filter(b=>b.id.includes(p.id)),_=p.opacity/100;d.forEach(b=>{b.type==="fill"?(p.originalFillOpacity||(p.originalFillOpacity=this.map.getPaintProperty(b.id,"fill-opacity")||1),this.map.setPaintProperty(b.id,"fill-opacity",p.originalFillOpacity*_)):b.type==="raster"?this.map.setPaintProperty(b.id,"raster-opacity",_):b.type==="line"?this.map.setPaintProperty(b.id,"line-opacity",_):b.type==="circle"?(this.map.setPaintProperty(b.id,"circle-opacity",_),this.map.setPaintProperty(b.id,"circle-stroke-opacity",_)):b.type==="symbol"&&(this.map.setPaintProperty(b.id,"icon-opacity",_),this.map.setPaintProperty(b.id,"text-opacity",_))})}},async handleRemoveFromCatalog(p){const d=this.selectedLayers.find(_=>_.id===p.id);d!=null&&d.visible&&await Qa(this.map,p.id),this.deleteLayer(p)},clearSelectedLayers(){this.selectedLayers.forEach(async p=>{p.visible&&await Qa(this.map,p.id)}),this.selectedLayers=[]},zoomToLayer(p){this.fitBoundsByLayer(p)},showLayerInfo(p){},showLayerTable(p){},fitBoundsByLayer(p){p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4&&this.map&&this.map.fitBounds([[p.bbox[0],p.bbox[1]],[p.bbox[2],p.bbox[3]]],{padding:50,duration:0})},popoverActions(p){return[{label:"Збільшити до шару",icon:"ZoomInIcon",class:p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4?"text-gray-700 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"zoomToLayer",disabled:!(p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4)},{label:"Інформація про шар",icon:"InfoIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerInfo",disabled:!0},{label:"Таблиця шару",icon:"TableIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerTable",disabled:!0},{divider:!0},{label:"Видалити шар",icon:"TrashIcon",class:"text-red-600 hover:bg-red-50",handler:"deleteLayer",disabled:!1}]},onDrop(p){const{removedIndex:d,addedIndex:_,payload:b}=p;if(d===null&&_===null)return;const k=[...this.selectedLayers];let P=b;if(d!==null&&(P=k.splice(d,1)[0]),_!==null&&k.splice(_,0,P),this.selectedLayers=k,this.map&&this.selectedLayers.length>1)for(let v=this.selectedLayers.length-1;v>=0;v--){const o=this.selectedLayers[v];o.visible&&this.map.getStyle().layers.find(B=>B.id.includes(o.id))&&this.map.getStyle().layers.forEach(B=>{B.id.includes(o.id)&&this.map.moveLayer(B.id)})}}}},t1={class:"w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm"},r1={class:"flex items-center justify-between mb-4"},i1={class:"flex items-center gap-2"},n1={class:"text-lg font-semibold text-gray-800"},o1={key:0},s1={key:1},a1={class:"flex mb-4 border-b border-gray-200"},l1={key:0},c1={class:"mb-4"},u1={class:"border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm"},h1={class:"flex items-center justify-between"},p1={class:"flex items-center gap-2 cursor-move"},d1=["onUpdate:modelValue","onChange"],f1={class:"text-gray-800 font-medium"},m1={class:"flex items-center gap-2"},g1={class:"relative"},y1={class:"flex items-center gap-2"},_1=["onUpdate:modelValue","onInput"],v1={class:"text-xs text-gray-600 whitespace-nowrap"},x1=["onClick"],b1={class:"relative"},w1={class:"w-48"},S1={key:0,class:"my-1 border-gray-200"},A1=["disabled","onClick"],k1={class:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Layer actions"},T1={key:0,class:"text-center text-[14px] text-[#4b5563]"},C1={class:"relative mt-[10px]"},E1={class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"},width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P1={key:0,class:"vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"},I1={key:0,class:"text-center text-[14px] text-[#4b5563]"},M1={key:0,class:"text-center text-[14px] text-[#4b5563]"},L1=["onClick"],R1={class:"flex items-center gap-x-3"},D1=["title"],z1={class:"text-xs opacity-60 text-[#4b5563]"};function B1(p,d,_,b,k,P){var T;const v=A.resolveComponent("VsPopover"),o=A.resolveComponent("DotsIcon"),B=A.resolveComponent("Draggable"),D=A.resolveComponent("Container"),L=A.resolveComponent("searchIcon"),H=A.resolveComponent("closeIcon"),M=A.resolveComponent("VsLayersItem"),C=A.resolveComponent("chevronRightIcon");return A.openBlock(),A.createElementBlock("div",t1,[A.createElementVNode("div",r1,[A.createElementVNode("div",i1,[d[6]||(d[6]=A.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-layers text-blue-600"},[A.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),A.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),A.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),A.createElementVNode("h2",n1,[A.createTextVNode(A.toDisplayString(k.activeView==="catalog"?"Каталог":"Вибрані шари")+" ",1),k.activeView==="catalog"?(A.openBlock(),A.createElementBlock("span",o1,"("+A.toDisplayString(((T=k.layers)==null?void 0:T.length)||0)+")",1)):(A.openBlock(),A.createElementBlock("span",s1,"("+A.toDisplayString(k.selectedLayers.length)+")",1))])]),A.createElementVNode("button",{class:"p-1 rounded-full hover:bg-gray-200 transition-colors","aria-label":"Reset layers",onClick:d[0]||(d[0]=(...N)=>P.clearSelectedLayers&&P.clearSelectedLayers(...N))},d[7]||(d[7]=[A.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-40ac73af><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-40ac73af></path><path d="M21 3v5h-5" data-v-40ac73af></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-40ac73af></path><path d="M8 16H3v5" data-v-40ac73af></path></svg>',1)]))]),A.createElementVNode("div",a1,[A.createElementVNode("button",{class:A.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="catalog"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:d[1]||(d[1]=N=>k.activeView="catalog")}," Каталог ",2),A.createElementVNode("button",{class:A.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="selected"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:d[2]||(d[2]=N=>k.activeView="selected")}," Вибрані шари ",2)]),k.activeView==="selected"?(A.openBlock(),A.createElementBlock("div",l1,[A.createElementVNode("div",c1,[A.createElementVNode("button",{class:"flex items-center gap-2 text-blue-600 hover:text-blue-700 transition-colors px-3 py-2 rounded-md bg-blue-50 hover:bg-blue-100 w-full justify-center",onClick:d[3]||(d[3]=N=>k.activeView="catalog")},d[8]||(d[8]=[A.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-plus"},[A.createElementVNode("path",{d:"M5 12h14"}),A.createElementVNode("path",{d:"M12 5v14"})],-1),A.createElementVNode("span",null,"Вибрати шар",-1)]))]),(A.openBlock(),A.createBlock(D,{onDrop:P.onDrop,lockAxis:"y","drag-class":"dragging",key:k.selectedLayers.length,class:"space-y-2 max-h-[400px] overflow-y-auto pr-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},{default:A.withCtx(()=>[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(k.selectedLayers,(N,G)=>(A.openBlock(),A.createBlock(B,{key:N.id||G,payload:N},{default:A.withCtx(()=>[A.createElementVNode("div",u1,[A.createElementVNode("div",h1,[A.createElementVNode("div",p1,[d[9]||(d[9]=A.createElementVNode("svg",{width:"16",height:"16",fill:"none",stroke:"#9ca3af","stroke-width":"2",viewBox:"0 0 24 24",class:"mr-1 shrink-0"},[A.createElementVNode("circle",{cx:"5",cy:"5",r:"1.5"}),A.createElementVNode("circle",{cx:"5",cy:"12",r:"1.5"}),A.createElementVNode("circle",{cx:"5",cy:"19",r:"1.5"}),A.createElementVNode("circle",{cx:"12",cy:"5",r:"1.5"}),A.createElementVNode("circle",{cx:"12",cy:"12",r:"1.5"}),A.createElementVNode("circle",{cx:"12",cy:"19",r:"1.5"}),A.createElementVNode("circle",{cx:"19",cy:"5",r:"1.5"}),A.createElementVNode("circle",{cx:"19",cy:"12",r:"1.5"}),A.createElementVNode("circle",{cx:"19",cy:"19",r:"1.5"})],-1)),A.withDirectives(A.createElementVNode("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500","onUpdate:modelValue":ie=>N.visible=ie,onChange:ie=>P.toggleLayerVisibility(N)},null,40,d1),[[A.vModelCheckbox,N.visible]]),A.createElementVNode("span",f1,A.toDisplayString(N.name||N.title||N.label),1)]),A.createElementVNode("div",m1,[A.createElementVNode("div",g1,[A.createVNode(v,{placement:"bottom"},{reference:A.withCtx(()=>[A.createElementVNode("div",{class:"text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",onClick:ie=>P.updateLayerOpacity(N)},A.toDisplayString(N.opacity||100)+"% ",9,x1)]),default:A.withCtx(()=>[A.createElementVNode("div",y1,[d[10]||(d[10]=A.createElementVNode("label",{class:"text-gray-600 whitespace-nowrap"},"Прозорість:",-1)),A.withDirectives(A.createElementVNode("input",{type:"range",min:"0",max:"100",step:"1","onUpdate:modelValue":ie=>N.opacity=ie,onInput:ie=>P.onLayerOpacityChange(N),class:"h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"},null,40,_1),[[A.vModelText,N.opacity]]),A.createElementVNode("span",v1,A.toDisplayString(Math.round(N.opacity))+"% ",1)])]),_:2},1024)]),A.createElementVNode("div",b1,[A.createVNode(v,{placement:"bottom"},{reference:A.withCtx(()=>[A.createElementVNode("div",k1,[A.createVNode(o)])]),default:A.withCtx(()=>[A.createElementVNode("div",w1,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(P.popoverActions(N),(ie,le)=>(A.openBlock(),A.createElementBlock(A.Fragment,{key:le},[ie.divider?(A.openBlock(),A.createElementBlock("hr",S1)):(A.openBlock(),A.createElementBlock("button",{key:1,class:A.normalizeClass("w-full p-2 text-left text-sm flex items-center gap-2 "+(ie.class||"")),disabled:ie.disabled,onClick:Ee=>!ie.disabled&&p.$options.methods[ie.handler].call(this,N)},[(A.openBlock(),A.createBlock(A.resolveDynamicComponent(ie.icon),{class:"lucide"})),A.createTextVNode(" "+A.toDisplayString(ie.label),1)],10,A1))],64))),128))])]),_:2},1024)])])])])]),_:2},1032,["payload"]))),128)),k.selectedLayers.length===0?(A.openBlock(),A.createElementBlock("div",T1,d[11]||(d[11]=[A.createElementVNode("p",null,'Щоб додати шар, натисніть на кнопку "Вибрати шар".',-1)]))):A.createCommentVNode("",!0)]),_:1},8,["onDrop"]))])):(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[A.createElementVNode("div",C1,[(A.openBlock(),A.createElementBlock("svg",E1,d[12]||(d[12]=[A.createElementVNode("path",{d:"M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),A.createElementVNode("path",{d:"M13.9995 14.5L11.1328 11.6333",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))),A.withDirectives(A.createElementVNode("input",{title:"value",placeholder:"Введіть назву шару...","onUpdate:modelValue":d[4]||(d[4]=N=>k.search=N),type:"text",class:"py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",onKeyup:d[5]||(d[5]=A.withKeys((...N)=>P.onEnter&&P.onEnter(...N),["enter"]))},null,544),[[A.vModelText,k.search]]),A.createVNode(L,{class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"}}),k.search?(A.openBlock(),A.createBlock(H,{key:0,class:"absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",style:{transform:"translate(0, -50%)"},onClick:P.clearSearch},null,8,["onClick"])):A.createCommentVNode("",!0)]),k.categories?(A.openBlock(),A.createElementBlock("div",P1,[k.search?(A.openBlock(),A.createElementBlock(A.Fragment,{key:0},[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(P.searchedLayers,(N,G)=>(A.openBlock(),A.createBlock(M,{key:G,layer:N,map:_.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128)),P.searchedLayers.length===0?(A.openBlock(),A.createElementBlock("div",I1," Нічого не знайдено ")):A.createCommentVNode("",!0)],64)):(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[!k.categories||Object.keys(k.categories).length===0?(A.openBlock(),A.createElementBlock("div",M1," Каталог порожній ")):(A.openBlock(!0),A.createElementBlock(A.Fragment,{key:1},A.renderList(Object.keys(k.categories),N=>(A.openBlock(),A.createElementBlock("div",{key:N},[A.createElementVNode("div",{class:"hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",onClick:G=>P.selectCategory(N)},[A.createElementVNode("div",R1,[A.createVNode(C,{class:A.normalizeClass({"rotate-up":N===k.selectedCategory,"rotate-down":N!==k.selectedCategory})},null,8,["class"]),A.createElementVNode("div",{class:"max-w-[260px] text-[14px] text-[#4b5563]",title:N},A.toDisplayString(N),9,D1)]),A.createElementVNode("div",z1,A.toDisplayString(P.formatNumber(k.categories[N].length)),1)],8,L1),A.withDirectives(A.createElementVNode("div",null,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(k.categories[N],(G,ie)=>(A.openBlock(),A.createBlock(M,{key:ie,layer:G,map:_.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128))],512),[[A.vShow,N===k.selectedCategory]])]))),128))],64))])):A.createCommentVNode("",!0)],64))])}const V1=Hr(e1,[["render",B1],["__scopeId","data-v-40ac73af"]]);function sd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ws=sd();function ty(p){Ws=p}var uc={exec:()=>null};function vr(p,d=""){let _=typeof p=="string"?p:p.source;const b={replace:(k,P)=>{let v=typeof P=="string"?P:P.source;return v=v.replace(Hi.caret,"$1"),_=_.replace(k,v),b},getRegex:()=>new RegExp(_,d)};return b}var Hi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:p=>new RegExp(`^( {0,3}${p})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}#`),htmlBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}<(?:[a-z].*>|!--)`,"i")},O1=/^(?:[ \t]*(?:\n|$))+/,F1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,N1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,q1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ad=/(?:[*+-]|\d{1,9}[.)])/,ry=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iy=vr(ry).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),U1=vr(ry).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ld=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,j1=/^[^\n]+/,cd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,H1=vr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),W1=vr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ad).getRegex(),_h="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ud=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z1=vr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ud).replace("tag",_h).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ny=vr(ld).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex(),K1=vr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ny).getRegex(),hd={blockquote:K1,code:F1,def:H1,fences:N1,heading:q1,hr:gc,html:Z1,lheading:iy,list:W1,newline:O1,paragraph:ny,table:uc,text:j1},xm=vr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex(),G1={...hd,lheading:U1,table:xm,paragraph:vr(ld).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex()},J1={...hd,html:vr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ud).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vr(ld).replace("hr",gc).replace("heading",` *#{1,6} *[^
746
+ `+P):b.stack=P}catch{}}throw b}}_request(d,_){typeof d=="string"?(_=_||{},_.url=d):_=d||{},_=js(this.defaults,_);const{transitional:b,paramsSerializer:k,headers:P}=_;b!==void 0&&rh.assertOptions(b,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),k!=null&&(Ge.isFunction(k)?_.paramsSerializer={serialize:k}:rh.assertOptions(k,{encode:ao.function,serialize:ao.function},!0)),_.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?_.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:_.allowAbsoluteUrls=!0),rh.assertOptions(_,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),_.method=(_.method||this.defaults.method||"get").toLowerCase();let v=P&&Ge.merge(P.common,P[_.method]);P&&Ge.forEach(["delete","get","head","post","put","patch","common"],T=>{delete P[T]}),_.headers=rn.concat(v,P);const o=[];let B=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(_)===!1||(B=B&&N.synchronous,o.unshift(N.fulfilled,N.rejected))});const D=[];this.interceptors.response.forEach(function(N){D.push(N.fulfilled,N.rejected)});let L,H=0,M;if(!B){const T=[gm.bind(this),void 0];for(T.unshift.apply(T,o),T.push.apply(T,D),M=T.length,L=Promise.resolve(_);H<M;)L=L.then(T[H++],T[H++]);return L}M=o.length;let C=_;for(H=0;H<M;){const T=o[H++],N=o[H++];try{C=T(C)}catch(G){N.call(this,G);break}}try{L=gm.call(this,C)}catch(T){return Promise.reject(T)}for(H=0,M=D.length;H<M;)L=L.then(D[H++],D[H++]);return L}getUri(d){d=js(this.defaults,d);const _=Hg(d.baseURL,d.url,d.allowAbsoluteUrls);return Fg(_,d.params,d.paramsSerializer)}};Ge.forEach(["delete","get","head","options"],function(d){Us.prototype[d]=function(_,b){return this.request(js(b||{},{method:d,url:_,data:(b||{}).data}))}});Ge.forEach(["post","put","patch"],function(d){function _(b){return function(P,v,o){return this.request(js(o||{},{method:d,headers:b?{"Content-Type":"multipart/form-data"}:{},url:P,data:v}))}}Us.prototype[d]=_(),Us.prototype[d+"Form"]=_(!0)});let Lx=class Xg{constructor(d){if(typeof d!="function")throw new TypeError("executor must be a function.");let _;this.promise=new Promise(function(P){_=P});const b=this;this.promise.then(k=>{if(!b._listeners)return;let P=b._listeners.length;for(;P-- >0;)b._listeners[P](k);b._listeners=null}),this.promise.then=k=>{let P;const v=new Promise(o=>{b.subscribe(o),P=o}).then(k);return v.cancel=function(){b.unsubscribe(P)},v},d(function(P,v,o){b.reason||(b.reason=new el(P,v,o),_(b.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(d){if(this.reason){d(this.reason);return}this._listeners?this._listeners.push(d):this._listeners=[d]}unsubscribe(d){if(!this._listeners)return;const _=this._listeners.indexOf(d);_!==-1&&this._listeners.splice(_,1)}toAbortSignal(){const d=new AbortController,_=b=>{d.abort(b)};return this.subscribe(_),d.signal.unsubscribe=()=>this.unsubscribe(_),d.signal}static source(){let d;return{token:new Xg(function(k){d=k}),cancel:d}}};function Rx(p){return function(_){return p.apply(null,_)}}function Dx(p){return Ge.isObject(p)&&p.isAxiosError===!0}const Yp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yp).forEach(([p,d])=>{Yp[d]=p});function Qg(p){const d=new Us(p),_=Cg(Us.prototype.request,d);return Ge.extend(_,Us.prototype,d,{allOwnKeys:!0}),Ge.extend(_,d,null,{allOwnKeys:!0}),_.create=function(k){return Qg(js(p,k))},_}const Kr=Qg(mc);Kr.Axios=Us;Kr.CanceledError=el;Kr.CancelToken=Lx;Kr.isCancel=Ug;Kr.VERSION=Jg;Kr.toFormData=mh;Kr.AxiosError=er;Kr.Cancel=Kr.CanceledError;Kr.all=function(d){return Promise.all(d)};Kr.spread=Rx;Kr.isAxiosError=Dx;Kr.mergeConfig=js;Kr.AxiosHeaders=rn;Kr.formToJSON=p=>qg(Ge.isHTMLForm(p)?new FormData(p):p);Kr.getAdapter=Gg.getAdapter;Kr.HttpStatusCode=Yp;Kr.default=Kr;const{Axios:uA,AxiosError:hA,CanceledError:pA,isCancel:dA,CancelToken:fA,VERSION:mA,all:gA,Cancel:yA,isAxiosError:_A,spread:vA,toFormData:xA,AxiosHeaders:bA,HttpStatusCode:wA,formToJSON:SA,getAdapter:AA,mergeConfig:kA}=Kr,zx={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden"},Bx={key:0,class:"p-5 pb-3 flex justify-between items-center"},Vx={class:"inline-block font-semibold text-lg text-gray-800"},Ox={key:1,class:"flex"},Fx={class:"flex items-center mx-[8px]"},Nx={class:"min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg"},qx={class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},Ux={class:"flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},jx={key:0,class:"text-center"},Hx={key:1,class:"text-red-500"},Wx={key:2},Zx=["innerHTML"],Kx={key:1,class:"flow-root"},Gx={class:"-my-3 divide-y divide-gray-100 text-sm"},Jx={class:"font-medium text-gray-900"},Xx={class:"text-gray-700 sm:col-span-2"},Qx={key:2,class:"vs-map-card-info__nodata"},Yg={__name:"vs-card-widget",props:{config:{type:Object,required:!0},cardValues:{type:Object,required:!0}},emits:["close","content-resize"],setup(p,{emit:d}){const _=p,b=d,k=A.computed(()=>{var G;return((G=_.config)==null?void 0:G.title)||""}),P=A.ref([]),v=A.ref(!1),o=A.ref(null),B=A.ref(0),D=A.computed(()=>B.value+1),L=A.computed(()=>{var G;return((G=_.info)==null?void 0:G.length)||0}),H=A.computed(()=>P.value[B.value]),M=A.computed(()=>{if(!H.value)return{};const{rows:G,columns:ie}=H.value;return!G||!ie?{}:ie.reduce((le,Ee)=>(!Ee.hide&&!["geom","geodata","id"].includes(Ee.name)&&(le[Ee.ua]=G[Ee.name]??"-"),le),{})});async function C(){var G,ie,le;v.value=!0,o.value=null;try{const Ee={id:(G=_.cardValues)==null?void 0:G.id,layer:(ie=_.cardValues)==null?void 0:ie.layer,map:(le=_.cardValues)==null?void 0:le.map},te=await Kr.get("/api/map-format",{params:Ee});P.value[B.value]=te.data}catch(Ee){o.value=(Ee==null?void 0:Ee.message)||"Помилка запиту"}finally{v.value=!1,await A.nextTick(),b("content-resize")}}function T(){B.value<_.info.length-1&&(B.value+=1,P.value[B.value]||C())}function N(){B.value>0&&(B.value-=1,P.value[B.value]||C())}return A.onMounted(async()=>{await A.nextTick(),C()}),A.watch(()=>_.info,()=>{B.value=0,C(),b("content-resize")},{deep:!0}),A.watch([()=>_.cardValues,()=>_.config],async()=>{await A.nextTick(),C(),b("content-resize")}),(G,ie)=>{var le;return A.openBlock(),A.createElementBlock("div",zx,[k.value?(A.openBlock(),A.createElementBlock("div",Bx,[A.createElementVNode("h2",Vx,A.toDisplayString(k.value),1),A.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600 ml-2",onClick:ie[0]||(ie[0]=Ee=>b("close"))},ie[1]||(ie[1]=[A.createElementVNode("svg",{class:"shrink-0 size-4 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[A.createElementVNode("path",{d:"M18 6 6 18"}),A.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))])):A.createCommentVNode("",!0),L.value>1?(A.openBlock(),A.createElementBlock("div",Ox,[A.createElementVNode("button",{type:"button",class:A.normalizeClass([{"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none":D.value===1},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]),onClick:N}," ◀ ",2),A.createElementVNode("div",Fx,[A.createElementVNode("span",Nx,A.toDisplayString(D.value),1),ie[2]||(ie[2]=A.createElementVNode("span",{class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),A.createElementVNode("span",qx,A.toDisplayString(L.value),1)]),A.createElementVNode("button",{type:"button",onClick:T,class:A.normalizeClass([{"opacity-50 pointer-events-none":D.value===L.value},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])}," ▶ ",2)])):A.createCommentVNode("",!0),A.createElementVNode("div",Ux,[v.value?(A.openBlock(),A.createElementBlock("div",jx,"Завантаження даних...")):o.value?(A.openBlock(),A.createElementBlock("div",Hx,"Помилка завантаження даних")):(A.openBlock(),A.createElementBlock("div",Wx,[(le=H.value)!=null&&le.html?(A.openBlock(),A.createElementBlock("div",{key:0,innerHTML:H.value.html,class:"custom-table-html border-b"},null,8,Zx)):Object.keys(M.value).length?(A.openBlock(),A.createElementBlock("div",Kx,[A.createElementVNode("dl",Gx,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(M.value,(Ee,te)=>(A.openBlock(),A.createElementBlock("div",{key:te,class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},[A.createElementVNode("dt",Jx,A.toDisplayString(te),1),A.createElementVNode("dd",Xx,A.toDisplayString(Ee),1)]))),128))])])):(A.openBlock(),A.createElementBlock("div",Qx,"Даних не знайдено."))]))])])}}},Yx={class:"size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},$x={key:0,class:"p-5 pb-0 items-center"},eb={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},tb={class:"h-full p-5"},rb={class:"h-full flex flex-col justify-between space-y-4"},ib={class:"space-y-4"},nb={key:0,class:"flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"},ob=["aria-valuenow"],sb={class:"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center rounded-lg group hover:bg-gray-100"},ab=["for"],lb={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},cb=["id","onUpdate:modelValue"],ub={class:"ms-2 text-gray-800 dark:text-neutral-200"},hb={key:0,class:"ms-auto text-xs text-gray-500 dark:text-neutral-500"},pb={__name:"vs-attributre-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0}},setup(p){const d=p,_=A.computed(()=>{var B;return((B=d.config)==null?void 0:B.title)||""}),b=A.ref([]),k=A.computed(()=>d.config.layer.style.rules.some(B=>B.count!==void 0)),P=A.computed(()=>d.config.layer.style.rules.reduce((B,D)=>B+(D.count||0),0)),v=B=>!B||P.value===0?0:Math.round(B/P.value*100),o=()=>{const D=d.config.layer.style.rules.filter((L,H)=>b.value[H]).map(L=>L.id||L.value).join(",");if(d.config.layer.id){const L=d.map.getSource(d.config.layer.id);if(L){const M=L.tiles[0].split("?filter=")[0],C=D?`${M}?filter=${d.config.layer.style.attribute}=${D}`:M;L.setTiles([C])}}};return A.onMounted(()=>{var B;(B=d.config)!=null&&B.layer&&($o(d.map,d.config.layer),b.value=new Array(d.config.layer.style.rules.length).fill(!1))}),(B,D)=>(A.openBlock(),A.createElementBlock("div",Yx,[_.value?(A.openBlock(),A.createElementBlock("div",$x,[A.createElementVNode("div",null,[A.createElementVNode("h2",eb,A.toDisplayString(_.value),1)])])):A.createCommentVNode("",!0),A.createElementVNode("div",tb,[A.createElementVNode("div",rb,[A.createElementVNode("div",ib,[k.value?(A.openBlock(),A.createElementBlock("div",nb,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.config.layer.style.rules,(L,H)=>(A.openBlock(),A.createElementBlock("div",{key:H,class:"flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",style:A.normalizeStyle({width:`${v(L.count)}%`,backgroundColor:L.color}),role:"progressbar","aria-valuenow":v(L.count),"aria-valuemin":"0","aria-valuemax":"100"},null,12,ob))),128))])):A.createCommentVNode("",!0),A.createElementVNode("ul",null,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.config.layer.style.rules,(L,H)=>(A.openBlock(),A.createElementBlock("li",{key:H},[A.createElementVNode("div",sb,[A.createElementVNode("label",{for:`filter-${H}`,class:"flex items-center w-full cursor-pointer"},[A.createElementVNode("div",{class:"w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",style:A.normalizeStyle({background:b.value[H]?L.color||"#2563eb":"#fff",borderColor:b.value[H]?L.color||"#2563eb":L.color||"#d9d9d9"})},[b.value[H]?(A.openBlock(),A.createElementBlock("img",lb)):A.createCommentVNode("",!0)],4),A.withDirectives(A.createElementVNode("input",{type:"checkbox",id:`filter-${H}`,"onUpdate:modelValue":M=>b.value[H]=M,onChange:o,class:"hidden",disabled:!1},null,40,cb),[[A.vModelCheckbox,b.value[H]]]),A.createElementVNode("span",ub,A.toDisplayString(L.label||L.text),1),k.value?(A.openBlock(),A.createElementBlock("span",hb,"("+A.toDisplayString(L.count)+")",1)):A.createCommentVNode("",!0)],8,ab)])]))),128))])])])])]))}},db={class:"hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]"},fb=["for"],mb={class:"custom-checkbox-wrapper"},gb=["id","checked"],yb={class:"custom-checkbox"},_b={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},vb={class:"flex items-center justify-between ml-2 w-full"},xb=["title"],bb={key:0,class:"text-xs opacity-60 text-[#4b5563]"},wb={__name:"vs-map-catalog-item",props:{layer:{type:Object,required:!0},map:{type:Object,default:()=>null},selectedLayers:{type:Array,default:()=>[]}},emits:["select","remove"],setup(p,{emit:d}){const _=p,b=d,k=A.computed(()=>_.selectedLayers.some(o=>o.id===_.layer.id)),P=o=>Intl.NumberFormat("uk",{notation:"compact"}).format(o),v=o=>{b(o?"select":"remove",_.layer)};return(o,B)=>{var D,L,H,M,C;return A.openBlock(),A.createElementBlock("div",db,[A.createElementVNode("label",{class:"flex items-center w-full cursor-pointer",for:p.layer.id},[A.createElementVNode("div",mb,[A.createElementVNode("input",{id:p.layer.id,type:"checkbox",checked:k.value,onChange:B[0]||(B[0]=T=>v(T.target.checked)),class:"custom-checkbox-input"},null,40,gb),A.createElementVNode("div",yb,[k.value?(A.openBlock(),A.createElementBlock("svg",_b,B[1]||(B[1]=[A.createElementVNode("path",{d:"M10.6663 1L4.24967 7.41667L1.33301 4.5",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):A.createCommentVNode("",!0)])]),A.createElementVNode("div",vb,[A.createElementVNode("div",{class:"whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",title:(D=p.layer)==null?void 0:D.name},A.toDisplayString(((L=p.layer)==null?void 0:L.name)||((H=p.layer)==null?void 0:H.title)),9,xb),isNaN(P((M=p.layer)==null?void 0:M.count))?A.createCommentVNode("",!0):(A.openBlock(),A.createElementBlock("div",bb,A.toDisplayString(P((C=p.layer)==null?void 0:C.count)),1))])],8,fb)])}}},Sb=Hr(wb,[["__scopeId","data-v-b96f3537"]]),Ab={},kb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-zoom-in"};function Tb(p,d){return A.openBlock(),A.createElementBlock("svg",kb,d[0]||(d[0]=[A.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),A.createElementVNode("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"},null,-1),A.createElementVNode("line",{x1:"11",x2:"11",y1:"8",y2:"14"},null,-1),A.createElementVNode("line",{x1:"8",x2:"14",y1:"11",y2:"11"},null,-1)]))}const Cb=Hr(Ab,[["render",Tb]]),Eb={},Pb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-info"};function Ib(p,d){return A.openBlock(),A.createElementBlock("svg",Pb,d[0]||(d[0]=[A.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),A.createElementVNode("path",{d:"M12 16v-4"},null,-1),A.createElementVNode("path",{d:"M12 8h.01"},null,-1)]))}const Mb=Hr(Eb,[["render",Ib]]),Lb={},Rb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-table"};function Db(p,d){return A.openBlock(),A.createElementBlock("svg",Rb,d[0]||(d[0]=[A.createElementVNode("path",{d:"M12 3v18"},null,-1),A.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),A.createElementVNode("path",{d:"M3 9h18"},null,-1),A.createElementVNode("path",{d:"M3 15h18"},null,-1)]))}const zb=Hr(Lb,[["render",Db]]),Bb={},Vb={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-trash2"};function Ob(p,d){return A.openBlock(),A.createElementBlock("svg",Vb,d[0]||(d[0]=[A.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const Fb=Hr(Bb,[["render",Ob]]),Nb={},qb={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-more-vertical text-gray-600"};function Ub(p,d){return A.openBlock(),A.createElementBlock("svg",qb,d[0]||(d[0]=[A.createElementVNode("circle",{cx:"12",cy:"12",r:"1"},null,-1),A.createElementVNode("circle",{cx:"12",cy:"5",r:"1"},null,-1),A.createElementVNode("circle",{cx:"12",cy:"19",r:"1"},null,-1)]))}const jb=Hr(Nb,[["render",Ub]]),Hb={},Wb={width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zb(p,d){return A.openBlock(),A.createElementBlock("svg",Wb,d[0]||(d[0]=[A.createElementVNode("path",{d:"M1 9L5 5L1 1",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Kb=Hr(Hb,[["render",Zb]]);var cc={exports:{}},Gb=cc.exports,_m;function Jb(){return _m||(_m=1,function(p,d){(function(_,b){b(d)})(Gb,function(_){var b,k,P="smooth-dnd-container-instance",v="smooth-dnd-draggable-wrapper",o="animated",B="__smooth_dnd_draggable_translation_value",D="__smooth_dnd_draggable_visibility_value",L="smooth-dnd-ghost",H="smooth-dnd-container",M="smooth-dnd-extra-size-for-insertion",C="smooth-dnd-stretcher-element",T="smooth-dnd-stretcher-instance",N="smooth-dnd-disable-touch-action",G="smooth-dnd-no-user-select",ie="smooth-dnd-prevent-auto-scroll-class",le="smooth-dnd-drop-preview-default-class",Ee="smooth-dnd-drop-preview-inner-class",te="smooth-dnd-drop-preview-constant-class",me="smooth-dnd-drop-preview-flex-container-class",De=Object.freeze({containerInstance:P,defaultGroupName:"@@smooth-dnd-default-group@@",wrapperClass:v,defaultGrabHandleClass:"smooth-dnd-default-grap-handle",animationClass:o,translationValue:B,visibilityValue:D,ghostClass:L,containerClass:H,extraSizeForInsertion:M,stretcherElementClass:C,stretcherElementInstance:T,isDraggableDetached:"smoth-dnd-is-draggable-detached",disbaleTouchActions:N,noUserSelectClass:G,preventAutoScrollClass:ie,dropPlaceholderDefaultClass:le,dropPlaceholderInnerClass:Ee,dropPlaceholderWrapperClass:te,dropPlaceholderFlexContainerClass:me}),qe={groupName:void 0,behaviour:"move",orientation:"vertical",getChildPayload:void 0,animationDuration:250,autoScrollEnabled:!0,shouldAcceptDrop:void 0,shouldAnimateDrop:void 0};function rt(ce){return(rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(ce)}function At(ce,ue,pe){return ue in ce?Object.defineProperty(ce,ue,{value:pe,enumerable:!0,configurable:!0,writable:!0}):ce[ue]=pe,ce}function _t(ce){return function(ue){if(Array.isArray(ue)){for(var pe=0,ve=new Array(ue.length);pe<ue.length;pe++)ve[pe]=ue[pe];return ve}}(ce)||function(ue){if(Symbol.iterator in Object(ue)||Object.prototype.toString.call(ue)==="[object Arguments]")return Array.from(ue)}(ce)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(k=b||(b={})).x="x",k.y="y",k.xy="xy";function lt(ce,ue,pe){return pe==="x"?{left:Math.max(ce.left,ue.left),top:ce.top,right:Math.min(ce.right,ue.right),bottom:ce.bottom}:{left:ce.left,top:Math.max(ce.top,ue.top),right:ce.right,bottom:Math.min(ce.bottom,ue.bottom)}}function vt(ce){var ue=window.getComputedStyle(ce),pe=ue.overflow;if(pe==="auto"||pe==="scroll")return b.xy;var ve=ue["overflow-x"],Ce=ve==="auto"||ve==="scroll",Be=ue["overflow-y"],st=Be==="auto"||Be==="scroll";return Ce&&st?b.xy:Ce?b.x:st?b.y:null}function qt(ce,ue){var pe=window.getComputedStyle(ce),ve=pe.overflow,Ce=pe["overflow-".concat(ue)];return ve==="auto"||ve==="scroll"||Ce==="auto"||Ce==="scroll"}var Xt=function(ce,ue){return{left:Math.max(ce.left,ue.left),top:Math.max(ce.top,ue.top),right:Math.min(ce.right,ue.right),bottom:Math.min(ce.bottom,ue.bottom)}},kr=function(ce){var ue=ce.getBoundingClientRect(),pe={left:ue.left,right:ue.right,top:ue.top,bottom:ue.bottom};if(ni(ce,"x")&&!xr(ce,"x")){var ve=pe.right-pe.left;pe.right=pe.right+ce.scrollWidth-ve}if(ni(ce,"y")&&!xr(ce,"y")){var Ce=pe.bottom-pe.top;pe.bottom=pe.bottom+ce.scrollHeight-Ce}return pe},xr=function(ce,ue){var pe=window.getComputedStyle(ce),ve=pe.overflow,Ce=pe["overflow-".concat(ue)];return ve==="auto"||ve==="scroll"||ve==="hidden"||Ce==="auto"||Ce==="scroll"||Ce==="hidden"},ni=function(ce,ue){return ue==="x"?ce.scrollWidth>ce.clientWidth:ce.scrollHeight>ce.clientHeight},ir=function(ce,ue){var pe=ce,ve=ue||kr(ce);for(pe=ce.parentElement;pe;)ni(pe,"x")&&xr(pe,"x")&&(ve=lt(ve,pe.getBoundingClientRect(),"x")),ni(pe,"y")&&xr(pe,"y")&&(ve=lt(ve,pe.getBoundingClientRect(),"y")),pe=pe.parentElement;return ve},Wi=function(ce,ue){for(var pe=ce;pe;){if(pe[P]){var ve=function(){var Ce=pe[P];if(ue.some(function(Be){return Be===Ce}))return{v:Ce}}();if(rt(ve)==="object")return ve.v}pe=pe.parentElement}return null},Rr=function(ce,ue){for(var pe=ce;pe;){if(pe.matches(ue))return pe;pe=pe.parentElement}return null},Zi=function(ce,ue){return-1<ce.className.split(" ").map(function(pe){return pe}).indexOf(ue)},Dr=function(ce,ue){if(ce){var pe=ce.className.split(" ").filter(function(ve){return ve});pe.indexOf(ue)===-1&&(pe.unshift(ue),ce.className=pe.join(" "))}},on=function(ce,ue){if(ce){var pe=ce.className.split(" ").filter(function(ve){return ve&&ve!==ue});ce.className=pe.join(" ")}},Si=function(ce,ue){return ce.removeChild(ce.children[ue])},Wr=function(ce,ue,pe){pe>=ce.children.length?ce.appendChild(ue):ce.insertBefore(ue,ce.children[pe])},Ki=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():window.document.selection&&window.document.selection.empty()},Yr=function(ce){if(ce){var ue=window.getComputedStyle(ce);if(ue)return ue.cursor}return null};function Gi(ce){return!(ce.bottom<=ce.top||ce.right<=ce.left)}function Mi(ce){var ue=ce.element,pe=ce.draggables;return function(ve,Ce){var Be=ve,st=Be.removedIndex,Je=Be.addedIndex,it=Be.droppedElement,ze=null;if(st!==null&&(ze=Si(ue,st),pe.splice(st,1)),Je!==null){var Ke=window.document.createElement("div");Ke.className="".concat(v),Ke.appendChild(ze&&ze.firstElementChild?ze.firstElementChild:it),Wr(ue,Ke,Je),Je>=pe.length?pe.push(Ke):pe.splice(Je,0,Ke)}Ce&&Ce(ve)}}var Tn=Object.freeze({domDropHandler:Mi,reactDropHandler:function(){return{handler:function(){return function(ce,ue){ue&&ue(ce)}}}}}),fi={size:"offsetWidth",distanceToParent:"offsetLeft",translate:"transform",begin:"left",end:"right",dragPosition:"x",scrollSize:"scrollWidth",offsetSize:"offsetWidth",scrollValue:"scrollLeft",scale:"scaleX",setSize:"width",setters:{translate:function(ce){return"translate3d(".concat(ce,"px, 0, 0)")}}},yt={size:"offsetHeight",distanceToParent:"offsetTop",translate:"transform",begin:"top",end:"bottom",dragPosition:"y",scrollSize:"scrollHeight",offsetSize:"offsetHeight",scrollValue:"scrollTop",scale:"scaleY",setSize:"height",setters:{translate:function(ce){return"translate3d(0,".concat(ce,"px, 0)")}}};function xt(ce,ue,pe){ce[M]=0;var ve=function(ze){return{get:function(Ke,Ye){return Ke[ze[Ye]||Ye]},set:function(Ke,Ye,ft){Ke[ze[Ye]]=ze.setters[Ye]?ze.setters[Ye](ft):ft}}}(ue==="horizontal"?fi:yt),Ce={translation:0};function Be(){st(ce),function(ze){var Ke=ze.getBoundingClientRect();Ce.scaleX=ze.offsetWidth?(Ke.right-Ke.left)/ze.offsetWidth:1,Ce.scaleY=ze.offsetHeight?(Ke.bottom-Ke.top)/ze.offsetHeight:1}(ce)}function st(ze){Ce.rect=kr(ze);var Ke=ir(ze,Ce.rect);Gi(Ke)&&(Ce.lastVisibleRect=Ce.visibleRect),Ce.visibleRect=Ke}function Je(ze){var Ke=ze;if(Ke.tagName){var Ye=Ke.getBoundingClientRect();return ue==="vertical"?Ye.bottom-Ye.top:Ye.right-Ye.left}return ve.get(ze,"size")*ve.get(Ce,"scale")}function it(ze){return ve.get(ze,"dragPosition")}return window.addEventListener("resize",function(){st(ce)}),setTimeout(function(){Be()},10),{getSize:Je,getContainerRectangles:function(){return{rect:Ce.rect,visibleRect:Ce.visibleRect,lastVisibleRect:Ce.lastVisibleRect}},getBeginEndOfDOMRect:function(ze){return{begin:ve.get(ze,"begin"),end:ve.get(ze,"end")}},getBeginEndOfContainer:function(){return{begin:ve.get(Ce.rect,"begin")+Ce.translation,end:ve.get(Ce.rect,"end")+Ce.translation}},getBeginEndOfContainerVisibleRect:function(){return{begin:ve.get(Ce.visibleRect,"begin")+Ce.translation,end:ve.get(Ce.visibleRect,"end")+Ce.translation}},getBeginEnd:function(ze){var Ke=function(Ye){return(ve.get(Ye,"distanceToParent")+(Ye[B]||0))*ve.get(Ce,"scale")}(ze)+(ve.get(Ce.rect,"begin")+Ce.translation)-ve.get(ce,"scrollValue");return{begin:Ke,end:Ke+Je(ze)*ve.get(Ce,"scale")}},getAxisValue:it,setTranslation:function(ze,Ke){Ke?ve.set(ze.style,"translate",Ke):ze.style.removeProperty("transform"),ze[B]=Ke},getTranslation:function(ze){return ze[B]},setVisibility:function(ze,Ke){ze[D]!==void 0&&ze[D]===Ke||(Ke?ze.style.removeProperty("visibility"):ze.style.visibility="hidden",ze[D]=Ke)},isVisible:function(ze){return ze[D]===void 0||ze[D]},isInVisibleRect:function(ze,Ke){var Ye=Ce.visibleRect,ft=Ye.left,ht=Ye.top,nt=Ye.right,Zt=Ye.bottom;Zt-ht<2&&(Zt=ht+30);var dt=Ce.rect;return ue==="vertical"?ze>dt.left&&ze<dt.right&&ht<Ke&&Ke<Zt:ft<ze&&ze<nt&&Ke>dt.top&&Ke<dt.bottom},setSize:function(ze,Ke){ve.set(ze,"setSize",Ke)},getTopLeftOfElementBegin:function(ze){var Ke=0;return{top:ue==="horizontal"?(Ke=ze,Ce.rect.top):(Ke=Ce.rect.left,ze),left:Ke}},getScrollSize:function(ze){return ve.get(ze,"scrollSize")},getScrollValue:function(ze){return ve.get(ze,"scrollValue")},setScrollValue:function(ze,Ke){return ve.set(ze,"scrollValue",Ke)},invalidate:Be,invalidateRects:function(){st(ce)},getPosition:function(ze){return it(ze)},setBegin:function(ze,Ke){ve.set(ze,"begin",Ke)}}}function ct(ce,ue,pe){var ve,Ce,Be,st=pe.left,Je=pe.right,it=pe.top,ze=pe.bottom,Ke=ce.x,Ye=ce.y;if(Ke<st||Je<Ke||Ye<it||ze<Ye)return null;Be=ue==="x"?(ve=st,Ce=Je,Ke):(ve=it,Ce=ze,Ye);var ft=Ce-ve,ht=400<ft?100:ft/4;return Ce-Be<ht?{direction:"end",speedFactor:(ht-(Ce-Be))/ht}:Be-ve<ht?{direction:"begin",speedFactor:(ht-(Be-ve))/ht}:null}function Bt(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"y",pe=null,ve=null,Ce=null,Be=null;return{animate:function(st,Je){Ce=st,Be=Je,function it(){pe===null&&(pe=requestAnimationFrame(function(ze){ve===null&&(ve=ze);var Ke=ze-ve;ve=ze;var Ye,ft,ht,nt=Ke/1e3*Be;ft=ue,ht=nt=Ce==="begin"?0-nt:nt,(Ye=ce)&&(Ye!==window?ft==="x"?Ye.scrollLeft+=ht:Ye.scrollTop+=ht:ft==="x"?Ye.scrollBy(ht,0):Ye.scrollBy(0,ht)),pe=null,it()}))}()},stop:function(){pe!==null&&(cancelAnimationFrame(pe),pe=null),ve=null}}}function Ht(ce){return function(){return ir(ce,ce.getBoundingClientRect())}}var Ot,pr,Nt,mr=function(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1500,pe=ce.reduce(function(ve,Ce){var Be=function(st){for(var Je=[],it=st.element;it;){var ze=vt(it);if(ze&&!Zi(it,ie)){var Ke={};switch(ze){case b.xy:Ke.x={animator:Bt(it,"x")},Ke.y={animator:Bt(it,"y")};break;case b.x:Ke.x={animator:Bt(it,"x")};break;case b.y:Ke.y={animator:Bt(it,"y")}}Je.push({axisAnimations:Ke,getRect:Ht(it),scrollerElement:it})}it=it.parentElement}return Je}(Ce).filter(function(st){return!ve.find(function(Je){return Je.scrollerElement===st.scrollerElement})});return[].concat(_t(ve),_t(Be))},[]);return function(ve){var Ce=ve.draggableInfo;if(ve.reset)pe.forEach(function(Je){Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop()});else if(Ce){(function(Je,it){Je.forEach(function(ze){var Ke=ze.axisAnimations,Ye=(0,ze.getRect)();Ke.x&&(Ke.x.scrollParams=ct(it,"x",Ye),ze.cachedRect=Ye),Ke.y&&(Ke.y.scrollParams=ct(it,"y",Ye),ze.cachedRect=Ye)})})(pe,Ce.mousePosition),pe.forEach(function(Je){var it=Je.axisAnimations,ze=it.x,Ke=it.y;if(ze)if(ze.scrollParams){var Ye=ze.scrollParams,ft=Ye.direction,ht=Ye.speedFactor;ze.animator.animate(ft,ht*ue)}else ze.animator.stop();if(Ke)if(Ke.scrollParams){var nt=Ke.scrollParams,Zt=nt.direction,dt=nt.speedFactor;Ke.animator.animate(Zt,dt*ue)}else Ke.animator.stop()});var Be=pe.filter(function(Je){return Je.cachedRect});if(Be.length&&1<Be.length){var st=function(Je,it){for(var ze=document.elementFromPoint(it.x,it.y);ze;){var Ke=Je.find(function(Ye){return Ye.scrollerElement===ze});if(Ke)return Ke;ze=ze.parentElement}return null}(Be,Ce.mousePosition);st&&Be.forEach(function(Je){Je!==st&&(Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop())})}}}};typeof window<"u"&&((Ot=Element)&&Ot.prototype&&!Ot.prototype.matches&&(Ot.prototype.matches=Ot.prototype.matchesSelector||Ot.prototype.mozMatchesSelector||Ot.prototype.msMatchesSelector||Ot.prototype.oMatchesSelector||Ot.prototype.webkitMatchesSelector||function(ce){for(var ue=(this.document||this.ownerDocument).querySelectorAll(ce),pe=ue.length;0<=--pe&&ue.item(pe)!==this;);return-1<pe}),(pr=Node||Element)&&pr.prototype&&pr.prototype.firstElementChild==null&&Object.defineProperty(pr.prototype,"firstElementChild",{get:function(){for(var ce,ue=this.childNodes,pe=0;ce=ue[pe++];)if(ce.nodeType===1)return ce;return null}}),Array.prototype.some||(Array.prototype.some=function(ce){if(this==null)throw new TypeError("Array.prototype.some called on null or undefined");if(typeof ce!="function")throw new TypeError;for(var ue=Object(this),pe=ue.length>>>0,ve=2<=arguments.length?arguments[1]:void 0,Ce=0;Ce<pe;Ce++)if(Ce in ue&&ce.call(ve,ue[Ce],Ce,ue))return!0;return!1}));var Ur={overflow:"hidden",display:"block"},mi={height:"100%",display:"table-cell","vertical-align":"top"},Ir=(At(Nt={},".".concat(H),{position:"relative","min-height":"30px","min-width":"30px"}),At(Nt,".".concat(H,".horizontal"),{display:"table"}),At(Nt,".".concat(H,".horizontal > .").concat(C),{display:"inline-block"}),At(Nt,".".concat(H,".horizontal > .").concat(v),mi),At(Nt,".".concat(H,".vertical > .").concat(v),Ur),At(Nt,".".concat(v),{"box-sizing":"border-box"}),At(Nt,".".concat(v,".horizontal"),mi),At(Nt,".".concat(v,".vertical"),Ur),At(Nt,".".concat(v,".animated"),{transition:"transform ease"}),At(Nt,".".concat(L),{"box-sizing":"border-box"}),At(Nt,".".concat(L,".animated"),{transition:"all ease-in-out"}),At(Nt,".".concat(L," *"),{"pointer-events":"none"}),At(Nt,".".concat(N," *"),{"touch-action":"none","-ms-touch-action":"none"}),At(Nt,".".concat(G),{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"}),At(Nt,".".concat(Ee),{flex:"1"}),At(Nt,".".concat(H,".horizontal > .").concat(te),{height:"100%",overflow:"hidden",display:"table-cell","vertical-align":"top"}),At(Nt,".".concat(H,".vertical > .").concat(te),{overflow:"hidden",display:"block",width:"100%"}),At(Nt,".".concat(me),{width:"100%",height:"100%",display:"flex","justify-content":"stretch","align-items":"stretch"}),At(Nt,".".concat(le),{"background-color":"rgba(150, 150, 150, 0.1)",border:"1px solid #ccc"}),Nt);function gi(ce){return Object.keys(ce).reduce(function(ue,pe){var ve=ce[pe];return rt(ve)==="object"?"".concat(ue).concat(pe,"{").concat(gi(ve),"}"):"".concat(ue).concat(pe,":").concat(ve,";")},"")}function Bi(ce){if(ce&&typeof window<"u"){var ue=window.document.head||window.document.getElementsByTagName("head")[0],pe=window.document.createElement("style"),ve=gi({"body *":{cursor:"".concat(ce," !important")}});return pe.type="text/css",pe.styleSheet?pe.styleSheet.cssText=ve:pe.appendChild(window.document.createTextNode(ve)),ue.appendChild(pe),pe}return null}var hr,lr,Ft=["mousedown","touchstart"],br=["mousemove","touchmove"],dr=["mouseup","touchend"],Jt=null,fr=null,It=null,wt=null,Ae=[],K=!1,Q=!1,ee=!1,he=!1,be=null,$=null,Me=null,Te=null,Ie=(hr=null,lr=!1,{start:function(){lr||(lr=!0,function ce(){hr=requestAnimationFrame(function(){Jt.forEach(function(ue){return ue.layout.invalidateRects()}),setTimeout(function(){hr!==null&&ce()},50)})}())},stop:function(){hr!==null&&(cancelAnimationFrame(hr),hr=null),lr=!1}}),Ve=typeof window<"u"&&!!(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));function Pe(){typeof window<"u"&&Ft.forEach(function(ce){window.document.addEventListener(ce,Wt,{passive:!1})})}function Qe(){return wt&&wt.ghostParent?wt.ghostParent:fr&&fr.parentElement||window.document.body}var ut,gt,Et,jt,Rt,Ue,ar=(jt=null,Rt=1,Ue=5,function(ce,ue,pe){ut=Li(ce),Et=pe,(gt=typeof ue=="number"?ue:Ve?200:0)&&(jt=setTimeout(Mt,gt)),br.forEach(function(ve){return window.document.addEventListener(ve,Qt)},{passive:!1}),dr.forEach(function(ve){return window.document.addEventListener(ve,or)},{passive:!1}),window.document.addEventListener("drag",Dt,{passive:!1})});function Qt(ce){var ue=Li(ce),pe=ue.clientX,ve=ue.clientY;if(gt)(Math.abs(ut.clientX-pe)>Ue||Math.abs(ut.clientY-ve)>Ue)&&Xe();else if(Math.abs(ut.clientX-pe)>Rt||Math.abs(ut.clientY-ve)>Rt)return Mt()}function or(){Xe()}function Dt(){Xe()}function Xe(){clearTimeout(jt),br.forEach(function(ce){return window.document.removeEventListener(ce,Qt)},{passive:!1}),dr.forEach(function(ce){return window.document.removeEventListener(ce,or)},{passive:!1}),window.document.removeEventListener("drag",Dt,{passive:!1})}function Mt(){clearTimeout(jt),Xe(),Et()}function Wt(ce){var ue=Li(ce);if(!K&&(ue.button===void 0||ue.button===0)&&(fr=Rr(ue.target,"."+v))){var pe=Rr(fr,"."+H),ve=Ae.filter(function(Je){return Je.element===pe})[0],Ce=ve.getOptions().dragHandleSelector,Be=ve.getOptions().nonDragAreaSelector,st=!0;Ce&&!Rr(ue.target,Ce)&&(st=!1),Be&&Rr(ue.target,Be)&&(st=!1),st&&(ve.layout.invalidate(),Dr(window.document.body,N),Dr(window.document.body,G),window.document.addEventListener("mouseup",function Je(){on(window.document.body,N),on(window.document.body,G),window.document.removeEventListener("mouseup",Je)})),st&&ar(ue,ve.getOptions().dragBeginDelay,function(){Ki(),Zn(ue,Yr(ce.target)),br.forEach(function(Je){window.document.addEventListener(Je,Tr,{passive:!1})}),dr.forEach(function(Je){window.document.addEventListener(Je,Cn,{passive:!1})})})}}function Tr(ce){ce.preventDefault();var ue=Li(ce);if(wt){var pe=wt.container.getOptions();pe.behaviour==="contain"?function(ve){var Ce,Be,st,Je,it=ve.clientX,ze=ve.clientY,Ke=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"vertical",Ye=wt.container.layout.getBeginEndOfContainerVisibleRect();Je=Ke==="vertical"?(Ce=ze,Be="y",st="top",wt.size.offsetHeight):(Ce=it,Be="x",st="left",wt.size.offsetWidth);var ft=Ye.begin,ht=Ye.end-Je,nt=Math.max(ft,Math.min(ht,Ce+It.positionDelta[st]));It.topLeft[Be]=nt,wt.position[Be]=Math.max(Ye.begin,Math.min(Ye.end,Ce+It.centerDelta[Be])),wt.mousePosition[Be]=Math.max(Ye.begin,Math.min(Ye.end,Ce)),wt.position[Be]<Ye.begin+Je/2&&(wt.position[Be]=Ye.begin+2),wt.position[Be]>Ye.end-Je/2&&(wt.position[Be]=Ye.end-2)}(ue,pe.orientation):Me?Me==="y"?(It.topLeft.y=ue.clientY+It.positionDelta.top,wt.position.y=ue.clientY+It.centerDelta.y,wt.mousePosition.y=ue.clientY):Me==="x"&&(It.topLeft.x=ue.clientX+It.positionDelta.left,wt.position.x=ue.clientX+It.centerDelta.x,wt.mousePosition.x=ue.clientX):(It.topLeft.x=ue.clientX+It.positionDelta.left,It.topLeft.y=ue.clientY+It.positionDelta.top,wt.position.x=ue.clientX+It.centerDelta.x,wt.position.y=ue.clientY+It.centerDelta.y,wt.mousePosition.x=ue.clientX,wt.mousePosition.y=ue.clientY),uo(),(he=!be(wt))&&co()}else Zn(ue,Yr(ce.target))}var gr,yi,Kt,Vi,co=(gr=yn,Kt=!(yi=20),Vi=null,function(){for(var ce=arguments.length,ue=new Array(ce),pe=0;pe<ce;pe++)ue[pe]=arguments[pe];Vi&&clearTimeout(Vi),Kt&&!Vi?gr.call.apply(gr,[null].concat(ue)):Vi=setTimeout(function(){Vi=null,gr.call.apply(gr,[null].concat(ue))},yi)});function yn(){he&&(he=!1,_n(wt,Jt))}function Cn(){br.forEach(function(ce){window.document.removeEventListener(ce,Tr,{passive:!1})}),dr.forEach(function(ce){window.document.removeEventListener(ce,Cn,{passive:!1})}),$({reset:!0}),Te&&(function(ce){ce&&typeof window<"u"&&(window.document.head||window.document.getElementsByTagName("head")[0]).removeChild(ce)}(Te),Te=null),wt&&(Ie.stop(),yn(),ee=!0,function(ce){function ue(){on(It.ghost,"animated"),It.ghost.style.transitionDuration=null,Qe().removeChild(It.ghost),ce()}function pe(dt,Ut,wr){var ho=dt.top,Rn=dt.left;Dr(It.ghost,"animated"),wr&&Dr(It.ghost.firstElementChild,wr),It.topLeft.x=Rn,It.topLeft.y=ho,uo(Ut),setTimeout(function(){ue()},Ut+20)}function ve(dt,Ut){Dr(It.ghost,"animated"),uo(dt,.9,!0),setTimeout(function(){Ut()},dt+20)}if(wt.targetElement){var Ce=Ae.filter(function(dt){return dt.element===wt.targetElement})[0];!(Zt=Ce.getOptions()).shouldAnimateDrop||Zt.shouldAnimateDrop(wt.container.getOptions(),wt.payload)?pe(Ce.getDragResult().shadowBeginEnd.rect,Math.max(150,Ce.getOptions().animationDuration/2),Ce.getOptions().dropClass):ue()}else{var Be=Ae.filter(function(dt){return dt===wt.container})[0];if(Be){var st=Be.getOptions(),Je=st.behaviour,it=st.removeOnDropOut;if(Je!=="move"&&Je!=="contain"||!Q&&it||!Be.getDragResult())ve(Be.getOptions().animationDuration,ue);else{var ze=Be.layout.getContainerRectangles();if(!Gi(ze.visibleRect)&&Gi(ze.lastVisibleRect))pe({top:ze.lastVisibleRect.top,left:ze.lastVisibleRect.left},Be.getOptions().animationDuration,Be.getOptions().dropClass);else{var Ke=Be.getDragResult(),Ye=Ke.removedIndex,ft=Ke.elementSize,ht=Be.layout;Be.getTranslateCalculator({dragResult:{removedIndex:Ye,addedIndex:Ye,elementSize:ft,pos:void 0,shadowBeginEnd:void 0}});var nt=0<Ye?ht.getBeginEnd(Be.draggables[Ye-1]).end:ht.getBeginEndOfContainer().begin;pe(ht.getTopLeftOfElementBegin(nt),Be.getOptions().animationDuration,Be.getOptions().dropClass)}}}else ve(qe.animationDuration,ue)}var Zt}(function(){yr(K=!1);for(var ce=Jt||[],ue=ce.shift();ue!==void 0;)ue.handleDrop(wt),ue=ce.shift();be=Me=wt=It=fr=Jt=null,ee=!1}))}function Li(ce){return ce.touches?ce.touches[0]:ce}function _n(ce,ue){var pe=!1;ue.forEach(function(ve){var Ce=ve.handleDrag(ce);pe=!!Ce.containerBoxChanged||!1,Ce.containerBoxChanged=!1}),pe&&(pe=!1,requestAnimationFrame(function(){Ae.forEach(function(ve){ve.layout.invalidateRects(),ve.onTranslated()})}))}function Mr(ce){var ue=ce,pe=null;return function(ve){return!(pe!==null||!K||ee)&&(pe=requestAnimationFrame(function(){K&&!ee&&(_n(ve,ue),$({draggableInfo:ve})),pe=null}),!0)}}function _i(ce,ue){return ce.getOptions().autoScrollEnabled?mr(ue,ce.getScrollMaxSpeed()):function(pe){return null}}function yr(ce){Ae.forEach(function(ue){var pe=ce?ue.getOptions().onDragStart:ue.getOptions().onDragEnd;if(pe){var ve={isSource:ue===wt.container,payload:wt.payload};ue.isDragRelevant(wt.container,wt.payload)?ve.willAcceptDrop=!0:ve.willAcceptDrop=!1,pe(ve)}})}function Zn(ce,ue){if(fr!==null){K=!0;var pe=Ae.filter(function(ve){return fr.parentElement===ve.element})[0];pe.setDraggables(),Me=pe.getOptions().lockAxis?pe.getOptions().lockAxis.toLowerCase():null,wt=function(ve){var Ce=Ae.filter(function(it){return ve.parentElement===it.element})[0],Be=Ce.draggables.indexOf(ve),st=Ce.getOptions().getGhostParent,Je=ve.getBoundingClientRect();return{container:Ce,element:ve,size:{offsetHeight:Je.bottom-Je.top,offsetWidth:Je.right-Je.left},elementIndex:Be,payload:Ce.getOptions().getChildPayload?Ce.getOptions().getChildPayload(Be):void 0,targetElement:null,position:{x:0,y:0},groupName:Ce.getOptions().groupName,ghostParent:st?st():null,invalidateShadow:null,mousePosition:null,relevantContainers:null}}(fr),It=function(ve,Ce,Be,st){var Je=Ce.x,it=Ce.y,ze=ve.getBoundingClientRect(),Ke=ze.left,Ye=ze.top,ft=ze.right,ht=ze.bottom,nt=Xt(Be.layout.getContainerRectangles().visibleRect,ze),Zt=nt.left+(nt.right-nt.left)/2,dt=nt.top+(nt.bottom-nt.top)/2,Ut=ve.cloneNode(!0);return Ut.style.zIndex="1000",Ut.style.boxSizing="border-box",Ut.style.position="fixed",Ut.style.top="0px",Ut.style.left="0px",Ut.style.transform=null,Ut.style.removeProperty("transform"),Be.shouldUseTransformForGhost()?Ut.style.transform="translate3d(".concat(Ke,"px, ").concat(Ye,"px, 0)"):(Ut.style.top="".concat(Ye,"px"),Ut.style.left="".concat(Ke,"px")),Ut.style.width=ft-Ke+"px",Ut.style.height=ht-Ye+"px",Ut.style.overflow="visible",Ut.style.transition=null,Ut.style.removeProperty("transition"),Ut.style.pointerEvents="none",Ut.style.userSelect="none",Be.getOptions().dragClass?setTimeout(function(){Dr(Ut.firstElementChild,Be.getOptions().dragClass);var wr=window.getComputedStyle(Ut.firstElementChild).cursor;Te=Bi(wr)}):Te=Bi(st),Dr(Ut,Be.getOptions().orientation||"vertical"),Dr(Ut,L),{ghost:Ut,centerDelta:{x:Zt-Je,y:dt-it},positionDelta:{left:Ke-Je,top:Ye-it},topLeft:{x:Ke,y:Ye}}}(fr,{x:ce.clientX,y:ce.clientY},wt.container,ue),wt.position={x:ce.clientX+It.centerDelta.x,y:ce.clientY+It.centerDelta.y},wt.mousePosition={x:ce.clientX,y:ce.clientY},Jt=Ae.filter(function(ve){return ve.isDragRelevant(pe,wt.payload)}),wt.relevantContainers=Jt,be=Mr(Jt),$&&$({reset:!0,draggableInfo:void 0}),$=_i(pe,Jt),Jt.forEach(function(ve){return ve.prepareDrag(ve,Jt)}),yr(!0),be(wt),Qe().appendChild(It.ghost),Ie.start()}}var sn=null;function uo(){var ce=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1,pe=2<arguments.length&&arguments[2]!==void 0&&arguments[2],ve=It,Ce=ve.ghost,Be=ve.topLeft,st=Be.x,Je=Be.y,it=!wt.container||wt.container.shouldUseTransformForGhost(),ze=it?"translate3d(".concat(st,"px,").concat(Je,"px, 0)"):null;if(ue!==1&&(ze=ze?"".concat(ze," scale(").concat(ue,")"):"scale(".concat(ue,")")),0<ce)return It.ghost.style.transitionDuration=ce+"ms",void requestAnimationFrame(function(){ze&&(Ce.style.transform=ze),it||(Ce.style.left=st+"px",Ce.style.top=Je+"px"),sn=null,pe&&(Ce.style.opacity="0")});sn===null&&(sn=requestAnimationFrame(function(){ze&&(Ce.style.transform=ze),it||(Ce.style.left=st+"px",Ce.style.top=Je+"px"),sn=null,pe&&(Ce.style.opacity="0")}))}function En(){if(K&&!Q&&!ee){he=!(Q=!0);var ce=Object.assign({},wt,{targetElement:null,position:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},mousePosition:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER}});Jt.forEach(function(ue){ue.handleDrag(ce)}),wt.targetElement=null,wt.cancelDrop=!0,Cn(),Q=!1}}typeof window<"u"&&function(){if(typeof window<"u"){var ce=window.document.head||window.document.getElementsByTagName("head")[0],ue=window.document.createElement("style");ue.id="smooth-dnd-style-definitions";var pe=gi(Ir);ue.type="text/css",ue.styleSheet?ue.styleSheet.cssText=pe:ue.appendChild(window.document.createTextNode(pe)),ce.appendChild(ue)}}();var Ri=(Pe(),{register:function(ce){(function(ue){Ae.push(ue),K&&wt&&ue.isDragRelevant(wt.container,wt.payload)&&(Jt.push(ue),ue.prepareDrag(ue,Jt),$&&$({reset:!0,draggableInfo:void 0}),$=_i(ue,Jt),be=Mr(Jt),ue.handleDrag(wt))})(ce)},unregister:function(ce){(function(ue){if(Ae.splice(Ae.indexOf(ue),1),K&&wt){wt.container===ue&&ue.fireRemoveElement(),wt.targetElement===ue.element&&(wt.targetElement=null);var pe=Jt.indexOf(ue);-1<pe&&(Jt.splice(pe,1),$&&$({reset:!0,draggableInfo:void 0}),$=_i(ue,Jt),be=Mr(Jt))}})(ce)},isDragging:function(){return K},cancelDrag:En});function es(ce,ue){var pe=2<arguments.length&&arguments[2]!==void 0?arguments[2]:qe.animationDuration;ue?(Dr(ce,o),ce.style.transitionDuration=pe+"ms"):(on(ce,o),ce.style.removeProperty("transition-duration"))}function Mo(ce){var ue=[];return Array.prototype.forEach.call(ce.children,function(pe){if(pe.nodeType===Node.ELEMENT_NODE){var ve=pe;Zi(pe,v)||(ve=function(Ce){if(Vt.wrapChild){var Be=window.document.createElement("div");return Be.className="".concat(v),Ce.parentElement.insertBefore(Be,Ce),Be.appendChild(Ce),Be}return Ce}(pe)),ve[B]=0,ue.push(ve)}else ce.removeChild(pe)}),ue}function Zs(ce){var ue=ce.layout;return function(pe,ve){var Ce=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return function Be(st,Je,it,ze){var Ke=4<arguments.length&&arguments[4]!==void 0&&arguments[4];if(ze<it)return it;if(it===ze){var Ye=ue.getBeginEnd(st[it]),ft=Ye.begin,ht=Ye.end;return Ke?Je<(ht+ft)/2?it:it+1:it}var nt=Math.floor((ze+it)/2),Zt=ue.getBeginEnd(st[nt]),dt=Zt.begin,Ut=Zt.end;return Je<dt?Be(st,Je,it,nt-1,Ke):Ut<Je?Be(st,Je,nt+1,ze,Ke):Ke?Je<(Ut+dt)/2?nt:nt+1:nt}(pe,ve,0,pe.length-1,Ce)}}function Kn(ce){var ue=ce.element,pe=ce.draggables,ve=ce.layout,Ce=ce.getOptions,Be=function(Je){var it=Je.element,ze=Je.draggables,Ke=Je.layout;return function(){ze.forEach(function(Ye){es(Ye,!1),Ke.setTranslation(Ye,0),Ke.setVisibility(Ye,!0)}),it[T]&&(it[T].parentNode.removeChild(it[T]),it[T]=null)}}({element:ue,draggables:pe,layout:ve}),st=(Vt.dropHandler||Mi)({element:ue,draggables:pe,layout:ve,getOptions:Ce});return function(Je,it){var ze=it.addedIndex,Ke=it.removedIndex,Ye=2<arguments.length&&arguments[2]!==void 0&&arguments[2];if(Be(),!Je.cancelDrop&&(Je.targetElement||Ce().removeOnDropOut||Ye)){var ft={removedIndex:Ke,addedIndex:ze!==null?Ke!==null&&Ke<ze?ze-1:ze:null,payload:Je.payload};st(ft,Ce().onDrop)}}}function ts(ce){var ue=ce.element,pe=ce.getOptions,ve=null;return function(Ce){var Be=Ce.draggableInfo,st=ve;return ve==null&&Be.container.element===ue&&pe().behaviour!=="copy"&&(st=ve=Be.elementIndex),{removedIndex:st}}}function Ks(ce){var ue=ce.draggables,pe=ce.layout;return function(ve){var Ce=ve.dragResult;Ce.removedIndex!==null&&pe.setVisibility(ue[Ce.removedIndex],!1)}}function Gs(ce){var ue=ce.element,pe=ce.layout;return function(ve){var Ce=ve.draggableInfo,Be=document.elementFromPoint(Ce.position.x,Ce.position.y);if(Be){var st=Wi(Be,Ce.relevantContainers);if(st&&st.element===ue)return{pos:pe.getPosition(Ce.position)}}return{pos:null}}}function Js(ce){var ue=ce.layout,pe=null;return function(ve){var Ce=ve.draggableInfo;return ve.dragResult.pos===null?pe=null:{elementSize:pe=pe||ue.getSize(Ce.size)}}}function rs(ce){var ue=ce.element;return function(pe){var ve=pe.draggableInfo,Ce=pe.dragResult;(function(Be,st){var Je=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];st&&Je?Be.targetElement=st:Be.targetElement===st&&(Be.targetElement=null)})(ve,ue,!!Ce.pos)}}function is(){return function(ce){return ce.dragResult.pos!==null?{addedIndex:0}:{addedIndex:null}}}function Pn(ce){var ue=ce.layout,pe=null;return function(ve){var Ce=ve.dragResult.addedIndex;if(Ce===pe)return null;pe=Ce;var Be=ue.getBeginEndOfContainer(),st=Be.begin;return Be.end,{shadowBeginEnd:{rect:ue.getTopLeftOfElementBegin(st)}}}}function ns(ce){var ue=ce.layout,pe=ce.element,ve=ce.getOptions,Ce=null;return function(Be){var st=Be.dragResult,Je=st.elementSize,it=st.shadowBeginEnd,ze=st.addedIndex,Ke=st.dropPlaceholderContainer,Ye=ve();if(Ye.dropPlaceholder){var ft=typeof Ye.dropPlaceholder=="boolean"?{}:Ye.dropPlaceholder,ht=ft.animationDuration,nt=ft.className,Zt=ft.showOnTop;if(ze===null)return Ke&&Ce!==null&&pe.removeChild(Ke),Ce=null,{dropPlaceholderContainer:void 0};if(!Ke){var dt=document.createElement("div"),Ut=document.createElement("div");Ut.className=me,dt.className="".concat(Ee," ").concat(nt||le),(Ke=document.createElement("div")).className="".concat(te),Ke.style.position="absolute",ht!==void 0&&(Ke.style.transition="all ".concat(ht,"ms ease")),Ke.appendChild(Ut),Ut.appendChild(dt),ue.setSize(Ke.style,Je+"px"),Ke.style.pointerEvents="none",Zt?pe.appendChild(Ke):pe.insertBefore(Ke,pe.firstElementChild)}return Ce!==ze&&it.dropArea&&ue.setBegin(Ke.style,it.dropArea.begin-ue.getBeginEndOfContainer().begin+"px"),Ce=ze,{dropPlaceholderContainer:Ke}}return null}}function Xs(ce){var ue=Jn(ce);return function(pe){var ve=pe.draggableInfo,Ce=pe.dragResult;return ve.invalidateShadow?ue({draggableInfo:ve,dragResult:Ce}):null}}function In(ce){var ue=function(pe){var ve=pe.draggables,Ce=Zs({layout:pe.layout});return function(Be){var st=Be.dragResult,Je=st.shadowBeginEnd,it=st.pos;if(Je)return Je.begin+Je.beginAdjustment<=it&&Je.end>=it?null:it<Je.begin+Je.beginAdjustment?Ce(ve,it):it>Je.end?Ce(ve,it)+1:ve.length;var ze=Ce(ve,it,!0);return ze!==null?ze:ve.length}}(ce);return function(pe){var ve=pe.dragResult,Ce=null;return ve.pos!==null&&(Ce=ue({dragResult:ve}))===null&&(Ce=ve.addedIndex),{addedIndex:Ce}}}function os(){var ce=null;return function(ue){var pe=ue.dragResult,ve=pe.addedIndex,Ce=pe.shadowBeginEnd;ve!==ce&&ce!==null&&Ce&&(Ce.beginAdjustment=0),ce=ve}}function tl(ce){var ue=ce.element,pe=ce.draggables,ve=ce.layout,Ce=ce.getOptions,Be=null;return function(st){var Je=st.dragResult,it=Je.addedIndex,ze=Je.removedIndex,Ke=Je.elementSize;if(ze===null){if(it!==null){if(!Be){var Ye=ve.getBeginEndOfContainer();Ye.end=Ye.begin+ve.getSize(ue);var ft=ve.getScrollSize(ue)>ve.getSize(ue)?Ye.begin+ve.getScrollSize(ue)-ve.getScrollValue(ue):Ye.end,ht=0<pe.length?ve.getBeginEnd(pe[pe.length-1]).end-pe[pe.length-1][B]:Ye.begin;if(ft<ht+Ke){(Be=window.document.createElement("div")).className=C+" "+Ce().orientation;var nt=0<pe.length?Ke+ht-ft:Ke;return ve.setSize(Be.style,"".concat(nt,"px")),ue.appendChild(Be),ue[T]=Be,{containerBoxChanged:!0}}}}else if(Be){ve.setTranslation(Be,0);var Zt=Be;return Be=null,ue.removeChild(Zt),{containerBoxChanged:!(ue[T]=null)}}}}}function Gn(ce){var ue=ce.draggables,pe=ce.layout,ve=null,Ce=null;return function(Be){var st=Be.dragResult,Je=st.addedIndex,it=st.removedIndex,ze=st.elementSize;if(Je!==ve||it!==Ce){for(var Ke=0;Ke<ue.length;Ke++)if(Ke!==it){var Ye=ue[Ke],ft=0;it!==null&&it<Ke&&(ft-=ze),Je!==null&&Je<=Ke&&(ft+=ze),pe.setTranslation(Ye,ft)}return{addedIndex:ve=Je,removedIndex:Ce=it}}}}function Jn(ce){var ue=ce.draggables,pe=ce.layout,ve=null;return function(Ce){var Be=Ce.draggableInfo,st=Ce.dragResult,Je=st.addedIndex,it=st.removedIndex,ze=st.elementSize,Ke=st.pos,Ye=st.shadowBeginEnd;if(Ke===null)return{shadowBeginEnd:ve=null};if(Je===null||!Be.invalidateShadow&&Je===ve)return null;var ft=Je-1,ht=Number.MIN_SAFE_INTEGER,nt=0,Zt=0,dt=null,Ut=null;if(ft===it&&ft--,-1<ft){var wr=pe.getSize(ue[ft]);if(Ut=pe.getBeginEnd(ue[ft]),ze<wr){var ho=(wr-ze)/2;ht=Ut.end-ho}else ht=Ut.end;nt=Ut.end}else Ut={end:pe.getBeginEndOfContainer().begin},nt=pe.getBeginEndOfContainer().begin;var Rn=Number.MAX_SAFE_INTEGER,an=Je;if(an===it&&an++,an<ue.length){var Dn=pe.getSize(ue[an]);if(dt=pe.getBeginEnd(ue[an]),ze<Dn){var po=(Dn-ze)/2;Rn=dt.begin+po}else Rn=dt.begin;Zt=dt.begin}else dt={begin:pe.getContainerRectangles().rect.end},Zt=pe.getContainerRectangles().rect.end-pe.getContainerRectangles().rect.begin;var as=Ut&&dt?pe.getTopLeftOfElementBegin(Ut.end):null;return ve=Je,{shadowBeginEnd:{dropArea:{begin:nt,end:Zt},begin:ht,end:Rn,rect:as,beginAdjustment:Ye?Ye.beginAdjustment:0}}}}function ss(){var ce=null;return function(ue){var pe=ue.dragResult,ve=pe.pos,Ce=pe.addedIndex,Be=pe.shadowBeginEnd;if(ve!==null){if(Ce!=null&&ce===null){if(ve<Be.begin){var st=ve-Be.begin-5;Be.beginAdjustment=st}ce=Ce}}else ce=null}}function oi(ce){var ue=ce.getOptions,pe=!1,ve=ue();return function(Ce){var Be=!!Ce.dragResult.pos;Be!==pe&&((pe=Be)?ve.onDragEnter&&ve.onDragEnter():ve.onDragLeave&&ve.onDragLeave())}}function tr(ce){var ue=ce.getOptions,pe=null,ve=ue();return function(Ce){var Be=Ce.dragResult,st=Be.addedIndex,Je=Be.removedIndex,it=Ce.draggableInfo,ze=it.payload,Ke=it.element;if(ve.onDropReady&&st!==null&&pe!==st){var Ye=pe=st;Je!==null&&Je<st&&Ye--,ve.onDropReady({addedIndex:Ye,removedIndex:Je,payload:ze,element:Ke?Ke.firstElementChild:void 0})}}}function Mn(ce){return ce.getOptions().behaviour==="drop-zone"?si(ce)(ts,Ks,Gs,Js,rs,is,Pn,oi,tr):si(ce)(ts,Ks,Gs,Js,rs,Xs,In,os,tl,Gn,Jn,ns,ss,oi,tr)}function si(ce){return function(){for(var ue=arguments.length,pe=new Array(ue),ve=0;ve<ue;ve++)pe[ve]=arguments[ve];var Ce=pe.map(function(st){return st(ce)}),Be=null;return function(st){return Be=Ce.reduce(function(Je,it){return Object.assign(Je,it({draggableInfo:st,dragResult:Je}))},Be||{addedIndex:null,removedIndex:null,elementSize:null,pos:null,shadowBeginEnd:null})}}}function Ln(ce){return function(ue){var pe=Object.assign({},qe,ue),ve=null,Ce=null,Be=function(ft,ht){var nt=Mo(ft),Zt=ht();return Dr(ft,"".concat(H," ").concat(Zt.orientation)),{element:ft,draggables:nt,getOptions:ht,layout:xt(ft,Zt.orientation,Zt.animationDuration)}}(ce,Ye),st=Mn(Be),Je=Kn(Be),it=function(ft,ht){var nt=[];function Zt(){nt&&(nt.forEach(function(dt){return dt.removeEventListener("scroll",ht)}),window.removeEventListener("scroll",ht))}return function(){for(var dt=ft;dt;)(qt(dt,"x")||qt(dt,"y"))&&nt.push(dt),dt=dt.parentElement}(),{dispose:function(){Zt(),nt=null},start:function(){nt&&(nt.forEach(function(dt){return dt.addEventListener("scroll",ht)}),window.addEventListener("scroll",ht))},stop:Zt}}(ce,function(){Be.layout.invalidateRects(),ze()});function ze(){Ce!==null&&(Ce.invalidateShadow=!0,ve=st(Ce),Ce.invalidateShadow=!1)}function Ke(ft,ht){for(var nt=Mo(ht),Zt=0;Zt<nt.length;Zt++)ft[Zt]=nt[Zt];for(var dt=0;dt<ft.length-nt.length;dt++)ft.pop()}function Ye(){return pe}return{element:ce,draggables:Be.draggables,isDragRelevant:function(ft){var ht=ft.element,nt=ft.getOptions;return function(Zt,dt){var Ut=nt();if(Ut.shouldAcceptDrop)return Ut.shouldAcceptDrop(Zt.getOptions(),dt);var wr=Zt.getOptions();return Ut.behaviour!=="copy"&&Rr(ht,"."+v)!==Zt.element&&(Zt.element===ht||!(!wr.groupName||wr.groupName!==Ut.groupName))}}(Be),layout:Be.layout,dispose:function(ft){it.dispose(),function(ht){Vt.wrapChild&&Array.prototype.forEach.call(ht.children,function(nt){nt.nodeType===Node.ELEMENT_NODE&&Zi(nt,v)&&(ht.insertBefore(nt.firstElementChild,nt),ht.removeChild(nt))})}(ft.element)},prepareDrag:function(ft,ht){var nt=ft.element,Zt=Be.draggables;Ke(Zt,nt),ft.layout.invalidateRects(),Zt.forEach(function(dt){return es(dt,!0,Ye().animationDuration)}),it.start()},handleDrag:function(ft){return ve=st(Ce=ft)},handleDrop:function(ft){it.stop(),ve&&ve.dropPlaceholderContainer&&ce.removeChild(ve.dropPlaceholderContainer),Ce=null,st=Mn(Be),Je(ft,ve),ve=null},fireRemoveElement:function(){Je(Ce,Object.assign({},ve,{addedIndex:null}),!0),ve=null},getDragResult:function(){return ve},getTranslateCalculator:function(ft){return Gn(Be)(ft)},onTranslated:function(){ze()},setDraggables:function(){Ke(Be.draggables,ce)},getScrollMaxSpeed:function(){return Vt.maxScrollSpeed},shouldUseTransformForGhost:function(){return Vt.useTransformForGhost===!0},getOptions:Ye,setOptions:function(ft){var ht=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];pe=ht===!1?Object.assign({},qe,ft):Object.assign({},qe,pe,ft)}}}}var Vt=function(ce,ue){var pe=Ln(ce)(ue);return ce[P]=pe,Ri.register(pe),{dispose:function(){Ri.unregister(pe),pe.dispose(pe)},setOptions:function(ve,Ce){pe.setOptions(ve,Ce)}}};function vn(ce,ue,pe){Object.defineProperty(ce,pe,{set:function(ve){ue[pe]=ve},get:function(){return ue[pe]}})}Vt.wrapChild=!0,Vt.cancelDrag=function(){Ri.cancelDrag()},Vt.isDragging=function(){return Ri.isDragging()};function Oi(ce,ue){return console.warn('default export is deprecated. please use named export "smoothDnD"'),Vt(ce,ue)}Oi.cancelDrag=function(){Vt.cancelDrag()},Oi.isDragging=function(){return Vt.isDragging()},vn(Oi,Vt,"useTransformForGhost"),vn(Oi,Vt,"maxScrollSpeed"),vn(Oi,Vt,"wrapChild"),vn(Oi,Vt,"dropHandler"),_.smoothDnD=Vt,_.constants=De,_.dropHandlers=Tn,_.default=Oi,Object.defineProperty(_,"__esModule",{value:!0})})}(cc,cc.exports)),cc.exports}var dc=Jb();function $g(p){return p?typeof p=="string"||typeof p=="object"&&(typeof p.value=="string"||typeof p.value=="function"||typeof p.value=="object"):!0}function ey(p,d){const _=p.$props.tag;if(_){if(typeof _=="string"){const b={value:_};return d&&(b.props={class:d}),b}else if(typeof _=="object"){const b={value:_.value||"div",props:_.props||{}};return d&&(b.props.class?Array.isArray(b.props.class)?b.props.class.push(d):b.props.class=[d,b.props.class]:b.props.class=d),b}}return{value:"div"}}dc.smoothDnD.dropHandler=dc.dropHandlers.reactDropHandler().handler;dc.smoothDnD.wrapChild=!1;const vm={"drag-start":"onDragStart","drag-end":"onDragEnd",drop:"onDrop","drag-enter":"onDragEnter","drag-leave":"onDragLeave","drop-ready":"onDropReady"};var Xb=A.defineComponent({name:"Container",mounted(){const p=Object.assign({},this.$props);for(const d in vm)p[vm[d]]=_=>{this.$emit(d,_)};this.containerElement=this.$refs.container||this.$el,this.container=dc.smoothDnD(this.containerElement,p)},unmounted(){if(this.container)try{this.container.dispose()}catch{}},emits:["drop","drag-start","drag-end","drag-enter","drag-leave","drop-ready"],props:{orientation:{type:String,default:"vertical"},removeOnDropOut:{type:Boolean,default:!1},autoScrollEnabled:{type:Boolean,default:!0},animationDuration:{type:Number,default:250},behaviour:String,groupName:String,dragHandleSelector:String,nonDragAreaSelector:String,lockAxis:String,dragClass:String,dropClass:String,dragBeginDelay:Number,getChildPayload:Function,shouldAnimateDrop:Function,shouldAcceptDrop:Function,getGhostParent:Function,dropPlaceholder:[Object,Boolean],tag:{validator:$g,default:"div"}},render(){const p=ey(this);return A.h(p.value,Object.assign({},{ref:"container"},p.props),this.$slots.default())}}),Qb=A.defineComponent({name:"Draggable",props:{tag:{validator:$g,default:"div"}},render:function(){const p=ey(this,dc.constants.wrapperClass);return A.h(p.value,Object.assign({},p.props),this.$slots.default())}});function Yb(){const d=new URLSearchParams(window.location.search).get("layers");return d?d.split(","):[]}function $b(p){const d=new URLSearchParams(window.location.search);p.length>0?d.set("layers",p.join(",")):d.delete("layers");const _=`${window.location.pathname}?${d.toString()}`;window.history.replaceState({},"",_)}const e1={components:{VsLayersItem:Sb,ZoomInIcon:Cb,InfoIcon:Mb,TableIcon:zb,TrashIcon:Fb,DotsIcon:jb,ChevronRightIcon:Kb,Container:Xb,Draggable:Qb},props:{center:{type:Array,default:()=>[26.2516,50.6199]},zoom:{type:Number,default:12},map:{type:Object,default:()=>null},history:{type:Boolean,default:!1}},emits:["content-resize"],data(){return{layers:null,rawCatalog:null,categories:null,selectedCategory:"",search:"",activeView:"catalog",selectedLayers:[]}},computed:{searchedLayers(){return this.layers.filter(({name:p})=>p==null?void 0:p.toLowerCase().match(this.search.toLowerCase()))}},async mounted(){if(await this.getLayers(),this.categories=this.layersCategories(),this.history){const p=Yb();p.length>0&&this.layers&&(p.forEach(d=>{const _=this.layers.find(b=>String(b.id)===d);if(_&&!this.selectedLayers.find(b=>b.id===_.id)){const b={..._,visible:!0,opacity:100};this.selectedLayers.push(b),$o(this.map,b)}}),this.activeView="selected")}this._resizeObserver=new window.ResizeObserver(()=>{this.$emit("content-resize")}),this.$nextTick(()=>{const p=this.$el;p&&this._resizeObserver.observe(p)})},beforeUnmount(){this._resizeObserver&&this._resizeObserver.disconnect()},watch:{selectedLayers:{handler(p){this.history&&$b(p.map(d=>d.id))},deep:!0}},methods:{async getLayers(){try{const p=await Kr.get("/api/map-catalog"),d=(p.data.services||[]).filter(_=>_.service_type!=="other");this.layers=[...d,...p.data.rasters||[]],this.rawCatalog={...p.data,services:d}}catch(p){console.error("Помилка завантаження шарів:",p)}},layersCategories(){return this.rawCatalog?{Сервіси:this.rawCatalog.services||[],Растри:this.rawCatalog.rasters||[]}:{}},selectCategory(p){this.selectedCategory=this.selectedCategory===p?"":p},formatNumber(p){return Intl.NumberFormat("uk",{notation:"compact"}).format(p)},onEnter(){this.layers.filter(({name:p})=>p==null?void 0:p.toLowerCase().match(this.search.toLowerCase()))},clearSearch(){this.search=""},addToSelected(p){if(!this.selectedLayers.find(d=>d.id===p.id)){const d={...p,visible:!0,opacity:100};this.selectedLayers.unshift(d),$o(this.map,d)}},deleteLayer(p){const d=this.selectedLayers.findIndex(_=>_.id===p.id);d!==-1&&this.selectedLayers.splice(d,1),Qa(this.map,p.id)},async toggleLayerVisibility(p){try{p.visible?await $o(this.map,p):await Qa(this.map,p.id)}catch(d){console.error("Error toggling layer visibility:",d),p.visible=!p.visible}},onLayerOpacityChange(p){this.updateLayerOpacity(p)},updateLayerOpacity(p){if(this.map){const d=this.map.getStyle().layers.filter(b=>b.id.includes(p.id)),_=p.opacity/100;d.forEach(b=>{b.type==="fill"?(p.originalFillOpacity||(p.originalFillOpacity=this.map.getPaintProperty(b.id,"fill-opacity")||1),this.map.setPaintProperty(b.id,"fill-opacity",p.originalFillOpacity*_)):b.type==="raster"?this.map.setPaintProperty(b.id,"raster-opacity",_):b.type==="line"?this.map.setPaintProperty(b.id,"line-opacity",_):b.type==="circle"?(this.map.setPaintProperty(b.id,"circle-opacity",_),this.map.setPaintProperty(b.id,"circle-stroke-opacity",_)):b.type==="symbol"&&(this.map.setPaintProperty(b.id,"icon-opacity",_),this.map.setPaintProperty(b.id,"text-opacity",_))})}},async handleRemoveFromCatalog(p){const d=this.selectedLayers.find(_=>_.id===p.id);d!=null&&d.visible&&await Qa(this.map,p.id),this.deleteLayer(p)},clearSelectedLayers(){this.selectedLayers.forEach(async p=>{p.visible&&await Qa(this.map,p.id)}),this.selectedLayers=[]},zoomToLayer(p){this.fitBoundsByLayer(p)},showLayerInfo(p){},showLayerTable(p){},fitBoundsByLayer(p){p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4&&this.map&&this.map.fitBounds([[p.bbox[0],p.bbox[1]],[p.bbox[2],p.bbox[3]]],{padding:50,duration:0})},popoverActions(p){return[{label:"Збільшити до шару",icon:"ZoomInIcon",class:p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4?"text-gray-700 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"zoomToLayer",disabled:!(p&&p.bbox&&Array.isArray(p.bbox)&&p.bbox.length===4)},{label:"Інформація про шар",icon:"InfoIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerInfo",disabled:!0},{label:"Таблиця шару",icon:"TableIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerTable",disabled:!0},{divider:!0},{label:"Видалити шар",icon:"TrashIcon",class:"text-red-600 hover:bg-red-50",handler:"deleteLayer",disabled:!1}]},onDrop(p){const{removedIndex:d,addedIndex:_,payload:b}=p;if(d===null&&_===null)return;const k=[...this.selectedLayers];let P=b;if(d!==null&&(P=k.splice(d,1)[0]),_!==null&&k.splice(_,0,P),this.selectedLayers=k,this.map&&this.selectedLayers.length>1)for(let v=this.selectedLayers.length-1;v>=0;v--){const o=this.selectedLayers[v];o.visible&&this.map.getStyle().layers.find(B=>B.id.includes(o.id))&&this.map.getStyle().layers.forEach(B=>{B.id.includes(o.id)&&this.map.moveLayer(B.id)})}}}},t1={class:"w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm"},r1={class:"flex items-center justify-between mb-4"},i1={class:"flex items-center gap-2"},n1={class:"text-lg font-semibold text-gray-800"},o1={key:0},s1={key:1},a1={class:"flex mb-4 border-b border-gray-200"},l1={key:0},c1={class:"mb-4"},u1={class:"border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm"},h1={class:"flex items-center justify-between"},p1={class:"flex items-center gap-2 cursor-move"},d1=["onUpdate:modelValue","onChange"],f1={class:"text-gray-800 font-medium"},m1={class:"flex items-center gap-2"},g1={class:"relative"},y1={class:"flex items-center gap-2"},_1=["onUpdate:modelValue","onInput"],v1={class:"text-xs text-gray-600 whitespace-nowrap"},x1=["onClick"],b1={class:"relative"},w1={class:"w-48"},S1={key:0,class:"my-1 border-gray-200"},A1=["disabled","onClick"],k1={class:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Layer actions"},T1={key:0,class:"text-center text-[14px] text-[#4b5563]"},C1={class:"relative mt-[10px]"},E1={class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"},width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P1={key:0,class:"vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"},I1={key:0,class:"text-center text-[14px] text-[#4b5563]"},M1={key:0,class:"text-center text-[14px] text-[#4b5563]"},L1=["onClick"],R1={class:"flex items-center gap-x-3"},D1=["title"],z1={class:"text-xs opacity-60 text-[#4b5563]"};function B1(p,d,_,b,k,P){var T;const v=A.resolveComponent("VsPopover"),o=A.resolveComponent("DotsIcon"),B=A.resolveComponent("Draggable"),D=A.resolveComponent("Container"),L=A.resolveComponent("searchIcon"),H=A.resolveComponent("closeIcon"),M=A.resolveComponent("VsLayersItem"),C=A.resolveComponent("chevronRightIcon");return A.openBlock(),A.createElementBlock("div",t1,[A.createElementVNode("div",r1,[A.createElementVNode("div",i1,[d[6]||(d[6]=A.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-layers text-blue-600"},[A.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),A.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),A.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),A.createElementVNode("h2",n1,[A.createTextVNode(A.toDisplayString(k.activeView==="catalog"?"Каталог":"Вибрані шари")+" ",1),k.activeView==="catalog"?(A.openBlock(),A.createElementBlock("span",o1,"("+A.toDisplayString(((T=k.layers)==null?void 0:T.length)||0)+")",1)):(A.openBlock(),A.createElementBlock("span",s1,"("+A.toDisplayString(k.selectedLayers.length)+")",1))])]),A.createElementVNode("button",{class:"p-1 rounded-full hover:bg-gray-200 transition-colors","aria-label":"Reset layers",onClick:d[0]||(d[0]=(...N)=>P.clearSelectedLayers&&P.clearSelectedLayers(...N))},d[7]||(d[7]=[A.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-40ac73af><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-40ac73af></path><path d="M21 3v5h-5" data-v-40ac73af></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-40ac73af></path><path d="M8 16H3v5" data-v-40ac73af></path></svg>',1)]))]),A.createElementVNode("div",a1,[A.createElementVNode("button",{class:A.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="catalog"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:d[1]||(d[1]=N=>k.activeView="catalog")}," Каталог ",2),A.createElementVNode("button",{class:A.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="selected"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:d[2]||(d[2]=N=>k.activeView="selected")}," Вибрані шари ",2)]),k.activeView==="selected"?(A.openBlock(),A.createElementBlock("div",l1,[A.createElementVNode("div",c1,[A.createElementVNode("button",{class:"flex items-center gap-2 text-blue-600 hover:text-blue-700 transition-colors px-3 py-2 rounded-md bg-blue-50 hover:bg-blue-100 w-full justify-center",onClick:d[3]||(d[3]=N=>k.activeView="catalog")},d[8]||(d[8]=[A.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-plus"},[A.createElementVNode("path",{d:"M5 12h14"}),A.createElementVNode("path",{d:"M12 5v14"})],-1),A.createElementVNode("span",null,"Вибрати шар",-1)]))]),(A.openBlock(),A.createBlock(D,{onDrop:P.onDrop,lockAxis:"y","drag-class":"dragging",key:k.selectedLayers.length,class:"space-y-2 max-h-[400px] overflow-y-auto pr-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},{default:A.withCtx(()=>[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(k.selectedLayers,(N,G)=>(A.openBlock(),A.createBlock(B,{key:N.id||G,payload:N},{default:A.withCtx(()=>[A.createElementVNode("div",u1,[A.createElementVNode("div",h1,[A.createElementVNode("div",p1,[d[9]||(d[9]=A.createElementVNode("svg",{width:"16",height:"16",fill:"none",stroke:"#9ca3af","stroke-width":"2",viewBox:"0 0 24 24",class:"mr-1 shrink-0"},[A.createElementVNode("circle",{cx:"5",cy:"5",r:"1.5"}),A.createElementVNode("circle",{cx:"5",cy:"12",r:"1.5"}),A.createElementVNode("circle",{cx:"5",cy:"19",r:"1.5"}),A.createElementVNode("circle",{cx:"12",cy:"5",r:"1.5"}),A.createElementVNode("circle",{cx:"12",cy:"12",r:"1.5"}),A.createElementVNode("circle",{cx:"12",cy:"19",r:"1.5"}),A.createElementVNode("circle",{cx:"19",cy:"5",r:"1.5"}),A.createElementVNode("circle",{cx:"19",cy:"12",r:"1.5"}),A.createElementVNode("circle",{cx:"19",cy:"19",r:"1.5"})],-1)),A.withDirectives(A.createElementVNode("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500","onUpdate:modelValue":ie=>N.visible=ie,onChange:ie=>P.toggleLayerVisibility(N)},null,40,d1),[[A.vModelCheckbox,N.visible]]),A.createElementVNode("span",f1,A.toDisplayString(N.name||N.title||N.label),1)]),A.createElementVNode("div",m1,[A.createElementVNode("div",g1,[A.createVNode(v,{placement:"bottom"},{reference:A.withCtx(()=>[A.createElementVNode("div",{class:"text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",onClick:ie=>P.updateLayerOpacity(N)},A.toDisplayString(N.opacity||100)+"% ",9,x1)]),default:A.withCtx(()=>[A.createElementVNode("div",y1,[d[10]||(d[10]=A.createElementVNode("label",{class:"text-gray-600 whitespace-nowrap"},"Прозорість:",-1)),A.withDirectives(A.createElementVNode("input",{type:"range",min:"0",max:"100",step:"1","onUpdate:modelValue":ie=>N.opacity=ie,onInput:ie=>P.onLayerOpacityChange(N),class:"h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"},null,40,_1),[[A.vModelText,N.opacity]]),A.createElementVNode("span",v1,A.toDisplayString(Math.round(N.opacity))+"% ",1)])]),_:2},1024)]),A.createElementVNode("div",b1,[A.createVNode(v,{placement:"bottom"},{reference:A.withCtx(()=>[A.createElementVNode("div",k1,[A.createVNode(o)])]),default:A.withCtx(()=>[A.createElementVNode("div",w1,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(P.popoverActions(N),(ie,le)=>(A.openBlock(),A.createElementBlock(A.Fragment,{key:le},[ie.divider?(A.openBlock(),A.createElementBlock("hr",S1)):(A.openBlock(),A.createElementBlock("button",{key:1,class:A.normalizeClass("w-full p-2 text-left text-sm flex items-center gap-2 "+(ie.class||"")),disabled:ie.disabled,onClick:Ee=>!ie.disabled&&p.$options.methods[ie.handler].call(this,N)},[(A.openBlock(),A.createBlock(A.resolveDynamicComponent(ie.icon),{class:"lucide"})),A.createTextVNode(" "+A.toDisplayString(ie.label),1)],10,A1))],64))),128))])]),_:2},1024)])])])])]),_:2},1032,["payload"]))),128)),k.selectedLayers.length===0?(A.openBlock(),A.createElementBlock("div",T1,d[11]||(d[11]=[A.createElementVNode("p",null,'Щоб додати шар, натисніть на кнопку "Вибрати шар".',-1)]))):A.createCommentVNode("",!0)]),_:1},8,["onDrop"]))])):(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[A.createElementVNode("div",C1,[(A.openBlock(),A.createElementBlock("svg",E1,d[12]||(d[12]=[A.createElementVNode("path",{d:"M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),A.createElementVNode("path",{d:"M13.9995 14.5L11.1328 11.6333",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))),A.withDirectives(A.createElementVNode("input",{title:"value",placeholder:"Введіть назву шару...","onUpdate:modelValue":d[4]||(d[4]=N=>k.search=N),type:"text",class:"py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",onKeyup:d[5]||(d[5]=A.withKeys((...N)=>P.onEnter&&P.onEnter(...N),["enter"]))},null,544),[[A.vModelText,k.search]]),A.createVNode(L,{class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"}}),k.search?(A.openBlock(),A.createBlock(H,{key:0,class:"absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",style:{transform:"translate(0, -50%)"},onClick:P.clearSearch},null,8,["onClick"])):A.createCommentVNode("",!0)]),k.categories?(A.openBlock(),A.createElementBlock("div",P1,[k.search?(A.openBlock(),A.createElementBlock(A.Fragment,{key:0},[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(P.searchedLayers,(N,G)=>(A.openBlock(),A.createBlock(M,{key:G,layer:N,map:_.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128)),P.searchedLayers.length===0?(A.openBlock(),A.createElementBlock("div",I1," Нічого не знайдено ")):A.createCommentVNode("",!0)],64)):(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[!k.categories||Object.keys(k.categories).length===0?(A.openBlock(),A.createElementBlock("div",M1," Каталог порожній ")):(A.openBlock(!0),A.createElementBlock(A.Fragment,{key:1},A.renderList(Object.keys(k.categories),N=>(A.openBlock(),A.createElementBlock("div",{key:N},[A.createElementVNode("div",{class:"hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",onClick:G=>P.selectCategory(N)},[A.createElementVNode("div",R1,[A.createVNode(C,{class:A.normalizeClass({"rotate-up":N===k.selectedCategory,"rotate-down":N!==k.selectedCategory})},null,8,["class"]),A.createElementVNode("div",{class:"max-w-[260px] text-[14px] text-[#4b5563]",title:N},A.toDisplayString(N),9,D1)]),A.createElementVNode("div",z1,A.toDisplayString(P.formatNumber(k.categories[N].length)),1)],8,L1),A.withDirectives(A.createElementVNode("div",null,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(k.categories[N],(G,ie)=>(A.openBlock(),A.createBlock(M,{key:ie,layer:G,map:_.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128))],512),[[A.vShow,N===k.selectedCategory]])]))),128))],64))])):A.createCommentVNode("",!0)],64))])}const V1=Hr(e1,[["render",B1],["__scopeId","data-v-40ac73af"]]);function sd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ws=sd();function ty(p){Ws=p}var uc={exec:()=>null};function vr(p,d=""){let _=typeof p=="string"?p:p.source;const b={replace:(k,P)=>{let v=typeof P=="string"?P:P.source;return v=v.replace(Hi.caret,"$1"),_=_.replace(k,v),b},getRegex:()=>new RegExp(_,d)};return b}var Hi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:p=>new RegExp(`^( {0,3}${p})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}#`),htmlBeginRegex:p=>new RegExp(`^ {0,${Math.min(3,p-1)}}<(?:[a-z].*>|!--)`,"i")},O1=/^(?:[ \t]*(?:\n|$))+/,F1=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,N1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,q1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ad=/(?:[*+-]|\d{1,9}[.)])/,ry=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iy=vr(ry).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),U1=vr(ry).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ld=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,j1=/^[^\n]+/,cd=/(?!\s*\])(?:\\.|[^\[\]\\])+/,H1=vr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),W1=vr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ad).getRegex(),_h="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ud=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Z1=vr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ud).replace("tag",_h).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ny=vr(ld).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex(),K1=vr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ny).getRegex(),hd={blockquote:K1,code:F1,def:H1,fences:N1,heading:q1,hr:gc,html:Z1,lheading:iy,list:W1,newline:O1,paragraph:ny,table:uc,text:j1},xm=vr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex(),G1={...hd,lheading:U1,table:xm,paragraph:vr(ld).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex()},J1={...hd,html:vr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ud).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vr(ld).replace("hr",gc).replace("heading",` *#{1,6} *[^
747
747
  ]`).replace("lheading",iy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},X1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Q1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oy=/^( {2,}|\\)\n(?!\s*$)/,Y1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vh=/[\p{P}\p{S}]/u,pd=/[\s\p{P}\p{S}]/u,sy=/[^\s\p{P}\p{S}]/u,$1=vr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,pd).getRegex(),ay=/(?!~)[\p{P}\p{S}]/u,ew=/(?!~)[\s\p{P}\p{S}]/u,tw=/(?:[^\s\p{P}\p{S}]|~)/u,rw=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,ly=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,iw=vr(ly,"u").replace(/punct/g,vh).getRegex(),nw=vr(ly,"u").replace(/punct/g,ay).getRegex(),cy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ow=vr(cy,"gu").replace(/notPunctSpace/g,sy).replace(/punctSpace/g,pd).replace(/punct/g,vh).getRegex(),sw=vr(cy,"gu").replace(/notPunctSpace/g,tw).replace(/punctSpace/g,ew).replace(/punct/g,ay).getRegex(),aw=vr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,sy).replace(/punctSpace/g,pd).replace(/punct/g,vh).getRegex(),lw=vr(/\\(punct)/,"gu").replace(/punct/g,vh).getRegex(),cw=vr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),uw=vr(ud).replace("(?:-->|$)","-->").getRegex(),hw=vr("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",uw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sh=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pw=vr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uy=vr(/^!?\[(label)\]\[(ref)\]/).replace("label",sh).replace("ref",cd).getRegex(),hy=vr(/^!?\[(ref)\](?:\[\])?/).replace("ref",cd).getRegex(),dw=vr("reflink|nolink(?!\\()","g").replace("reflink",uy).replace("nolink",hy).getRegex(),dd={_backpedal:uc,anyPunctuation:lw,autolink:cw,blockSkip:rw,br:oy,code:Q1,del:uc,emStrongLDelim:iw,emStrongRDelimAst:ow,emStrongRDelimUnd:aw,escape:X1,link:pw,nolink:hy,punctuation:$1,reflink:uy,reflinkSearch:dw,tag:hw,text:Y1,url:uc},fw={...dd,link:vr(/^!?\[(label)\]\((.*?)\)/).replace("label",sh).getRegex(),reflink:vr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sh).getRegex()},$p={...dd,emStrongRDelimAst:sw,emStrongLDelim:nw,url:vr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},mw={...$p,br:vr(oy).replace("{2,}","*").getRegex(),text:vr($p.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Au={normal:hd,gfm:G1,pedantic:J1},nc={normal:dd,gfm:$p,breaks:mw,pedantic:fw},gw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bm=p=>gw[p];function lo(p,d){if(d){if(Hi.escapeTest.test(p))return p.replace(Hi.escapeReplace,bm)}else if(Hi.escapeTestNoEncode.test(p))return p.replace(Hi.escapeReplaceNoEncode,bm);return p}function wm(p){try{p=encodeURI(p).replace(Hi.percentDecode,"%")}catch{return null}return p}function Sm(p,d){var P;const _=p.replace(Hi.findPipe,(v,o,B)=>{let D=!1,L=o;for(;--L>=0&&B[L]==="\\";)D=!D;return D?"|":" |"}),b=_.split(Hi.splitPipe);let k=0;if(b[0].trim()||b.shift(),b.length>0&&!((P=b.at(-1))!=null&&P.trim())&&b.pop(),d)if(b.length>d)b.splice(d);else for(;b.length<d;)b.push("");for(;k<b.length;k++)b[k]=b[k].trim().replace(Hi.slashPipe,"|");return b}function oc(p,d,_){const b=p.length;if(b===0)return"";let k=0;for(;k<b&&p.charAt(b-k-1)===d;)k++;return p.slice(0,b-k)}function yw(p,d){if(p.indexOf(d[1])===-1)return-1;let _=0;for(let b=0;b<p.length;b++)if(p[b]==="\\")b++;else if(p[b]===d[0])_++;else if(p[b]===d[1]&&(_--,_<0))return b;return _>0?-2:-1}function Am(p,d,_,b,k){const P=d.href,v=d.title||null,o=p[1].replace(k.other.outputLinkReplace,"$1");b.state.inLink=!0;const B={type:p[0].charAt(0)==="!"?"image":"link",raw:_,href:P,title:v,text:o,tokens:b.inlineTokens(o)};return b.state.inLink=!1,B}function _w(p,d,_){const b=p.match(_.other.indentCodeCompensation);if(b===null)return d;const k=b[1];return d.split(`
748
748
  `).map(P=>{const v=P.match(_.other.beginningSpace);if(v===null)return P;const[o]=v;return o.length>=k.length?P.slice(k.length):P}).join(`
749
749
  `)}var ah=class{constructor(p){Lr(this,"options");Lr(this,"rules");Lr(this,"lexer");this.options=p||Ws}space(p){const d=this.rules.block.newline.exec(p);if(d&&d[0].length>0)return{type:"space",raw:d[0]}}code(p){const d=this.rules.block.code.exec(p);if(d){const _=d[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?_:oc(_,`
@@ -842,4 +842,4 @@ Expecting `+lt.join(", ")+", got '"+(this.terminals_[Ee]||Ee)+"'":vt="Parse erro
842
842
  </div>
843
843
  `},At=yt=>({legend:_v,basemaps:Sv,layers:Jv,info:n0,attribute:pb,catalog:V1,filters:s2,"inline-filters":h2,list:w2,card:Yg})[yt],_t=A.computed(()=>{var yt;return(yt=d.config.widgets)==null?void 0:yt.some(xt=>xt.type==="filters")}),lt=yt=>{P.value=yt};function vt(){const yt=new URLSearchParams(window.location.search),xt=parseFloat(yt.get("x")),ct=parseFloat(yt.get("y")),Bt=parseFloat(yt.get("z")),Ht=parseFloat(yt.get("bearing")),Ot=parseFloat(yt.get("pitch"));return{center:isFinite(xt)&&isFinite(ct)?[xt,ct]:null,zoom:isFinite(Bt)?Bt:null,bearing:isFinite(Ht)?Ht:null,pitch:isFinite(Ot)?Ot:null}}function qt({center:yt,zoom:xt,bearing:ct,pitch:Bt}){const Ht=new URLSearchParams(window.location.search);Ht.set("x",yt[0].toFixed(5)),Ht.set("y",yt[1].toFixed(5)),Ht.set("z",xt.toFixed(2)),Ht.set("bearing",ct.toFixed(2)),Ht.set("pitch",Bt.toFixed(2));const Ot=`${window.location.pathname}?${Ht.toString()}`;window.history.replaceState({},"",Ot)}const Xt=()=>{var Ot,pr;const yt={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};let xt=d.config.map.center,ct=d.config.map.zoom,Bt=d.config.map.bearing||0,Ht=d.config.map.pitch||0;if(d.config.history){const Nt=vt();Nt.center&&(xt=Nt.center),Nt.zoom!==null&&(ct=Nt.zoom),Nt.bearing!==null&&(Bt=Nt.bearing),Nt.pitch!==null&&(Ht=Nt.pitch)}if(_.value=new Zp.Map({container:"maplibre-demo-map",style:yt,center:xt,zoom:ct,bearing:Bt,pitch:Ht,maxBounds:[18.0856083513,40.3614785833,58.0807890155,56.3350745713]}),(pr=(Ot=d.config.interactions)==null?void 0:Ot.navigation)!=null&&pr.enabled){const Nt=new Zp.NavigationControl({showCompass:!0,showZoom:!0,visualizePitch:!0});_.value.addControl(Nt,"top-right")}_.value.on("load",async()=>{var Nt,mr,Ur,mi;try{await t2(_.value);const Ir=vt(),gi=Ir.center&&Ir.zoom!==null;if((Nt=d.config.map)!=null&&Nt.bbox&&!gi){const[hr,lr,Ft,br]=d.config.map.bbox;_.value.fitBounds([[hr,lr],[Ft,br]],{padding:50,duration:0})}if(await(async()=>{var lr,Ft,br;const hr=((br=(Ft=(lr=d.config.widgets.find(dr=>dr.type==="layers"))==null?void 0:lr.config)==null?void 0:Ft.layers)==null?void 0:br.filter(dr=>{var Jt;return((Jt=dr.style)==null?void 0:Jt.attrType)==="icon-by-attribute"}))||[];for(const dr of hr){const{rules:Jt,default_icon:fr,icon_base_url:It}=dr.style,wt=[...Jt.map(Ae=>Ae.icon),fr].filter(Boolean);for(const Ae of wt)try{const K=`${It}${Ae}`,Q=await _.value.loadImage(K);_.value.hasImage(Ae)||_.value.addImage(Ae,Q.data)}catch(K){console.error(`Failed to load icon: ${Ae}`,K)}}})(),$o(_.value,{id:"voyager",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",title:"Базова карта (voyager)",service:"raster",attribution:"&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, &copy; <a href='https://carto.com/attributions'>CARTO</a>"}),(mi=(Ur=(mr=d.config)==null?void 0:mr.interactions)==null?void 0:Ur.hover)!=null&&mi.enabled&&(_.value.on("mousemove",hr=>{var fr,It,wt,Ae;const lr=_.value.queryRenderedFeatures(hr.point);if(_.value&&_.value.getCanvas&&(_.value.getCanvas().style.cursor=lr.length?"pointer":""),!lr.length){if(v.value){const K=(fr=_.value.getSource(v.value.source))==null?void 0:fr.type,Q={source:v.value.source,id:v.value.id};K==="vector"&&(Q.sourceLayer=v.value.source),Rr(_.value,v.value.source,v.value.id,{hovered:!1}),v.value=null}k&&(k.remove(),k=null);return}const Ft=lr[0];if(!v.value||v.value.id!==Ft.id||v.value.source!==Ft.layer.source){if(v.value){const ee=(It=_.value.getSource(v.value.source))==null?void 0:It.type,he={source:v.value.source,id:v.value.id};ee==="vector"&&(he.sourceLayer=v.value.source),Rr(_.value,v.value.source,v.value.id,{hovered:!1})}const K=(wt=_.value.getSource(Ft.layer.source))==null?void 0:wt.type,Q={source:Ft.layer.source,id:Ft.id};K==="vector"&&(Q.sourceLayer=Ft.layer.source),Rr(_.value,Ft.layer.source,Ft.id,{hovered:!0}),v.value={source:Ft.layer.source,id:Ft.id}}const br=d.config.widgets.find(K=>K.type==="layers"),dr=d.config.widgets.find(K=>K.type==="attribute");let Jt=null;if(br&&(Jt=br.config.layers.find(K=>K.id===Ft.layer.source)),!Jt&&dr&&dr.config.layer.id===Ft.layer.source&&(Jt=dr.config.layer),(Ae=Jt==null?void 0:Jt.style)!=null&&Ae.popup){const K=Jt.style.popup;let Q=K.title,ee="";K.mode==="markdown"?ee=Array.isArray(K.content)?K.content.join(`
844
844
 
845
- `):"":ee=Array.isArray(K.content)?K.content.join(""):"",k||(k=document.createElement("div"),_.value.getContainer().appendChild(k));const he=_.value.project(hr.lngLat);k.innerHTML=rt(Q,ee,K.fields,Ft.properties,K.mode,he)}}),_.value.on("mouseleave",()=>{var hr;if(k&&(k.remove(),k=null),v.value){const lr=(hr=_.value.getSource(v.value.source))==null?void 0:hr.type,Ft={source:v.value.source,id:v.value.id};lr==="vector"&&(Ft.sourceLayer=v.value.source),Rr(_.value,v.value.source,v.value.id,{hovered:!1}),v.value=null}_.value&&_.value.getCanvas&&(_.value.getCanvas().style.cursor="")})),_.value.on("click",async hr=>{var wt;if(["length","area","print"].includes(L.value))return;const lr=_.value.queryRenderedFeatures(hr.point);if(!lr.length)return;o.value.forEach(Ae=>{var ee;const K=(ee=_.value.getSource(Ae.source))==null?void 0:ee.type,Q={source:Ae.source,id:Ae.id};K==="vector"&&(Q.sourceLayer=Ae.source),Rr(_.value,Ae.source,Ae.id,{selected:!1})}),o.value=[];const Ft=lr[0],br=(wt=_.value.getSource(Ft.layer.source))==null?void 0:wt.type,dr={source:Ft.layer.source,id:Ft.id};br==="vector"&&(dr.sourceLayer=Ft.layer.source),Rr(_.value,Ft.layer.source,Ft.id,{selected:!0}),o.value.push({source:Ft.layer.source,id:Ft.id});const Jt=d.config.widgets.find(Ae=>Ae.type==="layers"),fr=d.config.widgets.find(Ae=>Ae.type==="attribute");let It=(fr==null?void 0:fr.config.layer)||(Jt==null?void 0:Jt.config.layers.find(Ae=>Ae.id===Ft.layer.source));D.value={layer:(It==null?void 0:It.service_key)||"",map:(It==null?void 0:It.map_key)||"",id:Ft.properties.id,title:(It==null?void 0:It.title)||""}}),_.value.on("dblclick",hr=>{var br;if(["length","area","print"].includes(L.value))return;Wr([hr.lngLat.lng,hr.lngLat.lat]);const lr=d.config.widgets.find(dr=>dr.type==="layers");let Ft=null;(br=lr==null?void 0:lr.config)!=null&&br.layers&&(Ft=lr.config.layers.find(dr=>dr.visible!==!1&&["tms","wms","raster"].includes((dr.service_type||dr.service||"").toLowerCase()))),D.value={layer:(Ft==null?void 0:Ft.map_key)||"",map:(Ft==null?void 0:Ft.service_key)||"",id:"",title:(Ft==null?void 0:Ft.title)||""}}),_.value.resize(),b.value=!0,d.config.history){const hr=()=>{const lr=_.value.getCenter();qt({center:[lr.lng,lr.lat],zoom:_.value.getZoom(),bearing:_.value.getBearing(),pitch:_.value.getPitch()})};_.value.on("moveend",hr),_.value.on("rotate",hr),_.value.on("pitch",hr)}}catch(Ir){console.error("Error loading map:",Ir)}})},kr=()=>{Si(),o.value.forEach(yt=>{_.value&&Rr(_.value,yt.source,yt.id,{selected:!1})}),o.value=[],D.value=null};A.onMounted(async()=>{await A.nextTick(),Xt(),me(),window.addEventListener("resize",()=>{me()}),A.watch([M["top-left"],M["top-right"],M["top-center"],M.center,M["bottom-left"],M["bottom-right"],M["bottom-center"],()=>d.config.widgets,B],async()=>{await A.nextTick(),me(),setTimeout(me,0)},{deep:!0}),A.watch(b,yt=>{yt&&A.nextTick().then(()=>{me()})})}),A.onUnmounted(()=>{window.removeEventListener("resize",me)});const xr=A.computed(()=>{var xt;return{height:d.config.height||((xt=d.config.map)==null?void 0:xt.height)||"100vh",width:"100%"}}),ni=yt=>{var ct;const xt=(ct=d.config.widgets)==null?void 0:ct.find(Bt=>Bt.position===yt);return(xt==null?void 0:xt.width)||"400px"},ir=A.ref([]),Wi=()=>{var xt;const yt=d.config.widgets.find(ct=>ct.type==="layers");return(xt=yt==null?void 0:yt.config)!=null&&xt.layers?yt.config.layers.map(ct=>({...ct,visible:ct.visible??!1})).filter(ct=>ct.visible).map(ct=>ct.id):[]};ir.value=Wi();function Rr(yt,xt,ct,Bt){yt.getStyle().layers.filter(Ot=>Ot.source===xt).forEach(Ot=>{var Nt;const pr={source:xt,id:ct};((Nt=yt.getSource(xt))==null?void 0:Nt.type)==="vector"&&Ot["source-layer"]&&(pr.sourceLayer=Ot["source-layer"]),yt.setFeatureState(pr,Bt)})}const Zi=A.computed(()=>{var yt,xt;return!!((xt=(yt=d.config.interactions)==null?void 0:yt.navigation)!=null&&xt.enabled)}),Dr=A.computed(()=>Array.isArray(d.config.tools)&&d.config.tools.length>0),on=A.computed(()=>Zi.value||Dr.value?"70px":"20px");function Si(){_.value&&(_.value.getLayer("layer-with-pulsing-dot")&&_.value.removeLayer("layer-with-pulsing-dot"),_.value.getSource("dot-point")&&_.value.removeSource("dot-point"),_.value.hasImage&&_.value.hasImage("pulsing-dot")&&_.value.removeImage("pulsing-dot"))}function Wr(yt){var Bt,Ht,Ot,pr;Si();const xt=80,ct={width:xt,height:xt,data:new Uint8Array(xt*xt*4),onAdd(){const Nt=document.createElement("canvas");Nt.width=this.width,Nt.height=this.height,this.context=Nt.getContext("2d",{willReadFrequently:!0})},render(){var Bi;const mr=performance.now()%2e3/2e3,Ur=xt/2*.3,mi=xt/2*.7*mr+Ur,{context:Ir}=this;Ir.clearRect(0,0,this.width,this.height),Ir.beginPath(),Ir.arc(this.width/2,this.height/2,mi,0,Math.PI*2),Ir.fillStyle=`rgba(255, 100, 100, ${1-mr})`,Ir.fill();const gi=xt/2*.7*(mr-.5<0?mr-.5+1:mr-.5)+Ur;return Ir.beginPath(),Ir.arc(this.width/2,this.height/2,gi,0,Math.PI*2),Ir.fillStyle=`rgba(255, 100, 100, ${1-(mr-.5<0?mr-.5+1:mr-.5)})`,Ir.fill(),this.data=Ir.getImageData(0,0,this.width,this.height).data,(Bi=_.value)==null||Bi.triggerRepaint(),!0}};(Bt=_.value)!=null&&Bt.hasImage("pulsing-dot")||(Ht=_.value)==null||Ht.addImage("pulsing-dot",ct,{pixelRatio:2}),(Ot=_.value)==null||Ot.addSource("dot-point",{type:"geojson",data:{type:"Feature",geometry:{type:"Point",coordinates:yt}}}),(pr=_.value)==null||pr.addLayer({id:"layer-with-pulsing-dot",type:"symbol",source:"dot-point",layout:{"icon-image":"pulsing-dot"},paint:{"icon-opacity":.6}})}const Ki=A.computed(()=>({center:d.config.map.center,zoom:d.config.map.zoom,pitch:d.config.map.pitch||0,bearing:d.config.map.bearing||0,bbox:d.config.map.bbox||null})),Yr={home:L2,print:F2,geolocation:cS,pitch:U2,length:FS,area:eA},Gi=yt=>{L.value=yt};function Mi(yt){const{map_key:xt,service_key:ct}=d.config.widgets.find(Bt=>Bt.type==="list").config;xt&&ct&&(D.value={id:yt,map:xt,layer:ct})}function Tn(yt){switch(yt){case"top-left":return T.value;case"top-right":return N.value;case"top-center":return G.value;case"center":return ie.value;case"bottom-left":return le.value;case"bottom-right":return Ee.value;case"bottom-center":return te.value;default:return 0}}const fi=A.computed(()=>{var yt;return((yt=d.config.widgets)==null?void 0:yt.filter(xt=>xt.position==="absolute"))||[]});return(yt,xt)=>(A.openBlock(),A.createElementBlock("div",{id:"maplibre-demo-map",style:A.normalizeStyle(xr.value)},[b.value?A.createCommentVNode("",!0):(A.openBlock(),A.createBlock(k2,{key:0})),A.withDirectives(A.createElementVNode("div",iA,[(A.openBlock(),A.createElementBlock(A.Fragment,null,A.renderList(H,ct=>A.createVNode(rA,{key:ct,position:ct,widgets:De(ct),map:_.value,mapLoaded:b.value,cardValues:D.value,hasFilters:_t.value,history:d.config.history,currentFilterLayer:P.value,enabledLayerIds:ir.value,getWidgetComponent:At,getColumnWidth:ni,rightColumnOffset:ct==="top-right"?on.value:void 0,maxHeight:Tn(ct),ref_for:!0,ref:Bt=>C(ct,Bt),onSetFilterLayer:lt,"onUpdate:enabledLayerIds":xt[0]||(xt[0]=Bt=>ir.value=Bt),onCardValuesId:Mi,onCloseCard:kr,onContentResize:()=>me(ct)},null,8,["position","widgets","map","mapLoaded","cardValues","hasFilters","history","currentFilterLayer","enabledLayerIds","rightColumnOffset","maxHeight","onContentResize"])),64)),A.createElementVNode("div",nA,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.config.tools,ct=>(A.openBlock(),A.createElementBlock(A.Fragment,{key:ct},[b.value&&Yr[ct]?(A.openBlock(),A.createBlock(A.resolveDynamicComponent(Yr[ct]),A.mergeProps({key:0,map:_.value,activeTool:L.value,setActiveTool:Gi},{ref_for:!0},ct==="home"?{initialView:Ki.value}:{},{onCardValuesId:Mi}),null,16,["map","activeTool"])):A.createCommentVNode("",!0)],64))),128))])],512),[[A.vShow,b.value]]),(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(fi.value,(ct,Bt)=>(A.openBlock(),A.createElementBlock("div",{key:"abs-"+(ct.id||ct.type||Bt),class:"absolute z-20",style:A.normalizeStyle(ct.style)},[(A.openBlock(),A.createBlock(A.resolveDynamicComponent(At(ct.type)),{map:_.value,config:ct.config,hasFilters:_t.value,currentFilterLayer:P.value,enabledLayerIds:ir.value,cardValues:D.value,onSetFilterLayer:lt,"onUpdate:enabledLayerIds":xt[1]||(xt[1]=Ht=>ir.value=Ht),onCardValuesId:Mi,onCloseCard:kr},null,40,["map","config","hasFilters","currentFilterLayer","enabledLayerIds","cardValues"]))],4))),128))],4))}};exports.MapCustom=oA;
845
+ `):"":ee=Array.isArray(K.content)?K.content.join(""):"",k||(k=document.createElement("div"),_.value.getContainer().appendChild(k));const he=_.value.project(hr.lngLat);k.innerHTML=rt(Q,ee,K.fields,Ft.properties,K.mode,he)}}),_.value.on("mouseleave",()=>{var hr;if(k&&(k.remove(),k=null),v.value){const lr=(hr=_.value.getSource(v.value.source))==null?void 0:hr.type,Ft={source:v.value.source,id:v.value.id};lr==="vector"&&(Ft.sourceLayer=v.value.source),Rr(_.value,v.value.source,v.value.id,{hovered:!1}),v.value=null}_.value&&_.value.getCanvas&&(_.value.getCanvas().style.cursor="")})),_.value.on("click",async hr=>{var wt;if(["length","area","print"].includes(L.value))return;const lr=_.value.queryRenderedFeatures(hr.point);if(!lr.length)return;o.value.forEach(Ae=>{var ee;const K=(ee=_.value.getSource(Ae.source))==null?void 0:ee.type,Q={source:Ae.source,id:Ae.id};K==="vector"&&(Q.sourceLayer=Ae.source),Rr(_.value,Ae.source,Ae.id,{selected:!1})}),o.value=[];const Ft=lr[0],br=(wt=_.value.getSource(Ft.layer.source))==null?void 0:wt.type,dr={source:Ft.layer.source,id:Ft.id};br==="vector"&&(dr.sourceLayer=Ft.layer.source),Rr(_.value,Ft.layer.source,Ft.id,{selected:!0}),o.value.push({source:Ft.layer.source,id:Ft.id});const Jt=d.config.widgets.find(Ae=>Ae.type==="layers"),fr=d.config.widgets.find(Ae=>Ae.type==="attribute");let It=(fr==null?void 0:fr.config.layer)||(Jt==null?void 0:Jt.config.layers.find(Ae=>Ae.id===Ft.layer.source));D.value={layer:(It==null?void 0:It.service_key)||"",map:(It==null?void 0:It.map_key)||"",id:Ft.properties.id,title:(It==null?void 0:It.title)||""}}),_.value.on("dblclick",hr=>{var br;if(["length","area","print"].includes(L.value))return;Wr([hr.lngLat.lng,hr.lngLat.lat]);const lr=d.config.widgets.find(dr=>dr.type==="layers");let Ft=null;(br=lr==null?void 0:lr.config)!=null&&br.layers&&(Ft=lr.config.layers.find(dr=>dr.visible!==!1&&["tms","wms","raster"].includes((dr.service_type||dr.service||"").toLowerCase()))),D.value={layer:(Ft==null?void 0:Ft.map_key)||"",map:(Ft==null?void 0:Ft.service_key)||"",id:"",title:(Ft==null?void 0:Ft.title)||""}}),_.value.resize(),b.value=!0,d.config.history){const hr=()=>{const lr=_.value.getCenter();qt({center:[lr.lng,lr.lat],zoom:_.value.getZoom(),bearing:_.value.getBearing(),pitch:_.value.getPitch()})};_.value.on("moveend",hr),_.value.on("rotate",hr),_.value.on("pitch",hr)}}catch(Ir){console.error("Error loading map:",Ir)}})},kr=()=>{Si(),o.value.forEach(yt=>{_.value&&Rr(_.value,yt.source,yt.id,{selected:!1})}),o.value=[],D.value=null};A.onMounted(async()=>{await A.nextTick(),Xt(),me(),window.addEventListener("resize",()=>{me()}),A.watch([M["top-left"],M["top-right"],M["top-center"],M.center,M["bottom-left"],M["bottom-right"],M["bottom-center"],()=>d.config.widgets,B],async()=>{await A.nextTick(),me(),setTimeout(me,0)},{deep:!0}),A.watch(b,yt=>{yt&&A.nextTick().then(()=>{me()})})}),A.onUnmounted(()=>{window.removeEventListener("resize",me)});const xr=A.computed(()=>{var xt;return{height:d.config.height||((xt=d.config.map)==null?void 0:xt.height)||"100vh",width:"100%"}}),ni=yt=>{var ct;const xt=(ct=d.config.widgets)==null?void 0:ct.find(Bt=>Bt.position===yt);return(xt==null?void 0:xt.width)||"400px"},ir=A.ref([]),Wi=()=>{var xt;const yt=d.config.widgets.find(ct=>ct.type==="layers");return(xt=yt==null?void 0:yt.config)!=null&&xt.layers?yt.config.layers.map(ct=>({...ct,visible:ct.visible??!1})).filter(ct=>ct.visible).map(ct=>ct.id):[]};ir.value=Wi();function Rr(yt,xt,ct,Bt){yt.getStyle().layers.filter(Ot=>Ot.source===xt).forEach(Ot=>{var Nt;const pr={source:xt,id:ct};((Nt=yt.getSource(xt))==null?void 0:Nt.type)==="vector"&&Ot["source-layer"]&&(pr.sourceLayer=Ot["source-layer"]),yt.setFeatureState(pr,Bt)})}const Zi=A.computed(()=>{var yt,xt;return!!((xt=(yt=d.config.interactions)==null?void 0:yt.navigation)!=null&&xt.enabled)}),Dr=A.computed(()=>Array.isArray(d.config.tools)&&d.config.tools.length>0),on=A.computed(()=>Zi.value||Dr.value?"70px":"20px");function Si(){_.value&&(_.value.getLayer("layer-with-pulsing-dot")&&_.value.removeLayer("layer-with-pulsing-dot"),_.value.getSource("dot-point")&&_.value.removeSource("dot-point"),_.value.hasImage&&_.value.hasImage("pulsing-dot")&&_.value.removeImage("pulsing-dot"))}function Wr(yt){var Bt,Ht,Ot,pr;Si();const xt=80,ct={width:xt,height:xt,data:new Uint8Array(xt*xt*4),onAdd(){const Nt=document.createElement("canvas");Nt.width=this.width,Nt.height=this.height,this.context=Nt.getContext("2d",{willReadFrequently:!0})},render(){var Bi;const mr=performance.now()%2e3/2e3,Ur=xt/2*.3,mi=xt/2*.7*mr+Ur,{context:Ir}=this;Ir.clearRect(0,0,this.width,this.height),Ir.beginPath(),Ir.arc(this.width/2,this.height/2,mi,0,Math.PI*2),Ir.fillStyle=`rgba(255, 100, 100, ${1-mr})`,Ir.fill();const gi=xt/2*.7*(mr-.5<0?mr-.5+1:mr-.5)+Ur;return Ir.beginPath(),Ir.arc(this.width/2,this.height/2,gi,0,Math.PI*2),Ir.fillStyle=`rgba(255, 100, 100, ${1-(mr-.5<0?mr-.5+1:mr-.5)})`,Ir.fill(),this.data=Ir.getImageData(0,0,this.width,this.height).data,(Bi=_.value)==null||Bi.triggerRepaint(),!0}};(Bt=_.value)!=null&&Bt.hasImage("pulsing-dot")||(Ht=_.value)==null||Ht.addImage("pulsing-dot",ct,{pixelRatio:2}),(Ot=_.value)==null||Ot.addSource("dot-point",{type:"geojson",data:{type:"Feature",geometry:{type:"Point",coordinates:yt}}}),(pr=_.value)==null||pr.addLayer({id:"layer-with-pulsing-dot",type:"symbol",source:"dot-point",layout:{"icon-image":"pulsing-dot"},paint:{"icon-opacity":.6}})}const Ki=A.computed(()=>({center:d.config.map.center,zoom:d.config.map.zoom,pitch:d.config.map.pitch||0,bearing:d.config.map.bearing||0,bbox:d.config.map.bbox||null})),Yr={home:L2,print:F2,geolocation:cS,pitch:U2,length:FS,area:eA},Gi=yt=>{L.value=yt};function Mi(yt){const{map_key:xt,service_key:ct}=d.config.widgets.find(Bt=>Bt.type==="list").config;xt&&ct&&(D.value={id:yt,map:xt,layer:ct})}function Tn(yt){switch(yt){case"top-left":return T.value;case"top-right":return N.value;case"top-center":return G.value;case"center":return ie.value;case"bottom-left":return le.value;case"bottom-right":return Ee.value;case"bottom-center":return te.value;default:return 0}}const fi=A.computed(()=>{var yt;return((yt=d.config.widgets)==null?void 0:yt.filter(xt=>xt.position==="absolute"))||[]});return(yt,xt)=>(A.openBlock(),A.createElementBlock("div",{id:"maplibre-demo-map",style:A.normalizeStyle(xr.value)},[b.value?A.createCommentVNode("",!0):(A.openBlock(),A.createBlock(k2,{key:0})),A.withDirectives(A.createElementVNode("div",iA,[(A.openBlock(),A.createElementBlock(A.Fragment,null,A.renderList(H,ct=>A.createVNode(rA,{key:ct,position:ct,widgets:De(ct),map:_.value,mapLoaded:b.value,cardValues:D.value,hasFilters:_t.value,history:d.config.history,currentFilterLayer:P.value,enabledLayerIds:ir.value,getWidgetComponent:At,getColumnWidth:ni,rightColumnOffset:ct==="top-right"?on.value:void 0,maxHeight:Tn(ct),ref_for:!0,ref:Bt=>C(ct,Bt),onSetFilterLayer:lt,"onUpdate:enabledLayerIds":xt[0]||(xt[0]=Bt=>ir.value=Bt),onCardValuesId:Mi,onCloseCard:kr,onContentResize:()=>me(ct)},null,8,["position","widgets","map","mapLoaded","cardValues","hasFilters","history","currentFilterLayer","enabledLayerIds","rightColumnOffset","maxHeight","onContentResize"])),64)),A.createElementVNode("div",nA,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(p.config.tools,ct=>(A.openBlock(),A.createElementBlock(A.Fragment,{key:ct},[b.value&&Yr[ct]?(A.openBlock(),A.createBlock(A.resolveDynamicComponent(Yr[ct]),A.mergeProps({key:0,map:_.value,activeTool:L.value,setActiveTool:Gi},{ref_for:!0},ct==="home"?{initialView:Ki.value}:{},{onCardValuesId:Mi}),null,16,["map","activeTool"])):A.createCommentVNode("",!0)],64))),128))])],512),[[A.vShow,b.value]]),(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(fi.value,(ct,Bt)=>(A.openBlock(),A.createElementBlock("div",{key:"abs-"+(ct.id||ct.type||Bt),class:"absolute z-20",style:A.normalizeStyle(ct.style)},[(A.openBlock(),A.createBlock(A.resolveDynamicComponent(At(ct.type)),{map:_.value,config:ct.config,hasFilters:_t.value,currentFilterLayer:P.value,enabledLayerIds:ir.value,cardValues:D.value,onSetFilterLayer:lt,"onUpdate:enabledLayerIds":xt[1]||(xt[1]=Ht=>ir.value=Ht),onCardValuesId:Mi,onCloseCard:kr},null,40,["map","config","hasFilters","currentFilterLayer","enabledLayerIds","cardValues"]))],4))),128))],4))}},sA={install(p){p.component("MapCustom",oA)}};module.exports=sA;
@@ -23516,22 +23516,22 @@ ii.getAdapter = wy.getAdapter;
23516
23516
  ii.HttpStatusCode = vd;
23517
23517
  ii.default = ii;
23518
23518
  const {
23519
- Axios: qA,
23520
- AxiosError: UA,
23521
- CanceledError: NA,
23522
- isCancel: jA,
23523
- CancelToken: HA,
23524
- VERSION: WA,
23525
- all: ZA,
23526
- Cancel: KA,
23527
- isAxiosError: GA,
23528
- spread: JA,
23529
- toFormData: XA,
23530
- AxiosHeaders: QA,
23531
- HttpStatusCode: YA,
23532
- formToJSON: $A,
23533
- getAdapter: eT,
23534
- mergeConfig: tT
23519
+ Axios: UA,
23520
+ AxiosError: NA,
23521
+ CanceledError: jA,
23522
+ isCancel: HA,
23523
+ CancelToken: WA,
23524
+ VERSION: ZA,
23525
+ all: KA,
23526
+ Cancel: GA,
23527
+ isAxiosError: JA,
23528
+ spread: XA,
23529
+ toFormData: QA,
23530
+ AxiosHeaders: YA,
23531
+ HttpStatusCode: $A,
23532
+ formToJSON: eT,
23533
+ getAdapter: tT,
23534
+ mergeConfig: rT
23535
23535
  } = ii, pb = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden" }, db = {
23536
23536
  key: 0,
23537
23537
  class: "p-5 pb-3 flex justify-between items-center"
@@ -32701,7 +32701,7 @@ const MA = /* @__PURE__ */ ei(AA, [["render", IA], ["__scopeId", "data-v-024154e
32701
32701
  ], 64))), 128))
32702
32702
  ], 6)) : er("", !0);
32703
32703
  }
32704
- }, RA = /* @__PURE__ */ ei(LA, [["__scopeId", "data-v-b777fbc8"]]), DA = { class: "map-widgets" }, zA = { class: "absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]" }, rT = {
32704
+ }, RA = /* @__PURE__ */ ei(LA, [["__scopeId", "data-v-b777fbc8"]]), DA = { class: "map-widgets" }, zA = { class: "absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]" }, OA = {
32705
32705
  __name: "vs-map",
32706
32706
  props: {
32707
32707
  config: {
@@ -33305,7 +33305,11 @@ const MA = /* @__PURE__ */ ei(AA, [["render", IA], ["__scopeId", "data-v-024154e
33305
33305
  ], 4))), 128))
33306
33306
  ], 4));
33307
33307
  }
33308
+ }, iT = {
33309
+ install(p) {
33310
+ p.component("MapCustom", OA);
33311
+ }
33308
33312
  };
33309
33313
  export {
33310
- rT as MapCustom
33314
+ iT as default
33311
33315
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/gis",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "main": "dist/import-file.js",