@opengis/partsmap 0.0.40 → 0.0.41

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.
@@ -582,4 +582,4 @@ uniform ${P} ${k} u_${L};
582
582
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(S){return S instanceof this?S:new this(S)}static concat(S,...C){const E=new this(S);return C.forEach(N=>E.set(N)),E}static accessor(S){const E=(this[fu]=this[fu]={accessors:{}}).accessors,N=this.prototype;function W(T){const c=Vo(T);E[c]||(Uf(N,T),E[c]=!0)}return fe.isArray(S)?S.forEach(W):W(S),this}}Gi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(Gi.prototype,({value:g},S)=>{let C=S[0].toUpperCase()+S.slice(1);return{get:()=>g,set(E){this[C]=E}}}),fe.freezeMethods(Gi);function Pc(g,S){const C=this||Oo,E=S||C,N=Gi.from(E.headers);let W=E.data;return fe.forEach(g,function(c){W=c.call(C,W,N.normalize(),S?S.status:void 0)}),N.normalize(),W}function mu(g){return!!(g&&g.__CANCEL__)}function Vs(g,S,C){ct.call(this,g??"canceled",ct.ERR_CANCELED,S,C),this.name="CanceledError"}fe.inherits(Vs,ct,{__CANCEL__:!0});function gu(g,S,C){const E=C.config.validateStatus;!C.status||!E||E(C.status)?g(C):S(new ct("Request failed with status code "+C.status,[ct.ERR_BAD_REQUEST,ct.ERR_BAD_RESPONSE][Math.floor(C.status/100)-4],C.config,C.request,C))}function jf(g){const S=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return S&&S[1]||""}function $f(g,S){g=g||10;const C=new Array(g),E=new Array(g);let N=0,W=0,T;return S=S!==void 0?S:1e3,function(ye){const xe=Date.now(),Se=E[W];T||(T=xe),C[N]=ye,E[N]=xe;let le=W,ae=0;for(;le!==N;)ae+=C[le++],le=le%g;if(N=(N+1)%g,N===W&&(W=(W+1)%g),xe-T<S)return;const _t=Se&&xe-Se;return _t?Math.round(ae*1e3/_t):void 0}}function qf(g,S){let C=0,E=1e3/S,N,W;const T=(xe,Se=Date.now())=>{C=Se,N=null,W&&(clearTimeout(W),W=null),g.apply(null,xe)};return[(...xe)=>{const Se=Date.now(),le=Se-C;le>=E?T(xe,Se):(N=xe,W||(W=setTimeout(()=>{W=null,T(N)},E-le)))},()=>N&&T(N)]}const cl=(g,S,C=3)=>{let E=0;const N=$f(50,250);return qf(W=>{const T=W.loaded,c=W.lengthComputable?W.total:void 0,ye=T-E,xe=N(ye),Se=T<=c;E=T;const le={loaded:T,total:c,progress:c?T/c:void 0,bytes:ye,rate:xe||void 0,estimated:xe&&c&&Se?(c-T)/xe:void 0,event:W,lengthComputable:c!=null,[S?"download":"upload"]:!0};g(le)},C)},_u=(g,S)=>{const C=g!=null;return[E=>S[0]({lengthComputable:C,total:g,loaded:E}),S[1]]},yu=g=>(...S)=>fe.asap(()=>g(...S)),Zf=Ir.hasStandardBrowserEnv?function(){const S=/(msie|trident)/i.test(navigator.userAgent),C=document.createElement("a");let E;function N(W){let T=W;return S&&(C.setAttribute("href",T),T=C.href),C.setAttribute("href",T),{href:C.href,protocol:C.protocol?C.protocol.replace(/:$/,""):"",host:C.host,search:C.search?C.search.replace(/^\?/,""):"",hash:C.hash?C.hash.replace(/^#/,""):"",hostname:C.hostname,port:C.port,pathname:C.pathname.charAt(0)==="/"?C.pathname:"/"+C.pathname}}return E=N(window.location.href),function(T){const c=fe.isString(T)?N(T):T;return c.protocol===E.protocol&&c.host===E.host}}():function(){return function(){return!0}}(),Gf=Ir.hasStandardBrowserEnv?{write(g,S,C,E,N,W){const T=[g+"="+encodeURIComponent(S)];fe.isNumber(C)&&T.push("expires="+new Date(C).toGMTString()),fe.isString(E)&&T.push("path="+E),fe.isString(N)&&T.push("domain="+N),W===!0&&T.push("secure"),document.cookie=T.join("; ")},read(g){const S=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return S?decodeURIComponent(S[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Hf(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function Xf(g,S){return S?g.replace(/\/?\/$/,"")+"/"+S.replace(/^\/+/,""):g}function xu(g,S){return g&&!Hf(S)?Xf(g,S):S}const vu=g=>g instanceof Gi?{...g}:g;function ts(g,S){S=S||{};const C={};function E(xe,Se,le){return fe.isPlainObject(xe)&&fe.isPlainObject(Se)?fe.merge.call({caseless:le},xe,Se):fe.isPlainObject(Se)?fe.merge({},Se):fe.isArray(Se)?Se.slice():Se}function N(xe,Se,le){if(fe.isUndefined(Se)){if(!fe.isUndefined(xe))return E(void 0,xe,le)}else return E(xe,Se,le)}function W(xe,Se){if(!fe.isUndefined(Se))return E(void 0,Se)}function T(xe,Se){if(fe.isUndefined(Se)){if(!fe.isUndefined(xe))return E(void 0,xe)}else return E(void 0,Se)}function c(xe,Se,le){if(le in S)return E(xe,Se);if(le in g)return E(void 0,xe)}const ye={url:W,method:W,data:W,baseURL:T,transformRequest:T,transformResponse:T,paramsSerializer:T,timeout:T,timeoutMessage:T,withCredentials:T,withXSRFToken:T,adapter:T,responseType:T,xsrfCookieName:T,xsrfHeaderName:T,onUploadProgress:T,onDownloadProgress:T,decompress:T,maxContentLength:T,maxBodyLength:T,beforeRedirect:T,transport:T,httpAgent:T,httpsAgent:T,cancelToken:T,socketPath:T,responseEncoding:T,validateStatus:c,headers:(xe,Se)=>N(vu(xe),vu(Se),!0)};return fe.forEach(Object.keys(Object.assign({},g,S)),function(Se){const le=ye[Se]||N,ae=le(g[Se],S[Se],Se);fe.isUndefined(ae)&&le!==c||(C[Se]=ae)}),C}const bu=g=>{const S=ts({},g);let{data:C,withXSRFToken:E,xsrfHeaderName:N,xsrfCookieName:W,headers:T,auth:c}=S;S.headers=T=Gi.from(T),S.url=hu(xu(S.baseURL,S.url),g.params,g.paramsSerializer),c&&T.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let ye;if(fe.isFormData(C)){if(Ir.hasStandardBrowserEnv||Ir.hasStandardBrowserWebWorkerEnv)T.setContentType(void 0);else if((ye=T.getContentType())!==!1){const[xe,...Se]=ye?ye.split(";").map(le=>le.trim()).filter(Boolean):[];T.setContentType([xe||"multipart/form-data",...Se].join("; "))}}if(Ir.hasStandardBrowserEnv&&(E&&fe.isFunction(E)&&(E=E(S)),E||E!==!1&&Zf(S.url))){const xe=N&&W&&Gf.read(W);xe&&T.set(N,xe)}return S},Wf=typeof XMLHttpRequest<"u"&&function(g){return new Promise(function(C,E){const N=bu(g);let W=N.data;const T=Gi.from(N.headers).normalize();let{responseType:c,onUploadProgress:ye,onDownloadProgress:xe}=N,Se,le,ae,_t,Ze;function tt(){_t&&_t(),Ze&&Ze(),N.cancelToken&&N.cancelToken.unsubscribe(Se),N.signal&&N.signal.removeEventListener("abort",Se)}let Ne=new XMLHttpRequest;Ne.open(N.method.toUpperCase(),N.url,!0),Ne.timeout=N.timeout;function pt(){if(!Ne)return;const He=Gi.from("getAllResponseHeaders"in Ne&&Ne.getAllResponseHeaders()),vt={data:!c||c==="text"||c==="json"?Ne.responseText:Ne.response,status:Ne.status,statusText:Ne.statusText,headers:He,config:g,request:Ne};gu(function(Nt){C(Nt),tt()},function(Nt){E(Nt),tt()},vt),Ne=null}"onloadend"in Ne?Ne.onloadend=pt:Ne.onreadystatechange=function(){!Ne||Ne.readyState!==4||Ne.status===0&&!(Ne.responseURL&&Ne.responseURL.indexOf("file:")===0)||setTimeout(pt)},Ne.onabort=function(){Ne&&(E(new ct("Request aborted",ct.ECONNABORTED,g,Ne)),Ne=null)},Ne.onerror=function(){E(new ct("Network Error",ct.ERR_NETWORK,g,Ne)),Ne=null},Ne.ontimeout=function(){let Ke=N.timeout?"timeout of "+N.timeout+"ms exceeded":"timeout exceeded";const vt=N.transitional||du;N.timeoutErrorMessage&&(Ke=N.timeoutErrorMessage),E(new ct(Ke,vt.clarifyTimeoutError?ct.ETIMEDOUT:ct.ECONNABORTED,g,Ne)),Ne=null},W===void 0&&T.setContentType(null),"setRequestHeader"in Ne&&fe.forEach(T.toJSON(),function(Ke,vt){Ne.setRequestHeader(vt,Ke)}),fe.isUndefined(N.withCredentials)||(Ne.withCredentials=!!N.withCredentials),c&&c!=="json"&&(Ne.responseType=N.responseType),xe&&([ae,Ze]=cl(xe,!0),Ne.addEventListener("progress",ae)),ye&&Ne.upload&&([le,_t]=cl(ye),Ne.upload.addEventListener("progress",le),Ne.upload.addEventListener("loadend",_t)),(N.cancelToken||N.signal)&&(Se=He=>{Ne&&(E(!He||He.type?new Vs(null,g,Ne):He),Ne.abort(),Ne=null)},N.cancelToken&&N.cancelToken.subscribe(Se),N.signal&&(N.signal.aborted?Se():N.signal.addEventListener("abort",Se)));const Ft=jf(N.url);if(Ft&&Ir.protocols.indexOf(Ft)===-1){E(new ct("Unsupported protocol "+Ft+":",ct.ERR_BAD_REQUEST,g));return}Ne.send(W||null)})},Jf=(g,S)=>{let C=new AbortController,E;const N=function(ye){if(!E){E=!0,T();const xe=ye instanceof Error?ye:this.reason;C.abort(xe instanceof ct?xe:new Vs(xe instanceof Error?xe.message:xe))}};let W=S&&setTimeout(()=>{N(new ct(`timeout ${S} of ms exceeded`,ct.ETIMEDOUT))},S);const T=()=>{g&&(W&&clearTimeout(W),W=null,g.forEach(ye=>{ye&&(ye.removeEventListener?ye.removeEventListener("abort",N):ye.unsubscribe(N))}),g=null)};g.forEach(ye=>ye&&ye.addEventListener&&ye.addEventListener("abort",N));const{signal:c}=C;return c.unsubscribe=T,[c,()=>{W&&clearTimeout(W),W=null}]},Kf=function*(g,S){let C=g.byteLength;if(!S||C<S){yield g;return}let E=0,N;for(;E<C;)N=E+S,yield g.slice(E,N),E=N},Yf=async function*(g,S,C){for await(const E of g)yield*Kf(ArrayBuffer.isView(E)?E:await C(String(E)),S)},wu=(g,S,C,E,N)=>{const W=Yf(g,S,N);let T=0,c,ye=xe=>{c||(c=!0,E&&E(xe))};return new ReadableStream({async pull(xe){try{const{done:Se,value:le}=await W.next();if(Se){ye(),xe.close();return}let ae=le.byteLength;if(C){let _t=T+=ae;C(_t)}xe.enqueue(new Uint8Array(le))}catch(Se){throw ye(Se),Se}},cancel(xe){return ye(xe),W.return()}},{highWaterMark:2})},hl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Su=hl&&typeof ReadableStream=="function",kc=hl&&(typeof TextEncoder=="function"?(g=>S=>g.encode(S))(new TextEncoder):async g=>new Uint8Array(await new Response(g).arrayBuffer())),Tu=(g,...S)=>{try{return!!g(...S)}catch{return!1}},Qf=Su&&Tu(()=>{let g=!1;const S=new Request(Ir.origin,{body:new ReadableStream,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!S}),Iu=64*1024,Ac=Su&&Tu(()=>fe.isReadableStream(new Response("").body)),ul={stream:Ac&&(g=>g.body)};hl&&(g=>{["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!ul[S]&&(ul[S]=fe.isFunction(g[S])?C=>C[S]():(C,E)=>{throw new ct(`Response type '${S}' is not supported`,ct.ERR_NOT_SUPPORT,E)})})})(new Response);const em=async g=>{if(g==null)return 0;if(fe.isBlob(g))return g.size;if(fe.isSpecCompliantForm(g))return(await new Request(g).arrayBuffer()).byteLength;if(fe.isArrayBufferView(g)||fe.isArrayBuffer(g))return g.byteLength;if(fe.isURLSearchParams(g)&&(g=g+""),fe.isString(g))return(await kc(g)).byteLength},tm=async(g,S)=>{const C=fe.toFiniteNumber(g.getContentLength());return C??em(S)},Cc={http:Tf,xhr:Wf,fetch:hl&&(async g=>{let{url:S,method:C,data:E,signal:N,cancelToken:W,timeout:T,onDownloadProgress:c,onUploadProgress:ye,responseType:xe,headers:Se,withCredentials:le="same-origin",fetchOptions:ae}=bu(g);xe=xe?(xe+"").toLowerCase():"text";let[_t,Ze]=N||W||T?Jf([N,W],T):[],tt,Ne;const pt=()=>{!tt&&setTimeout(()=>{_t&&_t.unsubscribe()}),tt=!0};let Ft;try{if(ye&&Qf&&C!=="get"&&C!=="head"&&(Ft=await tm(Se,E))!==0){let $t=new Request(S,{method:"POST",body:E,duplex:"half"}),Nt;if(fe.isFormData(E)&&(Nt=$t.headers.get("content-type"))&&Se.setContentType(Nt),$t.body){const[Vr,bi]=_u(Ft,cl(yu(ye)));E=wu($t.body,Iu,Vr,bi,kc)}}fe.isString(le)||(le=le?"include":"omit"),Ne=new Request(S,{...ae,signal:_t,method:C.toUpperCase(),headers:Se.normalize().toJSON(),body:E,duplex:"half",credentials:le});let He=await fetch(Ne);const Ke=Ac&&(xe==="stream"||xe==="response");if(Ac&&(c||Ke)){const $t={};["status","statusText","headers"].forEach(Nr=>{$t[Nr]=He[Nr]});const Nt=fe.toFiniteNumber(He.headers.get("content-length")),[Vr,bi]=c&&_u(Nt,cl(yu(c),!0))||[];He=new Response(wu(He.body,Iu,Vr,()=>{bi&&bi(),Ke&&pt()},kc),$t)}xe=xe||"text";let vt=await ul[fe.findKey(ul,xe)||"text"](He,g);return!Ke&&pt(),Ze&&Ze(),await new Promise(($t,Nt)=>{gu($t,Nt,{data:vt,headers:Gi.from(He.headers),status:He.status,statusText:He.statusText,config:g,request:Ne})})}catch(He){throw pt(),He&&He.name==="TypeError"&&/fetch/i.test(He.message)?Object.assign(new ct("Network Error",ct.ERR_NETWORK,g,Ne),{cause:He.cause||He}):ct.from(He,He&&He.code,g,Ne)}})};fe.forEach(Cc,(g,S)=>{if(g){try{Object.defineProperty(g,"name",{value:S})}catch{}Object.defineProperty(g,"adapterName",{value:S})}});const Pu=g=>`- ${g}`,im=g=>fe.isFunction(g)||g===null||g===!1,ku={getAdapter:g=>{g=fe.isArray(g)?g:[g];const{length:S}=g;let C,E;const N={};for(let W=0;W<S;W++){C=g[W];let T;if(E=C,!im(C)&&(E=Cc[(T=String(C)).toLowerCase()],E===void 0))throw new ct(`Unknown adapter '${T}'`);if(E)break;N[T||"#"+W]=E}if(!E){const W=Object.entries(N).map(([c,ye])=>`adapter ${c} `+(ye===!1?"is not supported by the environment":"is not available in the build"));let T=S?W.length>1?`since :
583
583
  `+W.map(Pu).join(`
584
584
  `):" "+Pu(W[0]):"as no adapter specified";throw new ct("There is no suitable adapter to dispatch the request "+T,"ERR_NOT_SUPPORT")}return E},adapters:Cc};function Ec(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new Vs(null,g)}function Au(g){return Ec(g),g.headers=Gi.from(g.headers),g.data=Pc.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),ku.getAdapter(g.adapter||Oo.adapter)(g).then(function(E){return Ec(g),E.data=Pc.call(g,g.transformResponse,E),E.headers=Gi.from(E.headers),E},function(E){return mu(E)||(Ec(g),E&&E.response&&(E.response.data=Pc.call(g,g.transformResponse,E.response),E.response.headers=Gi.from(E.response.headers))),Promise.reject(E)})}const Cu="1.7.4",Mc={};["object","boolean","number","function","string","symbol"].forEach((g,S)=>{Mc[g]=function(E){return typeof E===g||"a"+(S<1?"n ":" ")+g}});const Eu={};Mc.transitional=function(S,C,E){function N(W,T){return"[Axios v"+Cu+"] Transitional option '"+W+"'"+T+(E?". "+E:"")}return(W,T,c)=>{if(S===!1)throw new ct(N(T," has been removed"+(C?" in "+C:"")),ct.ERR_DEPRECATED);return C&&!Eu[T]&&(Eu[T]=!0,console.warn(N(T," has been deprecated since v"+C+" and will be removed in the near future"))),S?S(W,T,c):!0}};function rm(g,S,C){if(typeof g!="object")throw new ct("options must be an object",ct.ERR_BAD_OPTION_VALUE);const E=Object.keys(g);let N=E.length;for(;N-- >0;){const W=E[N],T=S[W];if(T){const c=g[W],ye=c===void 0||T(c,W,g);if(ye!==!0)throw new ct("option "+W+" must be "+ye,ct.ERR_BAD_OPTION_VALUE);continue}if(C!==!0)throw new ct("Unknown option "+W,ct.ERR_BAD_OPTION)}}const zc={assertOptions:rm,validators:Mc},Pn=zc.validators;class is{constructor(S){this.defaults=S,this.interceptors={request:new uu,response:new uu}}async request(S,C){try{return await this._request(S,C)}catch(E){if(E instanceof Error){let N;Error.captureStackTrace?Error.captureStackTrace(N={}):N=new Error;const W=N.stack?N.stack.replace(/^.+\n/,""):"";try{E.stack?W&&!String(E.stack).endsWith(W.replace(/^.+\n.+\n/,""))&&(E.stack+=`
585
- `+W):E.stack=W}catch{}}throw E}}_request(S,C){typeof S=="string"?(C=C||{},C.url=S):C=S||{},C=ts(this.defaults,C);const{transitional:E,paramsSerializer:N,headers:W}=C;E!==void 0&&zc.assertOptions(E,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean)},!1),N!=null&&(fe.isFunction(N)?C.paramsSerializer={serialize:N}:zc.assertOptions(N,{encode:Pn.function,serialize:Pn.function},!0)),C.method=(C.method||this.defaults.method||"get").toLowerCase();let T=W&&fe.merge(W.common,W[C.method]);W&&fe.forEach(["delete","get","head","post","put","patch","common"],Ze=>{delete W[Ze]}),C.headers=Gi.concat(T,W);const c=[];let ye=!0;this.interceptors.request.forEach(function(tt){typeof tt.runWhen=="function"&&tt.runWhen(C)===!1||(ye=ye&&tt.synchronous,c.unshift(tt.fulfilled,tt.rejected))});const xe=[];this.interceptors.response.forEach(function(tt){xe.push(tt.fulfilled,tt.rejected)});let Se,le=0,ae;if(!ye){const Ze=[Au.bind(this),void 0];for(Ze.unshift.apply(Ze,c),Ze.push.apply(Ze,xe),ae=Ze.length,Se=Promise.resolve(C);le<ae;)Se=Se.then(Ze[le++],Ze[le++]);return Se}ae=c.length;let _t=C;for(le=0;le<ae;){const Ze=c[le++],tt=c[le++];try{_t=Ze(_t)}catch(Ne){tt.call(this,Ne);break}}try{Se=Au.call(this,_t)}catch(Ze){return Promise.reject(Ze)}for(le=0,ae=xe.length;le<ae;)Se=Se.then(xe[le++],xe[le++]);return Se}getUri(S){S=ts(this.defaults,S);const C=xu(S.baseURL,S.url);return hu(C,S.params,S.paramsSerializer)}}fe.forEach(["delete","get","head","options"],function(S){is.prototype[S]=function(C,E){return this.request(ts(E||{},{method:S,url:C,data:(E||{}).data}))}}),fe.forEach(["post","put","patch"],function(S){function C(E){return function(W,T,c){return this.request(ts(c||{},{method:S,headers:E?{"Content-Type":"multipart/form-data"}:{},url:W,data:T}))}}is.prototype[S]=C(),is.prototype[S+"Form"]=C(!0)});class Dc{constructor(S){if(typeof S!="function")throw new TypeError("executor must be a function.");let C;this.promise=new Promise(function(W){C=W});const E=this;this.promise.then(N=>{if(!E._listeners)return;let W=E._listeners.length;for(;W-- >0;)E._listeners[W](N);E._listeners=null}),this.promise.then=N=>{let W;const T=new Promise(c=>{E.subscribe(c),W=c}).then(N);return T.cancel=function(){E.unsubscribe(W)},T},S(function(W,T,c){E.reason||(E.reason=new Vs(W,T,c),C(E.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(S){if(this.reason){S(this.reason);return}this._listeners?this._listeners.push(S):this._listeners=[S]}unsubscribe(S){if(!this._listeners)return;const C=this._listeners.indexOf(S);C!==-1&&this._listeners.splice(C,1)}static source(){let S;return{token:new Dc(function(N){S=N}),cancel:S}}}function nm(g){return function(C){return g.apply(null,C)}}function sm(g){return fe.isObject(g)&&g.isAxiosError===!0}const Lc={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(Lc).forEach(([g,S])=>{Lc[S]=g});function Mu(g){const S=new is(g),C=Xh(is.prototype.request,S);return fe.extend(C,is.prototype,S,{allOwnKeys:!0}),fe.extend(C,S,null,{allOwnKeys:!0}),C.create=function(N){return Mu(ts(g,N))},C}const jt=Mu(Oo);jt.Axios=is,jt.CanceledError=Vs,jt.CancelToken=Dc,jt.isCancel=mu,jt.VERSION=Cu,jt.toFormData=al,jt.AxiosError=ct,jt.Cancel=jt.CanceledError,jt.all=function(S){return Promise.all(S)},jt.spread=nm,jt.isAxiosError=sm,jt.mergeConfig=ts,jt.AxiosHeaders=Gi,jt.formToJSON=g=>pu(fe.isHTMLForm(g)?new FormData(g):g),jt.getAdapter=ku.getAdapter,jt.HttpStatusCode=Lc,jt.default=jt;const Rc=(g,S=300)=>{let C;return function(...N){clearTimeout(C),C=setTimeout(()=>{g.apply(this,N)},S)}};function dl(g,S,C={}){const E={type:"Feature"};return(C.id===0||C.id)&&(E.id=C.id),C.bbox&&(E.bbox=C.bbox),E.properties=S||{},E.geometry=g,E}function om(g,S,C={}){if(!g)throw new Error("coordinates is required");if(!Array.isArray(g))throw new Error("coordinates must be an Array");if(g.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ru(g[0])||!Ru(g[1]))throw new Error("coordinates must contain numbers");return dl({type:"Point",coordinates:g},S,C)}function zu(g,S,C={}){for(const N of g){if(N.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(N[N.length-1].length!==N[0].length)throw new Error("First and last Position are not equivalent.");for(let W=0;W<N[N.length-1].length;W++)if(N[N.length-1][W]!==N[0][W])throw new Error("First and last Position are not equivalent.")}return dl({type:"Polygon",coordinates:g},S,C)}function Du(g,S,C={}){return dl({type:"MultiPoint",coordinates:g},S,C)}function Lu(g,S,C={}){return dl({type:"MultiPolygon",coordinates:g},S,C)}function Ru(g){return!isNaN(g)&&g!==null&&!Array.isArray(g)}function Bu(g,S,C){if(g!==null)for(var E,N,W,T,c,ye,xe,Se=0,le=0,ae,_t=g.type,Ze=_t==="FeatureCollection",tt=_t==="Feature",Ne=Ze?g.features.length:1,pt=0;pt<Ne;pt++){xe=Ze?g.features[pt].geometry:tt?g.geometry:g,ae=xe?xe.type==="GeometryCollection":!1,c=ae?xe.geometries.length:1;for(var Ft=0;Ft<c;Ft++){var He=0,Ke=0;if(T=ae?xe.geometries[Ft]:xe,T!==null){ye=T.coordinates;var vt=T.type;switch(Se=0,vt){case null:break;case"Point":if(S(ye,le,pt,He,Ke)===!1)return!1;le++,He++;break;case"LineString":case"MultiPoint":for(E=0;E<ye.length;E++){if(S(ye[E],le,pt,He,Ke)===!1)return!1;le++,vt==="MultiPoint"&&He++}vt==="LineString"&&He++;break;case"Polygon":case"MultiLineString":for(E=0;E<ye.length;E++){for(N=0;N<ye[E].length-Se;N++){if(S(ye[E][N],le,pt,He,Ke)===!1)return!1;le++}vt==="MultiLineString"&&He++,vt==="Polygon"&&Ke++}vt==="Polygon"&&He++;break;case"MultiPolygon":for(E=0;E<ye.length;E++){for(Ke=0,N=0;N<ye[E].length;N++){for(W=0;W<ye[E][N].length-Se;W++){if(S(ye[E][N][W],le,pt,He,Ke)===!1)return!1;le++}Ke++}He++}break;case"GeometryCollection":for(E=0;E<T.geometries.length;E++)if(Bu(T.geometries[E],S)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Fu(g,S={}){if(g.bbox!=null&&S.recompute!==!0)return g.bbox;const C=[1/0,1/0,-1/0,-1/0];return Bu(g,E=>{C[0]>E[0]&&(C[0]=E[0]),C[1]>E[1]&&(C[1]=E[1]),C[2]<E[0]&&(C[2]=E[0]),C[3]<E[1]&&(C[3]=E[1])}),C}function Ou(g,S={}){const C=Fu(g),E=(C[0]+C[2])/2,N=(C[1]+C[3])/2;return om([E,N],S.properties,S)}const am={mixins:[yc],props:{map:{type:Object},baseLayers:{type:Array,default:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",category:"Національна інфраструктура геопросторових даних",scale:1e4,year:2020,bounds:"ua",maxzoom:18,owner:"НДІГК (Інститут геодезії та картографії)",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png",basemap:!0},{id:"graymap",name:"Сіра карта",url:"https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",attribution:"&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, &copy; <a href='https://carto.com/attributions'>CARTO</a>",bounds1:"ua",image:"https://basemaps.cartocdn.com/light_all/10/601/348.png",position:0,owner:"OSM",basemap:!0},{id:"darkmap_carto",name:"Темна карта України",image:"https://basemaps.cartocdn.com/dark_all/13/4791/2762.png?ver=2023-04-14",url:"https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",active:!1}]}},data(){return{selectedLayer:null}},watch:{map(g){g&&g.on("load",this.handleMapLoad)}},methods:{handleMapLoad(){var g;this.baseLayers.forEach(S=>{this.layerList.push(S)}),this.toggleLayerVisibility((g=this.baseLayers[0])==null?void 0:g.id)},toggleLayerVisibility(g){this.selectedLayer=g,this.changeBaseLayer(this.selectedLayer)}}},lm={class:"vs-map-slot-layers"},cm=["onClick"],hm=["src"];function um(g,S,C,E,N,W){return K.openBlock(),K.createElementBlock("div",lm,[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(C.baseLayers,(T,c)=>(K.openBlock(),K.createElementBlock("div",{key:T.id,class:K.normalizeClass(["vs-map-slot-layers__layer relative",{focused:T.id==N.selectedLayer}]),onClick:ye=>W.toggleLayerVisibility(T.id)},[K.createElementVNode("img",{src:T.image,class:"vs-map-slot-layers__image"},null,8,hm),K.createElementVNode("div",{class:K.normalizeClass(["absolute py-2 px-4 text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg top-[-46px] text-nowrap p-2 hidden whitespace-nowrap",[c===0?"left-[-10px]":"left-[50%] translate-x-[-50%] "]])},K.toDisplayString(T==null?void 0:T.name),3)],10,cm))),128))])}const dm=Or(am,[["render",um],["__scopeId","data-v-d4fbd7d5"]]),pm={props:["colors","title"],methods:{capitalizeFirstLetter(g){return g?g.charAt(0).toUpperCase()+g.slice(1):""}}},fm={class:"absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg"},mm={key:0,class:"mb-[10px] text-[1rem]"},gm={class:"legend-item"},_m={key:0,class:"flex justify-start items-center gap-2"},ym={class:"ml-1 text-[0.875rem]"};function xm(g,S,C,E,N,W){return K.openBlock(),K.createElementBlock("div",fm,[C.title?(K.openBlock(),K.createElementBlock("div",mm,K.toDisplayString(C.title),1)):K.createCommentVNode("",!0),(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(C.colors,T=>(K.openBlock(),K.createElementBlock("div",gm,[T.id>0?(K.openBlock(),K.createElementBlock("div",_m,[K.createElementVNode("div",{class:"w-[15px] h-[15px] rounded-[50%] min-w-[15px]",style:K.normalizeStyle({backgroundColor:T.color})},null,4),K.createElementVNode("div",ym,K.toDisplayString(W.capitalizeFirstLetter(T.text)),1)])):K.createCommentVNode("",!0)]))),256))])}const vm={components:{MapSlotLayers:dm,MapLegend:Or(pm,[["render",xm]])},props:{colorAttr:null,legendname:{type:String,default:()=>""},height:{type:String,default:()=>"100vh"},width:{type:String,default:"100vw"},center:{type:Array,default:[32,49]},maxBounds:{type:Array,default:[[22,44],[40,52]]},table:{type:String,default:""},zoom:{type:[String,Number],default:5},basemap:Array,filtersParam:{type:String,default:""},row:{type:Object,default:{}},pointZoom:{type:String,default:"12"}},mixins:[yc],data(){return{map:null,hoverObject:null,popup:null,colors:[]}},async mounted(){var g,S,C,E;if(await this.createMap(),(g=this.row)!=null&&g.geom){const{type:N,coordinates:W}=this.row.geom;let T;switch(N){case"Polygon":T=zu(W);break;case"MultiPolygon":T=Lu(W);break;case"MultiPoint":T=Du(W);break;default:(S=this.map)==null||S.fitBounds([W,W],{maxZoom:15,padding:30}),this.isSelectObj=!0;return}const c=Ou(T).geometry.coordinates;(C=this.map)==null||C.fitBounds([c,c],{maxZoom:15,padding:30})}else(E=this.map)==null||E.fitBounds(this.maxBounds)},watch:{filtersParam(g){this.setFilter(this.table,g)}},methods:{async getColorStyle(){var g=[["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"],["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"],["#ECD078","#D95B43","#C02942","#542437","#53777A"]];if(!this.colorAttr)return"blue";try{const{data:{rows:S}}=await jt.get(`/api/data/${this.table}/${this.colorAttr}`),C=S.reduce((E,N,W)=>N!=null&&N.id?[...E,N.id.toString(),N.color||g[0][W%5]]:E,["match",["get",this.colorAttr]]);return this.colors=[...S],C.push("gray"),C}catch(S){console.log(S)}},async handleMapLoad(){const g=await this.getColorStyle();await this.addLayer({id:this.table,service:"vector",url:`/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}`,layers:[{type:"fill","source-layer":this.table,paint:{"fill-color":g,"fill-opacity":.3,"fill-outline-color":["case",["==",["feature-state","hover"],!0],"red","#000000"]},filter:["all",["==",["geometry-type"],"Polygon"]]},{type:"circle","source-layer":this.table,filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":{base:1.75,stops:[[10,5],[12,6],[18,12]]},"circle-stroke-color":["case",["==",["feature-state","hover"],!0],"red","#ccc"],"circle-stroke-width":["case",["==",["feature-state","hover"],!0],2,1],"circle-color":g}}]})},async createMap(){const g={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new il.Map({container:"maplibre-map",style:g,zoom:10,center:this.center,maxBounds:this.maxBounds}),this.$parent.map=this.map,this.map.addControl(new il.NavigationControl({visualizePitch:!0})),this.map.on("load",this.handleMapLoad)}}},bm={class:"vs-map-portal relative"};function wm(g,S,C,E,N,W){const T=K.resolveComponent("MapLegend"),c=K.resolveComponent("MapSlotLayers");return K.openBlock(),K.createElementBlock("div",bm,[K.createElementVNode("div",{id:"maplibre-map",ref:"maplibreMap",class:"w-full",style:K.normalizeStyle({height:C.height})},null,4),K.createVNode(T,{colors:N.colors,title:C.legendname},null,8,["colors","title"]),K.createVNode(c,{map:N.map,baseLayers:C.basemap},null,8,["map","baseLayers"])])}const Sm=Or(vm,[["render",wm]]),Tm={},Im={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Pm=[K.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)];function km(g,S){return K.openBlock(),K.createElementBlock("svg",Im,Pm)}const Am=Or(Tm,[["render",km]]),Cm={},Em={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"},Mm=[K.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),K.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),K.createElementVNode("path",{d:"M15 4v16"},null,-1),K.createElementVNode("path",{d:"M9 10l2 2l-2 2"},null,-1)];function zm(g,S){return K.openBlock(),K.createElementBlock("svg",Em,Mm)}const Dm=Or(Cm,[["render",zm]]),Lm={},Rm={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"},Bm=[K.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),K.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),K.createElementVNode("path",{d:"M15 4v16"},null,-1),K.createElementVNode("path",{d:"M10 10l-2 2l2 2"},null,-1)];function Fm(g,S){return K.openBlock(),K.createElementBlock("svg",Rm,Bm)}const Om=Or(Lm,[["render",Fm]]),Vm={},Nm={class:"shrink-0 size-3",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"},Um=[K.createElementVNode("path",{d:"M18 6 6 18"},null,-1),K.createElementVNode("path",{d:"m6 6 12 12"},null,-1)];function jm(g,S){return K.openBlock(),K.createElementBlock("svg",Nm,Um)}const $m=Or(Vm,[["render",jm]]),qm={props:{visible:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},size:{type:String,default:()=>""}},emits:["update:visible","onClose"],name:"vs-dialog",mounted(){window.addEventListener("keydown",this.checkKey)},unmounted(){window.removeEventListener("keydown",this.checkKey)},computed:{hasSlot(){var g;return!!((g=this.$slots)!=null&&g.footer)},checkSize(){return this.size==="small"?"w-5/12":this.size==="medium"?"w-6/12":"lg:w-7/12 w-11/12"}},methods:{checkKey({key:g}){g==="Escape"&&this.handleClose()},handleClose(){this.$emit("update:visible",!1),this.$emit("onClose")}}},Vu=g=>(K.pushScopeId("data-v-37405773"),g=g(),K.popScopeId(),g),Zm={class:"vsTailwind ui-dialog__wrapper"},Gm={class:"w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"},Hm={class:"py-2.5 px-4 flex justify-between items-center border-b"},Xm={class:"font-medium text-gray-800"},Wm=[Vu(()=>K.createElementVNode("span",{class:"sr-only"},"Close",-1)),Vu(()=>K.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[K.createElementVNode("path",{d:"M18 6 6 18"}),K.createElementVNode("path",{d:"m6 6 12 12"})],-1))],Jm={class:"ui-dialog__content p-4"},Km={key:0,class:"flex justify-end gap-x-2"};function Ym(g,S,C,E,N,W){return K.openBlock(),K.createBlock(K.Teleport,{to:"#modal"},[K.createVNode(K.Transition,{name:"fade"},{default:K.withCtx(()=>[K.withDirectives(K.createElementVNode("div",Zm,[K.createElementVNode("div",Gm,[K.createVNode(K.Transition,{name:"content",appear:""},{default:K.withCtx(()=>[K.createElementVNode("div",{class:K.normalizeClass(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white border pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",[W.checkSize]])},[K.createElementVNode("div",Hm,[K.createElementVNode("h3",Xm,K.toDisplayString(C.title),1),K.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",onClick:S[0]||(S[0]=(...T)=>W.handleClose&&W.handleClose(...T))},Wm)]),K.createElementVNode("div",Jm,[K.renderSlot(g.$slots,"default",{},void 0,!0)]),W.hasSlot?(K.openBlock(),K.createElementBlock("div",Km,[K.renderSlot(g.$slots,"footer",{},void 0,!0)])):K.createCommentVNode("",!0)],2)]),_:3})])],512),[[K.vShow,C.visible]])]),_:3})])}const Qm=Or(qm,[["render",Ym],["__scopeId","data-v-37405773"]]),eg=K.defineComponent({props:{title:{type:String,default:()=>""},table:{type:String,default:()=>""},rows:{type:Object,default:()=>null},initTotal:{type:[Number,String],default:()=>""},colorAttr:{type:String,default:()=>""},legendname:{type:String,default:()=>""},maxBounds:{type:Array,default:()=>[[22,44.4],[40,52.5]]},id:{type:String,default:()=>""},isAutocomplete:{type:Boolean,default:()=>!1},isAddressAutocomplete:{type:Boolean,default:()=>!1},zoom:{type:[Number,String],default:()=>"13"},maskForSearch:{type:String,default:()=>null},basemap:{type:Array},pointZoom:{type:String,default:()=>"12"}},mixins:[yc],components:{MapPortal:Sm,NoData:Fp,FilterIcon:Am,VisibleMapIcon:Dm,HiddenMapIcon:Om,CloseIcon:$m,VsDialog:Qm},data(){return{filters:"",search:"",limit:20,polyline:null,filtersParam:"",isSelectObj:!1,selectedId:"",searchRegion:"",searchAddress:"",marker:null,handleSearchRegionDebounced:Rc(g=>this.updateSearchRegionValue(g),500),handleSearchAddressDebounced:Rc(g=>this.updateSearchAddressValue(g),500),searchRegionResult:[],searchAddressResult:[],selectedRow:null,activeFilters:"",isMapVisible:!0,tabsIsVisible:!1,filterUrl:"",currentPage:1,regionOptionGeneral:null,isFilterVisible:!1,tableData:null,hoverData:null,atuData:[],map:null,legendName:null,total:null,filterValues:"",activeFiltersCount:"",visibleTrue:!0,regionSelectValue:null,addressSelectValue:null,currentBbox:null,optionRowsCount:[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"}],handleDebouncedUpdateValue:Rc(g=>{this.handleSearchValue(g)},10)}},watch:{map(){this.map.on("mousemove",this.handleMapHover),this.map.on("click",this.handleMapClick)},activeFiltersCount(){var g,S;return(S=(g=this.$refs)==null?void 0:g.filter)==null?void 0:S.filteredActiveFiltersLength},activeFilters(){var g,S;return this.isSelectObj&&this.moveToDefaultPage(),(S=(g=this.$refs)==null?void 0:g.filter)==null?void 0:S.activeFilters},isFilterVisible(g){g||this.getData()},async regionSelectValue(g,S){var N,W;if(!this.regionSelectValue){this.map.removeSource("region-search-id");return}g&&this.selectedId&&this.closeObjCard(),this.polyline=this.regionSelectValue.encoded_geom,this.getData();const C=((N=this.regionSelectValue)==null?void 0:N.geom)||Sr.toGeoJSON(this.regionSelectValue.encoded_geom),E=this.map.getSource("region-search-id");if(this.currentBbox=Fu(C),E)E.setData({type:"Feature",geometry:C});else{this.map.addSource("region-search-id",{type:"geojson",data:{type:"Feature",geometry:C}});const T={id:"region-search-id",type:"line",source:"region-search-id",paint:{"line-color":"blue","line-opacity":1}};await this.map.addLayer(T)}this.moveLayer("site.prc.parcel_object.table"),(W=this.map)==null||W.fitBounds(this.currentBbox,{zoom:this.setAtuZoom,padding:20}),this.getData()},async addressSelectValue(g,S){this.addressSelectValue&&(g&&this.selectedId&&this.closeObjCard(),this.getData())}},created(){this.legendName,this.tableData=this.rows,this.total=this.initTotal,this.id&&(this.selectedRow=this.rows[0],this.selectedId=this.id,this.isSelectObj=!0)},mounted(){this.rows||this.getData(),this.getFilter()},updated(){this.checkFilterLength()},computed:{setAtuZoom(){var g,S,C;return((g=this.regionSelectValue)==null?void 0:g.id)==="UA80000000000093317"||((S=this.regionSelectValue)==null?void 0:S.id)==="UA85000000000065278"?10:((C=this.regionSelectValue)==null?void 0:C.region)===""?7.5:11}},methods:{async updateSearchRegionValue(g){this.searchRegion=g,await this.getReginOptions()},async updateSearchAddressValue(g){this.searchAddress=g,await this.getAddressOptions()},async getData(){try{const g={search:this.search||null,limit:this.limit,page:this.currentPage,polyline:this.polyline};this.filtersParam!==""&&this.filtersParam!=="no-url"?g.filter=this.filtersParam:g.filter="",this.addressSelectValue&&(g.filter+=g.filter?`&address_id=${this.addressSelectValue.id}`:`address_id=${this.addressSelectValue.id}`);const{data:S}=await jt.get(`/api/data/${this.table}`,{params:g});this.tableData=S==null?void 0:S.rows,this.total=S.total}catch(g){console.error(g.message)}},moveToDefaultPage(){var E;const g=new URLSearchParams(window.location.search);g.delete("id");const C=`${window.location.pathname}?${g.toString()}`;(E=this.map)==null||E.fitBounds(this.maxBounds,{}),window.history.pushState({},"",C),this.isSelectObj=!1},regionFullName(g){return g.region?`${g.text} / ${g.region}`:g.text},getLabelById(g){const S=this.filters.find(C=>C.id===g);return S?S.label:g},getOptionsLabelById(g,S){if(Array.isArray(S)){const C=this.filters.find(E=>E.id===g);return C!=null&&C.options?C==null?void 0:C.options.filter(E=>S.includes(E.id)).map(E=>E.text).join(", "):S==null?void 0:S.length}else return S},async clearFilter(g){var S,C;await((C=(S=this.$refs)==null?void 0:S.filter)==null?void 0:C.clearFilter(g)),await this.updateTableAndMap(),await this.getData()},async getReginOptions(){if(this.searchRegion===""&&this.regionOptionGeneral)this.searchRegionResult=this.regionOptionGeneral;else try{const{data:g}=await jt.get(`https://data.softpro.ua/api-user/suggest/atu.codifier.type.polyline.select.region?key=${this.searchRegion}`);this.searchRegionResult=g,this.regionOptionGeneral||(this.regionOptionGeneral=g)}catch(g){console.error(g.message)}},async getAddressOptions(){if(this.searchAddress===""&&this.addressOptionGeneral)this.searchAddressResult=this.addressOptionGeneral;else try{const{data:g}=await jt.get(`/api/suggest/itree.address_id?key=${this.searchAddress}`);this.searchAddressResult=g,this.addressOptionGeneral||(this.addressOptionGeneral=g)}catch(g){console.error(g.message)}},handlePageChange(g){this.currentPage=g,this.getData()},async getFilter(){try{const{data:g}=await jt.get(`/api/filter/${this.table}`);this.filters=g.list}catch(g){console.error(g.message)}},async handleSearchValue(g){this.search=g,await this.getData()},closeObjCard(){var E;const g=new URLSearchParams(window.location.search);g.delete("id"),this.deletePulsePoint(),this.deleteHighlighPolygon();const C=`${window.location.pathname}?${g.toString()}`;(E=this.map)==null||E.fitBounds(this.currentBbox||this.maxBounds,{}),window.history.pushState({},"",C),this.isSelectObj=!1,this.getData()},async handleSearchRegionValue(g){var C;const S=this.map.getLayer("region-search-id");this.searchRegion=g,g===""&&S?((C=this.map)==null||C.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("region-search-id"),this.getData()):g===""&&this.getData()},async handleSearchAddressValue(g){var C;const S=this.map.getLayer("address-search-id");this.searchAddress=g,g===""&&S?((C=this.map)==null||C.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("address-search-id"),this.getData()):g===""&&this.getData()},handleFilterChange(g){this.currentPage=g.state.page||1,this.filterUrl=g.url.split("|").filter(S=>!S.includes("page=")).join("|")},async updateTableAndMap(){var g,S;this.filtersParam=this.filterUrl,this.activeFilters=(S=(g=this.$refs)==null?void 0:g.filter)==null?void 0:S.activeFilters,this.isFilterVisible=!1},handleFilterSubmit(){var g;this.isSelectObj="",this.selectedId="",this.selectedId=!1,(g=this.map)==null||g.fitBounds(this.maxBounds,{}),this.isFilterVisible=!1},toggleFilterShown(){this.isFilterVisible=!this.isFilterVisible},closeFilterShown(){this.isFilterVisible=!1},toggleMapVisible(){this.isMapVisible=!this.isMapVisible},checkUrl(){const g=new URLSearchParams(window.location.search);g.has("id")?(this.isSelectObj=!0,this.isMapVisible=!0,this.selectedId=g.get("id")):(this.isSelectObj=!1,this.selectedId="")},changeLimit(g){this.limit=g,this.currentPage=1,this.getData()},filterModalClose(){this.toggleFilterShown(),this.isFilterVisible=!1},resetFilters(){this.$refs.filter&&(this.$refs.filter.clearAll(),this.search="",this.isFilterVisible=!1,this.filtersParam="",this.polyline=null,this.regionSelectValue=null,this.addressSelectValue=null,this.currentBbox=null,this.activeFilters=null,this.tabsIsVisible=!1,this.handleSearchRegionValue(""),this.handleSearchAddressValue(""))},checkFilterLength(){var S,C;const g=(C=(S=this.$refs)==null?void 0:S.filter)==null?void 0:C.filteredActiveFiltersLength;g!==this.previousLength&&(this.previousLength=g,this.activeFiltersCount=g)},async handleMapClick(g){var W,T,c,ye,xe,Se,le,ae;const S=this.map.queryRenderedFeatures(g.point);if((S==null?void 0:S.length)<1)return;const C=window.location.pathname,E=new URLSearchParams(window.location.search);E.set("id",`${(W=S[0])==null?void 0:W.properties.id}`),this.getObjectData((c=(T=S[0])==null?void 0:T.properties)==null?void 0:c.id);const N=`${C}?${E.toString()}`;window.history.pushState({},"",N),this.isSelectObj=!0,g.lngLat&&((ae=this.map)==null||ae.fitBounds([[(ye=g.lngLat)==null?void 0:ye.lng,(xe=g.lngLat)==null?void 0:xe.lat],[(Se=g.lngLat)==null?void 0:Se.lng,(le=g.lngLat)==null?void 0:le.lat]],{maxZoom:this.zoom,padding:30})),this.checkUrl()},async getObjectData(g){var S,C;try{const{data:E}=await jt.get(`/api/data/${this.table}/${g}`);this.selectRow((S=E==null?void 0:E.rows)==null?void 0:S[0]),((C=E==null?void 0:E.rows)==null?void 0:C.lenght)<1&&this.deletePulsePoint()}catch(E){console.error(E.message)}},async selectRow(g){var N,W;this.isMapVisible=!0,this.selectedRow=g;const S=window.location.pathname,C=new URLSearchParams(window.location.search);C.set("id",`${g.id}`);const E=`${S}?${C.toString()}`;if(window.history.pushState({},"",E),this.checkUrl(),g!=null&&g.geom){const{type:T,coordinates:c}=g.geom;let ye;switch(T){case"Polygon":ye=zu(c);break;case"MultiPolygon":ye=Lu(c);break;case"MultiPoint":ye=Du(c);break;default:(N=this.map)==null||N.fitBounds([c,c],{maxZoom:15,padding:30}),this.isSelectObj=!0;return}const xe=Ou(ye).geometry.coordinates;(W=this.map)==null||W.fitBounds([xe,xe],{maxZoom:this.zoom,padding:30})}this.isSelectObj=!0},deletePulsePoint(){this.marker&&this.marker.remove()},addPulsePoint(g){this.deletePulsePoint();const S=document.createElement("div");S.className="gps-marker",S.style.width="10px",S.style.height="10px",S.style.position="relative";const C=document.createElement("div");C.className="gps-wave",S.appendChild(C),this.marker=new il.Marker({element:S,anchor:"center"}).setLngLat(g).addTo(this.map)},deleteHighlighPolygon(){this.map.getLayer("highlighted-polygon")&&(this.map.removeLayer("highlighted-polygon"),this.map.removeSource("highlighted-polygon"))},highlightPolygon(g){var S,C,E;this.deletePulsePoint(),this.deleteHighlighPolygon(),this.map.addSource("highlighted-polygon",{type:"geojson",data:{geometry:{type:(S=g==null?void 0:g.geom)==null?void 0:S.type,coordinates:(C=g==null?void 0:g.geom)==null?void 0:C.coordinates},type:"Feature",properties:{id:g==null?void 0:g.id,name:g==null?void 0:g.name,category:g==null?void 0:g.id},id:g==null?void 0:g.id,layer:{id:"site.rest_zone.table-0",type:"fill",source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",minzoom:0,maxzoom:24,filter:["all",["==",["geometry-type"],(E=g==null?void 0:g.geom)==null?void 0:E.type]],paint:{"fill-color":"orange","fill-opacity":.5},layout:{}},source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",state:{hover:!0},table:"site.rest_zone.table"}}),this.map.addLayer({id:"highlighted-polygon",type:"fill",source:"highlighted-polygon",layout:{},paint:{"fill-color":"orange","fill-opacity":.6}}),this.map.moveLayer("highlighted-polygon")},async handleMapHover(g){var N,W,T;this.hoverObject&&(this.map.setFeatureState(this.hoverObject,{hover:!1}),this.hoverObject=null),this.popup||(this.popup=new il.Popup({maxWidth:"400px",closeButton:!1,closeOnClick:!1}));const S=this.map.queryRenderedFeatures(g.point);if(this.map.getCanvas().style.cursor="pointer",!(S!=null&&S.length)||((N=S==null?void 0:S[0])==null?void 0:N.source)==="region-search-id"){this.map.getCanvas().style.cursor="",this.popup.remove();return}const C=S[0].geometry.coordinates.slice();S[0].source==="highlighted-polygon"&&S[1]?this.hoverData=(W=S[1])==null?void 0:W.properties:this.hoverData=(T=S[0])==null?void 0:T.properties;const E={source:S[0].source,sourceLayer:S[0].sourceLayer,id:S[0].id};if(E.source!=="region-search-id"){for(this.map.setFeatureState(E,{hover:!0}),this.hoverObject=E;Math.abs(g.lngLat.lng-C[0])>180;)C[0]+=g.lngLat.lng>C[0]?360:-360;this.popup.setLngLat(g.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map)}}}}),tg={class:"ml-3 pt-5"},ig={class:"w-full gap-5 flex justify-between mb-[10px] pr-3"},rg={class:"flex gap-[20px]"},ng={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"},sg={class:"p-4 flex-1 flex flex-wrap justify-end items-center gap-2"},og=["title"],ag=K.createElementVNode("span",{class:"sr-only"},"Відкрити мапу",-1),lg={class:"flex"},cg={class:"py-[15px] pb-[24px] pl-2"},hg={class:"font-bold text-2xl mr-[10px]"},ug={class:"text-sm text-stone-500 font-medium"},dg=K.createElementVNode("span",{class:"text-sm text-stone-500 font-medium"}," об'єктів",-1),pg={class:"wrapperTable flex flex-col",style:{height:"calc(100vh - 302px)"}},fg={key:0,class:"flex gap-x-2 flex-wrap"},mg={class:"font-medium"},gg=K.createElementVNode("span",{class:"h-3 mx-2 border-s border-gray-200"},null,-1),_g={class:"text-gray-500"},yg=["onClick"],xg={key:0,class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full"},vg=K.createElementVNode("span",{class:"font-medium"}," Очистити ",-1),bg={key:2,class:"text-center py-28"},wg=K.createElementVNode("h2",{class:"font-medium text-base text-gray-500 rounded-xl"}," За вашим запитом даних не знайдено! ",-1),Sg=K.createElementVNode("p",{class:"font-normal text-sm text-gray-500 rounded-xl"}," Введіть, будь ласка, інші значення для пошуку. ",-1),Tg={key:0},Ig={key:1,class:"my-5 pr-2"},Pg={class:"flex justify-between"},kg={class:"w-2/4"},Ag={class:"map-section"},Cg={ref:"popup",style:{display:"none"}};function Eg(g,S,C,E,N,W){var He;const T=K.resolveComponent("VsAutocompleteOption"),c=K.resolveComponent("vs-autocomplete"),ye=K.resolveComponent("VsTextMask"),xe=K.resolveComponent("vs-text"),Se=K.resolveComponent("FilterIcon"),le=K.resolveComponent("VsFilter"),ae=K.resolveComponent("VsDialog"),_t=K.resolveComponent("VisibleMapIcon"),Ze=K.resolveComponent("HiddenMapIcon"),tt=K.resolveComponent("CloseIcon"),Ne=K.resolveComponent("NoData"),pt=K.resolveComponent("VsPagination"),Ft=K.resolveComponent("MapPortal");return K.openBlock(),K.createElementBlock("section",tg,[K.createElementVNode("div",null,[K.createElementVNode("div",ig,[K.createElementVNode("div",rg,[g.isAutocomplete?(K.openBlock(),K.createBlock(c,{key:0,modelValue:g.regionSelectValue,"onUpdate:modelValue":[S[0]||(S[0]=Ke=>g.regionSelectValue=Ke),g.handleSearchRegionValue],searchable:"",clearable:"",searchPlaceholder:"Введіть назву громади",placeholder:"Обрати область чи громаду",onOnSearch:g.handleSearchRegionDebounced,onClick:g.getReginOptions,class:"w-[350px]"},{default:K.withCtx(()=>[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(g.searchRegionResult,Ke=>(K.openBlock(),K.createBlock(T,{class:"cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",key:Ke==null?void 0:Ke.id,value:Ke,label:g.regionFullName(Ke)},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onOnSearch","onUpdate:modelValue","onClick"])):K.createCommentVNode("",!0),g.isAddressAutocomplete?(K.openBlock(),K.createBlock(c,{key:1,modelValue:g.addressSelectValue,"onUpdate:modelValue":[S[1]||(S[1]=Ke=>g.addressSelectValue=Ke),g.handleSearchAddressValue],searchable:"",clearable:"",searchPlaceholder:"Введіть адресу",placeholder:"Обрати адресу",onOnSearch:g.handleSearchAddressDebounced,onClick:g.getAddressOptions,class:"w-[350px]"},{default:K.withCtx(()=>[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(g.searchAddressResult,Ke=>(K.openBlock(),K.createBlock(T,{class:"cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",key:Ke==null?void 0:Ke.id,value:Ke,label:Ke.text},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onOnSearch","onUpdate:modelValue","onClick"])):K.createCommentVNode("",!0),g.maskForSearch?(K.openBlock(),K.createBlock(ye,{key:2,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"w-full table-interface-search",placeholder:"Пошук",mask:g.maskForSearch,icon:"search",iconPosition:"left",clearable:"",style:{height:"38px","min-width":"300px","max-width":"300px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue","mask"])):(K.openBlock(),K.createBlock(xe,{key:3,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"w-full table-interface-search",placeholder:"Пошук",icon:"search","icon-position":"left",clearable:"",style:{height:"38px",width:"300px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue"])),K.createElementVNode("button",{type:"button",class:"py-2 px-2.5 max-h-[38px] inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:S[2]||(S[2]=(...Ke)=>g.toggleFilterShown&&g.toggleFilterShown(...Ke))},[K.createVNode(Se),K.createTextVNode(" Фільтри "),g.activeFiltersCount>=1?(K.openBlock(),K.createElementBlock("span",ng,K.toDisplayString(g.activeFiltersCount),1)):K.createCommentVNode("",!0)]),K.createVNode(ae,{visible:g.isFilterVisible,"onUpdate:visible":S[5]||(S[5]=Ke=>g.isFilterVisible=Ke),title:"Фільтри",size:"small",onOnClose:S[6]||(S[6]=()=>{g.visibleTrue=!0,g.isFilterVisible=!1})},{footer:K.withCtx(()=>[K.createElementVNode("div",sg,[K.createElementVNode("button",{onClick:S[3]||(S[3]=(...Ke)=>g.resetFilters&&g.resetFilters(...Ke)),class:"py-2 px-3 inline-flex justify-center items-center text-start bg-white border border-gray-200 text-gray-800 text-sm font-medium rounded-lg shadow-sm align-middle hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"}," Очистити все "),K.createElementVNode("button",{onClick:S[4]||(S[4]=(...Ke)=>g.updateTableAndMap&&g.updateTableAndMap(...Ke)),class:"py-2 px-3 inline-flex justify-center items-center gap-x-2 text-start bg-blue-600 border border-blue-600 text-white text-sm font-medium rounded-lg shadow-sm align-middle hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500"}," Застосувати ")])]),default:K.withCtx(()=>[g.filters?(K.openBlock(),K.createBlock(le,{key:0,ref:"filter",scheme:g.filters,history:!0,closeFilterBtn:!0,onFilterClose:g.closeFilterShown,name:"filter",layout:"default",onFilterChange:g.handleFilterChange},null,8,["scheme","onFilterClose","onFilterChange"])):K.createCommentVNode("",!0)]),_:1},8,["visible"])]),K.createElementVNode("button",{type:"button",class:"py-2 px-2 inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100",title:g.isMapVisible?"Приховати карту":"Показати карту",onClick:S[7]||(S[7]=(...Ke)=>g.toggleMapVisible&&g.toggleMapVisible(...Ke))},[g.isMapVisible?(K.openBlock(),K.createBlock(_t,{key:0})):(K.openBlock(),K.createBlock(Ze,{key:1})),ag],8,og)]),K.createElementVNode("div",lg,[K.createElementVNode("div",{class:K.normalizeClass(["relative overflow-hidden",g.isMapVisible?"w-2/4 mr-0":"w-full mr-3",g.isSelectObj?"hidden":""])},[K.createElementVNode("h1",cg,[K.createElementVNode("span",hg,K.toDisplayString(g.title),1),K.createElementVNode("span",ug,K.toDisplayString(g.total),1),dg]),K.createElementVNode("div",pg,[g.activeFilters?(K.openBlock(),K.createElementBlock("div",fg,[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(g.activeFilters,(Ke,vt,$t)=>(K.openBlock(),K.createElementBlock("span",{class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full",key:$t},[K.createElementVNode("span",mg,K.toDisplayString(g.getLabelById(vt)),1),gg,K.createElementVNode("span",_g,K.toDisplayString(g.getOptionsLabelById(vt,Ke)),1),K.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:Nt=>g.clearFilter(vt)},[K.createVNode(tt)],8,yg)]))),128)),((He=Object.keys(g.activeFilters))==null?void 0:He.length)>=2?(K.openBlock(),K.createElementBlock("span",xg,[vg,K.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:S[8]||(S[8]=(...Ke)=>g.resetFilters&&g.resetFilters(...Ke))},[K.createVNode(tt)])])):K.createCommentVNode("",!0)])):K.createCommentVNode("",!0),g.total>=1?K.renderSlot(g.$slots,"table",{key:1,rows:g.tableData,map:g.map,selectRow:g.selectRow,getData:g.getData,isMapVisible:g.isMapVisible}):(K.openBlock(),K.createElementBlock("div",bg,[K.createVNode(Ne),wg,Sg,K.createElementVNode("button",{type:"button",class:"mt-[10px] py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs rounded-lg border border-stone-200 bg-white text-stone-800 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",onClick:S[9]||(S[9]=(...Ke)=>g.resetFilters&&g.resetFilters(...Ke))}," Очистити дані пошуку ")]))]),g.total>=1?(K.openBlock(),K.createElementBlock("hr",Tg)):K.createCommentVNode("",!0),g.total>=1?(K.openBlock(),K.createElementBlock("div",Ig,[K.createElementVNode("div",Pg,[K.createVNode(pt,{total:g.total,maxPages:7,defaultPage:g.currentPage,pageSize:g.limit,goTo:!1,size:"medium",onPageChange:g.handlePageChange,backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[10,20,30],onPageSizeChange:g.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])):K.createCommentVNode("",!0)],2),g.isSelectObj?(K.openBlock(),K.createElementBlock("div",{key:0,class:K.normalizeClass(g.isMapVisible?"w-2/4 mr-0 pb-5":"w-full pb-5 mr-3"),style:{height:"calc(100vh - 152px)"}},[K.renderSlot(g.$slots,"details",{table:g.table,selectedId:g.selectedId,selectedRow:g.selectedRow,map:g.map,closeObjCard:g.closeObjCard,isMapVisible:g.isMapVisible})],2)):K.createCommentVNode("",!0),K.withDirectives(K.createElementVNode("div",kg,[K.createElementVNode("section",Ag,[K.createVNode(Ft,{height:"calc(100vh - 152px)",width:"w-2/4",table:g.table,filtersParam:g.filtersParam,row:g.selectedRow,legendname:g.legendname,colorAttr:g.colorAttr,maxBounds:g.maxBounds,zoom:g.zoom,basemap:g.basemap,pointZoom:g.pointZoom},null,8,["table","filtersParam","row","legendname","colorAttr","maxBounds","zoom","basemap","pointZoom"])])],512),[[K.vShow,g.isMapVisible]])]),K.createElementVNode("div",Cg,[K.renderSlot(g.$slots,"popup",{data:g.hoverData})],512)])])}const Nu=Or(eg,[["render",Eg]]),Uu={install:g=>{g.component("VsPartsMap",Nu)},components:{VsPartsMap:Nu}};return typeof window<"u"&&(window.PartsMap=Uu),Uu});
585
+ `+W):E.stack=W}catch{}}throw E}}_request(S,C){typeof S=="string"?(C=C||{},C.url=S):C=S||{},C=ts(this.defaults,C);const{transitional:E,paramsSerializer:N,headers:W}=C;E!==void 0&&zc.assertOptions(E,{silentJSONParsing:Pn.transitional(Pn.boolean),forcedJSONParsing:Pn.transitional(Pn.boolean),clarifyTimeoutError:Pn.transitional(Pn.boolean)},!1),N!=null&&(fe.isFunction(N)?C.paramsSerializer={serialize:N}:zc.assertOptions(N,{encode:Pn.function,serialize:Pn.function},!0)),C.method=(C.method||this.defaults.method||"get").toLowerCase();let T=W&&fe.merge(W.common,W[C.method]);W&&fe.forEach(["delete","get","head","post","put","patch","common"],Ze=>{delete W[Ze]}),C.headers=Gi.concat(T,W);const c=[];let ye=!0;this.interceptors.request.forEach(function(tt){typeof tt.runWhen=="function"&&tt.runWhen(C)===!1||(ye=ye&&tt.synchronous,c.unshift(tt.fulfilled,tt.rejected))});const xe=[];this.interceptors.response.forEach(function(tt){xe.push(tt.fulfilled,tt.rejected)});let Se,le=0,ae;if(!ye){const Ze=[Au.bind(this),void 0];for(Ze.unshift.apply(Ze,c),Ze.push.apply(Ze,xe),ae=Ze.length,Se=Promise.resolve(C);le<ae;)Se=Se.then(Ze[le++],Ze[le++]);return Se}ae=c.length;let _t=C;for(le=0;le<ae;){const Ze=c[le++],tt=c[le++];try{_t=Ze(_t)}catch(Ne){tt.call(this,Ne);break}}try{Se=Au.call(this,_t)}catch(Ze){return Promise.reject(Ze)}for(le=0,ae=xe.length;le<ae;)Se=Se.then(xe[le++],xe[le++]);return Se}getUri(S){S=ts(this.defaults,S);const C=xu(S.baseURL,S.url);return hu(C,S.params,S.paramsSerializer)}}fe.forEach(["delete","get","head","options"],function(S){is.prototype[S]=function(C,E){return this.request(ts(E||{},{method:S,url:C,data:(E||{}).data}))}}),fe.forEach(["post","put","patch"],function(S){function C(E){return function(W,T,c){return this.request(ts(c||{},{method:S,headers:E?{"Content-Type":"multipart/form-data"}:{},url:W,data:T}))}}is.prototype[S]=C(),is.prototype[S+"Form"]=C(!0)});class Dc{constructor(S){if(typeof S!="function")throw new TypeError("executor must be a function.");let C;this.promise=new Promise(function(W){C=W});const E=this;this.promise.then(N=>{if(!E._listeners)return;let W=E._listeners.length;for(;W-- >0;)E._listeners[W](N);E._listeners=null}),this.promise.then=N=>{let W;const T=new Promise(c=>{E.subscribe(c),W=c}).then(N);return T.cancel=function(){E.unsubscribe(W)},T},S(function(W,T,c){E.reason||(E.reason=new Vs(W,T,c),C(E.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(S){if(this.reason){S(this.reason);return}this._listeners?this._listeners.push(S):this._listeners=[S]}unsubscribe(S){if(!this._listeners)return;const C=this._listeners.indexOf(S);C!==-1&&this._listeners.splice(C,1)}static source(){let S;return{token:new Dc(function(N){S=N}),cancel:S}}}function nm(g){return function(C){return g.apply(null,C)}}function sm(g){return fe.isObject(g)&&g.isAxiosError===!0}const Lc={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(Lc).forEach(([g,S])=>{Lc[S]=g});function Mu(g){const S=new is(g),C=Xh(is.prototype.request,S);return fe.extend(C,is.prototype,S,{allOwnKeys:!0}),fe.extend(C,S,null,{allOwnKeys:!0}),C.create=function(N){return Mu(ts(g,N))},C}const jt=Mu(Oo);jt.Axios=is,jt.CanceledError=Vs,jt.CancelToken=Dc,jt.isCancel=mu,jt.VERSION=Cu,jt.toFormData=al,jt.AxiosError=ct,jt.Cancel=jt.CanceledError,jt.all=function(S){return Promise.all(S)},jt.spread=nm,jt.isAxiosError=sm,jt.mergeConfig=ts,jt.AxiosHeaders=Gi,jt.formToJSON=g=>pu(fe.isHTMLForm(g)?new FormData(g):g),jt.getAdapter=ku.getAdapter,jt.HttpStatusCode=Lc,jt.default=jt;const Rc=(g,S=300)=>{let C;return function(...N){clearTimeout(C),C=setTimeout(()=>{g.apply(this,N)},S)}};function dl(g,S,C={}){const E={type:"Feature"};return(C.id===0||C.id)&&(E.id=C.id),C.bbox&&(E.bbox=C.bbox),E.properties=S||{},E.geometry=g,E}function om(g,S,C={}){if(!g)throw new Error("coordinates is required");if(!Array.isArray(g))throw new Error("coordinates must be an Array");if(g.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Ru(g[0])||!Ru(g[1]))throw new Error("coordinates must contain numbers");return dl({type:"Point",coordinates:g},S,C)}function zu(g,S,C={}){for(const N of g){if(N.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(N[N.length-1].length!==N[0].length)throw new Error("First and last Position are not equivalent.");for(let W=0;W<N[N.length-1].length;W++)if(N[N.length-1][W]!==N[0][W])throw new Error("First and last Position are not equivalent.")}return dl({type:"Polygon",coordinates:g},S,C)}function Du(g,S,C={}){return dl({type:"MultiPoint",coordinates:g},S,C)}function Lu(g,S,C={}){return dl({type:"MultiPolygon",coordinates:g},S,C)}function Ru(g){return!isNaN(g)&&g!==null&&!Array.isArray(g)}function Bu(g,S,C){if(g!==null)for(var E,N,W,T,c,ye,xe,Se=0,le=0,ae,_t=g.type,Ze=_t==="FeatureCollection",tt=_t==="Feature",Ne=Ze?g.features.length:1,pt=0;pt<Ne;pt++){xe=Ze?g.features[pt].geometry:tt?g.geometry:g,ae=xe?xe.type==="GeometryCollection":!1,c=ae?xe.geometries.length:1;for(var Ft=0;Ft<c;Ft++){var He=0,Ke=0;if(T=ae?xe.geometries[Ft]:xe,T!==null){ye=T.coordinates;var vt=T.type;switch(Se=0,vt){case null:break;case"Point":if(S(ye,le,pt,He,Ke)===!1)return!1;le++,He++;break;case"LineString":case"MultiPoint":for(E=0;E<ye.length;E++){if(S(ye[E],le,pt,He,Ke)===!1)return!1;le++,vt==="MultiPoint"&&He++}vt==="LineString"&&He++;break;case"Polygon":case"MultiLineString":for(E=0;E<ye.length;E++){for(N=0;N<ye[E].length-Se;N++){if(S(ye[E][N],le,pt,He,Ke)===!1)return!1;le++}vt==="MultiLineString"&&He++,vt==="Polygon"&&Ke++}vt==="Polygon"&&He++;break;case"MultiPolygon":for(E=0;E<ye.length;E++){for(Ke=0,N=0;N<ye[E].length;N++){for(W=0;W<ye[E][N].length-Se;W++){if(S(ye[E][N][W],le,pt,He,Ke)===!1)return!1;le++}Ke++}He++}break;case"GeometryCollection":for(E=0;E<T.geometries.length;E++)if(Bu(T.geometries[E],S)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Fu(g,S={}){if(g.bbox!=null&&S.recompute!==!0)return g.bbox;const C=[1/0,1/0,-1/0,-1/0];return Bu(g,E=>{C[0]>E[0]&&(C[0]=E[0]),C[1]>E[1]&&(C[1]=E[1]),C[2]<E[0]&&(C[2]=E[0]),C[3]<E[1]&&(C[3]=E[1])}),C}function Ou(g,S={}){const C=Fu(g),E=(C[0]+C[2])/2,N=(C[1]+C[3])/2;return om([E,N],S.properties,S)}const am={mixins:[yc],props:{map:{type:Object},baseLayers:{type:Array,default:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",category:"Національна інфраструктура геопросторових даних",scale:1e4,year:2020,bounds:"ua",maxzoom:18,owner:"НДІГК (Інститут геодезії та картографії)",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png",basemap:!0},{id:"graymap",name:"Сіра карта",url:"https://basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",attribution:"&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, &copy; <a href='https://carto.com/attributions'>CARTO</a>",bounds1:"ua",image:"https://basemaps.cartocdn.com/light_all/10/601/348.png",position:0,owner:"OSM",basemap:!0},{id:"darkmap_carto",name:"Темна карта України",image:"https://basemaps.cartocdn.com/dark_all/13/4791/2762.png?ver=2023-04-14",url:"https://basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",service:"TMS",category:"Базові карти",active:!1}]}},data(){return{selectedLayer:null}},watch:{map(g){g&&g.on("load",this.handleMapLoad)}},methods:{handleMapLoad(){var g;this.baseLayers.forEach(S=>{this.layerList.push(S)}),this.toggleLayerVisibility((g=this.baseLayers[0])==null?void 0:g.id)},toggleLayerVisibility(g){this.selectedLayer=g,this.changeBaseLayer(this.selectedLayer)}}},lm={class:"vs-map-slot-layers"},cm=["onClick"],hm=["src"];function um(g,S,C,E,N,W){return K.openBlock(),K.createElementBlock("div",lm,[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(C.baseLayers,(T,c)=>(K.openBlock(),K.createElementBlock("div",{key:T.id,class:K.normalizeClass(["vs-map-slot-layers__layer relative",{focused:T.id==N.selectedLayer}]),onClick:ye=>W.toggleLayerVisibility(T.id)},[K.createElementVNode("img",{src:T.image,class:"vs-map-slot-layers__image"},null,8,hm),K.createElementVNode("div",{class:K.normalizeClass(["absolute py-2 px-4 text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg top-[-46px] text-nowrap p-2 hidden whitespace-nowrap",[c===0?"left-[-10px]":"left-[50%] translate-x-[-50%] "]])},K.toDisplayString(T==null?void 0:T.name),3)],10,cm))),128))])}const dm=Or(am,[["render",um],["__scopeId","data-v-d4fbd7d5"]]),pm={props:["colors","title"],methods:{capitalizeFirstLetter(g){return g?g.charAt(0).toUpperCase()+g.slice(1):""}}},fm={class:"absolute left-[20px] bottom-[74px] bg-white max-w-[250px] p-[10px] rounded-lg"},mm={key:0,class:"mb-[10px] text-[1rem]"},gm={class:"legend-item"},_m={key:0,class:"flex justify-start items-center gap-2"},ym={class:"ml-1 text-[0.875rem]"};function xm(g,S,C,E,N,W){return K.openBlock(),K.createElementBlock("div",fm,[C.title?(K.openBlock(),K.createElementBlock("div",mm,K.toDisplayString(C.title),1)):K.createCommentVNode("",!0),(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(C.colors,T=>(K.openBlock(),K.createElementBlock("div",gm,[T.id>0?(K.openBlock(),K.createElementBlock("div",_m,[K.createElementVNode("div",{class:"w-[15px] h-[15px] rounded-[50%] min-w-[15px]",style:K.normalizeStyle({backgroundColor:T.color})},null,4),K.createElementVNode("div",ym,K.toDisplayString(W.capitalizeFirstLetter(T.text)),1)])):K.createCommentVNode("",!0)]))),256))])}const vm={components:{MapSlotLayers:dm,MapLegend:Or(pm,[["render",xm]])},props:{colorAttr:null,legendname:{type:String,default:()=>""},height:{type:String,default:()=>"100vh"},width:{type:String,default:"100vw"},center:{type:Array,default:[32,49]},maxBounds:{type:Array,default:[[22,44],[40,52]]},table:{type:String,default:""},zoom:{type:[String,Number],default:5},basemap:Array,filtersParam:{type:String,default:""},row:{type:Object,default:{}},pointZoom:{type:String,default:"12"}},mixins:[yc],data(){return{map:null,hoverObject:null,popup:null,colors:[]}},async mounted(){var g,S,C,E;if(await this.createMap(),(g=this.row)!=null&&g.geom){const{type:N,coordinates:W}=this.row.geom;let T;switch(N){case"Polygon":T=zu(W);break;case"MultiPolygon":T=Lu(W);break;case"MultiPoint":T=Du(W);break;default:(S=this.map)==null||S.fitBounds([W,W],{maxZoom:15,padding:30}),this.isSelectObj=!0;return}const c=Ou(T).geometry.coordinates;(C=this.map)==null||C.fitBounds([c,c],{maxZoom:15,padding:30})}else(E=this.map)==null||E.fitBounds(this.maxBounds)},watch:{filtersParam(g){this.setFilter(this.table,g)}},methods:{async getColorStyle(){var g=[["#69D2E7","#A7DBD8","#E0E4CC","#F38630","#FA6900"],["#FE4365","#FC9D9A","#F9CDAD","#C8C8A9","#83AF9B"],["#ECD078","#D95B43","#C02942","#542437","#53777A"]];if(!this.colorAttr)return"blue";try{const{data:{rows:S}}=await jt.get(`/api/data/${this.table}/${this.colorAttr}`),C=S.reduce((E,N,W)=>N!=null&&N.id?[...E,N.id.toString(),N.color||g[0][W%5]]:E,["match",["get",this.colorAttr]]);return this.colors=[...S],C.push("gray"),C}catch(S){console.log(S)}},async handleMapLoad(){const g=await this.getColorStyle();await this.addLayer({id:this.table,service:"vector",url:`/api/vtile/${this.table}/ua/{z}/{x}/{y}.vmt?pointZoom=${this.pointZoom}`,layers:[{type:"fill","source-layer":this.table,paint:{"fill-color":g,"fill-opacity":.3,"fill-outline-color":["case",["==",["feature-state","hover"],!0],"red","#000000"]},filter:["all",["==",["geometry-type"],"Polygon"]]},{type:"circle","source-layer":this.table,filter:["all",["==",["geometry-type"],"Point"]],paint:{"circle-radius":{base:1.75,stops:[[10,5],[12,6],[18,12]]},"circle-stroke-color":["case",["==",["feature-state","hover"],!0],"red","#ccc"],"circle-stroke-width":["case",["==",["feature-state","hover"],!0],2,1],"circle-color":g}}]})},async createMap(){const g={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new il.Map({container:"maplibre-map",style:g,zoom:10,center:this.center,maxBounds:this.maxBounds}),this.$parent.map=this.map,this.map.addControl(new il.NavigationControl({visualizePitch:!0})),this.map.on("load",this.handleMapLoad)}}},bm={class:"vs-map-portal relative"};function wm(g,S,C,E,N,W){const T=K.resolveComponent("MapLegend"),c=K.resolveComponent("MapSlotLayers");return K.openBlock(),K.createElementBlock("div",bm,[K.createElementVNode("div",{id:"maplibre-map",ref:"maplibreMap",class:"w-full",style:K.normalizeStyle({height:C.height})},null,4),K.createVNode(T,{colors:N.colors,title:C.legendname},null,8,["colors","title"]),K.createVNode(c,{map:N.map,baseLayers:C.basemap},null,8,["map","baseLayers"])])}const Sm=Or(vm,[["render",wm]]),Tm={},Im={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Pm=[K.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)];function km(g,S){return K.openBlock(),K.createElementBlock("svg",Im,Pm)}const Am=Or(Tm,[["render",km]]),Cm={},Em={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-collapse"},Mm=[K.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),K.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),K.createElementVNode("path",{d:"M15 4v16"},null,-1),K.createElementVNode("path",{d:"M9 10l2 2l-2 2"},null,-1)];function zm(g,S){return K.openBlock(),K.createElementBlock("svg",Em,Mm)}const Dm=Or(Cm,[["render",zm]]),Lm={},Rm={xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-layout-sidebar-right-expand"},Bm=[K.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),K.createElementVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null,-1),K.createElementVNode("path",{d:"M15 4v16"},null,-1),K.createElementVNode("path",{d:"M10 10l-2 2l2 2"},null,-1)];function Fm(g,S){return K.openBlock(),K.createElementBlock("svg",Rm,Bm)}const Om=Or(Lm,[["render",Fm]]),Vm={},Nm={class:"shrink-0 size-3",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"},Um=[K.createElementVNode("path",{d:"M18 6 6 18"},null,-1),K.createElementVNode("path",{d:"m6 6 12 12"},null,-1)];function jm(g,S){return K.openBlock(),K.createElementBlock("svg",Nm,Um)}const $m=Or(Vm,[["render",jm]]),qm={props:{visible:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},size:{type:String,default:()=>""}},emits:["update:visible","onClose"],name:"vs-dialog",mounted(){window.addEventListener("keydown",this.checkKey)},unmounted(){window.removeEventListener("keydown",this.checkKey)},computed:{hasSlot(){var g;return!!((g=this.$slots)!=null&&g.footer)},checkSize(){return this.size==="small"?"w-5/12":this.size==="medium"?"w-6/12":"lg:w-7/12 w-11/12"}},methods:{checkKey({key:g}){g==="Escape"&&this.handleClose()},handleClose(){this.$emit("update:visible",!1),this.$emit("onClose")}}},Vu=g=>(K.pushScopeId("data-v-37405773"),g=g(),K.popScopeId(),g),Zm={class:"vsTailwind ui-dialog__wrapper"},Gm={class:"w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50"},Hm={class:"py-2.5 px-4 flex justify-between items-center border-b"},Xm={class:"font-medium text-gray-800"},Wm=[Vu(()=>K.createElementVNode("span",{class:"sr-only"},"Close",-1)),Vu(()=>K.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",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"},[K.createElementVNode("path",{d:"M18 6 6 18"}),K.createElementVNode("path",{d:"m6 6 12 12"})],-1))],Jm={class:"ui-dialog__content p-4"},Km={key:0,class:"flex justify-end gap-x-2"};function Ym(g,S,C,E,N,W){return K.openBlock(),K.createBlock(K.Teleport,{to:"#modal"},[K.createVNode(K.Transition,{name:"fade"},{default:K.withCtx(()=>[K.withDirectives(K.createElementVNode("div",Zm,[K.createElementVNode("div",Gm,[K.createVNode(K.Transition,{name:"content",appear:""},{default:K.withCtx(()=>[K.createElementVNode("div",{class:K.normalizeClass(["ui-dialog__modal opacity-1 transition-all flex flex-col bg-white border pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",[W.checkSize]])},[K.createElementVNode("div",Hm,[K.createElementVNode("h3",Xm,K.toDisplayString(C.title),1),K.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",onClick:S[0]||(S[0]=(...T)=>W.handleClose&&W.handleClose(...T))},Wm)]),K.createElementVNode("div",Jm,[K.renderSlot(g.$slots,"default",{},void 0,!0)]),W.hasSlot?(K.openBlock(),K.createElementBlock("div",Km,[K.renderSlot(g.$slots,"footer",{},void 0,!0)])):K.createCommentVNode("",!0)],2)]),_:3})])],512),[[K.vShow,C.visible]])]),_:3})])}const Qm=Or(qm,[["render",Ym],["__scopeId","data-v-37405773"]]),eg=K.defineComponent({props:{title:{type:String,default:()=>""},table:{type:String,default:()=>""},rows:{type:Object,default:()=>null},initTotal:{type:[Number,String],default:()=>""},colorAttr:{type:String,default:()=>""},legendname:{type:String,default:()=>""},maxBounds:{type:Array,default:()=>[[22,44.4],[40,52.5]]},id:{type:String,default:()=>""},isAutocomplete:{type:Boolean,default:()=>!1},isAddressAutocomplete:{type:Boolean,default:()=>!1},zoom:{type:[Number,String],default:()=>"13"},maskForSearch:{type:String,default:()=>null},basemap:{type:Array},pointZoom:{type:String,default:()=>"12"}},mixins:[yc],components:{MapPortal:Sm,NoData:Fp,FilterIcon:Am,VisibleMapIcon:Dm,HiddenMapIcon:Om,CloseIcon:$m,VsDialog:Qm},data(){return{filters:"",search:"",limit:20,polyline:null,filtersParam:"",isSelectObj:!1,selectedId:"",searchRegion:"",searchAddress:"",marker:null,handleSearchRegionDebounced:Rc(g=>this.updateSearchRegionValue(g),500),handleSearchAddressDebounced:Rc(g=>this.updateSearchAddressValue(g),500),searchRegionResult:[],searchAddressResult:[],selectedRow:null,activeFilters:"",isMapVisible:!0,tabsIsVisible:!1,filterUrl:"",currentPage:1,regionOptionGeneral:null,isFilterVisible:!1,tableData:null,hoverData:null,atuData:[],map:null,legendName:null,total:null,filterValues:"",activeFiltersCount:"",visibleTrue:!0,regionSelectValue:null,addressSelectValue:null,currentBbox:null,optionRowsCount:[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"}],handleDebouncedUpdateValue:Rc(g=>{this.handleSearchValue(g)},10)}},watch:{map(){this.map.on("mousemove",this.handleMapHover),this.map.on("click",this.handleMapClick)},activeFiltersCount(){var g,S;return(S=(g=this.$refs)==null?void 0:g.filter)==null?void 0:S.filteredActiveFiltersLength},activeFilters(){var g,S;return this.isSelectObj&&this.moveToDefaultPage(),(S=(g=this.$refs)==null?void 0:g.filter)==null?void 0:S.activeFilters},isFilterVisible(g){g||this.getData()},async regionSelectValue(g,S){var N,W;if(!this.regionSelectValue){this.map.removeSource("region-search-id");return}g&&this.selectedId&&this.closeObjCard(),this.polyline=this.regionSelectValue.encoded_geom,this.getData();const C=((N=this.regionSelectValue)==null?void 0:N.geom)||Sr.toGeoJSON(this.regionSelectValue.encoded_geom),E=this.map.getSource("region-search-id");if(this.currentBbox=Fu(C),E)E.setData({type:"Feature",geometry:C});else{this.map.addSource("region-search-id",{type:"geojson",data:{type:"Feature",geometry:C}});const T={id:"region-search-id",type:"line",source:"region-search-id",paint:{"line-color":"blue","line-opacity":1}};await this.map.addLayer(T)}this.moveLayer("site.prc.parcel_object.table"),(W=this.map)==null||W.fitBounds(this.currentBbox,{zoom:this.setAtuZoom,padding:20}),this.getData()},async addressSelectValue(g,S){this.addressSelectValue&&(g&&this.selectedId&&this.closeObjCard(),this.getData())}},created(){this.legendName,this.tableData=this.rows,this.total=this.initTotal,this.id&&(this.selectedRow=this.rows[0],this.selectedId=this.id,this.isSelectObj=!0)},mounted(){this.rows||this.getData(),this.getFilter()},updated(){this.checkFilterLength()},computed:{setAtuZoom(){var g,S,C;return((g=this.regionSelectValue)==null?void 0:g.id)==="UA80000000000093317"||((S=this.regionSelectValue)==null?void 0:S.id)==="UA85000000000065278"?10:((C=this.regionSelectValue)==null?void 0:C.region)===""?7.5:11}},methods:{async updateSearchRegionValue(g){this.searchRegion=g,await this.getReginOptions()},async updateSearchAddressValue(g){this.searchAddress=g,await this.getAddressOptions()},async getData(){try{const g={search:this.search||null,limit:this.limit,page:this.currentPage,polyline:this.polyline};this.filtersParam!==""&&this.filtersParam!=="no-url"?g.filter=this.filtersParam:g.filter="",this.addressSelectValue&&(g.filter+=g.filter?`&address_id=${this.addressSelectValue.id}`:`address_id=${this.addressSelectValue.id}`);const{data:S}=await jt.get(`/api/data/${this.table}`,{params:g});this.tableData=S==null?void 0:S.rows,this.total=S.total}catch(g){console.error(g.message)}},moveToDefaultPage(){var E;const g=new URLSearchParams(window.location.search);g.delete("id");const C=`${window.location.pathname}?${g.toString()}`;(E=this.map)==null||E.fitBounds(this.maxBounds,{}),window.history.pushState({},"",C),this.isSelectObj=!1},regionFullName(g){return g.region?`${g.text} / ${g.region}`:g.text},getLabelById(g){const S=this.filters.find(C=>C.id===g);return S?S.label:g},getOptionsLabelById(g,S){if(Array.isArray(S)){const C=this.filters.find(E=>E.id===g);return C!=null&&C.options?C==null?void 0:C.options.filter(E=>S.includes(E.id)).map(E=>E.text).join(", "):S==null?void 0:S.length}else return S},async clearFilter(g){var S,C;await((C=(S=this.$refs)==null?void 0:S.filter)==null?void 0:C.clearFilter(g)),await this.updateTableAndMap(),await this.getData()},async getReginOptions(){if(this.searchRegion===""&&this.regionOptionGeneral)this.searchRegionResult=this.regionOptionGeneral;else try{const{data:g}=await jt.get(`https://data.softpro.ua/api-user/suggest/atu.codifier.type.polyline.select.region?key=${this.searchRegion}`);this.searchRegionResult=g,this.regionOptionGeneral||(this.regionOptionGeneral=g)}catch(g){console.error(g.message)}},async getAddressOptions(){if(this.searchAddress===""&&this.addressOptionGeneral)this.searchAddressResult=this.addressOptionGeneral;else try{const{data:g}=await jt.get(`/api/suggest/itree.address_id?key=${this.searchAddress}`);this.searchAddressResult=g,this.addressOptionGeneral||(this.addressOptionGeneral=g)}catch(g){console.error(g.message)}},handlePageChange(g){this.currentPage=g,this.getData()},async getFilter(){try{const{data:g}=await jt.get(`/api/filter/${this.table}`);this.filters=g.list}catch(g){console.error(g.message)}},async handleSearchValue(g){this.search=g,await this.getData()},closeObjCard(){var E;const g=new URLSearchParams(window.location.search);g.delete("id"),this.deletePulsePoint(),this.deleteHighlighPolygon();const C=`${window.location.pathname}?${g.toString()}`;(E=this.map)==null||E.fitBounds(this.currentBbox||this.maxBounds,{}),window.history.pushState({},"",C),this.isSelectObj=!1,this.getData()},async handleSearchRegionValue(g){var C;const S=this.map.getLayer("region-search-id");this.searchRegion=g,g===""&&S?((C=this.map)==null||C.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("region-search-id"),this.getData()):g===""&&this.getData()},async handleSearchAddressValue(g){var C;const S=this.map.getLayer("address-search-id");this.searchAddress=g,g===""&&S?((C=this.map)==null||C.fitBounds(this.maxBounds,{}),this.currentBbox=null,this.polyline=null,this.map.removeLayer("address-search-id"),this.getData()):g===""&&this.getData()},handleFilterChange(g){this.currentPage=g.state.page||1,this.filterUrl=g.url.split("|").filter(S=>!S.includes("page=")).join("|")},async updateTableAndMap(){var g,S;this.filtersParam=this.filterUrl,this.activeFilters=(S=(g=this.$refs)==null?void 0:g.filter)==null?void 0:S.activeFilters,this.isFilterVisible=!1},handleFilterSubmit(){var g;this.isSelectObj="",this.selectedId="",this.selectedId=!1,(g=this.map)==null||g.fitBounds(this.maxBounds,{}),this.isFilterVisible=!1},toggleFilterShown(){this.isFilterVisible=!this.isFilterVisible},closeFilterShown(){this.isFilterVisible=!1},toggleMapVisible(){this.isMapVisible=!this.isMapVisible},checkUrl(){const g=new URLSearchParams(window.location.search);g.has("id")?(this.isSelectObj=!0,this.isMapVisible=!0,this.selectedId=g.get("id")):(this.isSelectObj=!1,this.selectedId="")},changeLimit(g){this.limit=g,this.currentPage=1,this.getData()},filterModalClose(){this.toggleFilterShown(),this.isFilterVisible=!1},resetFilters(){this.$refs.filter&&(this.$refs.filter.clearAll(),this.search="",this.isFilterVisible=!1,this.filtersParam="",this.polyline=null,this.regionSelectValue=null,this.addressSelectValue=null,this.currentBbox=null,this.activeFilters=null,this.tabsIsVisible=!1,this.handleSearchRegionValue(""),this.handleSearchAddressValue(""))},checkFilterLength(){var S,C;const g=(C=(S=this.$refs)==null?void 0:S.filter)==null?void 0:C.filteredActiveFiltersLength;g!==this.previousLength&&(this.previousLength=g,this.activeFiltersCount=g)},async handleMapClick(g){var W,T,c,ye,xe,Se,le,ae;const S=this.map.queryRenderedFeatures(g.point);if((S==null?void 0:S.length)<1)return;const C=window.location.pathname,E=new URLSearchParams(window.location.search);E.set("id",`${(W=S[0])==null?void 0:W.properties.id}`),this.getObjectData((c=(T=S[0])==null?void 0:T.properties)==null?void 0:c.id);const N=`${C}?${E.toString()}`;window.history.pushState({},"",N),this.isSelectObj=!0,g.lngLat&&((ae=this.map)==null||ae.fitBounds([[(ye=g.lngLat)==null?void 0:ye.lng,(xe=g.lngLat)==null?void 0:xe.lat],[(Se=g.lngLat)==null?void 0:Se.lng,(le=g.lngLat)==null?void 0:le.lat]],{maxZoom:this.zoom,padding:30})),this.checkUrl()},async getObjectData(g){var S,C;try{const{data:E}=await jt.get(`/api/data/${this.table}/${g}`);this.selectRow((S=E==null?void 0:E.rows)==null?void 0:S[0]),((C=E==null?void 0:E.rows)==null?void 0:C.lenght)<1&&this.deletePulsePoint()}catch(E){console.error(E.message)}},async selectRow(g){var N,W;this.isMapVisible=!0,this.selectedRow=g;const S=window.location.pathname,C=new URLSearchParams(window.location.search);C.set("id",`${g.id}`);const E=`${S}?${C.toString()}`;if(window.history.pushState({},"",E),this.checkUrl(),g!=null&&g.geom){const{type:T,coordinates:c}=g.geom;let ye;switch(T){case"Polygon":ye=zu(c);break;case"MultiPolygon":ye=Lu(c);break;case"MultiPoint":ye=Du(c);break;default:(N=this.map)==null||N.fitBounds([c,c],{maxZoom:15,padding:30}),this.isSelectObj=!0;return}const xe=Ou(ye).geometry.coordinates;(W=this.map)==null||W.fitBounds([xe,xe],{maxZoom:this.zoom,padding:30})}this.isSelectObj=!0},deletePulsePoint(){this.marker&&this.marker.remove()},addPulsePoint(g){this.deletePulsePoint();const S=document.createElement("div");S.className="gps-marker",S.style.width="10px",S.style.height="10px",S.style.position="relative";const C=document.createElement("div");C.className="gps-wave",S.appendChild(C),this.marker=new il.Marker({element:S,anchor:"center"}).setLngLat(g).addTo(this.map)},deleteHighlighPolygon(){this.map.getLayer("highlighted-polygon")&&(this.map.removeLayer("highlighted-polygon"),this.map.removeSource("highlighted-polygon"))},highlightPolygon(g){var S,C,E;this.deletePulsePoint(),this.deleteHighlighPolygon(),this.map.addSource("highlighted-polygon",{type:"geojson",data:{geometry:{type:(S=g==null?void 0:g.geom)==null?void 0:S.type,coordinates:(C=g==null?void 0:g.geom)==null?void 0:C.coordinates},type:"Feature",properties:{id:g==null?void 0:g.id,name:g==null?void 0:g.name,category:g==null?void 0:g.id},id:g==null?void 0:g.id,layer:{id:"site.rest_zone.table-0",type:"fill",source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",minzoom:0,maxzoom:24,filter:["all",["==",["geometry-type"],(E=g==null?void 0:g.geom)==null?void 0:E.type]],paint:{"fill-color":"orange","fill-opacity":.5},layout:{}},source:"site.rest_zone.table",sourceLayer:"site.rest_zone.table",state:{hover:!0},table:"site.rest_zone.table"}}),this.map.addLayer({id:"highlighted-polygon",type:"fill",source:"highlighted-polygon",layout:{},paint:{"fill-color":"orange","fill-opacity":.6}}),this.map.moveLayer("highlighted-polygon")},async handleMapHover(g){var N,W,T;this.hoverObject&&(this.map.setFeatureState(this.hoverObject,{hover:!1}),this.hoverObject=null),this.popup||(this.popup=new il.Popup({maxWidth:"400px",closeButton:!1,closeOnClick:!1}));const S=this.map.queryRenderedFeatures(g.point);if(this.map.getCanvas().style.cursor="pointer",!(S!=null&&S.length)||((N=S==null?void 0:S[0])==null?void 0:N.source)==="region-search-id"){this.map.getCanvas().style.cursor="",this.popup.remove();return}const C=S[0].geometry.coordinates.slice();S[0].source==="highlighted-polygon"&&S[1]?this.hoverData=(W=S[1])==null?void 0:W.properties:this.hoverData=(T=S[0])==null?void 0:T.properties;const E={source:S[0].source,sourceLayer:S[0].sourceLayer,id:S[0].id};if(E.source!=="region-search-id"){for(this.map.setFeatureState(E,{hover:!0}),this.hoverObject=E;Math.abs(g.lngLat.lng-C[0])>180;)C[0]+=g.lngLat.lng>C[0]?360:-360;this.popup.setLngLat(g.lngLat).setHTML(this.$refs.popup.innerHTML).addTo(this.map)}}}}),tg={class:"ml-3 pt-5"},ig={class:"w-full gap-5 flex justify-between mb-[10px] pr-3"},rg={class:"flex gap-[20px]"},ng={key:0,class:"font-medium text-[10px] min-w-[16px] py-0.5 px-[5px] bg-gray-800 text-white leading-3 rounded-full"},sg={class:"p-4 flex-1 flex flex-wrap justify-end items-center gap-2"},og=["title"],ag=K.createElementVNode("span",{class:"sr-only"},"Відкрити мапу",-1),lg={class:"flex"},cg={class:"py-[15px] pb-[24px] pl-2"},hg={class:"font-bold text-2xl mr-[10px]"},ug={class:"text-sm text-stone-500 font-medium"},dg=K.createElementVNode("span",{class:"text-sm text-stone-500 font-medium"}," об'єктів",-1),pg={class:"wrapperTable flex flex-col",style:{height:"calc(100vh - 302px)"}},fg={key:0,class:"flex gap-x-2 flex-wrap"},mg={class:"font-medium"},gg=K.createElementVNode("span",{class:"h-3 mx-2 border-s border-gray-200"},null,-1),_g={class:"text-gray-500"},yg=["onClick"],xg={key:0,class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full"},vg=K.createElementVNode("span",{class:"font-medium"}," Очистити ",-1),bg={key:2,class:"text-center py-28"},wg=K.createElementVNode("h2",{class:"font-medium text-base text-gray-500 rounded-xl"}," За вашим запитом даних не знайдено! ",-1),Sg=K.createElementVNode("p",{class:"font-normal text-sm text-gray-500 rounded-xl"}," Введіть, будь ласка, інші значення для пошуку. ",-1),Tg={key:0},Ig={key:1,class:"my-5 pr-2"},Pg={class:"flex justify-between"},kg={class:"w-2/4"},Ag={class:"map-section"},Cg={ref:"popup",style:{display:"none"}};function Eg(g,S,C,E,N,W){var He;const T=K.resolveComponent("VsAutocompleteOption"),c=K.resolveComponent("vs-autocomplete"),ye=K.resolveComponent("VsTextMask"),xe=K.resolveComponent("vs-text"),Se=K.resolveComponent("FilterIcon"),le=K.resolveComponent("VsFilter"),ae=K.resolveComponent("VsDialog"),_t=K.resolveComponent("VisibleMapIcon"),Ze=K.resolveComponent("HiddenMapIcon"),tt=K.resolveComponent("CloseIcon"),Ne=K.resolveComponent("NoData"),pt=K.resolveComponent("VsPagination"),Ft=K.resolveComponent("MapPortal");return K.openBlock(),K.createElementBlock("section",tg,[K.createElementVNode("div",null,[K.createTextVNode(K.toDisplayString(g.filtersParam)+" ",1),K.createElementVNode("div",ig,[K.createElementVNode("div",rg,[g.isAutocomplete?(K.openBlock(),K.createBlock(c,{key:0,modelValue:g.regionSelectValue,"onUpdate:modelValue":[S[0]||(S[0]=Ke=>g.regionSelectValue=Ke),g.handleSearchRegionValue],searchable:"",clearable:"",searchPlaceholder:"Введіть назву громади",placeholder:"Обрати область чи громаду",onOnSearch:g.handleSearchRegionDebounced,onClick:g.getReginOptions,class:"w-[350px]"},{default:K.withCtx(()=>[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(g.searchRegionResult,Ke=>(K.openBlock(),K.createBlock(T,{class:"cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",key:Ke==null?void 0:Ke.id,value:Ke,label:g.regionFullName(Ke)},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onOnSearch","onUpdate:modelValue","onClick"])):K.createCommentVNode("",!0),g.isAddressAutocomplete?(K.openBlock(),K.createBlock(c,{key:1,modelValue:g.addressSelectValue,"onUpdate:modelValue":[S[1]||(S[1]=Ke=>g.addressSelectValue=Ke),g.handleSearchAddressValue],searchable:"",clearable:"",searchPlaceholder:"Введіть адресу",placeholder:"Обрати адресу",onOnSearch:g.handleSearchAddressDebounced,onClick:g.getAddressOptions,class:"w-[350px]"},{default:K.withCtx(()=>[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(g.searchAddressResult,Ke=>(K.openBlock(),K.createBlock(T,{class:"cursor-pointer dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",key:Ke==null?void 0:Ke.id,value:Ke,label:Ke.text},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onOnSearch","onUpdate:modelValue","onClick"])):K.createCommentVNode("",!0),g.maskForSearch?(K.openBlock(),K.createBlock(ye,{key:2,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"w-full table-interface-search",placeholder:"Пошук",mask:g.maskForSearch,icon:"search",iconPosition:"left",clearable:"",style:{height:"38px","min-width":"300px","max-width":"300px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue","mask"])):(K.openBlock(),K.createBlock(xe,{key:3,"model-value":g.search,"onUpdate:modelValue":g.handleDebouncedUpdateValue,class:"w-full table-interface-search",placeholder:"Пошук",icon:"search","icon-position":"left",clearable:"",style:{height:"38px",width:"300px"},ref:"searchInput"},null,8,["model-value","onUpdate:modelValue"])),K.createElementVNode("button",{type:"button",class:"py-2 px-2.5 max-h-[38px] inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",onClick:S[2]||(S[2]=(...Ke)=>g.toggleFilterShown&&g.toggleFilterShown(...Ke))},[K.createVNode(Se),K.createTextVNode(" Фільтри "),g.activeFiltersCount>=1?(K.openBlock(),K.createElementBlock("span",ng,K.toDisplayString(g.activeFiltersCount),1)):K.createCommentVNode("",!0)]),K.createVNode(ae,{visible:g.isFilterVisible,"onUpdate:visible":S[5]||(S[5]=Ke=>g.isFilterVisible=Ke),title:"Фільтри",size:"small",onOnClose:S[6]||(S[6]=()=>{g.visibleTrue=!0,g.isFilterVisible=!1})},{footer:K.withCtx(()=>[K.createElementVNode("div",sg,[K.createElementVNode("button",{onClick:S[3]||(S[3]=(...Ke)=>g.resetFilters&&g.resetFilters(...Ke)),class:"py-2 px-3 inline-flex justify-center items-center text-start bg-white border border-gray-200 text-gray-800 text-sm font-medium rounded-lg shadow-sm align-middle hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"}," Очистити все "),K.createElementVNode("button",{onClick:S[4]||(S[4]=(...Ke)=>g.updateTableAndMap&&g.updateTableAndMap(...Ke)),class:"py-2 px-3 inline-flex justify-center items-center gap-x-2 text-start bg-blue-600 border border-blue-600 text-white text-sm font-medium rounded-lg shadow-sm align-middle hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-1 focus:ring-blue-300 dark:focus:ring-blue-500"}," Застосувати ")])]),default:K.withCtx(()=>[g.filters?(K.openBlock(),K.createBlock(le,{key:0,ref:"filter",scheme:g.filters,urlSeparator:"true",history:!0,closeFilterBtn:!0,onFilterClose:g.closeFilterShown,name:"filter",layout:"default",onFilterChange:g.handleFilterChange},null,8,["scheme","onFilterClose","onFilterChange"])):K.createCommentVNode("",!0)]),_:1},8,["visible"])]),K.createElementVNode("button",{type:"button",class:"py-2 px-2 inline-flex items-center gap-x-1.5 text-sm rounded-lg border border-gray-200 bg-white text-gray-600 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100",title:g.isMapVisible?"Приховати карту":"Показати карту",onClick:S[7]||(S[7]=(...Ke)=>g.toggleMapVisible&&g.toggleMapVisible(...Ke))},[g.isMapVisible?(K.openBlock(),K.createBlock(_t,{key:0})):(K.openBlock(),K.createBlock(Ze,{key:1})),ag],8,og)]),K.createElementVNode("div",lg,[K.createElementVNode("div",{class:K.normalizeClass(["relative overflow-hidden",g.isMapVisible?"w-2/4 mr-0":"w-full mr-3",g.isSelectObj?"hidden":""])},[K.createElementVNode("h1",cg,[K.createElementVNode("span",hg,K.toDisplayString(g.title),1),K.createElementVNode("span",ug,K.toDisplayString(g.total),1),dg]),K.createElementVNode("div",pg,[g.activeFilters?(K.openBlock(),K.createElementBlock("div",fg,[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(g.activeFilters,(Ke,vt,$t)=>(K.openBlock(),K.createElementBlock("span",{class:"mb-[10px] py-1 ps-3 pe-1 inline-flex items-center bg-white border border-gray-200 text-gray-800 text-xs rounded-full",key:$t},[K.createElementVNode("span",mg,K.toDisplayString(g.getLabelById(vt)),1),gg,K.createElementVNode("span",_g,K.toDisplayString(g.getOptionsLabelById(vt,Ke)),1),K.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:Nt=>g.clearFilter(vt)},[K.createVNode(tt)],8,yg)]))),128)),((He=Object.keys(g.activeFilters))==null?void 0:He.length)>=2?(K.openBlock(),K.createElementBlock("span",xg,[vg,K.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-5 ms-1 rounded-full text-gray-600 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 text-sm",onClick:S[8]||(S[8]=(...Ke)=>g.resetFilters&&g.resetFilters(...Ke))},[K.createVNode(tt)])])):K.createCommentVNode("",!0)])):K.createCommentVNode("",!0),g.total>=1?K.renderSlot(g.$slots,"table",{key:1,rows:g.tableData,map:g.map,selectRow:g.selectRow,getData:g.getData,isMapVisible:g.isMapVisible}):(K.openBlock(),K.createElementBlock("div",bg,[K.createVNode(Ne),wg,Sg,K.createElementVNode("button",{type:"button",class:"mt-[10px] py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs rounded-lg border border-stone-200 bg-white text-stone-800 shadow-sm hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100",onClick:S[9]||(S[9]=(...Ke)=>g.resetFilters&&g.resetFilters(...Ke))}," Очистити дані пошуку ")]))]),g.total>=1?(K.openBlock(),K.createElementBlock("hr",Tg)):K.createCommentVNode("",!0),g.total>=1?(K.openBlock(),K.createElementBlock("div",Ig,[K.createElementVNode("div",Pg,[K.createVNode(pt,{total:g.total,maxPages:7,defaultPage:g.currentPage,pageSize:g.limit,goTo:!1,size:"medium",onPageChange:g.handlePageChange,backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[10,20,30],onPageSizeChange:g.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])):K.createCommentVNode("",!0)],2),g.isSelectObj?(K.openBlock(),K.createElementBlock("div",{key:0,class:K.normalizeClass(g.isMapVisible?"w-2/4 mr-0 pb-5":"w-full pb-5 mr-3"),style:{height:"calc(100vh - 152px)"}},[K.renderSlot(g.$slots,"details",{table:g.table,selectedId:g.selectedId,selectedRow:g.selectedRow,map:g.map,closeObjCard:g.closeObjCard,isMapVisible:g.isMapVisible})],2)):K.createCommentVNode("",!0),K.withDirectives(K.createElementVNode("div",kg,[K.createElementVNode("section",Ag,[K.createVNode(Ft,{height:"calc(100vh - 152px)",width:"w-2/4",table:g.table,filtersParam:g.filtersParam,row:g.selectedRow,legendname:g.legendname,colorAttr:g.colorAttr,maxBounds:g.maxBounds,zoom:g.zoom,basemap:g.basemap,pointZoom:g.pointZoom},null,8,["table","filtersParam","row","legendname","colorAttr","maxBounds","zoom","basemap","pointZoom"])])],512),[[K.vShow,g.isMapVisible]])]),K.createElementVNode("div",Cg,[K.renderSlot(g.$slots,"popup",{data:g.hoverData})],512)])])}const Nu=Or(eg,[["render",Eg]]),Uu={install:g=>{g.component("VsPartsMap",Nu)},components:{VsPartsMap:Nu}};return typeof window<"u"&&(window.PartsMap=Uu),Uu});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/partsmap",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "description": "partsmap-plugins",
6
6
  "main": "dist/PartsMap.js",