@mappedin/mappedin-js 6.16.0 → 6.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{a as ec,b as Gf,c as tc,d as ns,e as qn,f as xi,g as Uf,h as Qn,i as _i,j as Ci,k as Hf,l as zf,m as Gp,n as $f,o as Xf,p as Up,q as Yf,r as Zf,s as Jf,t as Yp,z as lh}from"./chunk-72VREA6L.js";import{$ as ih,A as tt,B as Wf,E as qf,F as Qf,G as Kf,H as eh,K as vn,L as Pi,M as Hp,N as th,O as rh,P as nh,Q as Wp,R as zp,S as $p,T as Xp,V as oh,X as rc,Z as Zp,_ as Jp,aa as ah,ca as qp,d as k,e as xe,f as ql,g as Lf,i as dr,k as Mi,l as Ql,m as rs,mc as sh,p as Kl,q as Nf,s as Bf,t as qr,u as Rf,w as Vf,x as jf,y as Ei}from"./chunk-RTTZ7LHQ.js";import{a as m,b as x}from"./chunk-PUC4BMPX.js";import{a as A,b as W,c as Qt,e as Ye,g as Jl,h as f,i,j as M,k as E,l as Y}from"./chunk-IGHVNMJ3.js";var Bd=Ye((Ld,Nd)=>{m();(function(n,t){typeof Ld=="object"&&typeof Nd<"u"?Nd.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self,n.polygonClipping=t())})(Ld,(function(){"use strict";function n(w,u){var g={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},v,S,T,L;return L={next:F(0),throw:F(1),return:F(2)},typeof Symbol=="function"&&(L[Symbol.iterator]=function(){return this}),L;function F(R){return function(te){return j([R,te])}}function j(R){if(v)throw new TypeError("Generator is already executing.");for(;g;)try{if(v=1,S&&(T=R[0]&2?S.return:R[0]?S.throw||((T=S.return)&&T.call(S),0):S.next)&&!(T=T.call(S,R[1])).done)return T;switch(S=0,T&&(R=[R[0]&2,T.value]),R[0]){case 0:case 1:T=R;break;case 4:return g.label++,{value:R[1],done:!1};case 5:g.label++,S=R[1],R=[0];continue;case 7:R=g.ops.pop(),g.trys.pop();continue;default:if(T=g.trys,!(T=T.length>0&&T[T.length-1])&&(R[0]===6||R[0]===2)){g=0;continue}if(R[0]===3&&(!T||R[1]>T[0]&&R[1]<T[3])){g.label=R[1];break}if(R[0]===6&&g.label<T[1]){g.label=T[1],T=R;break}if(T&&g.label<T[2]){g.label=T[2],g.ops.push(R);break}T[2]&&g.ops.pop(),g.trys.pop();continue}R=u.call(w,g)}catch(te){R=[6,te],S=0}finally{v=T=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}}var t=(function(){function w(u,g){this.next=null,this.key=u,this.data=g,this.left=null,this.right=null}return w})();function e(w,u){return w>u?1:w<u?-1:0}function r(w,u,g){for(var v=new t(null,null),S=v,T=v;;){var L=g(w,u.key);if(L<0){if(u.left===null)break;if(g(w,u.left.key)<0){var F=u.left;if(u.left=F.right,F.right=u,u=F,u.left===null)break}T.left=u,T=u,u=u.left}else if(L>0){if(u.right===null)break;if(g(w,u.right.key)>0){var F=u.right;if(u.right=F.left,F.left=u,u=F,u.right===null)break}S.right=u,S=u,u=u.right}else break}return S.right=u.left,T.left=u.right,u.left=v.right,u.right=v.left,u}function o(w,u,g,v){var S=new t(w,u);if(g===null)return S.left=S.right=null,S;g=r(w,g,v);var T=v(w,g.key);return T<0?(S.left=g.left,S.right=g,g.left=null):T>=0&&(S.right=g.right,S.left=g,g.right=null),S}function a(w,u,g){var v=null,S=null;if(u){u=r(w,u,g);var T=g(u.key,w);T===0?(v=u.left,S=u.right):T<0?(S=u.right,u.right=null,v=u):(v=u.left,u.left=null,S=u)}return{left:v,right:S}}function s(w,u,g){return u===null?w:(w===null||(u=r(w.key,u,g),u.left=w),u)}function l(w,u,g,v,S){if(w){v(""+u+(g?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+S(w)+"\n");var T=u+(g?" ":"\u2502 ");w.left&&l(w.left,T,!1,v,S),w.right&&l(w.right,T,!0,v,S)}}var c=(function(){function w(u){u===void 0&&(u=e),this._root=null,this._size=0,this._comparator=u}return w.prototype.insert=function(u,g){return this._size++,this._root=o(u,g,this._root,this._comparator)},w.prototype.add=function(u,g){var v=new t(u,g);this._root===null&&(v.left=v.right=null,this._size++,this._root=v);var S=this._comparator,T=r(u,this._root,S),L=S(u,T.key);return L===0?this._root=T:(L<0?(v.left=T.left,v.right=T,T.left=null):L>0&&(v.right=T.right,v.left=T,T.right=null),this._size++,this._root=v),this._root},w.prototype.remove=function(u){this._root=this._remove(u,this._root,this._comparator)},w.prototype._remove=function(u,g,v){var S;if(g===null)return null;g=r(u,g,v);var T=v(u,g.key);return T===0?(g.left===null?S=g.right:(S=r(u,g.left,v),S.right=g.right),this._size--,S):g},w.prototype.pop=function(){var u=this._root;if(u){for(;u.left;)u=u.left;return this._root=r(u.key,this._root,this._comparator),this._root=this._remove(u.key,this._root,this._comparator),{key:u.key,data:u.data}}return null},w.prototype.findStatic=function(u){for(var g=this._root,v=this._comparator;g;){var S=v(u,g.key);if(S===0)return g;S<0?g=g.left:g=g.right}return null},w.prototype.find=function(u){return this._root&&(this._root=r(u,this._root,this._comparator),this._comparator(u,this._root.key)!==0)?null:this._root},w.prototype.contains=function(u){for(var g=this._root,v=this._comparator;g;){var S=v(u,g.key);if(S===0)return!0;S<0?g=g.left:g=g.right}return!1},w.prototype.forEach=function(u,g){for(var v=this._root,S=[],T=!1;!T;)v!==null?(S.push(v),v=v.left):S.length!==0?(v=S.pop(),u.call(g,v),v=v.right):T=!0;return this},w.prototype.range=function(u,g,v,S){for(var T=[],L=this._comparator,F=this._root,j;T.length!==0||F;)if(F)T.push(F),F=F.left;else{if(F=T.pop(),j=L(F.key,g),j>0)break;if(L(F.key,u)>=0&&v.call(S,F))return this;F=F.right}return this},w.prototype.keys=function(){var u=[];return this.forEach(function(g){var v=g.key;return u.push(v)}),u},w.prototype.values=function(){var u=[];return this.forEach(function(g){var v=g.data;return u.push(v)}),u},w.prototype.min=function(){return this._root?this.minNode(this._root).key:null},w.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},w.prototype.minNode=function(u){if(u===void 0&&(u=this._root),u)for(;u.left;)u=u.left;return u},w.prototype.maxNode=function(u){if(u===void 0&&(u=this._root),u)for(;u.right;)u=u.right;return u},w.prototype.at=function(u){for(var g=this._root,v=!1,S=0,T=[];!v;)if(g)T.push(g),g=g.left;else if(T.length>0){if(g=T.pop(),S===u)return g;S++,g=g.right}else v=!0;return null},w.prototype.next=function(u){var g=this._root,v=null;if(u.right){for(v=u.right;v.left;)v=v.left;return v}for(var S=this._comparator;g;){var T=S(u.key,g.key);if(T===0)break;T<0?(v=g,g=g.left):g=g.right}return v},w.prototype.prev=function(u){var g=this._root,v=null;if(u.left!==null){for(v=u.left;v.right;)v=v.right;return v}for(var S=this._comparator;g;){var T=S(u.key,g.key);if(T===0)break;T<0?g=g.left:(v=g,g=g.right)}return v},w.prototype.clear=function(){return this._root=null,this._size=0,this},w.prototype.toList=function(){return h(this._root)},w.prototype.load=function(u,g,v){g===void 0&&(g=[]),v===void 0&&(v=!1);var S=u.length,T=this._comparator;if(v&&I(u,g,0,S-1,T),this._root===null)this._root=p(u,g,0,S),this._size=S;else{var L=b(this.toList(),d(u,g),T);S=this._size+S,this._root=y({head:L},0,S)}return this},w.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(w.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),w.prototype.toString=function(u){u===void 0&&(u=function(v){return String(v.key)});var g=[];return l(this._root,"",!0,function(v){return g.push(v)},u),g.join("")},w.prototype.update=function(u,g,v){var S=this._comparator,T=a(u,this._root,S),L=T.left,F=T.right;S(u,g)<0?F=o(g,v,F,S):L=o(g,v,L,S),this._root=s(L,F,S)},w.prototype.split=function(u){return a(u,this._root,this._comparator)},w.prototype[Symbol.iterator]=function(){var u,g,v;return n(this,function(S){switch(S.label){case 0:u=this._root,g=[],v=!1,S.label=1;case 1:return v?[3,6]:u===null?[3,2]:(g.push(u),u=u.left,[3,5]);case 2:return g.length===0?[3,4]:(u=g.pop(),[4,u]);case 3:return S.sent(),u=u.right,[3,5];case 4:v=!0,S.label=5;case 5:return[3,1];case 6:return[2]}})},w})();function p(w,u,g,v){var S=v-g;if(S>0){var T=g+Math.floor(S/2),L=w[T],F=u[T],j=new t(L,F);return j.left=p(w,u,g,T),j.right=p(w,u,T+1,v),j}return null}function d(w,u){for(var g=new t(null,null),v=g,S=0;S<w.length;S++)v=v.next=new t(w[S],u[S]);return v.next=null,g.next}function h(w){for(var u=w,g=[],v=!1,S=new t(null,null),T=S;!v;)u?(g.push(u),u=u.left):g.length>0?(u=T=T.next=g.pop(),u=u.right):v=!0;return T.next=null,S.next}function y(w,u,g){var v=g-u;if(v>0){var S=u+Math.floor(v/2),T=y(w,u,S),L=w.head;return L.left=T,w.head=w.head.next,L.right=y(w,S+1,g),L}return null}function b(w,u,g){for(var v=new t(null,null),S=v,T=w,L=u;T!==null&&L!==null;)g(T.key,L.key)<0?(S.next=T,T=T.next):(S.next=L,L=L.next),S=S.next;return T!==null?S.next=T:L!==null&&(S.next=L),v.next}function I(w,u,g,v,S){if(!(g>=v)){for(var T=w[g+v>>1],L=g-1,F=v+1;;){do L++;while(S(w[L],T)<0);do F--;while(S(w[F],T)>0);if(L>=F)break;var j=w[L];w[L]=w[F],w[F]=j,j=u[L],u[L]=u[F],u[F]=j}I(w,u,g,F,S),I(w,u,F+1,v,S)}}let C=(w,u)=>w.ll.x<=u.x&&u.x<=w.ur.x&&w.ll.y<=u.y&&u.y<=w.ur.y,P=(w,u)=>{if(u.ur.x<w.ll.x||w.ur.x<u.ll.x||u.ur.y<w.ll.y||w.ur.y<u.ll.y)return null;let g=w.ll.x<u.ll.x?u.ll.x:w.ll.x,v=w.ur.x<u.ur.x?w.ur.x:u.ur.x,S=w.ll.y<u.ll.y?u.ll.y:w.ll.y,T=w.ur.y<u.ur.y?w.ur.y:u.ur.y;return{ll:{x:g,y:S},ur:{x:v,y:T}}},O=Number.EPSILON;O===void 0&&(O=Math.pow(2,-52));let U=O*O,H=(w,u)=>{if(-O<w&&w<O&&-O<u&&u<O)return 0;let g=w-u;return g*g<U*w*u?0:w<u?-1:1};class V{constructor(){this.reset()}reset(){this.xRounder=new B,this.yRounder=new B}round(u,g){return{x:this.xRounder.round(u),y:this.yRounder.round(g)}}}class B{constructor(){this.tree=new c,this.round(0)}round(u){let g=this.tree.add(u),v=this.tree.prev(g);if(v!==null&&H(g.key,v.key)===0)return this.tree.remove(u),v.key;let S=this.tree.next(g);return S!==null&&H(g.key,S.key)===0?(this.tree.remove(u),S.key):u}}let q=new V,N=11102230246251565e-32,J=134217729,se=(3+8*N)*N;function z(w,u,g,v,S){let T,L,F,j,R=u[0],te=v[0],D=0,G=0;te>R==te>-R?(T=R,R=u[++D]):(T=te,te=v[++G]);let Q=0;if(D<w&&G<g)for(te>R==te>-R?(L=R+T,F=T-(L-R),R=u[++D]):(L=te+T,F=T-(L-te),te=v[++G]),T=L,F!==0&&(S[Q++]=F);D<w&&G<g;)te>R==te>-R?(L=T+R,j=L-T,F=T-(L-j)+(R-j),R=u[++D]):(L=T+te,j=L-T,F=T-(L-j)+(te-j),te=v[++G]),T=L,F!==0&&(S[Q++]=F);for(;D<w;)L=T+R,j=L-T,F=T-(L-j)+(R-j),R=u[++D],T=L,F!==0&&(S[Q++]=F);for(;G<g;)L=T+te,j=L-T,F=T-(L-j)+(te-j),te=v[++G],T=L,F!==0&&(S[Q++]=F);return(T!==0||Q===0)&&(S[Q++]=T),Q}function ie(w,u){let g=u[0];for(let v=1;v<w;v++)g+=u[v];return g}function me(w){return new Float64Array(w)}let ve=(3+16*N)*N,ye=(2+12*N)*N,X=(9+64*N)*N*N,$=me(4),he=me(8),ee=me(12),ne=me(16),de=me(4);function ge(w,u,g,v,S,T,L){let F,j,R,te,D,G,Q,le,pe,Pe,Ie,Be,ot,Je,ht,Re,it,at,jt=w-S,wt=g-S,Gt=u-T,Ke=v-T;Je=jt*Ke,G=J*jt,Q=G-(G-jt),le=jt-Q,G=J*Ke,pe=G-(G-Ke),Pe=Ke-pe,ht=le*Pe-(Je-Q*pe-le*pe-Q*Pe),Re=Gt*wt,G=J*Gt,Q=G-(G-Gt),le=Gt-Q,G=J*wt,pe=G-(G-wt),Pe=wt-pe,it=le*Pe-(Re-Q*pe-le*pe-Q*Pe),Ie=ht-it,D=ht-Ie,$[0]=ht-(Ie+D)+(D-it),Be=Je+Ie,D=Be-Je,ot=Je-(Be-D)+(Ie-D),Ie=ot-Re,D=ot-Ie,$[1]=ot-(Ie+D)+(D-Re),at=Be+Ie,D=at-Be,$[2]=Be-(at-D)+(Ie-D),$[3]=at;let pr=ie(4,$),Jn=ye*L;if(pr>=Jn||-pr>=Jn||(D=w-jt,F=w-(jt+D)+(D-S),D=g-wt,R=g-(wt+D)+(D-S),D=u-Gt,j=u-(Gt+D)+(D-T),D=v-Ke,te=v-(Ke+D)+(D-T),F===0&&j===0&&R===0&&te===0)||(Jn=X*L+se*Math.abs(pr),pr+=jt*te+Ke*F-(Gt*R+wt*j),pr>=Jn||-pr>=Jn))return pr;Je=F*Ke,G=J*F,Q=G-(G-F),le=F-Q,G=J*Ke,pe=G-(G-Ke),Pe=Ke-pe,ht=le*Pe-(Je-Q*pe-le*pe-Q*Pe),Re=j*wt,G=J*j,Q=G-(G-j),le=j-Q,G=J*wt,pe=G-(G-wt),Pe=wt-pe,it=le*Pe-(Re-Q*pe-le*pe-Q*Pe),Ie=ht-it,D=ht-Ie,de[0]=ht-(Ie+D)+(D-it),Be=Je+Ie,D=Be-Je,ot=Je-(Be-D)+(Ie-D),Ie=ot-Re,D=ot-Ie,de[1]=ot-(Ie+D)+(D-Re),at=Be+Ie,D=at-Be,de[2]=Be-(at-D)+(Ie-D),de[3]=at;let Yl=z(4,$,4,de,he);Je=jt*te,G=J*jt,Q=G-(G-jt),le=jt-Q,G=J*te,pe=G-(G-te),Pe=te-pe,ht=le*Pe-(Je-Q*pe-le*pe-Q*Pe),Re=Gt*R,G=J*Gt,Q=G-(G-Gt),le=Gt-Q,G=J*R,pe=G-(G-R),Pe=R-pe,it=le*Pe-(Re-Q*pe-le*pe-Q*Pe),Ie=ht-it,D=ht-Ie,de[0]=ht-(Ie+D)+(D-it),Be=Je+Ie,D=Be-Je,ot=Je-(Be-D)+(Ie-D),Ie=ot-Re,D=ot-Ie,de[1]=ot-(Ie+D)+(D-Re),at=Be+Ie,D=at-Be,de[2]=Be-(at-D)+(Ie-D),de[3]=at;let Zl=z(Yl,he,4,de,ee);Je=F*te,G=J*F,Q=G-(G-F),le=F-Q,G=J*te,pe=G-(G-te),Pe=te-pe,ht=le*Pe-(Je-Q*pe-le*pe-Q*Pe),Re=j*R,G=J*j,Q=G-(G-j),le=j-Q,G=J*R,pe=G-(G-R),Pe=R-pe,it=le*Pe-(Re-Q*pe-le*pe-Q*Pe),Ie=ht-it,D=ht-Ie,de[0]=ht-(Ie+D)+(D-it),Be=Je+Ie,D=Be-Je,ot=Je-(Be-D)+(Ie-D),Ie=ot-Re,D=ot-Ie,de[1]=ot-(Ie+D)+(D-Re),at=Be+Ie,D=at-Be,de[2]=Be-(at-D)+(Ie-D),de[3]=at;let Vp=z(Zl,ee,4,de,ne);return ne[Vp-1]}function Le(w,u,g,v,S,T){let L=(u-T)*(g-S),F=(w-S)*(v-T),j=L-F,R=Math.abs(L+F);return Math.abs(j)>=ve*R?j:-ge(w,u,g,v,S,T,R)}let Me=(w,u)=>w.x*u.y-w.y*u.x,We=(w,u)=>w.x*u.x+w.y*u.y,_e=(w,u,g)=>{let v=Le(w.x,w.y,u.x,u.y,g.x,g.y);return v>0?-1:v<0?1:0},It=w=>Math.sqrt(We(w,w)),qt=(w,u,g)=>{let v={x:u.x-w.x,y:u.y-w.y},S={x:g.x-w.x,y:g.y-w.y};return Me(S,v)/It(S)/It(v)},Er=(w,u,g)=>{let v={x:u.x-w.x,y:u.y-w.y},S={x:g.x-w.x,y:g.y-w.y};return We(S,v)/It(S)/It(v)},cr=(w,u,g)=>u.y===0?null:{x:w.x+u.x/u.y*(g-w.y),y:g},_o=(w,u,g)=>u.x===0?null:{x:g,y:w.y+u.y/u.x*(g-w.x)},Si=(w,u,g,v)=>{if(u.x===0)return _o(g,v,w.x);if(v.x===0)return _o(w,u,g.x);if(u.y===0)return cr(g,v,w.y);if(v.y===0)return cr(w,u,g.y);let S=Me(u,v);if(S==0)return null;let T={x:g.x-w.x,y:g.y-w.y},L=Me(T,u)/S,F=Me(T,v)/S,j=w.x+F*u.x,R=g.x+L*v.x,te=w.y+F*u.y,D=g.y+L*v.y,G=(j+R)/2,Q=(te+D)/2;return{x:G,y:Q}};class Qe{static compare(u,g){let v=Qe.comparePoints(u.point,g.point);return v!==0?v:(u.point!==g.point&&u.link(g),u.isLeft!==g.isLeft?u.isLeft?1:-1:ut.compare(u.segment,g.segment))}static comparePoints(u,g){return u.x<g.x?-1:u.x>g.x?1:u.y<g.y?-1:u.y>g.y?1:0}constructor(u,g){u.events===void 0?u.events=[this]:u.events.push(this),this.point=u,this.isLeft=g}link(u){if(u.point===this.point)throw new Error("Tried to link already linked events");let g=u.point.events;for(let v=0,S=g.length;v<S;v++){let T=g[v];this.point.events.push(T),T.point=this.point}this.checkForConsuming()}checkForConsuming(){let u=this.point.events.length;for(let g=0;g<u;g++){let v=this.point.events[g];if(v.segment.consumedBy===void 0)for(let S=g+1;S<u;S++){let T=this.point.events[S];T.consumedBy===void 0&&v.otherSE.point.events===T.otherSE.point.events&&v.segment.consume(T.segment)}}}getAvailableLinkedEvents(){let u=[];for(let g=0,v=this.point.events.length;g<v;g++){let S=this.point.events[g];S!==this&&!S.segment.ringOut&&S.segment.isInResult()&&u.push(S)}return u}getLeftmostComparator(u){let g=new Map,v=S=>{let T=S.otherSE;g.set(S,{sine:qt(this.point,u.point,T.point),cosine:Er(this.point,u.point,T.point)})};return(S,T)=>{g.has(S)||v(S),g.has(T)||v(T);let{sine:L,cosine:F}=g.get(S),{sine:j,cosine:R}=g.get(T);return L>=0&&j>=0?F<R?1:F>R?-1:0:L<0&&j<0?F<R?-1:F>R?1:0:j<L?-1:j>L?1:0}}}let Yn=0;class ut{static compare(u,g){let v=u.leftSE.point.x,S=g.leftSE.point.x,T=u.rightSE.point.x,L=g.rightSE.point.x;if(L<v)return 1;if(T<S)return-1;let F=u.leftSE.point.y,j=g.leftSE.point.y,R=u.rightSE.point.y,te=g.rightSE.point.y;if(v<S){if(j<F&&j<R)return 1;if(j>F&&j>R)return-1;let D=u.comparePoint(g.leftSE.point);if(D<0)return 1;if(D>0)return-1;let G=g.comparePoint(u.rightSE.point);return G!==0?G:-1}if(v>S){if(F<j&&F<te)return-1;if(F>j&&F>te)return 1;let D=g.comparePoint(u.leftSE.point);if(D!==0)return D;let G=u.comparePoint(g.rightSE.point);return G<0?1:G>0?-1:1}if(F<j)return-1;if(F>j)return 1;if(T<L){let D=g.comparePoint(u.rightSE.point);if(D!==0)return D}if(T>L){let D=u.comparePoint(g.rightSE.point);if(D<0)return 1;if(D>0)return-1}if(T!==L){let D=R-F,G=T-v,Q=te-j,le=L-S;if(D>G&&Q<le)return 1;if(D<G&&Q>le)return-1}return T>L?1:T<L||R<te?-1:R>te?1:u.id<g.id?-1:u.id>g.id?1:0}constructor(u,g,v,S){this.id=++Yn,this.leftSE=u,u.segment=this,u.otherSE=g,this.rightSE=g,g.segment=this,g.otherSE=u,this.rings=v,this.windings=S}static fromRing(u,g,v){let S,T,L,F=Qe.comparePoints(u,g);if(F<0)S=u,T=g,L=1;else if(F>0)S=g,T=u,L=-1;else throw new Error("Tried to create degenerate segment at [".concat(u.x,", ").concat(u.y,"]"));let j=new Qe(S,!0),R=new Qe(T,!1);return new ut(j,R,[v],[L])}replaceRightSE(u){this.rightSE=u,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let u=this.leftSE.point.y,g=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:u<g?u:g},ur:{x:this.rightSE.point.x,y:u>g?u:g}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(u){return u.x===this.leftSE.point.x&&u.y===this.leftSE.point.y||u.x===this.rightSE.point.x&&u.y===this.rightSE.point.y}comparePoint(u){if(this.isAnEndpoint(u))return 0;let g=this.leftSE.point,v=this.rightSE.point,S=this.vector();if(g.x===v.x)return u.x===g.x?0:u.x<g.x?1:-1;let T=(u.y-g.y)/S.y,L=g.x+T*S.x;if(u.x===L)return 0;let F=(u.x-g.x)/S.x,j=g.y+F*S.y;return u.y===j?0:u.y<j?-1:1}getIntersection(u){let g=this.bbox(),v=u.bbox(),S=P(g,v);if(S===null)return null;let T=this.leftSE.point,L=this.rightSE.point,F=u.leftSE.point,j=u.rightSE.point,R=C(g,F)&&this.comparePoint(F)===0,te=C(v,T)&&u.comparePoint(T)===0,D=C(g,j)&&this.comparePoint(j)===0,G=C(v,L)&&u.comparePoint(L)===0;if(te&&R)return G&&!D?L:!G&&D?j:null;if(te)return D&&T.x===j.x&&T.y===j.y?null:T;if(R)return G&&L.x===F.x&&L.y===F.y?null:F;if(G&&D)return null;if(G)return L;if(D)return j;let Q=Si(T,this.vector(),F,u.vector());return Q===null||!C(S,Q)?null:q.round(Q.x,Q.y)}split(u){let g=[],v=u.events!==void 0,S=new Qe(u,!0),T=new Qe(u,!1),L=this.rightSE;this.replaceRightSE(T),g.push(T),g.push(S);let F=new ut(S,L,this.rings.slice(),this.windings.slice());return Qe.comparePoints(F.leftSE.point,F.rightSE.point)>0&&F.swapEvents(),Qe.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),v&&(S.checkForConsuming(),T.checkForConsuming()),g}swapEvents(){let u=this.rightSE;this.rightSE=this.leftSE,this.leftSE=u,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let g=0,v=this.windings.length;g<v;g++)this.windings[g]*=-1}consume(u){let g=this,v=u;for(;g.consumedBy;)g=g.consumedBy;for(;v.consumedBy;)v=v.consumedBy;let S=ut.compare(g,v);if(S!==0){if(S>0){let T=g;g=v,v=T}if(g.prev===v){let T=g;g=v,v=T}for(let T=0,L=v.rings.length;T<L;T++){let F=v.rings[T],j=v.windings[T],R=g.rings.indexOf(F);R===-1?(g.rings.push(F),g.windings.push(j)):g.windings[R]+=j}v.rings=null,v.windings=null,v.consumedBy=g,v.leftSE.consumedBy=g.leftSE,v.rightSE.consumedBy=g.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let u=this.prev.consumedBy||this.prev;this._beforeState=u.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let u=this.beforeState();this._afterState={rings:u.rings.slice(0),windings:u.windings.slice(0),multiPolys:[]};let g=this._afterState.rings,v=this._afterState.windings,S=this._afterState.multiPolys;for(let F=0,j=this.rings.length;F<j;F++){let R=this.rings[F],te=this.windings[F],D=g.indexOf(R);D===-1?(g.push(R),v.push(te)):v[D]+=te}let T=[],L=[];for(let F=0,j=g.length;F<j;F++){if(v[F]===0)continue;let R=g[F],te=R.poly;if(L.indexOf(te)===-1)if(R.isExterior)T.push(te);else{L.indexOf(te)===-1&&L.push(te);let D=T.indexOf(R.poly);D!==-1&&T.splice(D,1)}}for(let F=0,j=T.length;F<j;F++){let R=T[F].multiPoly;S.indexOf(R)===-1&&S.push(R)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let u=this.beforeState().multiPolys,g=this.afterState().multiPolys;switch(ft.type){case"union":{let v=u.length===0,S=g.length===0;this._isInResult=v!==S;break}case"intersection":{let v,S;u.length<g.length?(v=u.length,S=g.length):(v=g.length,S=u.length),this._isInResult=S===ft.numMultiPolys&&v<S;break}case"xor":{let v=Math.abs(u.length-g.length);this._isInResult=v%2===1;break}case"difference":{let v=S=>S.length===1&&S[0].isSubject;this._isInResult=v(u)!==v(g);break}default:throw new Error("Unrecognized operation type found ".concat(ft.type))}return this._isInResult}}class Zn{constructor(u,g,v){if(!Array.isArray(u)||u.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=g,this.isExterior=v,this.segments=[],typeof u[0][0]!="number"||typeof u[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let S=q.round(u[0][0],u[0][1]);this.bbox={ll:{x:S.x,y:S.y},ur:{x:S.x,y:S.y}};let T=S;for(let L=1,F=u.length;L<F;L++){if(typeof u[L][0]!="number"||typeof u[L][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let j=q.round(u[L][0],u[L][1]);j.x===T.x&&j.y===T.y||(this.segments.push(ut.fromRing(T,j,this)),j.x<this.bbox.ll.x&&(this.bbox.ll.x=j.x),j.y<this.bbox.ll.y&&(this.bbox.ll.y=j.y),j.x>this.bbox.ur.x&&(this.bbox.ur.x=j.x),j.y>this.bbox.ur.y&&(this.bbox.ur.y=j.y),T=j)}(S.x!==T.x||S.y!==T.y)&&this.segments.push(ut.fromRing(T,S,this))}getSweepEvents(){let u=[];for(let g=0,v=this.segments.length;g<v;g++){let S=this.segments[g];u.push(S.leftSE),u.push(S.rightSE)}return u}}class Qa{constructor(u,g){if(!Array.isArray(u))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Zn(u[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let v=1,S=u.length;v<S;v++){let T=new Zn(u[v],this,!1);T.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=T.bbox.ll.x),T.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=T.bbox.ll.y),T.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=T.bbox.ur.x),T.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=T.bbox.ur.y),this.interiorRings.push(T)}this.multiPoly=g}getSweepEvents(){let u=this.exteriorRing.getSweepEvents();for(let g=0,v=this.interiorRings.length;g<v;g++){let S=this.interiorRings[g].getSweepEvents();for(let T=0,L=S.length;T<L;T++)u.push(S[T])}return u}}class mn{constructor(u,g){if(!Array.isArray(u))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof u[0][0][0]=="number"&&(u=[u])}catch(v){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let v=0,S=u.length;v<S;v++){let T=new Qa(u[v],this);T.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=T.bbox.ll.x),T.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=T.bbox.ll.y),T.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=T.bbox.ur.x),T.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=T.bbox.ur.y),this.polys.push(T)}this.isSubject=g}getSweepEvents(){let u=[];for(let g=0,v=this.polys.length;g<v;g++){let S=this.polys[g].getSweepEvents();for(let T=0,L=S.length;T<L;T++)u.push(S[T])}return u}}class yn{static factory(u){let g=[];for(let v=0,S=u.length;v<S;v++){let T=u[v];if(!T.isInResult()||T.ringOut)continue;let L=null,F=T.leftSE,j=T.rightSE,R=[F],te=F.point,D=[];for(;L=F,F=j,R.push(F),F.point!==te;)for(;;){let G=F.getAvailableLinkedEvents();if(G.length===0){let pe=R[0].point,Pe=R[R.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(pe.x,",")+" ".concat(pe.y,"]. Last matching segment found ends at")+" [".concat(Pe.x,", ").concat(Pe.y,"]."))}if(G.length===1){j=G[0].otherSE;break}let Q=null;for(let pe=0,Pe=D.length;pe<Pe;pe++)if(D[pe].point===F.point){Q=pe;break}if(Q!==null){let pe=D.splice(Q)[0],Pe=R.splice(pe.index);Pe.unshift(Pe[0].otherSE),g.push(new yn(Pe.reverse()));continue}D.push({index:R.length,point:F.point});let le=F.getLeftmostComparator(L);j=G.sort(le)[0].otherSE;break}g.push(new yn(R))}return g}constructor(u){this.events=u;for(let g=0,v=u.length;g<v;g++)u[g].segment.ringOut=this;this.poly=null}getGeom(){let u=this.events[0].point,g=[u];for(let R=1,te=this.events.length-1;R<te;R++){let D=this.events[R].point,G=this.events[R+1].point;_e(D,u,G)!==0&&(g.push(D),u=D)}if(g.length===1)return null;let v=g[0],S=g[1];_e(v,u,S)===0&&g.shift(),g.push(g[0]);let T=this.isExteriorRing()?1:-1,L=this.isExteriorRing()?0:g.length-1,F=this.isExteriorRing()?g.length:-1,j=[];for(let R=L;R!=F;R+=T)j.push([g[R].x,g[R].y]);return j}isExteriorRing(){if(this._isExteriorRing===void 0){let u=this.enclosingRing();this._isExteriorRing=u?!u.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let u=this.events[0];for(let S=1,T=this.events.length;S<T;S++){let L=this.events[S];Qe.compare(u,L)>0&&(u=L)}let g=u.segment.prevInResult(),v=g?g.prevInResult():null;for(;;){if(!g)return null;if(!v)return g.ringOut;if(v.ringOut!==g.ringOut)return v.ringOut.enclosingRing()!==g.ringOut?g.ringOut:g.ringOut.enclosingRing();g=v.prevInResult(),v=g?g.prevInResult():null}}}class Co{constructor(u){this.exteriorRing=u,u.poly=this,this.interiorRings=[]}addInterior(u){this.interiorRings.push(u),u.poly=this}getGeom(){let u=[this.exteriorRing.getGeom()];if(u[0]===null)return null;for(let g=0,v=this.interiorRings.length;g<v;g++){let S=this.interiorRings[g].getGeom();S!==null&&u.push(S)}return u}}class zl{constructor(u){this.rings=u,this.polys=this._composePolys(u)}getGeom(){let u=[];for(let g=0,v=this.polys.length;g<v;g++){let S=this.polys[g].getGeom();S!==null&&u.push(S)}return u}_composePolys(u){let g=[];for(let v=0,S=u.length;v<S;v++){let T=u[v];if(!T.poly)if(T.isExteriorRing())g.push(new Co(T));else{let L=T.enclosingRing();L.poly||g.push(new Co(L)),L.poly.addInterior(T)}}return g}}class $l{constructor(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.compare;this.queue=u,this.tree=new c(g),this.segments=[]}process(u){let g=u.segment,v=[];if(u.consumedBy)return u.isLeft?this.queue.remove(u.otherSE):this.tree.remove(g),v;let S=u.isLeft?this.tree.add(g):this.tree.find(g);if(!S)throw new Error("Unable to find segment #".concat(g.id," ")+"[".concat(g.leftSE.point.x,", ").concat(g.leftSE.point.y,"] -> ")+"[".concat(g.rightSE.point.x,", ").concat(g.rightSE.point.y,"] ")+"in SweepLine tree.");let T=S,L=S,F,j;for(;F===void 0;)T=this.tree.prev(T),T===null?F=null:T.key.consumedBy===void 0&&(F=T.key);for(;j===void 0;)L=this.tree.next(L),L===null?j=null:L.key.consumedBy===void 0&&(j=L.key);if(u.isLeft){let R=null;if(F){let D=F.getIntersection(g);if(D!==null&&(g.isAnEndpoint(D)||(R=D),!F.isAnEndpoint(D))){let G=this._splitSafely(F,D);for(let Q=0,le=G.length;Q<le;Q++)v.push(G[Q])}}let te=null;if(j){let D=j.getIntersection(g);if(D!==null&&(g.isAnEndpoint(D)||(te=D),!j.isAnEndpoint(D))){let G=this._splitSafely(j,D);for(let Q=0,le=G.length;Q<le;Q++)v.push(G[Q])}}if(R!==null||te!==null){let D=null;R===null?D=te:te===null?D=R:D=Qe.comparePoints(R,te)<=0?R:te,this.queue.remove(g.rightSE),v.push(g.rightSE);let G=g.split(D);for(let Q=0,le=G.length;Q<le;Q++)v.push(G[Q])}v.length>0?(this.tree.remove(g),v.push(u)):(this.segments.push(g),g.prev=F)}else{if(F&&j){let R=F.getIntersection(j);if(R!==null){if(!F.isAnEndpoint(R)){let te=this._splitSafely(F,R);for(let D=0,G=te.length;D<G;D++)v.push(te[D])}if(!j.isAnEndpoint(R)){let te=this._splitSafely(j,R);for(let D=0,G=te.length;D<G;D++)v.push(te[D])}}}this.tree.remove(g)}return v}_splitSafely(u,g){this.tree.remove(u);let v=u.rightSE;this.queue.remove(v);let S=u.split(g);return S.push(v),u.consumedBy===void 0&&this.tree.add(u),S}}let Xl=typeof x<"u"&&x.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Ka=typeof x<"u"&&x.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Po{run(u,g,v){ft.type=u,q.reset();let S=[new mn(g,!0)];for(let D=0,G=v.length;D<G;D++)S.push(new mn(v[D],!1));if(ft.numMultiPolys=S.length,ft.type==="difference"){let D=S[0],G=1;for(;G<S.length;)P(S[G].bbox,D.bbox)!==null?G++:S.splice(G,1)}if(ft.type==="intersection")for(let D=0,G=S.length;D<G;D++){let Q=S[D];for(let le=D+1,pe=S.length;le<pe;le++)if(P(Q.bbox,S[le].bbox)===null)return[]}let T=new c(Qe.compare);for(let D=0,G=S.length;D<G;D++){let Q=S[D].getSweepEvents();for(let le=0,pe=Q.length;le<pe;le++)if(T.insert(Q[le]),T.size>Xl)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}let L=new $l(T),F=T.size,j=T.pop();for(;j;){let D=j.key;if(T.size===F){let Q=D.segment;throw new Error("Unable to pop() ".concat(D.isLeft?"left":"right"," SweepEvent ")+"[".concat(D.point.x,", ").concat(D.point.y,"] from segment #").concat(Q.id," ")+"[".concat(Q.leftSE.point.x,", ").concat(Q.leftSE.point.y,"] -> ")+"[".concat(Q.rightSE.point.x,", ").concat(Q.rightSE.point.y,"] from queue."))}if(T.size>Xl)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(L.segments.length>Ka)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");let G=L.process(D);for(let Q=0,le=G.length;Q<le;Q++){let pe=G[Q];pe.consumedBy===void 0&&T.insert(pe)}F=T.size,j=T.pop()}q.reset();let R=yn.factory(L.segments);return new zl(R).getGeom()}}let ft=new Po;var es={union:function(w){for(var u=arguments.length,g=new Array(u>1?u-1:0),v=1;v<u;v++)g[v-1]=arguments[v];return ft.run("union",w,g)},intersection:function(w){for(var u=arguments.length,g=new Array(u>1?u-1:0),v=1;v<u;v++)g[v-1]=arguments[v];return ft.run("intersection",w,g)},xor:function(w){for(var u=arguments.length,g=new Array(u>1?u-1:0),v=1;v<u;v++)g[v-1]=arguments[v];return ft.run("xor",w,g)},difference:function(w){for(var u=arguments.length,g=new Array(u>1?u-1:0),v=1;v<u;v++)g[v-1]=arguments[v];return ft.run("difference",w,g)}};return es}))});var Xr=Ye(lr=>{"use strict";m();lr.__esModule=!0;lr.extend=Vy;lr.indexOf=II;lr.escapeExpression=TI;lr.isEmpty=SI;lr.createFrame=MI;lr.blockParams=EI;lr.appendContextPath=xI;var mI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},yI=/[&<>"'`=]/g,bI=/[&<>"'`=]/;function vI(n){return mI[n]}function Vy(n){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&(n[e]=arguments[t][e]);return n}var ju=Object.prototype.toString;lr.toString=ju;var Vu=function(t){return typeof t=="function"};Vu(/x/)&&(lr.isFunction=Vu=function(n){return typeof n=="function"&&ju.call(n)==="[object Function]"});lr.isFunction=Vu;var jy=Array.isArray||function(n){return n&&typeof n=="object"?ju.call(n)==="[object Array]":!1};lr.isArray=jy;function II(n,t){for(var e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1}function TI(n){if(typeof n!="string"){if(n&&n.toHTML)return n.toHTML();if(n==null)return"";if(!n)return n+"";n=""+n}return bI.test(n)?n.replace(yI,vI):n}function SI(n){return!n&&n!==0?!0:!!(jy(n)&&n.length===0)}function MI(n){var t=Vy({},n);return t._parent=n,t}function EI(n,t){return n.path=t,n}function xI(n,t){return(n?n+".":"")+t}});var So=Ye((ip,Gy)=>{"use strict";m();ip.__esModule=!0;var Gu=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Uu(n,t){var e=t&&t.loc,r=void 0,o=void 0,a=void 0,s=void 0;e&&(r=e.start.line,o=e.end.line,a=e.start.column,s=e.end.column,n+=" - "+r+":"+a);for(var l=Error.prototype.constructor.call(this,n),c=0;c<Gu.length;c++)this[Gu[c]]=l[Gu[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Uu);try{e&&(this.lineNumber=r,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:a,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=a,this.endColumn=s))}catch(p){}}Uu.prototype=new Error;ip.default=Uu;Gy.exports=ip.default});var Hy=Ye((ap,Uy)=>{"use strict";m();ap.__esModule=!0;var Hu=Xr();ap.default=function(n){n.registerHelper("blockHelperMissing",function(t,e){var r=e.inverse,o=e.fn;if(t===!0)return o(this);if(t===!1||t==null)return r(this);if(Hu.isArray(t))return t.length>0?(e.ids&&(e.ids=[e.name]),n.helpers.each(t,e)):r(this);if(e.data&&e.ids){var a=Hu.createFrame(e.data);a.contextPath=Hu.appendContextPath(e.data.contextPath,e.name),e={data:a}}return o(t,e)})};Uy.exports=ap.default});var zy=Ye((sp,Wy)=>{"use strict";m();sp.__esModule=!0;function _I(n){return n&&n.__esModule?n:{default:n}}var xl=Xr(),CI=So(),PI=_I(CI);sp.default=function(n){n.registerHelper("each",function(t,e){if(!e)throw new PI.default("Must pass iterator to #each");var r=e.fn,o=e.inverse,a=0,s="",l=void 0,c=void 0;e.data&&e.ids&&(c=xl.appendContextPath(e.data.contextPath,e.ids[0])+"."),xl.isFunction(t)&&(t=t.call(this)),e.data&&(l=xl.createFrame(e.data));function p(I,C,P){l&&(l.key=I,l.index=C,l.first=C===0,l.last=!!P,c&&(l.contextPath=c+I)),s=s+r(t[I],{data:l,blockParams:xl.blockParams([t[I],I],[c+I,null])})}if(t&&typeof t=="object")if(xl.isArray(t))for(var d=t.length;a<d;a++)a in t&&p(a,a,a===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var h=[],y=t[Symbol.iterator](),b=y.next();!b.done;b=y.next())h.push(b.value);t=h;for(var d=t.length;a<d;a++)p(a,a,a===t.length-1)}else(function(){var I=void 0;Object.keys(t).forEach(function(C){I!==void 0&&p(I,a-1),I=C,a++}),I!==void 0&&p(I,a-1,!0)})();return a===0&&(s=o(this)),s})};Wy.exports=sp.default});var Xy=Ye((lp,$y)=>{"use strict";m();lp.__esModule=!0;function wI(n){return n&&n.__esModule?n:{default:n}}var OI=So(),DI=wI(OI);lp.default=function(n){n.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new DI.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};$y.exports=lp.default});var qy=Ye((cp,Jy)=>{"use strict";m();cp.__esModule=!0;function AI(n){return n&&n.__esModule?n:{default:n}}var Yy=Xr(),FI=So(),Zy=AI(FI);cp.default=function(n){n.registerHelper("if",function(t,e){if(arguments.length!=2)throw new Zy.default("#if requires exactly one argument");return Yy.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||Yy.isEmpty(t)?e.inverse(this):e.fn(this)}),n.registerHelper("unless",function(t,e){if(arguments.length!=2)throw new Zy.default("#unless requires exactly one argument");return n.helpers.if.call(this,t,{fn:e.inverse,inverse:e.fn,hash:e.hash})})};Jy.exports=cp.default});var Ky=Ye((pp,Qy)=>{"use strict";m();pp.__esModule=!0;pp.default=function(n){n.registerHelper("log",function(){for(var t=[void 0],e=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var o=1;e.hash.level!=null?o=e.hash.level:e.data&&e.data.level!=null&&(o=e.data.level),t[0]=o,n.log.apply(n,t)})};Qy.exports=pp.default});var t1=Ye((dp,e1)=>{"use strict";m();dp.__esModule=!0;dp.default=function(n){n.registerHelper("lookup",function(t,e,r){return t&&r.lookupProperty(t,e)})};e1.exports=dp.default});var n1=Ye((up,r1)=>{"use strict";m();up.__esModule=!0;function kI(n){return n&&n.__esModule?n:{default:n}}var _l=Xr(),LI=So(),NI=kI(LI);up.default=function(n){n.registerHelper("with",function(t,e){if(arguments.length!=2)throw new NI.default("#with requires exactly one argument");_l.isFunction(t)&&(t=t.call(this));var r=e.fn;if(_l.isEmpty(t))return e.inverse(this);var o=e.data;return e.data&&e.ids&&(o=_l.createFrame(e.data),o.contextPath=_l.appendContextPath(e.data.contextPath,e.ids[0])),r(t,{data:o,blockParams:_l.blockParams([t],[o&&o.contextPath])})})};r1.exports=up.default});var Wu=Ye(fp=>{"use strict";m();fp.__esModule=!0;fp.registerDefaultHelpers=qI;fp.moveHelperToHooks=QI;function mi(n){return n&&n.__esModule?n:{default:n}}var BI=Hy(),RI=mi(BI),VI=zy(),jI=mi(VI),GI=Xy(),UI=mi(GI),HI=qy(),WI=mi(HI),zI=Ky(),$I=mi(zI),XI=t1(),YI=mi(XI),ZI=n1(),JI=mi(ZI);function qI(n){RI.default(n),jI.default(n),UI.default(n),WI.default(n),$I.default(n),YI.default(n),JI.default(n)}function QI(n,t,e){n.helpers[t]&&(n.hooks[t]=n.helpers[t],e||delete n.helpers[t])}});var i1=Ye((hp,o1)=>{"use strict";m();hp.__esModule=!0;var KI=Xr();hp.default=function(n){n.registerDecorator("inline",function(t,e,r,o){var a=t;return e.partials||(e.partials={},a=function(s,l){var c=r.partials;r.partials=KI.extend({},c,e.partials);var p=t(s,l);return r.partials=c,p}),e.partials[o.args[0]]=o.fn,a})};o1.exports=hp.default});var a1=Ye(zu=>{"use strict";m();zu.__esModule=!0;zu.registerDefaultDecorators=nT;function eT(n){return n&&n.__esModule?n:{default:n}}var tT=i1(),rT=eT(tT);function nT(n){rT.default(n)}});var $u=Ye((gp,s1)=>{"use strict";m();gp.__esModule=!0;var oT=Xr(),Ga={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var e=oT.indexOf(Ga.methodMap,t.toLowerCase());e>=0?t=e:t=parseInt(t,10)}return t},log:function(t){if(t=Ga.lookupLevel(t),typeof console<"u"&&Ga.lookupLevel(Ga.level)<=t){var e=Ga.methodMap[t];console[e]||(e="log");for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];console[e].apply(console,o)}}};gp.default=Ga;s1.exports=gp.default});var l1=Ye(Xu=>{"use strict";m();Xu.__esModule=!0;Xu.createNewLookupObject=aT;var iT=Xr();function aT(){for(var n=arguments.length,t=Array(n),e=0;e<n;e++)t[e]=arguments[e];return iT.extend.apply(void 0,[Object.create(null)].concat(t))}});var Yu=Ye(Cl=>{"use strict";m();Cl.__esModule=!0;Cl.createProtoAccessControl=pT;Cl.resultIsAllowed=dT;Cl.resetLoggedProperties=fT;function sT(n){return n&&n.__esModule?n:{default:n}}var c1=l1(),lT=$u(),cT=sT(lT),mp=Object.create(null);function pT(n){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var e=Object.create(null);return e.__proto__=!1,{properties:{whitelist:c1.createNewLookupObject(e,n.allowedProtoProperties),defaultValue:n.allowProtoPropertiesByDefault},methods:{whitelist:c1.createNewLookupObject(t,n.allowedProtoMethods),defaultValue:n.allowProtoMethodsByDefault}}}function dT(n,t,e){return p1(typeof n=="function"?t.methods:t.properties,e)}function p1(n,t){return n.whitelist[t]!==void 0?n.whitelist[t]===!0:n.defaultValue!==void 0?n.defaultValue:(uT(t),!1)}function uT(n){mp[n]!==!0&&(mp[n]=!0,cT.default.log("error",'Handlebars: Access has been denied to resolve the property "'+n+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function fT(){Object.keys(mp).forEach(function(n){delete mp[n]})}});var Qu=Ye(fn=>{"use strict";m();fn.__esModule=!0;fn.HandlebarsEnvironment=qu;function d1(n){return n&&n.__esModule?n:{default:n}}var yi=Xr(),hT=So(),Zu=d1(hT),gT=Wu(),mT=a1(),yT=$u(),yp=d1(yT),bT=Yu(),vT="4.7.8";fn.VERSION=vT;var IT=8;fn.COMPILER_REVISION=IT;var TT=7;fn.LAST_COMPATIBLE_COMPILER_REVISION=TT;var ST={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};fn.REVISION_CHANGES=ST;var Ju="[object Object]";function qu(n,t,e){this.helpers=n||{},this.partials=t||{},this.decorators=e||{},gT.registerDefaultHelpers(this),mT.registerDefaultDecorators(this)}qu.prototype={constructor:qu,logger:yp.default,log:yp.default.log,registerHelper:function(t,e){if(yi.toString.call(t)===Ju){if(e)throw new Zu.default("Arg not supported with multiple helpers");yi.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(yi.toString.call(t)===Ju)yi.extend(this.partials,t);else{if(typeof e>"u")throw new Zu.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(yi.toString.call(t)===Ju){if(e)throw new Zu.default("Arg not supported with multiple decorators");yi.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){bT.resetLoggedProperties()}};var MT=yp.default.log;fn.log=MT;fn.createFrame=yi.createFrame;fn.logger=yp.default});var f1=Ye((bp,u1)=>{"use strict";m();bp.__esModule=!0;function Ku(n){this.string=n}Ku.prototype.toString=Ku.prototype.toHTML=function(){return""+this.string};bp.default=Ku;u1.exports=bp.default});var h1=Ye(ef=>{"use strict";m();ef.__esModule=!0;ef.wrapHelper=ET;function ET(n,t){if(typeof n!="function")return n;var e=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),n.apply(this,arguments)};return e}});var v1=Ye(Mo=>{"use strict";m();Mo.__esModule=!0;Mo.checkRevision=OT;Mo.template=DT;Mo.wrapProgram=vp;Mo.resolvePartial=AT;Mo.invokePartial=FT;Mo.noop=y1;function xT(n){return n&&n.__esModule?n:{default:n}}function _T(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t}var CT=Xr(),Un=_T(CT),PT=So(),Hn=xT(PT),Wn=Qu(),g1=Wu(),wT=h1(),m1=Yu();function OT(n){var t=n&&n[0]||1,e=Wn.COMPILER_REVISION;if(!(t>=Wn.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Wn.COMPILER_REVISION))if(t<Wn.LAST_COMPATIBLE_COMPILER_REVISION){var r=Wn.REVISION_CHANGES[e],o=Wn.REVISION_CHANGES[t];throw new Hn.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}else throw new Hn.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").")}function DT(n,t){if(!t)throw new Hn.default("No environment passed to template");if(!n||!n.main)throw new Hn.default("Unknown template object: "+typeof n);n.main.decorator=n.main_d,t.VM.checkRevision(n.compiler);var e=n.compiler&&n.compiler[0]===7;function r(s,l,c){c.hash&&(l=Un.extend({},l,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,l,c);var p=Un.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),d=t.VM.invokePartial.call(this,s,l,p);if(d==null&&t.compile&&(c.partials[c.name]=t.compile(s,n.compilerOptions,t),d=c.partials[c.name](l,p)),d!=null){if(c.indent){for(var h=d.split("\n"),y=0,b=h.length;y<b&&!(!h[y]&&y+1===b);y++)h[y]=c.indent+h[y];d=h.join("\n")}return d}else throw new Hn.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(l,c,p){if(!l||!(c in l))throw new Hn.default('"'+c+'" not defined in '+l,{loc:p});return o.lookupProperty(l,c)},lookupProperty:function(l,c){var p=l[c];if(p==null||Object.prototype.hasOwnProperty.call(l,c)||m1.resultIsAllowed(p,o.protoAccessControl,c))return p},lookup:function(l,c){for(var p=l.length,d=0;d<p;d++){var h=l[d]&&o.lookupProperty(l[d],c);if(h!=null)return l[d][c]}},lambda:function(l,c){return typeof l=="function"?l.call(c):l},escapeExpression:Un.escapeExpression,invokePartial:r,fn:function(l){var c=n[l];return c.decorator=n[l+"_d"],c},programs:[],program:function(l,c,p,d,h){var y=this.programs[l],b=this.fn(l);return c||h||d||p?y=vp(this,l,b,c,p,d,h):y||(y=this.programs[l]=vp(this,l,b)),y},data:function(l,c){for(;l&&c--;)l=l._parent;return l},mergeIfNeeded:function(l,c){var p=l||c;return l&&c&&l!==c&&(p=Un.extend({},c,l)),p},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:n.compiler};function a(s){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=l.data;a._setup(l),!l.partial&&n.useData&&(c=kT(s,c));var p=void 0,d=n.useBlockParams?[]:void 0;n.useDepths&&(l.depths?p=s!=l.depths[0]?[s].concat(l.depths):l.depths:p=[s]);function h(y){return""+n.main(o,y,o.helpers,o.partials,c,d,p)}return h=b1(n.main,h,o,l.depths||[],c,d),h(s,l)}return a.isTop=!0,a._setup=function(s){if(s.partial)o.protoAccessControl=s.protoAccessControl,o.helpers=s.helpers,o.partials=s.partials,o.decorators=s.decorators,o.hooks=s.hooks;else{var l=Un.extend({},t.helpers,s.helpers);LT(l,o),o.helpers=l,n.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(n.usePartial||n.useDecorators)&&(o.decorators=Un.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=m1.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||e;g1.moveHelperToHooks(o,"helperMissing",c),g1.moveHelperToHooks(o,"blockHelperMissing",c)}},a._child=function(s,l,c,p){if(n.useBlockParams&&!c)throw new Hn.default("must pass block params");if(n.useDepths&&!p)throw new Hn.default("must pass parent depths");return vp(o,s,n[s],l,0,c,p)},a}function vp(n,t,e,r,o,a,s){function l(c){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=s;return s&&c!=s[0]&&!(c===n.nullContext&&s[0]===null)&&(d=[c].concat(s)),e(n,c,n.helpers,n.partials,p.data||r,a&&[p.blockParams].concat(a),d)}return l=b1(e,l,n,s,r,a),l.program=t,l.depth=s?s.length:0,l.blockParams=o||0,l}function AT(n,t,e){return n?!n.call&&!e.name&&(e.name=n,n=e.partials[n]):e.name==="@partial-block"?n=e.data["partial-block"]:n=e.partials[e.name],n}function FT(n,t,e){var r=e.data&&e.data["partial-block"];e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var o=void 0;if(e.fn&&e.fn!==y1&&(function(){e.data=Wn.createFrame(e.data);var a=e.fn;o=e.data["partial-block"]=function(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Wn.createFrame(c.data),c.data["partial-block"]=r,a(l,c)},a.partials&&(e.partials=Un.extend({},e.partials,a.partials))})(),n===void 0&&o&&(n=o),n===void 0)throw new Hn.default("The partial "+e.name+" could not be found");if(n instanceof Function)return n(t,e)}function y1(){return""}function kT(n,t){return(!t||!("root"in t))&&(t=t?Wn.createFrame(t):{},t.root=n),t}function b1(n,t,e,r,o,a){if(n.decorator){var s={};t=n.decorator(t,s,e,r&&r[0],o,a,r),Un.extend(t,s)}return t}function LT(n,t){Object.keys(n).forEach(function(e){var r=n[e];n[e]=NT(r,t)})}function NT(n,t){var e=t.lookupProperty;return wT.wrapHelper(n,function(r){return Un.extend({lookupProperty:e},r)})}});var T1=Ye((Ip,I1)=>{"use strict";m();Ip.__esModule=!0;Ip.default=function(n){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;n.noConflict=function(){return globalThis.Handlebars===n&&(globalThis.Handlebars=t),n}};I1.exports=Ip.default});var _1=Ye((Tp,x1)=>{"use strict";m();Tp.__esModule=!0;function rf(n){return n&&n.__esModule?n:{default:n}}function nf(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t}var BT=Qu(),S1=nf(BT),RT=f1(),VT=rf(RT),jT=So(),GT=rf(jT),UT=Xr(),tf=nf(UT),HT=v1(),M1=nf(HT),WT=T1(),zT=rf(WT);function E1(){var n=new S1.HandlebarsEnvironment;return tf.extend(n,S1),n.SafeString=VT.default,n.Exception=GT.default,n.Utils=tf,n.escapeExpression=tf.escapeExpression,n.VM=M1,n.template=function(t){return M1.template(t,n)},n}var Pl=E1();Pl.create=E1;zT.default(Pl);Pl.default=Pl;Tp.default=Pl;x1.exports=Tp.default});var P1=Ye((VO,C1)=>{m();C1.exports=_1().default});var Fb=Ye((Bl,Wa)=>{m();var _2=200,hb="__lodash_hash_undefined__",C2=800,P2=16,gb=9007199254740991,mb="[object Arguments]",w2="[object Array]",O2="[object AsyncFunction]",D2="[object Boolean]",A2="[object Date]",F2="[object Error]",yb="[object Function]",k2="[object GeneratorFunction]",L2="[object Map]",N2="[object Number]",B2="[object Null]",bb="[object Object]",R2="[object Proxy]",V2="[object RegExp]",j2="[object Set]",G2="[object String]",U2="[object Undefined]",H2="[object WeakMap]",W2="[object ArrayBuffer]",z2="[object DataView]",$2="[object Float32Array]",X2="[object Float64Array]",Y2="[object Int8Array]",Z2="[object Int16Array]",J2="[object Int32Array]",q2="[object Uint8Array]",Q2="[object Uint8ClampedArray]",K2="[object Uint16Array]",eS="[object Uint32Array]",tS=/[\\^$.*+?()[\]{}|]/g,rS=/^\[object .+?Constructor\]$/,nS=/^(?:0|[1-9]\d*)$/,ze={};ze[$2]=ze[X2]=ze[Y2]=ze[Z2]=ze[J2]=ze[q2]=ze[Q2]=ze[K2]=ze[eS]=!0;ze[mb]=ze[w2]=ze[W2]=ze[D2]=ze[z2]=ze[A2]=ze[F2]=ze[yb]=ze[L2]=ze[N2]=ze[bb]=ze[V2]=ze[j2]=ze[G2]=ze[H2]=!1;var vb=typeof global=="object"&&global&&global.Object===Object&&global,oS=typeof self=="object"&&self&&self.Object===Object&&self,jl=vb||oS||Function("return this")(),Ib=typeof Bl=="object"&&Bl&&!Bl.nodeType&&Bl,Rl=Ib&&typeof Wa=="object"&&Wa&&!Wa.nodeType&&Wa,Tb=Rl&&Rl.exports===Ib,uf=Tb&&vb.process,ib=(function(){try{var n=Rl&&Rl.require&&Rl.require("util").types;return n||uf&&uf.binding&&uf.binding("util")}catch(t){}})(),ab=ib&&ib.isTypedArray;function iS(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function aS(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}function sS(n){return function(t){return n(t)}}function lS(n,t){return n==null?void 0:n[t]}function cS(n,t){return function(e){return n(t(e))}}var pS=Array.prototype,dS=Function.prototype,wp=Object.prototype,ff=jl["__core-js_shared__"],Op=dS.toString,$n=wp.hasOwnProperty,sb=(function(){var n=/[^.]+$/.exec(ff&&ff.keys&&ff.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})(),Sb=wp.toString,uS=Op.call(Object),fS=RegExp("^"+Op.call($n).replace(tS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Cp=Tb?jl.Buffer:void 0,lb=jl.Symbol,cb=jl.Uint8Array,pb=Cp?Cp.allocUnsafe:void 0,Mb=cS(Object.getPrototypeOf,Object),db=Object.create,hS=wp.propertyIsEnumerable,gS=pS.splice,vi=lb?lb.toStringTag:void 0,Pp=(function(){try{var n=vf(Object,"defineProperty");return n({},"",{}),n}catch(t){}})(),mS=Cp?Cp.isBuffer:void 0,ub=Math.max,yS=Date.now,Eb=vf(jl,"Map"),Vl=vf(Object,"create"),bS=(function(){function n(){}return function(t){if(!Ti(t))return{};if(db)return db(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}})();function Ii(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function vS(){this.__data__=Vl?Vl(null):{},this.size=0}function IS(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function TS(n){var t=this.__data__;if(Vl){var e=t[n];return e===hb?void 0:e}return $n.call(t,n)?t[n]:void 0}function SS(n){var t=this.__data__;return Vl?t[n]!==void 0:$n.call(t,n)}function MS(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=Vl&&t===void 0?hb:t,this}Ii.prototype.clear=vS;Ii.prototype.delete=IS;Ii.prototype.get=TS;Ii.prototype.has=SS;Ii.prototype.set=MS;function Xn(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function ES(){this.__data__=[],this.size=0}function xS(n){var t=this.__data__,e=Dp(t,n);if(e<0)return!1;var r=t.length-1;return e==r?t.pop():gS.call(t,e,1),--this.size,!0}function _S(n){var t=this.__data__,e=Dp(t,n);return e<0?void 0:t[e][1]}function CS(n){return Dp(this.__data__,n)>-1}function PS(n,t){var e=this.__data__,r=Dp(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this}Xn.prototype.clear=ES;Xn.prototype.delete=xS;Xn.prototype.get=_S;Xn.prototype.has=CS;Xn.prototype.set=PS;function za(n){var t=-1,e=n==null?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}function wS(){this.size=0,this.__data__={hash:new Ii,map:new(Eb||Xn),string:new Ii}}function OS(n){var t=Fp(this,n).delete(n);return this.size-=t?1:0,t}function DS(n){return Fp(this,n).get(n)}function AS(n){return Fp(this,n).has(n)}function FS(n,t){var e=Fp(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this}za.prototype.clear=wS;za.prototype.delete=OS;za.prototype.get=DS;za.prototype.has=AS;za.prototype.set=FS;function $a(n){var t=this.__data__=new Xn(n);this.size=t.size}function kS(){this.__data__=new Xn,this.size=0}function LS(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e}function NS(n){return this.__data__.get(n)}function BS(n){return this.__data__.has(n)}function RS(n,t){var e=this.__data__;if(e instanceof Xn){var r=e.__data__;if(!Eb||r.length<_2-1)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new za(r)}return e.set(n,t),this.size=e.size,this}$a.prototype.clear=kS;$a.prototype.delete=LS;$a.prototype.get=NS;$a.prototype.has=BS;$a.prototype.set=RS;function VS(n,t){var e=yf(n),r=!e&&mf(n),o=!e&&!r&&Pb(n),a=!e&&!r&&!o&&Ob(n),s=e||r||o||a,l=s?aS(n.length,String):[],c=l.length;for(var p in n)(t||$n.call(n,p))&&!(s&&(p=="length"||o&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||_b(p,c)))&&l.push(p);return l}function hf(n,t,e){(e!==void 0&&!kp(n[t],e)||e===void 0&&!(t in n))&&bf(n,t,e)}function jS(n,t,e){var r=n[t];(!($n.call(n,t)&&kp(r,e))||e===void 0&&!(t in n))&&bf(n,t,e)}function Dp(n,t){for(var e=n.length;e--;)if(kp(n[e][0],t))return e;return-1}function bf(n,t,e){t=="__proto__"&&Pp?Pp(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e}var GS=eM();function Ap(n){return n==null?n===void 0?U2:B2:vi&&vi in Object(n)?tM(n):sM(n)}function fb(n){return Gl(n)&&Ap(n)==mb}function US(n){if(!Ti(n)||iM(n))return!1;var t=Tf(n)?fS:rS;return t.test(dM(n))}function HS(n){return Gl(n)&&wb(n.length)&&!!ze[Ap(n)]}function WS(n){if(!Ti(n))return aM(n);var t=Cb(n),e=[];for(var r in n)r=="constructor"&&(t||!$n.call(n,r))||e.push(r);return e}function xb(n,t,e,r,o){n!==t&&GS(t,function(a,s){if(o||(o=new $a),Ti(a))zS(n,t,s,e,xb,r,o);else{var l=r?r(gf(n,s),a,s+"",n,t,o):void 0;l===void 0&&(l=a),hf(n,s,l)}},Db)}function zS(n,t,e,r,o,a,s){var l=gf(n,e),c=gf(t,e),p=s.get(c);if(p){hf(n,e,p);return}var d=a?a(l,c,e+"",n,t,s):void 0,h=d===void 0;if(h){var y=yf(c),b=!y&&Pb(c),I=!y&&!b&&Ob(c);d=c,y||b||I?yf(l)?d=l:uM(l)?d=qS(l):b?(h=!1,d=YS(c,!0)):I?(h=!1,d=JS(c,!0)):d=[]:fM(c)||mf(c)?(d=l,mf(l)?d=hM(l):(!Ti(l)||Tf(l))&&(d=rM(c))):h=!1}h&&(s.set(c,d),o(d,c,r,a,s),s.delete(c)),hf(n,e,d)}function $S(n,t){return cM(lM(n,t,Ab),n+"")}var XS=Pp?function(n,t){return Pp(n,"toString",{configurable:!0,enumerable:!1,value:mM(t),writable:!0})}:Ab;function YS(n,t){if(t)return n.slice();var e=n.length,r=pb?pb(e):new n.constructor(e);return n.copy(r),r}function ZS(n){var t=new n.constructor(n.byteLength);return new cb(t).set(new cb(n)),t}function JS(n,t){var e=t?ZS(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}function qS(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t}function QS(n,t,e,r){var o=!e;e||(e={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=r?r(e[l],n[l],l,e,n):void 0;c===void 0&&(c=n[l]),o?bf(e,l,c):jS(e,l,c)}return e}function KS(n){return $S(function(t,e){var r=-1,o=e.length,a=o>1?e[o-1]:void 0,s=o>2?e[2]:void 0;for(a=n.length>3&&typeof a=="function"?(o--,a):void 0,s&&nM(e[0],e[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=e[r];l&&n(t,l,r,a)}return t})}function eM(n){return function(t,e,r){for(var o=-1,a=Object(t),s=r(t),l=s.length;l--;){var c=s[n?l:++o];if(e(a[c],c,a)===!1)break}return t}}function Fp(n,t){var e=n.__data__;return oM(t)?e[typeof t=="string"?"string":"hash"]:e.map}function vf(n,t){var e=lS(n,t);return US(e)?e:void 0}function tM(n){var t=$n.call(n,vi),e=n[vi];try{n[vi]=void 0;var r=!0}catch(a){}var o=Sb.call(n);return r&&(t?n[vi]=e:delete n[vi]),o}function rM(n){return typeof n.constructor=="function"&&!Cb(n)?bS(Mb(n)):{}}function _b(n,t){var e=typeof n;return t=t==null?gb:t,!!t&&(e=="number"||e!="symbol"&&nS.test(n))&&n>-1&&n%1==0&&n<t}function nM(n,t,e){if(!Ti(e))return!1;var r=typeof t;return(r=="number"?If(e)&&_b(t,e.length):r=="string"&&t in e)?kp(e[t],n):!1}function oM(n){var t=typeof n;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?n!=="__proto__":n===null}function iM(n){return!!sb&&sb in n}function Cb(n){var t=n&&n.constructor,e=typeof t=="function"&&t.prototype||wp;return n===e}function aM(n){var t=[];if(n!=null)for(var e in Object(n))t.push(e);return t}function sM(n){return Sb.call(n)}function lM(n,t,e){return t=ub(t===void 0?n.length-1:t,0),function(){for(var r=arguments,o=-1,a=ub(r.length-t,0),s=Array(a);++o<a;)s[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=e(s),iS(n,this,l)}}function gf(n,t){if(!(t==="constructor"&&typeof n[t]=="function")&&t!="__proto__")return n[t]}var cM=pM(XS);function pM(n){var t=0,e=0;return function(){var r=yS(),o=P2-(r-e);if(e=r,o>0){if(++t>=C2)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function dM(n){if(n!=null){try{return Op.call(n)}catch(t){}try{return n+""}catch(t){}}return""}function kp(n,t){return n===t||n!==n&&t!==t}var mf=fb((function(){return arguments})())?fb:function(n){return Gl(n)&&$n.call(n,"callee")&&!hS.call(n,"callee")},yf=Array.isArray;function If(n){return n!=null&&wb(n.length)&&!Tf(n)}function uM(n){return Gl(n)&&If(n)}var Pb=mS||yM;function Tf(n){if(!Ti(n))return!1;var t=Ap(n);return t==yb||t==k2||t==O2||t==R2}function wb(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=gb}function Ti(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}function Gl(n){return n!=null&&typeof n=="object"}function fM(n){if(!Gl(n)||Ap(n)!=bb)return!1;var t=Mb(n);if(t===null)return!0;var e=$n.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Op.call(e)==uS}var Ob=ab?sS(ab):HS;function hM(n){return QS(n,Db(n))}function Db(n){return If(n)?VS(n,!0):WS(n)}var gM=KS(function(n,t,e){xb(n,t,e)});function mM(n){return function(){return n}}function Ab(n){return n}function yM(){return!1}Wa.exports=gM});m();m();m();m();m();var ch="mi-session-data",ph="mi-local-data",nc="id",oc="deviceId",Oo,xr,_r,ic=class ic{constructor(){M(this,xr);M(this,_r);try{let t=sessionStorage.getItem(ch);t?E(this,xr,JSON.parse(t)):E(this,xr,{[nc]:xe()})}catch(t){E(this,xr,{[nc]:xe()})}try{let t=localStorage.getItem(ph);t?E(this,_r,JSON.parse(t)):E(this,_r,{[oc]:xe()})}catch(t){E(this,_r,{[oc]:xe()})}i(this,xr)[nc]||(i(this,xr)[nc]=xe()),i(this,_r)[oc]||(i(this,_r)[oc]=xe())}static getInstance(){return i(this,Oo)||E(this,Oo,new ic),i(this,Oo)}static ___clearInstance(){E(this,Oo,void 0)}saveSessionData(t,e){i(this,xr)[t]=e;try{return sessionStorage.setItem(ch,JSON.stringify(i(this,xr))),!0}catch(r){return!1}}loadSessionData(t){let e=i(this,xr)[t];if(e!=null)return e}saveLocalData(t,e){i(this,_r)[t]=e;try{return localStorage.setItem(ph,JSON.stringify(i(this,_r))),!0}catch(r){return!1}}loadLocalData(t){let e=i(this,_r)[t];if(e!=null)return e}};Oo=new WeakMap,xr=new WeakMap,_r=new WeakMap,M(ic,Oo);var Cr=ic;m();m();var wi=n=>n!=null;var qb=(function(){let t=globalThis.fetch;return{fetch(...e){if(!wi(t))throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return t==null?void 0:t(...e)},setFetch(e){t=e}}})(),dh=qb.fetch;var mh=["websdk","web","webv2","kiosk","kiosk-v2","mobile","iossdk","androidsdk","reactnativesdk","gen7","bespoke","reactsdk","minimap"],uh=mh[0],yh="https://api-gateway.mappedin.com/track-analytics/a/",bh="deny-watchposition",vh="load-mapview",Ih="load-mapdata",Th="change-language",Sh="query-directions";var Qr,ur,In,Kp,ac,Oi=class{constructor(){M(this,In);M(this,Qr,Object.freeze({}));M(this,ur);f(this,"oneTimeEventsSent",new Set);f(this,"sendGetDirectionsEvent",Lf((t,e,r)=>{let o={start:t,end:e,type:"location_to_location"};return r!==void 0&&(o.accessible=r),this.sendAnalyticEvent(Sh,o)},2500));E(this,ur,Y(this,In,ac).call(this,i(this,Qr)))}init(t){this.reset(),this.updateStateWithOptions(t)}reset(){E(this,Qr,{}),E(this,ur,Y(this,In,ac).call(this,{})),this.oneTimeEventsSent.clear()}updateStateWithOptions(t){return E(this,Qr,Object.freeze(Object.assign({},i(this,Qr),t))),E(this,ur,Y(this,In,ac).call(this,t)),Y(this,In,Kp).call(this,i(this,ur)),i(this,ur)}updateState(t){let e=A({},t);e.mapId&&(e.analyticsBaseUrl=Qp(W(A({},i(this,ur)),{mapId:e.mapId}))),e.context&&(e.context=gh(e.context)),e.baseUri&&(e.analyticsBaseUrl=Qp({baseUri:e.baseUri,mapId:i(this,ur).mapId})),Object.assign(i(this,ur),e),this.handleStateUpdate(t),Y(this,In,Kp).call(this,e)}handleStateUpdate(t){var e;(e=t.userPosition)!=null&&e.floorLevel?this.sendBlueDotEvents("found-floor"):t.userPosition&&this.sendBlueDotEvents("found-position")}get authReady(){let{key:t,secret:e,accessToken:r}=this.getState();return!!(t&&e)||!!r}getState(){return i(this,ur)}getContext(){return this.getState().context||i(this,Qr).context||uh}getSessionId(){return this.getState().sessionId||i(this,Qr).sessionId||hh()}getDeviceId(){return this.getState().deviceId||i(this,Qr).deviceId||fh()}sendAnalyticEvent(t,e={}){let r=this.getState(),o=Qb(r.analyticsBaseUrl,t),a={"mi-context":this.getContext(),"mi-session":this.getSessionId(),"mi-device":this.getDeviceId()};if(r.logEvents&&k.log("Analytics.track",o,a),!r.sendEvents)return Promise.resolve();if(!this.authReady)return k.warn("Auth needs to be ready to send analytics.");let s=W(A({},e),{g:r.geolocationMode,sdk_version:r.version});return r.userPosition&&Object.assign(s,r.userPosition),a["Content-Type"]="application/json",r.accessToken?a.Authorization="Bearer ".concat(r.accessToken):r.noAuth||r.secret&&r.key&&(a["x-mappedin-key"]=btoa(r.key),a["x-mappedin-secret"]=btoa(r.secret)),dh(o,{method:"POST",mode:"cors",headers:a,body:JSON.stringify(s)})}capture(t,e){if(e0.includes(t))return k.warn("".concat(t," event is sent internally.")),Promise.resolve();let r=Kb.includes(t)?t.slice(1):t;return this.sendAnalyticEvent(r,e)}sendGetMapDataEvent(t){return this.sendAnalyticEvent(Ih,t)}sendChangeLanguageEvent(t){return this.sendAnalyticEvent(Th,t)}sendWatchPositionDenied(){return this.sendAnalyticEvent(bh)}sendMapViewLoadedEvent({firstRenderDuration:t,dimension:e,collisionWorkerDisabled:r,outdoorsWorkerDisabled:o}){return this.sendAnalyticEvent(vh,{type:"3d",firstRenderDuration:t,width:e.width,height:e.height,devicePixelRatio:globalThis.devicePixelRatio||1,collisionWorkerDisabled:r,outdoorsWorkerDisabled:o})}sendBlueDotEvents(t){if(!((t==="found-floor"||t==="found-position")&&this.oneTimeEventsSent.has(t)))return this.oneTimeEventsSent.add(t),this.sendAnalyticEvent(t)}};Qr=new WeakMap,ur=new WeakMap,In=new WeakSet,Kp=function(t){t.sessionId&&Cr.getInstance().saveSessionData("id",t.sessionId),t.deviceId&&Cr.getInstance().saveLocalData("deviceId",t.deviceId)},ac=function(t){var r,o,a,s;let e=(r=t.baseUri)!=null?r:yh;return{baseUri:e,analyticsBaseUrl:Qp(W(A({},t),{baseUri:e})),version:t.version||((o=x==null?void 0:x.env)==null?void 0:o.npm_package_version)||"v6",deviceId:t.deviceId||fh(),accessToken:t.accessToken,mapId:t.mapId,sessionId:t.sessionId||hh(),platformString:t.platformString||"",context:gh(t.context)||uh,geolocationMode:!1,sendEvents:(a=t.sendEvents)!=null?a:!0,logEvents:(s=t.logEvents)!=null?s:!1,noAuth:t.noAuth||!1,key:t.key,secret:t.secret}};function Qp({mapId:n,baseUri:t=yh}){return"".concat(t).concat(n,"/")}function fh(){return Cr.getInstance().loadLocalData("deviceId")}function hh(){return Cr.getInstance().loadSessionData("id")}function Qb(n,t){return n+t}function gh(n){return mh.find(t=>t===n)}var Kb=["$select-location","$select-category","$query-suggest","$query-search"],e0=[vh,Ih,Sh,bh,Th],JM=new Oi,fr,os=class{constructor(t){M(this,fr);f(this,"capture");f(this,"updateState");E(this,fr,t),this.capture=i(this,fr).capture.bind(i(this,fr)),this.updateState=i(this,fr).updateState.bind(i(this,fr))}getState(){let o=i(this,fr).getState(),{sessionId:t,deviceId:e}=o;return Qt(o,["sessionId","deviceId"])}getContext(){return i(this,fr).getContext()}getSessionId(){return i(this,fr).getSessionId()}getDeviceId(){return i(this,fr).getDeviceId()}};fr=new WeakMap;m();m();var as,ss,ls,is=class{constructor(t,e,{enabled:r=!1}={}){M(this,as);f(this,"searchInstance");M(this,ss);M(this,ls);f(this,"enabled",!1);E(this,as,t),E(this,ss,e),E(this,ls,()=>{var o;(o=this.searchInstance)==null||o.then(a=>a.populate())}),r&&this.enable()}async query(t,e={}){if(this.enabled||await this.enable(),!this.searchInstance)return k.error("Search should be enabled by now"),{places:[],enterpriseLocations:[],enterpriseCategories:[]};try{return await(await this.searchInstance).search(t,e)}catch(r){return k.error("Search.query failed due to",r),{places:[],enterpriseLocations:[],enterpriseCategories:[]}}}async suggest(t,e={}){if(this.enabled||await this.enable(),!this.searchInstance)return k.error("Search should be enabled by now"),[];try{return await(await this.searchInstance).suggest(t,e)}catch(r){return k.error("Search.suggest failed due to",r),[]}}async enable(){this.enabled||(this.enabled=!0,this.searchInstance||(this.searchInstance=import("./internal-7BZS3RBF.js").then(({InternalSearch:t})=>new t(i(this,as)))),i(this,ss).on("language-change",i(this,ls)),await this.searchInstance)}};as=new WeakMap,ss=new WeakMap,ls=new WeakMap;var Mh={"enterprise-location":"location-profile","enterprise-category":"location-category"},Eh={"location-profile":"enterprise-location","location-category":"enterprise-category"},xh=new WeakMap,Do,Ve,ed=class{constructor(t,{search:e}={}){M(this,Do);M(this,Ve);f(this,"Analytics");f(this,"Search");f(this,"Query");f(this,"internal");f(this,"on",(t,e)=>{i(this,Do).on(t,e)});f(this,"off",(t,e)=>{i(this,Do).off(t,e)});f(this,"__LEGACY_GET_DIRECTIONS_SYNC",(t,e,r)=>i(this,Ve).__LEGACY_GET_DIRECTIONS_SYNC(t,e,r));f(this,"getDirections",(t,e,r)=>i(this,Ve).getDirections(t,e,r));f(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(t,e,r)=>i(this,Ve).__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(t,e,r));f(this,"getDirectionsMultiDestination",(t,e,r)=>i(this,Ve).getDirectionsMultiDestination(t,e,r));E(this,Do,new dr),E(this,Ve,t),xh.set(this,t),this.Analytics=new os(t.Analytics),this.Query=t.Query,this.internal=t,this.Search=new is(this,t,{enabled:e==null?void 0:e.enabled}),i(this,Ve).on("language-change",r=>{i(this,Do).publish("language-change",r)})}getEnv(){return i(this,Ve).getEnv()}getAccessToken(){var t;return(t=i(this,Ve).tokenManager)==null?void 0:t.getAccessToken().token}get mapName(){return i(this,Ve).mapName}get mapId(){var t;return(t=i(this,Ve).getMapDataOptions)==null?void 0:t.mapId}get isEnterpriseMode(){return i(this,Ve).enterpriseMode}get mapCenter(){return i(this,Ve).mapCenter}get organizationId(){return i(this,Ve).organizationId}get outdoorViewToken(){return i(this,Ve).outdoorViewToken}getByType(t){let e=i(this,Ve).getByType(t);if(Array.isArray(e)&&e.length===0){let r=this.isEnterpriseMode;!r&&t in Mh?k.warn("MappedinSDK: getByType('".concat(t,"') returned 0 results. ")+"This is a Maker map (API key starts with 'mik_'). "+"Use '".concat(Mh[t],"' instead. ")+"See https://developer.mappedin.com/web-sdk/getting-started"):r&&t in Eh&&k.warn("MappedinSDK: getByType('".concat(t,"') returned 0 results. ")+"This is an Enterprise map. "+"Use '".concat(Eh[t],"' instead. ")+"See https://developer.mappedin.com/web-sdk/getting-started")}return e}getById(t,e){return i(this,Ve).getById(t,e)}getByExternalId(t,e){return i(this,Ve).getByExternalId(t,e)}getGeoJSON(t){return t.geoJSON}async changeLanguage(t){return i(this,Ve).changeLanguage(t)}get currentLanguage(){return i(this,Ve).currentLanguage}get naturalBearing(){var t;return(t=i(this,Ve).naturalBearing)!=null?t:0}getDistance(t,e){return i(this,Ve).getDistance(t,e)}toBinaryBundle({downloadLanguagePacks:t=!0}={}){return i(this,Ve).toBinaryBundle({downloadLanguagePacks:t})}toJSONBundle({downloadLanguagePacks:t=!0}={}){return i(this,Ve).toJSONBundle({downloadLanguagePacks:t})}};Do=new WeakMap,Ve=new WeakMap;var cs=ed;function ps(n){let t=xh.get(n);if(!t)throw new Error("MapDataInternal not found");return t}m();m();m();m();m();function Di(n){return n.endsWith("/")?n:"".concat(n,"/")}m();var Ai="https://app.mappedin.com/",_h="https://auth.mappedin.com/",Ch=Object.freeze({baseUri:"https://app.mappedin.com/",baseAuthUri:"https://app.mappedin.com/",analyticsBaseUri:"https://api-gateway.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),t0=Object.freeze(W(A({},Ch),{baseUri:"https://api-gateway.mappedin.com/",baseAuthUri:"https://auth.mappedin.com/"})),r0=Object.freeze({baseUri:"https://api-gateway.eu.mappedin.com/",baseAuthUri:"https://auth.eu.mappedin.com/",analyticsBaseUri:"https://api-gateway.eu.mappedin.com/track-analytics/a/",tileServerUri:"https://tiles-cdn.eu.mappedin.com/styles/mappedin/style.json"}),n0=Object.freeze({baseUri:"https://api-gateway-staging.mappedin.net/",baseAuthUri:"https://auth-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),o0=Object.freeze({baseUri:"https://app-staging.mappedin.net/",baseAuthUri:"https://app-staging.mappedin.net/",analyticsBaseUri:"https://api-gateway-staging.mappedin.net/track-analytics/a/",tileServerUri:"https://tiles-cdn.mappedin.com/styles/mappedin/style.json"}),i0={eu:r0,us:Ch,"us-enterprise":t0,"us-staging-enterprise":n0,"us-staging-self-serve":o0};function Ph(n){return i0[n]}m();m();var a0=n=>{let t=Date.now();return n-t},sc=(n,t)=>a0(n)<=t*60*1e3;var Oh=10,Dh=Oh*60*1e3,wh="accessTokens";async function ds(n,t=!1){let e="".concat(n.key),r=Cr.getInstance(),o=(r==null?void 0:r.loadSessionData(wh))||{},a=Math.floor(Date.now()/1e3);if(o[e]&&!sc(o[e].expiresTimestamp*1e3,Oh))return o[e];let s=t?await s0(n,a):await l0(n,a),l=W(A({},o),{[e]:s});return r==null||r.saveSessionData(wh,l),s}async function s0(n,t){var a;let e;n.customAuthUri?e=n.customAuthUri:e="".concat((a=n.baseAuthUri)!=null?a:_h,"oauth2/token");let r;try{r=await Kt()(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"client_credentials",client_id:n.key,client_secret:n.secret})})}catch(s){let l=s instanceof Error?s.message:String(s);throw new Error("Failed to fetch enterprise access token from ".concat(e,": ").concat(l))}if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText,": ").concat(await r.text()));let o=await r.json();return{accessToken:o.access_token,expiresTimestamp:t+o.expires_in}}async function l0(n,t){let e;n.customAuthUri?e=n.customAuthUri:e="".concat(n.baseAuthUri?Di(n.baseAuthUri):Ai,"api/v1/api-key/token");let r;try{r=await Kt()(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:n.key,secret:n.secret})})}catch(a){let s=a instanceof Error?a.message:String(a);throw new Error("Failed to fetch access token from ".concat(e,": ").concat(s))}if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText,": ").concat(await r.text()));let o=await r.json();return{accessToken:o.access_token,expiresTimestamp:t+o.expires_in}}m();var Fh=10,kh=Fh*60*1e3,Ah="miSasTokens";async function td(n,t){let e="".concat(t,"__").concat(n.mapId),r=Cr.getInstance(),o=(r==null?void 0:r.loadSessionData(Ah))||{};if(o[e]&&!sc(o[e].expires,Fh))return o[e];let a=await c0(n,t),s=W(A({},o),{[e]:{token:a.token,expires:new Date(a.expires).getTime()}});return r==null||r.saveSessionData(Ah,s),a}async function c0(n,t){let e="".concat(n.baseUri?Di(n.baseUri):Ai,"api/v1/venue/").concat(n.mapId,"/sas-token"),r=await Kt()(e,{method:"GET",headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText,": ").concat(await r.text()));let o=await r.json();return{token:o.token,expires:new Date(o.expires).getTime()}}m();var er=Uint8Array,Ao=Uint16Array,Lh=Uint32Array,Nh=new er([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bh=new er([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),p0=new er([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Rh=function(n,t){for(var e=new Ao(31),r=0;r<31;++r)e[r]=t+=1<<n[r-1];for(var o=new Lh(e[30]),r=1;r<30;++r)for(var a=e[r];a<e[r+1];++a)o[a]=a-e[r]<<5|r;return[e,o]},Vh=Rh(Nh,2),jh=Vh[0],d0=Vh[1];jh[28]=258,d0[258]=28;var Gh=Rh(Bh,0),u0=Gh[0],U3=Gh[1],id=new Ao(32768);for(Fe=0;Fe<32768;++Fe)Tn=(Fe&43690)>>>1|(Fe&21845)<<1,Tn=(Tn&52428)>>>2|(Tn&13107)<<2,Tn=(Tn&61680)>>>4|(Tn&3855)<<4,id[Fe]=((Tn&65280)>>>8|(Tn&255)<<8)>>>1;var Tn,Fe,us=(function(n,t,e){for(var r=n.length,o=0,a=new Ao(t);o<r;++o)n[o]&&++a[n[o]-1];var s=new Ao(t);for(o=0;o<t;++o)s[o]=s[o-1]+a[o-1]<<1;var l;if(e){l=new Ao(1<<t);var c=15-t;for(o=0;o<r;++o)if(n[o])for(var p=o<<4|n[o],d=t-n[o],h=s[n[o]-1]++<<d,y=h|(1<<d)-1;h<=y;++h)l[id[h]>>>c]=p}else for(l=new Ao(r),o=0;o<r;++o)n[o]&&(l[o]=id[s[n[o]-1]++]>>>15-n[o]);return l}),fs=new er(288);for(Fe=0;Fe<144;++Fe)fs[Fe]=8;var Fe;for(Fe=144;Fe<256;++Fe)fs[Fe]=9;var Fe;for(Fe=256;Fe<280;++Fe)fs[Fe]=7;var Fe;for(Fe=280;Fe<288;++Fe)fs[Fe]=8;var Fe,Uh=new er(32);for(Fe=0;Fe<32;++Fe)Uh[Fe]=5;var Fe;var f0=us(fs,9,1);var h0=us(Uh,5,1),rd=function(n){for(var t=n[0],e=1;e<n.length;++e)n[e]>t&&(t=n[e]);return t},Pr=function(n,t,e){var r=t/8|0;return(n[r]|n[r+1]<<8)>>(t&7)&e},nd=function(n,t){var e=t/8|0;return(n[e]|n[e+1]<<8|n[e+2]<<16)>>(t&7)},g0=function(n){return(n+7)/8|0},sd=function(n,t,e){(t==null||t<0)&&(t=0),(e==null||e>n.length)&&(e=n.length);var r=new(n.BYTES_PER_ELEMENT==2?Ao:n.BYTES_PER_ELEMENT==4?Lh:er)(e-t);return r.set(n.subarray(t,e)),r};var m0=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],wr=function(n,t,e){var r=new Error(t||m0[n]);if(r.code=n,Error.captureStackTrace&&Error.captureStackTrace(r,wr),!e)throw r;return r},y0=function(n,t,e){var r=n.length;if(!r||e&&e.f&&!e.l)return t||new er(0);var o=!t||e,a=!e||e.i;e||(e={}),t||(t=new er(r*3));var s=function(It){var qt=t.length;if(It>qt){var Er=new er(Math.max(qt*2,It));Er.set(t),t=Er}},l=e.f||0,c=e.p||0,p=e.b||0,d=e.l,h=e.d,y=e.m,b=e.n,I=r*8;do{if(!d){l=Pr(n,c,1);var C=Pr(n,c+1,3);if(c+=3,C)if(C==1)d=f0,h=h0,y=9,b=5;else if(C==2){var H=Pr(n,c,31)+257,V=Pr(n,c+10,15)+4,B=H+Pr(n,c+5,31)+1;c+=14;for(var q=new er(B),N=new er(19),J=0;J<V;++J)N[p0[J]]=Pr(n,c+J*3,7);c+=V*3;for(var se=rd(N),z=(1<<se)-1,ie=us(N,se,1),J=0;J<B;){var me=ie[Pr(n,c,z)];c+=me&15;var P=me>>>4;if(P<16)q[J++]=P;else{var ve=0,ye=0;for(P==16?(ye=3+Pr(n,c,3),c+=2,ve=q[J-1]):P==17?(ye=3+Pr(n,c,7),c+=3):P==18&&(ye=11+Pr(n,c,127),c+=7);ye--;)q[J++]=ve}}var X=q.subarray(0,H),$=q.subarray(H);y=rd(X),b=rd($),d=us(X,y,1),h=us($,b,1)}else wr(1);else{var P=g0(c)+4,O=n[P-4]|n[P-3]<<8,U=P+O;if(U>r){a&&wr(0);break}o&&s(p+O),t.set(n.subarray(P,U),p),e.b=p+=O,e.p=c=U*8,e.f=l;continue}if(c>I){a&&wr(0);break}}o&&s(p+131072);for(var he=(1<<y)-1,ee=(1<<b)-1,ne=c;;ne=c){var ve=d[nd(n,c)&he],de=ve>>>4;if(c+=ve&15,c>I){a&&wr(0);break}if(ve||wr(2),de<256)t[p++]=de;else if(de==256){ne=c,d=null;break}else{var ge=de-254;if(de>264){var J=de-257,Le=Nh[J];ge=Pr(n,c,(1<<Le)-1)+jh[J],c+=Le}var Me=h[nd(n,c)&ee],We=Me>>>4;Me||wr(3),c+=Me&15;var $=u0[We];if(We>3){var Le=Bh[We];$+=nd(n,c)&(1<<Le)-1,c+=Le}if(c>I){a&&wr(0);break}o&&s(p+131072);for(var _e=p+ge;p<_e;p+=4)t[p]=t[p-$],t[p+1]=t[p+1-$],t[p+2]=t[p+2-$],t[p+3]=t[p+3-$];p=_e}}e.l=d,e.p=ne,e.b=p,e.f=l,d&&(l=1,e.m=y,e.d=h,e.n=b)}while(!l);return p==t.length?t:sd(t,0,p)};var b0=new er(0);var Kr=function(n,t){return n[t]|n[t+1]<<8},Or=function(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0},od=function(n,t){return Or(n,t)+Or(n,t+4)*4294967296};function v0(n,t){return y0(n,t)}var ad=typeof TextDecoder<"u"&&new TextDecoder,I0=0;try{ad.decode(b0,{stream:!0}),I0=1}catch(n){}var T0=function(n){for(var t="",e=0;;){var r=n[e++],o=(r>127)+(r>223)+(r>239);if(e+o>n.length)return[t,sd(n,e-1)];o?o==3?(r=((r&15)<<18|(n[e++]&63)<<12|(n[e++]&63)<<6|n[e++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):o&1?t+=String.fromCharCode((r&31)<<6|n[e++]&63):t+=String.fromCharCode((r&15)<<12|(n[e++]&63)<<6|n[e++]&63):t+=String.fromCharCode(r)}};function S0(n,t){if(t){for(var e="",r=0;r<n.length;r+=16384)e+=String.fromCharCode.apply(null,n.subarray(r,r+16384));return e}else{if(ad)return ad.decode(n);var o=T0(n),a=o[0],s=o[1];return s.length&&wr(8),a}}var M0=function(n,t){return t+30+Kr(n,t+26)+Kr(n,t+28)},E0=function(n,t,e){var r=Kr(n,t+28),o=S0(n.subarray(t+46,t+46+r),!(Kr(n,t+8)&2048)),a=t+46+r,s=Or(n,t+20),l=e&&s==4294967295?x0(n,a):[s,Or(n,t+24),Or(n,t+42)],c=l[0],p=l[1],d=l[2];return[Kr(n,t+10),c,p,o,a+Kr(n,t+30)+Kr(n,t+32),d]},x0=function(n,t){for(;Kr(n,t)!=1;t+=4+Kr(n,t+2));return[od(n,t+12),od(n,t+4),od(n,t+20)]};function ld(n,t){for(var e={},r=n.length-22;Or(n,r)!=101010256;--r)(!r||n.length-r>65558)&&wr(13);var o=Kr(n,r+8);if(!o)return{};var a=Or(n,r+16),s=a==4294967295||o==65535;if(s){var l=Or(n,r-12);s=Or(n,l)==101075792,s&&(o=Or(n,l+32),a=Or(n,l+48))}for(var c=t&&t.filter,p=0;p<o;++p){var d=E0(n,a,s),h=d[0],y=d[1],b=d[2],I=d[3],C=d[4],P=d[5],O=M0(n,P);a=C,(!c||c({name:I,size:y,originalSize:b,compression:h}))&&(h?h==8?e[I]=v0(n.subarray(O,O+y),new er(b)):wr(14,"unknown compression type "+h):e[I]=sd(n,O,O+y))}return e}var Hh=globalThis.fetch,zh,C0=(zh=x==null?void 0:x.env)==null?void 0:zh.npm_package_version;function Kt(){if(Hh==null)throw new Error("fetch is not available in your environment. Pass your own function into `setFetchFn` (node-fetch, etc)");return Hh}var cd={supplementaryUrl:"https://api-gateway.mappedin.com/analytics/",headers:{},accessToken:"",clientId:"",noAuth:!1,includeHidden:!0,clientSecret:"",apiGateway:"",authorization:"",perspective:"Website",language:"",venue:""};function $h(n){var e;let t=A(A({},cd),n);return t.headers=W(A({},t.headers),{"mappedin-sdk-version":C0}),t.things=[],"platformString"in n&&(t.headers=W(A({},t.headers),{"mappedin-platform-version":n.platformString})),t.noAuth||(t.accessToken?t.authorization="Bearer ".concat(t.accessToken):t.clientId&&t.clientSecret&&(t.authorization="Basic ".concat(globalThis.btoa("".concat(t.clientId,":").concat(t.clientSecret))))),t.language=(e=t.language)==null?void 0:e.toLowerCase(),t}function P0(n,t,e=!1){let r={language:n.language,clientId:n.clientId,clientSecret:n.clientSecret};e&&delete r.language;let{headers:o}=n;o["Content-Type"]=o["Content-Type"]||"text/json",n.accessToken?o.Authorization="Bearer ".concat(n.accessToken):n.noAuth||n.clientId&&n.clientSecret&&(o["x-mappedin-key"]=btoa(n.clientId),o["x-mappedin-secret"]=btoa(n.clientSecret));let a={method:"GET",headers:o};return n.secure&&(t+="&withcdntoken"),{req:a,url:t}}async function w0(n,t,e=!1){let r=P0(n,t,e),o=await Kt()(r.url,r.req);if(!o.ok)throw new Error("".concat(o.status," ").concat(o.statusText));return o.json()}var O0=n=>{let t=n!=null&&typeof n=="object"&&"perspectives"in n&&n.perspectives!=null&&typeof n.perspectives=="object"?n.perspectives:null;if(t==null||Object.keys(t).length===0)return k.warn("No perspectives available in response!"),null;let e={};for(let[r,o]of Object.entries(t)){let a="url"in o&&typeof o.url=="string"?o.url:null,s="locale_packs"in o&&typeof o.locale_packs=="object"?o.locale_packs:null;if(a==null||s==null){k.warn("Perspective ".concat(r," is missing url or locale_packs!"));continue}e[r]={url:a,locale_packs:s}}return e};async function D0(n,t="exports/mvf/1/bundle"){var p,d;let e=$h(A(A({baseUri:"https://api-gateway.mappedin.com/"},cd),n)),r="".concat(e.baseUri+t,"?venue=").concat(e.venue,"&version=").concat((p=e.version)!=null?p:"2.0.0");e.headers["Content-Type"]="application/zip";let o=await w0(e,r),a=o.url,s=o.locale_packs,l=(d=e.perspective)!=null?d:cd.perspective,c=O0(o);if(l!=null&&l!==""&&c!=null){let h=c[l];h==null?k.warn("Perspective ".concat(l," not found in response! Loading default perspective instead.")):(k.log('Loading perspective "'.concat(l,'"')),a=h.url,s=h.locale_packs)}return{url:a,localePacks:s,updated_at:o.updated_at}}var Fi=(function(){let n;return()=>(n||(n=new TextDecoder),n)})();async function pd(n,{signal:t}){let e=await(await Kt()(n,{signal:t})).arrayBuffer();return new Uint8Array(e)}async function ki(n){let t=ld(n),e={};if(t["enterprise/"]!=null){e.enterprise={};let r=t["enterprise/locations.json"];r&&(e.enterprise.locations=JSON.parse(Fi().decode(r)));let o=t["enterprise/locationInstances.json"];o&&(e.enterprise.locationInstances=JSON.parse(Fi().decode(o)));let a=t["enterprise/categories.json"];a&&(e.enterprise.categories=JSON.parse(Fi().decode(a)))}return t["floorstack.json"]&&(e["floorstack.json"]=JSON.parse(Fi().decode(t["floorstack.json"]))),t["floor.geojson"]&&(e["floor.geojson"]=JSON.parse(Fi().decode(t["floor.geojson"]))),t["manifest.json"]&&(e["manifest.geojson"]=JSON.parse(Fi().decode(t["manifest.json"]))),e}async function Xh(n,{signal:t}){try{let e=await(await Kt()(n,{signal:t})).arrayBuffer();if(t.aborted)return;let r=new Uint8Array(e);return await ki(r)}catch(e){let r=new Error("downloadLanguagePack failed");throw r.cause=e,r}}function A0(n){let{mvfVersion:t,useDraftData:e}=n;if(t==="3.0.0")return e?"exports/mvf3-draft/1/bundle":"exports/mvf3/1/bundle";if(t==null||t==="2.0.0")return e?"exports/mvf2-draft/1/bundle":"exports/mvf2/1/bundle";if(t==="2.0.0-c")return e?"exports/mvf2c-draft/1/bundle":"exports/mvf2c/1/bundle";throw new Error("Unsupported MVF version: ".concat(t))}async function dd(n){return new Promise(async(t,e)=>{try{let r=A0(n),{url:o,localePacks:a}=await D0(n,r),s=await Kt()(o).then(c=>c.arrayBuffer()),l=new Uint8Array(s);t({compressed:l,localePacks:a})}catch(r){e(r)}})}async function ud(n,t){return new Promise(async(e,r)=>{try{let{url:o}=await F0(n,t),a=await Kt()(o).then(l=>l.arrayBuffer()),s=new Uint8Array(a);e(s)}catch(o){r(o)}})}async function F0(n,t){let e=new URL("".concat(n.baseUri?Di(n.baseUri):Ai,"api/v1/venue/").concat(n.mapId,"/mvf"));n.viewId&&e.searchParams.set("configId",n.viewId),n.mvfVersion&&e.searchParams.set("version",n.mvfVersion);let r=await Kt()(e.toString(),{headers:{Authorization:"Bearer ".concat(t)}});if(!r.ok)throw new Error("".concat(r.status," ").concat(r.statusText));return r.json()}function Yh(n){return Gp(n)}function k0(n){if(n==null||typeof n!="object")return!1;let t=["connection.json","manifest.geojson","floor.geojson"in n?"floor.geojson":"map.geojson","node.geojson","floorstack.json"in n?"floorstack.json":"mapstack.json"in n?"mapstack.json":"mapstack.geojson"];"styles.json"in n&&t.push("styles.json"),"shapes.json"in n&&t.push("shapes.json"),"navigationFlags.json"in n&&t.push("navigationFlags.json"),"annotation-symbols.json"in n&&t.push("annotation-symbols.json");for(let e of t)if(n[e]==null||n[e][Symbol.toStringTag]!=="Uint8Array")return!1;return!0}async function fd(n){return new Promise(async(t,e)=>{try{if(n==null||typeof n!="object")throw new Error("Error parsing data! Unzipping failed.");if(n[Symbol.toStringTag]!=="Uint8Array")throw new Error("Unexpected file type! Unzipping failed.");let r=ld(n);if(!k0(r))throw new Error("MVF is missing some expect static files. Unzipping failed.");let o={},a=Object.keys(r);for(let s of a){if(r[s].length===0)continue;let l=s.split("/");if(l.length<0)throw new Error("Encounted a file with no name! Unzipping failed.");if(l.length>2)throw new Error("Encountered unexpected nesting in MVF! Unzipping failed.");if(l.length===1){o[l[0]]=r[s];continue}if(l[0]==="image"){k.warn("MVF unzipping encountered an image. Ignoring as this case has not been implemented.");continue}else o[l[0]]==null&&(o[l[0]]={}),o[l[0]][l[1]]=r[s]}t(o)}catch(r){e(r)}})}function Kn(){let n="us",t={};function e(){return L0(Ph(n),t)}return{updateByUserOption(r){var o,a;r.environment&&(n=r.environment),r.baseUri&&(t.baseUri=r.baseUri),r.baseAuthUri&&(t.baseAuthUri=r.baseAuthUri),(o=r.analytics)!=null&&o.baseUri&&(t.analyticsBaseUri=(a=r.analytics)==null?void 0:a.baseUri)},updateTileServerBaseUrl(r){t.tileServerUri=r},updateEnvironment(r){n=r},setEnterprise(r){(n==="us"||n==="us-enterprise")&&(n=r?"us-enterprise":"us")},getBaseUri(){return e().baseUri},getBaseAuthUri(){return e().baseAuthUri},getAnalyticsBaseUri(){return e().analyticsBaseUri},getTileServerUri(){return e().tileServerUri},reset(){n="us",t={}},__getState:e}}function L0(n,t){return A(A({},n),t)}var lc=n=>{var e,r;let t=Object.values((r=(e=n["floorstack.json"])!=null?e:n["mapstack.json"])!=null?r:{});return t.length===1?[]:t.filter(o=>o.type!=="Outdoor").map(o=>o.id.replace("fs_","").replace("ms_",""))},Wh=async n=>{let t=performance.now(),e,r=Xf.decompressUnsafeSync(n);r.isOk()?e=r.unwrap():k.error("MVFv3 decompression failed!");let o;if(e)try{o=$f(e)}catch(a){k.error("MVFv3 to MVFv2 conversion failed!",a)}if(k.log("Parsed MVFv3 in ".concat(performance.now()-t,"ms")),!o)throw new Error("Failed to parse MVFv2 from MVFv3!");return{mvf2:o,mvf3:e}};async function cc(n,t="2.0.0"){switch(t){case"2.0.0":case"2.0.0-c":try{let e=performance.now(),r=await fd(n),o=Gp(r);return k.log("Parsed MVFv2 in ".concat(performance.now()-e,"ms")),{mvf2:o}}catch(e){return k.error("MVFv2 parsing failed! Trying MVFv3."),Wh(n)}case"3.0.0":return Wh(n);default:throw new Error("Unsupported MVF version: ".concat(t))}}m();m();function N0(n,t,e){e===void 0&&(e={});for(var r=Qn(n),o=_i(t),a=0;a<o.length-1;a++){var s=!1;if(e.ignoreEndVertices&&(a===0&&(s="start"),a===o.length-2&&(s="end"),a===0&&a+1===o.length-1&&(s="both")),B0(o[a],o[a+1],r,s,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function B0(n,t,e,r,o){var a=e[0],s=e[1],l=n[0],c=n[1],p=t[0],d=t[1],h=e[0]-l,y=e[1]-c,b=p-l,I=d-c,C=h*I-y*b;if(o!==null){if(Math.abs(C)>o)return!1}else if(C!==0)return!1;if(r){if(r==="start")return Math.abs(b)>=Math.abs(I)?b>0?l<a&&a<=p:p<=a&&a<l:I>0?c<s&&s<=d:d<=s&&s<c;if(r==="end")return Math.abs(b)>=Math.abs(I)?b>0?l<=a&&a<p:p<a&&a<=l:I>0?c<=s&&s<d:d<s&&s<=c;if(r==="both")return Math.abs(b)>=Math.abs(I)?b>0?l<a&&a<p:p<a&&a<l:I>0?c<s&&s<d:d<s&&s<c}else return Math.abs(b)>=Math.abs(I)?b>0?l<=a&&a<=p:p<=a&&a<=l:I>0?c<=s&&s<=d:d<=s&&s<=c;return!1}var Zh=N0;m();function R0(n,t){t===void 0&&(t={});var e=Ei(n),r=(e[0]+e[2])/2,o=(e[1]+e[3])/2;return Mi([r,o],t.properties,t)}var Li=R0;m();m();function V0(n,t,e){e===void 0&&(e={});var r=Qn(n),o=Qn(t),a=qr(o[1]-r[1]),s=qr(o[0]-r[0]),l=qr(r[1]),c=qr(o[1]),p=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(l)*Math.cos(c);return Nf(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),e.units)}var eo=V0;function pc(n,t){return t===void 0&&(t={}),jf(n,function(e,r){var o=r.geometry.coordinates;return e+eo(o[0],o[1],t)},0)}m();m();m();function dc(n,t,e){if(e===void 0&&(e={}),e.final===!0)return j0(n,t);var r=Qn(n),o=Qn(t),a=qr(r[0]),s=qr(o[0]),l=qr(r[1]),c=qr(o[1]),p=Math.sin(s-a)*Math.cos(c),d=Math.cos(l)*Math.sin(c)-Math.sin(l)*Math.cos(c)*Math.cos(s-a);return Bf(Math.atan2(p,d))}function j0(n,t){var e=dc(t,n);return e=(e+180)%360,e}function G0(n,t,e){e===void 0&&(e={});var r=Mi([1/0,1/0],{dist:1/0}),o=0;return Vf(n,function(a){for(var s=_i(a),l=0;l<s.length-1;l++){var c=Mi(s[l]);c.properties.dist=eo(t,c,e);var p=Mi(s[l+1]);p.properties.dist=eo(t,p,e);var d=eo(c,p,e),h=Math.max(c.properties.dist,p.properties.dist),y=dc(c,p),b=Up(t,h,y+90,e),I=Up(t,h,y-90,e),C=Yf(rs([b.geometry.coordinates,I.geometry.coordinates]),rs([c.geometry.coordinates,p.geometry.coordinates])),P=null;C.features.length>0&&(P=C.features[0],P.properties.dist=eo(t,P,e),P.properties.location=o+eo(c,P,e)),c.properties.dist<r.properties.dist&&(r=c,r.properties.index=l,r.properties.location=o),p.properties.dist<r.properties.dist&&(r=p,r.properties.index=l+1,r.properties.location=o+d),P&&P.properties.dist<r.properties.dist&&(r=P,r.properties.index=l),o+=d}}),r}var hs=G0;function U0(n,t,e){var r=_i(e);if(Hf(e)!=="LineString")throw new Error("line must be a LineString");var o=hs(e,n),a=hs(e,t),s;o.properties.index<=a.properties.index?s=[o,a]:s=[a,o];for(var l=[s[0].geometry.coordinates],c=s[0].properties.index+1;c<s[1].properties.index+1;c++)l.push(r[c]);return l.push(s[1].geometry.coordinates),rs(l,e.properties)}var hd=U0;var H0=1e-7;function gd(n){return{type:"Point",coordinates:n}}function W0(n,t){let{coordinates:e}=t.geometry,{coordinates:r}=n.geometry,o=e.map(a=>hs(n,gd(a)));return r.reduce((a,s)=>{let l=hd(gd(s),o[0],n),c=hd(gd(s),o[1],n),p=pc(l)<pc(c)?l:c;return p.properties=W(A({},n.properties),{entrances:[]}),a.concat([p])},[])}function md(n,t){return t.reduce((e,r)=>{let o={epsilon:H0},a=e.obstructions.findIndex(l=>Zh(Li(r),l,o)),s=e.obstructions[a];if(s){let[l,c]=W0(s,r);e.entrances.push(r),e.obstructions.splice(a,1,l,c)}return e},{obstructions:[n],entrances:[]})}m();m();m();var lt=class{constructor(t){f(this,"id");this.id=t}};m();m();var Sn,Ni=class Ni{constructor(t,e,r){f(this,"__type",Ni.__type);f(this,"id",xe());f(this,"latitude");f(this,"longitude");f(this,"floorId");f(this,"verticalOffset");M(this,Sn,{});var o;if(typeof t=="object")this.latitude=t.latitude,this.longitude=t.longitude,this.floorId=t.floorId,this.verticalOffset=(o=t.verticalOffset)!=null?o:0;else{if(e==null)throw new Error("Coordinate longitude is required.");this.latitude=t,this.longitude=e,this.floorId=r,this.verticalOffset=0}}static is(t){return t.__type===Ni.__type}get anchorTarget(){return this}get focusTarget(){return this}get navigationTarget(){return this}isEqual(t){return this.latitude===t.latitude&&this.longitude===t.longitude&&this.floorId===t.floorId}toJSON(){return{__type:Ni.__type,latitude:this.latitude,longitude:this.longitude,floorId:this.floorId,verticalOffset:this.verticalOffset}}get geoJSON(){if(i(this,Sn).geoJSON!=null)return i(this,Sn).geoJSON;let t=[this.longitude,this.latitude];return this.verticalOffset!==0&&t.push(this.verticalOffset),i(this,Sn).geoJSON={type:"Feature",properties:null,geometry:{type:"Point",coordinates:t}},i(this,Sn).geoJSON}toGeoJSON(){return this.geoJSON.geometry}destroy(){for(let t of globalThis.Object.keys(i(this,Sn)))delete i(this,Sn)[t]}};Sn=new WeakMap,f(Ni,"__type","coordinate");var yd=Ni,re=yd;function bd(n){var o,a,s,l,c,p;let t=((a=(o=n.enterprise)==null?void 0:o.locations)==null?void 0:a.reduce((d,h)=>(d[h.id]=h,d),{}))||{};for(let d of((s=n.enterprise)==null?void 0:s.locationInstances)||[])t[d.id]=d;let e={};for(let d of n["floorstack.json"]||[])e[d.id]=d;let r={};for(let d of((l=n["floor.geojson"])==null?void 0:l.features)||[])d.properties&&d.properties.id&&(r[d.properties.id]=d.properties);return{type:"downloaded",data:n,optimized:{"enterprise-location":t,"enterprise-category":((p=(c=n.enterprise)==null?void 0:c.categories)==null?void 0:p.reduce((d,h)=>(d[h.id]=h,d),{}))||{},"floor-stack":e,floor:r}}}var z0=/^https?:\/\/cdn(-staging)?\.mappedin\.com(\/|$)/;function Jh(n){return z0.test(n)}function qh(n){let t=n.split("?")[1];return!!(t!=null&&t.includes("sv="))}function Et(n,t){var r;let e=((r=n==null?void 0:n.properties)==null?void 0:r.id)||"unknown";if(n.geometry==null)return k.error('Cannot get the center coordinate for "'.concat(e,'" because it has no geometry.')),new re({latitude:0,longitude:0,floorId:t});try{if(n.geometry.type==="LineString"){let[[o,a],[s,l]]=n.geometry.coordinates,c=(o+s)/2,p=(a+l)/2;return new re({latitude:p,longitude:c,floorId:t})}else if(n.geometry.type==="Point"){let[o,a]=n.geometry.coordinates;return new re({latitude:a,longitude:o,floorId:t})}else if(n.geometry.type==="Polygon"){let o=n;if(o.properties.center!=null){let[a,s]=o.properties.center;return new re({latitude:s,longitude:a,floorId:t})}}}catch(o){}try{let[o,a]=Li(n).geometry.coordinates;return new re({latitude:a,longitude:o,floorId:t})}catch(o){return k.error('Failed to get center coordinate for "'.concat(e,'" ').concat(o instanceof Error?o.stack:"")),new re({latitude:0,longitude:0,floorId:t})}}function Qh(n,t){return t&&(n.flags[t.index]&1<<t.bit)!==0}function uc(n,t){var a;let e=(a=n.instanceLocationsByPolygonId)==null?void 0:a[t];if(e)return[e];let r=[],o=n.mvfLocationsByGeometryId[t];if(o)for(let s of o){let l=n.getById("enterprise-location",s.id);l&&r.push(l)}return r}var tr,gt,Fo,Mn,Bi=class Bi extends lt{constructor(e,r){super(r.mvfData.properties.id);f(this,"__type",Bi.__type);M(this,tr);M(this,gt,{});M(this,Fo);M(this,Mn);E(this,tr,e),E(this,Fo,r.floorId),E(this,Mn,r.mvfData)}static is(e){return e.__type===Bi.__type}get locations(){return i(this,gt).locations?i(this,gt).locations:(i(this,gt).locations=(i(this,tr).locationIdsByNodeId[this.id]||[]).map(e=>i(this,tr).getById("enterprise-location",e)).filter(Boolean),i(this,gt).locations)}get space(){var e;return i(this,tr).getById("space",(e=i(this,tr).spaceIdsByNodeId[this.id])==null?void 0:e[0])}get object(){var e;return i(this,tr).getById("object",(e=i(this,tr).objectIdsByNodeId[this.id])==null?void 0:e[0])}get floor(){let e=i(this,tr).getById("floor",i(this,Fo));if(e==null)throw new Error("Floor ".concat(i(this,Fo)," not found!"));return e}get coordinate(){return i(this,gt).coordinate==null&&(i(this,gt).coordinate=Et(i(this,Mn),i(this,Fo))),i(this,gt).coordinate}get externalId(){var e;return(e=i(this,Mn).properties.externalId)!=null?e:""}get neighbors(){if(i(this,gt).neighbors==null){let e=i(this,Mn).properties.neighbors.map(r=>{let o=i(this,tr).getById("node",r.id);if(o==null)throw new Error("Node ".concat(r.id," not found!"));return o});i(this,gt).neighbors=e}return i(this,gt).neighbors}get navigationFlags(){if(i(this,gt).navigationFlags==null){let e=[],r=i(this,Mn).properties.flags;if(r!=null&&r.length>0)for(let[o,a]of Object.entries(i(this,tr).navigationFlags))r.length>a.index&&r[a.index]!=null&&Qh({flags:r},a)&&e.push(o);i(this,gt).navigationFlags=Object.freeze(e)}return i(this,gt).navigationFlags}get geoJSON(){return W(A({},i(this,Mn)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}get navigationTarget(){return this}toJSON(){return{__type:Bi.__type,id:this.id,floor:this.floor.id,coordinate:this.coordinate.toJSON(),neighbors:this.neighbors.map(e=>e.id)}}destroy(){for(let e of Object.keys(i(this,gt)))delete i(this,gt)[e]}};tr=new WeakMap,gt=new WeakMap,Fo=new WeakMap,Mn=new WeakMap,f(Bi,"__type","node");var vd=Bi,hr=vd;m();m();m();m();var gs,En,Ri=class Ri extends lt{constructor(e){super(String(xe()));f(this,"__type",Ri.__type);M(this,gs,{});M(this,En);E(this,En,e.mvfData)}static is(e){return e.__type===Ri.__type}get url(){return i(this,En).url}get name(){if("displayName"in i(this,En))return i(this,En).displayName;if("label"in i(this,En))return i(this,En).label}toJSON(){return{__type:Ri.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let e of globalThis.Object.keys(i(this,gs)))delete i(this,gs)[e]}};gs=new WeakMap,En=new WeakMap,f(Ri,"__type","hyperlink");var Id=Ri,ko=Id;m();m();function ms(n){var t;return typeof n=="string"?n:(t=n==null?void 0:n.id)!=null?t:""}function Kh(n){return Array.isArray(n)&&Number.isFinite(n[0])&&Number.isFinite(n[1])}var $0=/^https:\/\/cdn\.mappedin\.com\/category-symbols\/.+$/,X0=/^https:\/\/cdn-staging\.mappedin\.net\/category-symbols\/.+$/,Y0=n=>$0.test(n)||X0.test(n),Z0=/^https:\/\/cdn\.mappedin\.com\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,J0=/^https:\/\/cdn-staging\.mappedin\.com\/[^/]+\/[^/]+\.[a-zA-Z0-9]+$/,q0=n=>Y0(n)?!1:Z0.test(n)||J0.test(n),Vi=n=>{var s;if(!q0(n))return null;let t="";n.startsWith("https://")?(t="https://",n=n.slice(8)):n.startsWith("http://")&&(t="http://",n=n.slice(7));let[e,r,o]=n.split("/"),a=(s=o.split(".").pop())!=null?s:"";return{origin:t+e,mapId:r,fileName:o,fileType:a}};function Td(n){return n.reduce((t,e,r)=>r===0?t:t+qn(n[r-1].toGeoJSON().coordinates,e.toGeoJSON().coordinates),0)}function xn(n){return n!=null&&typeof n=="object"&&"__type"in n&&n.__type!==null&&typeof n.__type=="string"}function Sd(n){return n!=null&&typeof n=="object"&&"name"in n&&n.name!=null&&typeof n.name=="string"&&n.name!==""}function eg(n){return xn(n)&&Sd(n)}var ys,to,Lo,ji=class ji extends lt{constructor(e){super(String(xe()));f(this,"__type",ji.__type);M(this,ys,{});M(this,to);M(this,Lo);E(this,to,e.mvfData),E(this,Lo,e.mapData)}static is(e){return e.__type===ji.__type}get url(){let e=i(this,to).url;if(i(this,Lo).tokenManager==null)return e;let r=Vi(i(this,to).url);if(r==null)return e;let o=r.mapId;try{if(i(this,Lo).tokenManager.isEnterpriseMode())return e;let a=i(this,Lo).tokenManager.getSasToken(o).token;if(a==null||a==="")throw new Error("SAS token empty!");return"".concat(e,"?").concat(a)}catch(a){return r.fileType!=="svg"&&k.error("Error getting SAS token for image",{error:a,url:e}),e}}get name(){return i(this,to).altText}get altText(){return i(this,to).altText}toJSON(){return{__type:ji.__type,id:this.id,url:this.url,name:this.name}}destroy(){for(let e of globalThis.Object.keys(i(this,ys)))delete i(this,ys)[e]}};ys=new WeakMap,to=new WeakMap,Lo=new WeakMap,f(ji,"__type","image");var Md=ji,en=Md;m();var No,Dr=class{constructor(t,e){f(this,"id");M(this,No);this.id=t}get geoJSONBoundingBox(){return i(this,No)?i(this,No):"bbox"in this.geoJSON.geometry&&this.geoJSON.geometry.bbox?this.geoJSON.geometry.bbox:(E(this,No,Ei(this.geoJSON)),i(this,No))}get geoJSON(){return{properties:null,type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}}}};No=new WeakMap;var Gi,_n,Cn,ct=class extends Dr{constructor(e,r){super(r.properties.id,e);M(this,Gi);M(this,_n);M(this,Cn,{});E(this,Gi,e),E(this,_n,r)}get externalId(){var e;return(e=i(this,_n).properties.externalId)!=null?e:""}get name(){var r,o,a,s;let e=(o=(r=i(this,_n).properties.details)==null?void 0:r.name)!=null?o:"";return e===""&&(e=(s=(a=this.locationProfiles.find(l=>l.name&&l.name.length>0))==null?void 0:a.name)!=null?s:""),e}get icon(){var e;return(e=this.locationProfiles.find(r=>r.icon!=null&&r.icon.url!=null&&r.icon.url.length>0))==null?void 0:e.icon}get description(){var r,o,a,s;let e=(o=(r=i(this,_n).properties.details)==null?void 0:r.description)!=null?o:"";return e===""&&(e=(s=(a=this.locationProfiles.find(l=>l.description&&l.description.length>0))==null?void 0:a.description)!=null?s:""),e}get images(){var r,o,a,s,l;if(i(this,Cn).images!=null)return i(this,Cn).images;let e=(a=(o=(r=i(this,_n).properties.details)==null?void 0:r.images)==null?void 0:o.map(c=>new en({mvfData:c,mapData:i(this,Gi)})))!=null?a:[];return(e==null||e.length===0)&&(e=(l=(s=this.locationProfiles.find(c=>c.images.length>0))==null?void 0:s.images)!=null?l:[]),i(this,Cn).images=e,e}get links(){var r,o,a,s,l;if(i(this,Cn).links!=null)return i(this,Cn).links;let e=(a=(o=(r=i(this,_n).properties.details)==null?void 0:r.links)==null?void 0:o.map(c=>new ko({mvfData:c})))!=null?a:[];return(e==null||e.length===0)&&(e=(l=(s=this.locationProfiles.find(c=>c.links.length>0))==null?void 0:s.links)!=null?l:[]),i(this,Cn).links=e,e}get locationProfiles(){var e;return(e=i(this,Gi).locationProfilesByAttachedFeatureId[this.id])!=null?e:[]}_serializeDetailedMapData(){return{externalId:this.externalId,name:this.name,description:this.description,images:this.images,links:this.links,locationProfiles:this.locationProfiles}}};Gi=new WeakMap,_n=new WeakMap,Cn=new WeakMap;m();var vs,Ar,Bo,bs=class bs{constructor(t,e,r,o){M(this,vs);M(this,Ar);M(this,Bo);f(this,"target");f(this,"__type",bs.__type);E(this,vs,t),E(this,Ar,e),this.target=r,E(this,Bo,o)}static is(t){return t.__type===bs.__type}get id(){return i(this,vs)}get url(){if(i(this,Bo)==null)return i(this,Ar);let t=Vi(i(this,Ar));if(t==null)return i(this,Ar);let e=t.mapId;try{if(i(this,Bo).isEnterpriseMode())return i(this,Ar);let r=i(this,Bo).getSasToken(e).token;if(r==null||r==="")throw new Error("SAS token empty!");return"".concat(i(this,Ar),"?").concat(r)}catch(r){return t.fileType!=="svg"&&k.error("Error getting SAS token for image",{error:r,url:i(this,Ar)}),i(this,Ar)}}};vs=new WeakMap,Ar=new WeakMap,Bo=new WeakMap,f(bs,"__type","image-3d");var rr=bs;m();m();function ro(n){let t;if(re.is(n))t=n;else if(Ht.is(n))t=n.coordinates[0];else if(Pn.is(n))if(n.spaces.length>0)t=n.spaces[0].center;else return;else if(Tt.is(n))if(n.coordinates.length>0)t=n.coordinates[0];else return;else if("center"in n&&re.is(n.center))t=n.center;else if("coordinate"in n&&re.is(n.coordinate))t=n.coordinate;else return;return t}m();m();var Is={debug:!1,pitch:45,bearing:0,antialiasing:{enabled:!0},shadingAndOutlines:!0,outdoorView:{layersHiddenByGeometry:["building-outline","building-top","building","building-wall","building-buffer"]},imagePlacementOptions:{mode:"default"},flipImagesToFaceCamera:!0,multiFloorView:{enabled:!0,floorGap:"auto",footprintColor:"#ffffff"},disableUpdateStateValidation:!1},tn="ExteriorWalls",no="Walls",tg=0,Ui="InteriorDoors",Hi="ExteriorDoors",Ze="GeometryLayer",rn="LabelsLayer",Fr="MarkersLayer",Ts="FootprintLayer",Ro="OcclusionLayer",Vo="AreasLayer",Wi="ImagesLayer",jo="FacadesLayer",nn="PathsLayer",kr="ModelsLayer";var rg=["https://mappedin.auth0.com","https://mappedin-staging.auth0.com","https://staging.mappedin.com","https://mappedin-staging.auth0.com/userinfo","https://mappedin.com","https://mappedin.auth0.com/userinfo"],Q0={orange:"#F26336",teal:"#057685",lightTeal:"#5DC7D0"};var K0=new Set(["outdoorView","bearing","pitch","zoomLevel","screenOffsets","debug","initialFloor","shadingAndOutlines","wallTopColor","style","multiFloorView","occlusion","imagePlacementOptions","flipImagesToFaceCamera","injectStyles","useStandaloneCamera","preloadFloors"]),ev=new Set(["style","enabled","layersHiddenByGeometry","lowDpi"]);function Ed(n){var t,e;(t=n.outdoorView)!=null&&t.enabled&&!((e=n.outdoorView)!=null&&e.token)&&k.error("Enable outdoor view requires a token. Provide token in `options.outdoorView.token`")}function xd(n,t){var o,a,s,l,c,p,d;let e=((o=n==null?void 0:n.outdoorView)==null?void 0:o.token)||t.outdoorViewToken,r=W(A(A({},Is),n),{outdoorView:A({enabled:((a=n==null?void 0:n.outdoorView)==null?void 0:a.enabled)===void 0?!!e:(s=n==null?void 0:n.outdoorView)==null?void 0:s.enabled,layersHiddenByGeometry:(l=Is.outdoorView)==null?void 0:l.layersHiddenByGeometry},n==null?void 0:n.outdoorView),bearing:(p=(c=n==null?void 0:n.bearing)!=null?c:t.naturalBearing)!=null?p:0,imagePlacementOptions:A(A({},Is.imagePlacementOptions),n==null?void 0:n.imagePlacementOptions),multiFloorView:A(A({},Is.multiFloorView),n==null?void 0:n.multiFloorView),disableUpdateStateValidation:(d=n==null?void 0:n.disableUpdateStateValidation)!=null?d:!1});return e&&r.outdoorView&&(r.outdoorView.token=e),r}function ng(n){let t={remove_watermark:!1};if(n)try{let e=ec(n);Object.assign(t,e.capabilities)}catch(e){k.error("Error decoding capabilities from token",e)}return t}function og(n){let t=Object.fromEntries(Object.entries(n).filter(([e])=>K0.has(e)));return t.outdoorView&&(t.outdoorView=Object.fromEntries(Object.entries(t.outdoorView).filter(([e])=>ev.has(e)))),t}var Go,Uo,wn,Ho,fc,ig,zi=class zi extends ct{constructor(e,r){super(e,r.mvfData);M(this,fc);f(this,"__type",zi.__type);M(this,Go);M(this,Uo);M(this,wn,{});M(this,Ho);E(this,Go,e),E(this,Uo,r.floorId),E(this,Ho,r.mvfData)}static is(e){return e.__type===zi.__type}get center(){return i(this,wn).center==null&&(i(this,wn).center=Et(i(this,Ho),i(this,Uo))),i(this,wn).center}get floor(){let e=i(this,Go).getById("floor",i(this,Uo));if(e==null)throw new Error("Floor ".concat(i(this,Uo)," not found!"));return e}get images3D(){var o;let e=(o=i(this,Go).floorImagesByAnchorId.get(this.id))!=null?o:[],r=Y(this,fc,ig).call(this);return r?[...e,r]:e}get geoJSON(){return W(A({},i(this,Ho)),{properties:null})}get focusTarget(){return this}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{__type:zi.__type,id:this.id,name:this.name,floor:this.floor.id}}destroy(){}};Go=new WeakMap,Uo=new WeakMap,wn=new WeakMap,Ho=new WeakMap,fc=new WeakSet,ig=function(){let e=i(this,Ho).properties;if(e.image!=null)return i(this,wn).polygonImage==null&&(i(this,wn).polygonImage=new rr("".concat(this.id,"-polygon-image-").concat(xe()),e.image.path,this,i(this,Go).tokenManager)),i(this,wn).polygonImage},f(zi,"__type","area");var _d=zi,gr=_d;m();var Wo,On,zo,oo,$i=class $i extends ct{constructor(e,r){super(e,r.mvfData);f(this,"__type",$i.__type);M(this,Wo);M(this,On);M(this,zo);M(this,oo);E(this,On,{}),E(this,oo,r.mvfData),E(this,Wo,e),E(this,zo,r.floorId)}static is(e){return e.__type===$i.__type}get floor(){let e=i(this,Wo).getById("floor",i(this,zo));if(e==null)throw new Error("Floor ".concat(i(this,zo)," not found!"));return e}get center(){return i(this,On).center==null&&(i(this,On).center=Et(i(this,oo),i(this,zo))),i(this,On).center}get isExterior(){var o;if(i(this,oo).properties.isExterior!==void 0)return i(this,oo).properties.isExterior;let e=i(this,Wo).obstructionIdByEntranceId[this.id],r=i(this,Wo).getMVFFeatureById("obstruction",e);return(o=r==null?void 0:r.properties.footprintComponent)!=null?o:!1}get geoJSON(){return W(A({},i(this,oo)),{properties:null})}get focusTarget(){return this.center}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{__type:$i.__type,id:this.id,name:this.name,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let e of Object.keys(i(this,On)))delete i(this,On)[e]}};Wo=new WeakMap,On=new WeakMap,zo=new WeakMap,oo=new WeakMap,f($i,"__type","door");var Cd=$i,Ot=Cd;m();var on,$o,rt,io,hc,ag,Xi=class Xi extends ct{constructor(e,r){super(e,r.mvfData);M(this,hc);f(this,"__type",Xi.__type);M(this,on);M(this,$o);M(this,rt,{});M(this,io);E(this,on,e),E(this,$o,r.floorId),E(this,io,r.mvfData)}static is(e){return e.__type===Xi.__type}get type(){return rv(i(this,io).properties.kind)}get enterpriseLocations(){return i(this,rt).enterpriseLocations!=null?i(this,rt).enterpriseLocations:(i(this,rt).enterpriseLocations=uc(i(this,on),this.id),i(this,rt).enterpriseLocations)}get locations(){return this.enterpriseLocations}get floor(){let e=i(this,on).getById("floor",i(this,$o));if(e==null)throw new Error("Floor ".concat(i(this,$o)," not found!"));return e}get doors(){var r,o;if(i(this,rt).doors)return i(this,rt).doors;i(this,rt).doors=[];let e=(o=(r=i(this,on).entranceNodeIdsBySpaceId)==null?void 0:r[this.id])!=null?o:[];for(let a of e){let s=i(this,on).doorsByNodeId[a];s&&i(this,rt).doors.push(s)}return i(this,rt).doors}get images3D(){var o;let e=(o=i(this,on).floorImagesByAnchorId.get(this.id))!=null?o:[],r=Y(this,hc,ag).call(this);return r?[...e,r]:e}get center(){return i(this,rt).center==null&&(i(this,rt).center=Et(i(this,io),i(this,$o))),i(this,rt).center}get geoJSON(){return W(A({},i(this,io)),{properties:null})}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{__type:Xi.__type,id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let e of Object.keys(i(this,rt)))delete i(this,rt)[e]}};on=new WeakMap,$o=new WeakMap,rt=new WeakMap,io=new WeakMap,hc=new WeakSet,ag=function(){let e=i(this,io).properties;if(e.image!=null)return i(this,rt).polygonImage==null&&(i(this,rt).polygonImage=new rr("".concat(this.id,"-polygon-image-").concat(xe()),e.image.path,this,i(this,on).tokenManager)),i(this,rt).polygonImage},f(Xi,"__type","space");var Pd=Xi,tv=["room","hallway","exterior","void","gate","otb"];function rv(n){if(n==null||n==="default")return"room";let t=n.toLowerCase();return tv.includes(t)?t:"room"}var qe=Pd;m();var mr,Ae,Wt,Zi,gc,Yi=class Yi extends Dr{constructor(e,r){super(r.mvfData.properties.id,e);M(this,Zi);f(this,"__type",Yi.__type);M(this,mr);M(this,Ae,{});M(this,Wt);E(this,mr,e),E(this,Wt,r.mvfData)}static is(e){return e.__type===Yi.__type}get focusTarget(){return this}get name(){var r;if(!("name"in i(this,Wt).properties))return(r=i(this,Wt).properties.externalId)!=null?r:"";let e=Y(this,Zi,gc).call(this,"name");return typeof e=="string"?e:""}get shortName(){var r;if(!("shortName"in i(this,Wt).properties))return(r=i(this,Wt).properties.externalId)!=null?r:"";let e=Y(this,Zi,gc).call(this,"shortName");return typeof e=="string"?e:""}get subtitle(){let e=Y(this,Zi,gc).call(this,"subtitle");return typeof e=="string"?e:""}get externalId(){var e;return(e=i(this,Wt).properties.externalId)!=null?e:""}get elevation(){return i(this,Wt).properties.elevation}get maxHeight(){return i(this,Wt).properties.maxHeight}get spaces(){if(i(this,Ae).spaces==null){let e=i(this,mr).spaces.filter(r=>r.floor.id===this.id);i(this,Ae).spaces=e}return i(this,Ae).spaces}get spacesOpenToBelow(){if(i(this,Ae).spacesOpenToBelow==null){let e=[];for(let r of this.spaces)(r.type==="void"||r.type==="otb")&&e.push(r);i(this,Ae).spacesOpenToBelow=e}return i(this,Ae).spacesOpenToBelow}get geoJSON(){var e;return{type:"Feature",properties:null,geometry:(e=i(this,Wt).geometry)!=null?e:{type:"Polygon",coordinates:[]}}}get objects(){if(i(this,Ae).objects==null){let e=i(this,mr).objects.filter(r=>r.floor.id===this.id);i(this,Ae).objects=e}return i(this,Ae).objects}get connections(){if(i(this,Ae).connections==null){let e=i(this,mr).connections.filter(r=>r.floors.includes(this));i(this,Ae).connections=e}return i(this,Ae).connections}get doors(){if(i(this,Ae).doors==null){let e=i(this,mr).doors.filter(r=>r.floor.id===this.id);i(this,Ae).doors=e}return i(this,Ae).doors}get annotations(){if(i(this,Ae).annotations==null){let e=i(this,mr).annotations.filter(r=>r.floor.id===this.id);i(this,Ae).annotations=e}return i(this,Ae).annotations}get pois(){if(i(this,Ae).pois==null){let e=i(this,mr).pointsOfInterest.filter(r=>r.floor.id===this.id);i(this,Ae).pois=e}return i(this,Ae).pois}get floorStack(){if(i(this,Ae).floorStack==null){let e=i(this,mr).floorStacks.find(r=>r.floors.includes(this));i(this,Ae).floorStack=e}return i(this,Ae).floorStack}get center(){return i(this,Ae).center==null&&(i(this,Ae).center=Et(i(this,Wt),this.id)),i(this,Ae).center}toJSON(){return{__type:Yi.__type,id:this.id,name:this.name,shortName:this.shortName,subtitle:this.subtitle,elevation:this.elevation,maxHeight:this.maxHeight,spaces:this.spaces.map(e=>e.id),objects:this.objects.map(e=>e.id),connections:this.connections.map(e=>e.id),doors:this.doors.map(e=>e.id),annotations:this.annotations.map(e=>e.id),pois:this.pois.map(e=>e.id)}}destroy(){for(let e of globalThis.Object.keys(i(this,Ae)))delete i(this,Ae)[e]}};mr=new WeakMap,Ae=new WeakMap,Wt=new WeakMap,Zi=new WeakSet,gc=function(e){let r=i(this,Wt).properties[e];return i(this,mr).getPropTranslation(this.__type,e,this.id,r)},f(Yi,"__type","floor");var wd=Yi,zt=wd;m();var qi,Lr,ao,Ji=class Ji extends ct{constructor(e,r){super(e,{type:"Feature",geometry:{type:"Point",coordinates:[0,0]},properties:r.mvfData});f(this,"__type",Ji.__type);M(this,qi);M(this,Lr);M(this,ao);E(this,Lr,{}),E(this,qi,e),E(this,ao,r.mvfData)}static is(e){return e.__type===Ji.__type}get accessible(){var e;return(e=i(this,ao).accessible)!=null?e:!1}get type(){var e;return(e=i(this,ao).type)!=null?e:"unknown"}get extra(){return i(this,ao).extra}get coordinates(){if(i(this,Lr).coordinates==null){i(this,Lr).coordinates=[];for(let e of this.nodes)i(this,Lr).coordinates.some(r=>r.isEqual(e.coordinate))||i(this,Lr).coordinates.push(e.coordinate)}return i(this,Lr).coordinates}get nodes(){return i(this,ao).nodes.map(e=>i(this,qi).getById("node",e)).filter(wi)}get floors(){return this.coordinates.map(e=>e.floorId?i(this,qi).getById("floor",e.floorId):void 0).filter(wi)}get focusTarget(){return this.coordinates}get navigationTarget(){return this.coordinates}toJSON(){return{__type:Ji.__type,id:this.id,name:this.name,type:this.type,externalId:this.externalId,coordinates:this.coordinates.map(e=>e.toJSON()),floors:this.floors.map(e=>e.id),extra:this.extra}}destroy(){for(let e of Object.keys(i(this,Lr)))delete i(this,Lr)[e]}};qi=new WeakMap,Lr=new WeakMap,ao=new WeakMap,f(Ji,"__type","connection");var Od=Ji,Tt=Od;m();var so,Xo,Dt,lo,mc,sg,Qi=class Qi extends ct{constructor(e,r){super(e,r.mvfData);M(this,mc);f(this,"__type",Qi.__type);M(this,so);M(this,Xo);M(this,Dt,{});M(this,lo);E(this,so,e),E(this,Xo,r.floorId),E(this,lo,r.mvfData)}static is(e){return e.__type===Qi.__type}get type(){let e=i(this,lo).properties.kind;return e==null&&(e="object"),e==="Desks"&&(e="desk"),e.toLowerCase()}get enterpriseLocations(){return i(this,Dt).enterpriseLocations!=null?i(this,Dt).enterpriseLocations:(i(this,Dt).enterpriseLocations=uc(i(this,so),this.id),i(this,Dt).enterpriseLocations)}get locations(){return this.enterpriseLocations}get floor(){let e=i(this,so).getById("floor",i(this,Xo));if(e==null)throw new Error("Floor ".concat(i(this,Xo)," not found!"));return e}get center(){return i(this,Dt).center==null&&(i(this,Dt).center=Et(i(this,lo),i(this,Xo))),i(this,Dt).center}get images3D(){var o;let e=(o=i(this,so).floorImagesByAnchorId.get(this.id))!=null?o:[],r=Y(this,mc,sg).call(this);return r?[...e,r]:e}get geoJSON(){return W(A({},i(this,lo)),{properties:null})}get anchorTarget(){return this.center}get focusTarget(){return this.geoJSON.geometry.type==="Polygon"?this:this.center}get navigationTarget(){return this}toJSON(){return{__type:Qi.__type,id:this.id,name:this.name,type:this.type,floor:this.floor.id,center:this.center.toJSON()}}destroy(){for(let e of globalThis.Object.keys(i(this,Dt)))i(this,Dt)[e]=null}};so=new WeakMap,Xo=new WeakMap,Dt=new WeakMap,lo=new WeakMap,mc=new WeakSet,sg=function(){let e=i(this,lo).properties;if(e.image!=null)return i(this,Dt).polygonImage==null&&(i(this,Dt).polygonImage=new rr("".concat(this.id,"-polygon-image-").concat(xe()),e.image.path,this,i(this,so).tokenManager)),i(this,Dt).polygonImage},f(Qi,"__type","object");var Dd=Qi,$t=Dd;m();var ea,Yo,co,ta,Ki=class Ki extends ct{constructor(e,r){super(e,r.mvfData);f(this,"__type",Ki.__type);M(this,ea);M(this,Yo);M(this,co,{});M(this,ta);E(this,ea,e),E(this,ta,r.mvfData),E(this,Yo,r.floorId)}static is(e){return e.__type===Ki.__type}get navigationTarget(){return this.coordinate}get floor(){let e=i(this,ea).getById("floor",i(this,Yo));if(e==null)throw new Error("Floor ".concat(i(this,Yo)," not found!"));return e}get coordinate(){return i(this,co).coordinate==null&&(i(this,co).coordinate=Et(i(this,ta),i(this,Yo))),i(this,co).coordinate}get geoJSON(){return W(A({},i(this,ta)),{properties:null})}get images3D(){var e;return(e=i(this,ea).floorImagesByAnchorId.get(this.id))!=null?e:[]}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}toJSON(){return{__type:Ki.__type,id:this.id,name:this.name,floor:this.floor.id,coordinate:this.coordinate.toJSON()}}destroy(){for(let e in i(this,co))i(this,co)[e]=null}};ea=new WeakMap,Yo=new WeakMap,co=new WeakMap,ta=new WeakMap,f(Ki,"__type","point-of-interest");var Ad=Ki,nr=Ad;m();var na,Zo,Nr,Jo,qo,Ss,kd,ra=class ra extends ct{constructor(e,r){var o;super(e,r.mvfData);M(this,Ss);f(this,"__type",ra.__type);M(this,na);M(this,Zo);M(this,Nr,{});M(this,Jo);M(this,qo);E(this,na,e),E(this,Zo,r.floorId),E(this,Jo,r.mvfData),E(this,qo,(o=r.symbol)!=null?o:{url:"",name:""})}static is(e){return e.__type===ra.__type}get group(){return Y(this,Ss,kd).call(this).group}get type(){return Y(this,Ss,kd).call(this).type}get coordinate(){return i(this,Nr).coordinate==null&&(i(this,Nr).coordinate=Et(i(this,Jo),i(this,Zo))),i(this,Nr).coordinate}get floor(){let e=i(this,na).getById("floor",i(this,Zo));if(e==null)throw new Error("Floor ".concat(i(this,Zo)," not found!"));return e}get name(){return super.name||i(this,qo).name||""}get icon(){return i(this,Nr).icon==null&&(i(this,Nr).icon=super.icon||new en({mvfData:{url:i(this,qo).url,altText:i(this,qo).name},mapData:i(this,na)})),i(this,Nr).icon}get geoJSON(){return W(A({},i(this,Jo)),{properties:null})}get focusTarget(){return this.coordinate}get anchorTarget(){return this.coordinate}get navigationTarget(){return this.coordinate}toJSON(){return{__type:ra.__type,id:this.id,group:this.group,type:this.type,coordinate:this.coordinate.toJSON()}}destroy(){for(let e of Object.keys(i(this,Nr)))delete i(this,Nr)[e]}};na=new WeakMap,Zo=new WeakMap,Nr=new WeakMap,Jo=new WeakMap,qo=new WeakMap,Ss=new WeakSet,kd=function(){let[e,r]=i(this,Jo).properties.symbolId.split("--");return{group:e,type:r}},f(ra,"__type","annotation");var Fd=ra,Br=Fd;m();m();var lg=Jl(Bd(),1);function nv(n,t,e){e===void 0&&(e={});var r=Ci(n),o=Ci(t),a=lg.default.union(r.coordinates,o.coordinates);return a.length===0?null:a.length===1?Ql(a[0],e.properties):Kl(a,e.properties)}var cg=nv;var po,xt,Rr,ia,Ms,Vd,oa=class oa extends Dr{constructor(e,r){super(r.mvfData.id,e);M(this,Ms);f(this,"__type",oa.__type);M(this,po);M(this,xt,{});M(this,Rr);M(this,ia);E(this,po,e),E(this,Rr,r.mvfData),E(this,ia,r.facadeId)}static is(e){return e.__type===oa.__type}get type(){return i(this,Rr).type}get name(){let e=Y(this,Ms,Vd).call(this,"name");return typeof e=="string"?e:""}get shortName(){let e=Y(this,Ms,Vd).call(this,"shortName");return typeof e=="string"?e:""}get externalId(){var e;return(e=i(this,Rr).externalId)!=null?e:""}get floors(){var e,r;if(i(this,xt).floors==null){let o=((r=(e=i(this,Rr).floors)!=null?e:i(this,Rr).maps)!=null?r:[]).reduce((a,s)=>{let l=i(this,po).floorsById[s];return l&&a.push(l),a},[]);o.length===0&&k.error("Floor stack ".concat(this.id," has no floors")),i(this,xt).floors=o.sort((a,s)=>a.elevation-s.elevation)}return i(this,xt).floors}get defaultFloor(){if(i(this,xt).defaultFloor!=null)return i(this,xt).defaultFloor;let e=i(this,Rr).defaultFloor?i(this,po).getById("floor",i(this,Rr).defaultFloor):void 0;return i(this,xt).defaultFloor=e||this.floors.reduce((r,o)=>Math.abs(o.elevation)<Math.abs(r.elevation)?o:r),i(this,xt).defaultFloor}get facade(){return i(this,ia)?i(this,po).facadesById[i(this,ia)]:void 0}get geoJSON(){if(i(this,xt).geoJSON!=null)return i(this,xt).geoJSON;let e=null;for(let r of this.floors){let o=r.geoJSON;e==null?e=o:e=cg(e,o)}return i(this,xt).geoJSON=e!=null?e:{type:"Feature",properties:null,geometry:{type:"Polygon",coordinates:[]}},i(this,xt).geoJSON}toJSON(){return{__type:oa.__type,id:this.id,name:this.name,shortName:this.shortName,type:this.type,floors:this.floors.map(e=>e.id)}}destroy(){for(let e of globalThis.Object.keys(i(this,xt)))delete i(this,xt)[e]}};po=new WeakMap,xt=new WeakMap,Rr=new WeakMap,ia=new WeakMap,Ms=new WeakSet,Vd=function(e){return i(this,po).getPropTranslation(this.__type,e,this.id,i(this,Rr)[e])},f(oa,"__type","floor-stack");var Rd=oa,yc=Rd;m();var sa,Qo,la,an,aa=class aa extends Dr{constructor(e,r){super(r.mvfData.id,e);f(this,"__type",aa.__type);M(this,sa);M(this,Qo);M(this,la);M(this,an,{});E(this,sa,r.mvfData),E(this,Qo,e),E(this,la,r.floorStackId)}static is(e){return e.__type===aa.__type}get floorStack(){return i(this,Qo).getById("floor-stack",i(this,la))}get spaces(){if(!i(this,an).spaces){i(this,an).spaces=[];for(let e of i(this,sa).spaces){let r=i(this,Qo).getById("space",e.spaceId);r&&i(this,an).spaces.push(r)}}return i(this,an).spaces}get center(){if(!i(this,an).center){let e={type:"FeatureCollection",features:[]};for(let o of this.spaces){let a=i(this,Qo).mvfSpacesById[o.id];a&&e.features.push(a)}if(e.features.length===0)throw new tt("No geometry found for facade!");let r=Li(e);i(this,an).center=new re({latitude:r.geometry.coordinates[1],longitude:r.geometry.coordinates[0],floorId:i(this,sa).spaces[0].floorId})}return i(this,an).center}get focusTarget(){return this.spaces}get anchorTarget(){return this.center}get navigationTarget(){return this}toJSON(){return{id:this.id,__type:aa.__type,floorStackId:i(this,la),floorStack:this.floorStack,spaces:this.spaces}}};sa=new WeakMap,Qo=new WeakMap,la=new WeakMap,an=new WeakMap,f(aa,"__type","facade");var jd=aa,mt=jd;m();var ov=new Set(["wall","area"]),iv=new Set(["desk-entrance"]),av=n=>{var e;let t={};for(let r of(e=n==null?void 0:n.locations)!=null?e:[])t[r.id]=r;return{mvf3LocationsById:t}},sv=(n,t,e)=>{var p,d,h,y,b,I,C,P,O,U,H;let r={},o={},a={},s={},l={},c={};for(let V of t["location.json"]||[]){let B=new Pn(n,{mvf2Data:V,mvf3Data:e[V.id]});if(r[V.id]=B,V.externalId&&(s[V.externalId]==null&&(s[V.externalId]=[]),s[V.externalId].push(B)),V.categories)for(let N of V.categories)l[N]==null&&(l[N]=[]),l[N].push(B);let q=[...(d=(p=V.obstructions)==null?void 0:p.map(N=>N.id))!=null?d:[],...(y=(h=V.spaces)==null?void 0:h.map(N=>N.id))!=null?y:[],...(I=(b=V.annotations)==null?void 0:b.map(N=>N.id))!=null?I:[],...(C=V.connections)!=null?C:[],...(O=(P=V.entrances)==null?void 0:P.map(N=>N.id))!=null?O:[],...(H=(U=V.areas)==null?void 0:U.map(N=>N.id))!=null?H:[]];for(let N of q)N&&(c[N]==null&&(c[N]=[]),c[N].push(B))}for(let V of t["category.json"]||[]){let B=new vc(n,{mvfData:V});o[V.id]=B,V.parent&&(a[V.parent]==null&&(a[V.parent]=[]),a[V.parent].push(B))}return{locationCategoriesByParentId:a,locationProfilesById:r,locationCategoriesById:o,locationProfilesByExternalId:s,locationProfilesByCategoryId:l,locationProfilesByAttachedFeatureId:c}},lv=(n,t)=>{let e={},r={},o={},a={},s={},l={},c={},p={},d={},h=globalThis.Object.keys(n.space);for(let y of h){let b=n.space[y];if(b!=null){for(let I of b.features)if(d[I.properties.id]=y,l[I.properties.id]=I,I.properties.kind==="desk-entrance"&&(s[I.properties.externalId]==null&&(s[I.properties.externalId]=[]),s[I.properties.externalId].push(...I.properties.destinationNodes)),!Sv(I))if(I.properties.kind==="poi"||I.geometry.type==="Point"&&I.properties.kind==null){let C=new nr(t,{floorId:y,mvfData:I});o[I.properties.id]=C,p[y]||(p[y]=[]),p[y].push(I),I.properties.externalId&&(a[I.properties.externalId]==null&&(a[I.properties.externalId]=[]),a[I.properties.externalId].push(C))}else if(I.geometry.type==="Point")k.warn("Encountered a point space with an unknown kind!",I.properties.kind);else{let C=new qe(t,{floorId:y,mvfData:I});e[I.properties.id]=C,I.properties.externalId&&(r[I.properties.externalId]==null&&(r[I.properties.externalId]=[]),r[I.properties.externalId].push(C)),c[y]||(c[y]=[]),c[y].push(I)}}}return{spacesById:e,spacesByExternalId:r,poisById:o,poisByExternalId:a,objectEntranceNodeIdsByObstructionId:s,mvfSpacesById:l,mvfSpacesByFloorId:c,mvfPoisByFloorId:p}},cv=(n,t)=>{var s,l;let e={},r={},o={},a={};for(let c of n["node.geojson"].features){o[c.properties.id]=c;let p=new hr(t,{mvfData:c,floorId:(s=c.properties.floor)!=null?s:c.properties.map});e[c.properties.id]=p,c.properties.externalId&&(r[c.properties.externalId]==null&&(r[c.properties.externalId]=[]),r[c.properties.externalId].push(p));let d=(l=c.properties.floor)!=null?l:c.properties.map;a[d]||(a[d]=[]),a[d].push(c)}return{nodesById:e,nodesByExternalId:r,mvfNodesById:o,mvfNodesByFloorId:a}},pv=(n,t)=>{var l,c;let e={},r={},o={},a={},s=globalThis.Object.keys(n.obstruction);for(let p of s){let d=n.obstruction[p];if(d!=null)for(let h of d.features){o[h.properties.id]=h;for(let b of h.properties.entrances)a[b]=h.properties.id;if(ov.has((c=(l=h.properties.kind)==null?void 0:l.toLowerCase())!=null?c:""))continue;let y=new $t(t,{floorId:p,mvfData:h});e[h.properties.id]=y,h.properties.externalId&&(r[h.properties.externalId]==null&&(r[h.properties.externalId]=[]),r[h.properties.externalId].push(y))}}return{objectsById:e,objectsByExternalId:r,mvfObstructionById:o,obstructionIdByEntranceId:a}},dv=(n,t)=>{let e={},r={},o={};if("floor.geojson"in n&&n["floor.geojson"]!=null)for(let a of n["floor.geojson"].features){o[a.properties.id]=a.properties;let s=new zt(t,{mvfData:a});e[a.properties.id]=s,a.properties.externalId&&(r[a.properties.externalId]==null&&(r[a.properties.externalId]=[]),r[a.properties.externalId].push(s))}else for(let a of n["map.geojson"]){o[a.id]=a;let s=new zt(t,{mvfData:{properties:a}});e[a.id]=s}return{floorsById:e,floorsByExternalId:r,mvfFloorsById:o}},uv=(n,t)=>{var c;let e={},r={},o={},a={},s={},l=n["floorstack.json"]||n["mapstack.json"]||n["mapstack.geojson"];if(l!=null)for(let p of l){let d=(c=n.facade)==null?void 0:c[p.id],h=new yc(t,{mvfData:p,facadeId:d==null?void 0:d.id});if(e[p.id]=h,p.externalId&&(r[p.externalId]==null&&(r[p.externalId]=[]),r[p.externalId].push(h)),o[p.id]=p,d){let y=new mt(t,{mvfData:d,floorStackId:p.id});a[d.id]=y;for(let b of d.spaces)s[b.spaceId]=y}}return{floorStacksById:e,floorStacksByExternalId:r,mvfFloorStacksById:o,facadesById:a,facadesBySpaceId:s}},fv=(n,t)=>{let e={},r={},o=n["connection.json"].reduce((a,s)=>{if(s.nodes.forEach(c=>a[c]=s),r[s.id]=s,s.type==="door")return a;let l=new Tt(t,{mvfData:s});return e[s.id]=l,a},{});return{connectionsById:e,mvfConnectionsById:r,mvfConnectionsByNodeId:o}},hv=(n,t)=>{let e={},r={},o={},a={},s={},l=globalThis.Object.keys(n.entrance);for(let c of l){let p=n.entrance[c];if(p!=null)for(let d of p.features){a[d.properties.id]=d;let h=new Ot(t,{floorId:c,mvfData:d});d.properties.node&&(o[d.properties.node]=h),e[d.properties.id]=h,d.properties.externalId&&(r[d.properties.externalId]==null&&(r[d.properties.externalId]=[]),r[d.properties.externalId].push(h)),s[c]||(s[c]=[]),s[c].push(d)}}return{doorsById:e,doorsByExternalId:r,doorsByNodeId:o,mvfEntrancesById:a,mvfEntrancesByFloorId:s}},gv=(n,t,e)=>{var r;if(n.textAreas!=null)for(let o in n.textAreas){let a=(r=n.textAreas[o])==null?void 0:r.features;if(a!=null){for(let s of a)if("anchorId"in s.properties){let l=s==null?void 0:s.properties,c=t[l.anchorId]||e[l.anchorId];if(c!=null&&l!=null){let p=c.properties;p.textArea=l,p.textArea&&(p.textArea.position=s.geometry.coordinates)}}}}},mv=(n,t,e,r)=>{var o;if(n.floorImages!=null)for(let a in n.floorImages){let s=(o=n.floorImages[a])==null?void 0:o.features;if(s!=null){for(let l of s)if("anchorId"in l.properties){let c=l==null?void 0:l.properties,p=t[c.anchorId]||e[c.anchorId]||r[c.anchorId];if(p!=null&&c!=null){let d=p.properties;d.image=c,d.image&&(d.image.position=l.geometry.coordinates)}}}}},yv=(n,t)=>{var r,o;if(((r=n.enterprise)==null?void 0:r.enterpriseStyles)==null)return;let e=(o=n.enterprise)==null?void 0:o.enterpriseStyles;for(let a in e){let s=e[a];s.geometryAnchors.forEach(l=>{let c=t[l.geometryId];if(c!=null){let p=c.properties;p.style={styleId:a,edgeOffset:s.edgeOffset}}})}},bv=(n,t,e)=>{if(!(n.enterprise==null||n.enterprise.textures==null))for(let r of n.enterprise.textures)for(let o of r.geometryAnchors){let a=t[o.geometryId]||e[o.geometryId];if(a!=null){let s=a.properties;s.textures==null&&(s.textures=[]),s.textures.push(r)}}},vv=(n,t)=>{let e={},r={},o={};if(n.annotation==null)return{annotationsById:e,mvfAnnotationsById:r,mvfAnnotationsByFloorId:o};let a=n["annotation-symbols.json"]||{},s=globalThis.Object.keys(n.annotation);for(let l of s){let c=n.annotation[l];if(c!=null)for(let p of c.features){r[p.properties.id]=p;let d=new Br(t,{floorId:l,mvfData:p,symbol:a[p.properties.symbolId]});e[p.properties.id]=d,o[l]||(o[l]=[]),o[l].push(p)}}return{annotationsById:e,mvfAnnotationsById:r,mvfAnnotationsByFloorId:o}},Iv=(n,t)=>{let e={},r={},o={};if(n.area==null)return{areasById:e,areasByExternalId:r,mvfAreasById:o};let a=globalThis.Object.keys(n.area);for(let s of a){let l=n.area[s];if(l!=null)for(let c of l.features){o[c.properties.id]=c;let p=new gr(t,{floorId:s,mvfData:c});e[c.properties.id]=p,c.properties.externalId&&(r[c.properties.externalId]==null&&(r[c.properties.externalId]=[]),r[c.properties.externalId].push(p))}}return{areasById:e,areasByExternalId:r,mvfAreasById:o}},Tv=(n,t)=>{var s;let e={},r={},o={},a={};for(let l in n){let c=n[l];if(c==null)continue;let p=(s=c.properties.destinationNodes)!=null?s:[];if(p.length<1)continue;let d=[];for(let h of p)t[h]!=null&&d.push(h),r[h]==null&&(r[h]=[]),r[h].push(c.properties.id),c.properties.kind==="desk-entrance"&&(o[h]==null&&(o[h]=[]),o[h].push(c.properties.externalId));d.length>0&&(e[l]=d),a[l]=p}return{entranceNodeIdsBySpaceId:e,spaceIdsByNodeId:r,objectIdsByNodeId:o,destinationNodesIdsBySpaceId:a}},pg=(n,t)=>{var U,H,V,B,q,N,J,se,z,ie,me,ve,ye,X;let e={},r={},o={},a={},s=((H=(U=n.enterprise)==null?void 0:U.locations)!=null?H:[]).reduce(($,he)=>($[he.id]=he,$),{}),l={},c={},p={},d={},h={},y={},b=((V=n.enterprise)==null?void 0:V.venue)||{},I={},C={},P={};for(let $ of(q=(B=n.enterprise)==null?void 0:B.categories)!=null?q:[]){let he=new bc(t,{mvfData:$});l[$.id]=he,$.externalId&&(c[$.externalId]==null&&(c[$.externalId]=[]),c[$.externalId].push(he)),p[$.id]=$,$.locations.forEach(ee=>{h[ee]==null&&(h[ee]=[]),h[ee].push($.id)})}let O={};for(let $ of(J=(N=n.enterprise)==null?void 0:N.locationInstances)!=null?J:[]){let he=s[$.parent],ee=Object.keys(he),ne={};for(let Le of ee)ne[Le]=void 0;let de=A(W(A({},ne),{polygons:[],nodes:[]}),$);O[de.parent]==null&&(O[de.parent]=[]);let ge=new Ht(t,{mvfData:de,categoryIds:((z=(se=n.enterprise)==null?void 0:se.categoryPriorities)==null?void 0:z[de.id])||h[de.id],parentId:$.parent});O[de.parent].push(ge);for(let Le of(ie=$.polygons)!=null?ie:[])P[Le.id]=ge;I[de.id]=$,C[de.id]=ge,$.externalId&&(a[$.externalId]==null&&(a[$.externalId]=[]),a[$.externalId].push(ge))}for(let $ of(ve=(me=n.enterprise)==null?void 0:me.locations)!=null?ve:[]){let he=new Ht(t,{mvfData:$,categoryIds:((X=(ye=n.enterprise)==null?void 0:ye.categoryPriorities)==null?void 0:X[$.id])||h[$.id],locationInstances:O[$.id]});o[$.id]=he,$.externalId&&(a[$.externalId]==null&&(a[$.externalId]=[]),a[$.externalId].push(he)),$.nodes.forEach(ee=>{y[ee.id]==null&&(y[ee.id]=[]),y[ee.id].push($.id)});for(let ee of $.polygons)d[ee.id]==null&&(d[ee.id]=[]),d[ee.id].push($)}if(t.enterpriseMode===!0){for(let $ in t.mvfConnectionsById){let he={},ee=t.mvfConnectionsById[$],ne={id:$,externalId:ee.externalId,kind:"enterprise."+ee.type,destinationNodes:[],flags:ee.flags,type:ee.type,nodes:ee.nodes,accessible:ee.accessible,extra:ee.extra,details:ee.details};for(let de of t.mvfConnectionsById[$].nodes){let ge=t.nodesById[de];ge!=null&&(he[ge.floor.id]={type:"Feature",geometry:{type:"Point",coordinates:[ge.coordinate.longitude,ge.coordinate.latitude]},properties:ne})}Object.keys(he).length>0&&(e[$]=new Tt(t,{mvfData:ne}),ee.externalId&&(r[ee.externalId]==null&&(r[ee.externalId]=[]),r[ee.externalId].push(e[$])))}t.connectionsById=e}return{connectionsByExternalId:r,locationIdsByNodeId:y,mvfLocationsByGeometryId:d,mvfLocationsById:s,mvfCategoriesById:p,locationsById:o,locationInstancesById:C,instanceLocationsByPolygonId:P,locationsByExternalId:a,mvfLocationInstancesById:I,categoriesById:l,categoriesByExternalId:c,venue:b}},dg=(n,t,e)=>{let{nodesById:r,nodesByExternalId:o,mvfNodesById:a,mvfNodesByFloorId:s}=cv(t,n),{connectionsById:l,mvfConnectionsById:c,mvfConnectionsByNodeId:p}=fv(t,n),{spacesById:d,spacesByExternalId:h,poisById:y,poisByExternalId:b,mvfSpacesById:I,objectEntranceNodeIdsByObstructionId:C,mvfSpacesByFloorId:P,mvfPoisByFloorId:O}=lv(t,n),{objectsById:U,objectsByExternalId:H,mvfObstructionById:V,obstructionIdByEntranceId:B}=pv(t,n),{floorsById:q,floorsByExternalId:N,mvfFloorsById:J}=dv(t,n),{floorStacksById:se,floorStacksByExternalId:z,mvfFloorStacksById:ie,facadesById:me,facadesBySpaceId:ve}=uv(t,n),{doorsById:ye,doorsByExternalId:X,doorsByNodeId:$,mvfEntrancesById:he,mvfEntrancesByFloorId:ee}=hv(t,n),{annotationsById:ne,mvfAnnotationsById:de,mvfAnnotationsByFloorId:ge}=vv(t,n),{areasById:Le,areasByExternalId:Me,mvfAreasById:We}=Iv(t,n);mv(t,I,V,We),gv(t,I,V),yv(t,I),bv(t,I,V);let{mvf3LocationsById:_e}=av(e),{locationCategoriesByParentId:It,locationProfilesById:qt,locationCategoriesById:Er,locationProfilesByExternalId:cr,locationProfilesByCategoryId:_o,locationProfilesByAttachedFeatureId:Si}=sv(n,t,_e),{entranceNodeIdsBySpaceId:Qe,spaceIdsByNodeId:Yn,objectIdsByNodeId:ut,destinationNodesIdsBySpaceId:Zn}=Tv(I,$);return{spacesById:d,spacesByExternalId:h,nodesById:r,nodesByExternalId:o,objectsById:U,objectsByExternalId:H,floorsById:q,floorsByExternalId:N,floorStacksById:se,floorStacksByExternalId:z,facadesById:me,facadesBySpaceId:ve,connectionsById:l,doorsById:ye,doorsByExternalId:X,doorsByNodeId:$,poisById:y,poisByExternalId:b,annotationsById:ne,areasById:Le,areasByExternalId:Me,objectEntranceNodeIdsByObstructionId:C,obstructionIdByEntranceId:B,locationProfilesById:qt,locationCategoriesById:Er,locationProfilesByExternalId:cr,locationProfilesByCategoryId:_o,locationCategoriesByParentId:It,mvfSpacesById:I,mvfNodesById:a,mvfObstructionById:V,mvfFloorsById:J,mvfFloorStacksById:ie,mvfConnectionsById:c,mvfConnectionsByNodeId:p,mvfEntrancesById:he,mvfAnnotationsById:de,mvfNodesByFloorId:s,mvfSpacesByFloorId:P,mvfPoisByFloorId:O,mvfAreasById:We,mvfEntrancesByFloorId:ee,mvfAnnotationsByFloorId:ge,locationProfilesByAttachedFeatureId:Si,entranceNodeIdsBySpaceId:Qe,spaceIdsByNodeId:Yn,objectIdsByNodeId:ut,destinationNodesIdsBySpaceId:Zn,mvf3LocationsById:_e}};function Sv(n){var t,e;return!["Polygon","MultiPolygon"].includes(n.geometry.type)&&"kind"in n.properties&&n.properties.kind==null||((t=n.properties.kind)==null?void 0:t.includes("connection"))||iv.has((e=n.properties.kind)!=null?e:"")}m();var Mv=new Set(["polygons"]),or,we,pt,Es,ca=class ca extends lt{constructor(e,r){super(r.mvfData.externalId);f(this,"__type",ca.__type);f(this,"description");f(this,"name","");f(this,"amenity");f(this,"externalId","");f(this,"extra");f(this,"gallery");f(this,"instances");f(this,"logo");f(this,"operationHours");f(this,"phone");f(this,"picture");f(this,"shortName");f(this,"showFloatingLabelWhenImagePresent");f(this,"showLogo");f(this,"siblingGroups");f(this,"social");f(this,"sortOrder",-1);f(this,"states");f(this,"tags");f(this,"type","");f(this,"hidden",!1);f(this,"primaryCategory");M(this,or);M(this,we,{});M(this,pt);M(this,Es);E(this,or,e),E(this,pt,r.mvfData),E(this,Es,r.categoryIds||[]),this.instances=r.locationInstances||[];for(let o in r.mvfData)!Mv.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{enumerable:!0,get(){if(r.parentId){let a=i(this,or).locationsById[r.parentId];return i(this,pt)[o]!=null?i(this,or).getPropTranslation(this.__type,o,i(this,pt).id,i(this,pt)[o]):i(this,or).getPropTranslation(this.__type,o,i(this,pt).id,a[o])}return i(this,or).getPropTranslation(this.__type,o,i(this,pt).id,i(this,pt)[o])}})}static is(e){return e.__type===ca.__type}get focusTarget(){return this.spaces.length>0?this.spaces:this.coordinates}get navigationTarget(){return this.spaces}get categories(){return i(this,we).categories?i(this,we).categories:(i(this,we).categories=(i(this,Es).map(e=>i(this,or).getById("enterprise-category",e))||[]).filter(Boolean),i(this,we).categories)}get coordinates(){if(i(this,we).coordinates)return i(this,we).coordinates;i(this,we).coordinates=[];for(let e=0;e<this.nodes.length;e++)i(this,we).coordinates.push(this.nodes[e].coordinate);return i(this,we).coordinates}get nodes(){if(i(this,we).nodes)return i(this,we).nodes;i(this,we).nodes=[];for(let e=0;e<i(this,pt).nodes.length;e++){let r=i(this,or).getById("node",i(this,pt).nodes[e].id);r&&i(this,we).nodes.push(r)}return i(this,we).nodes}get points(){if(i(this,we).points)return i(this,we).points;i(this,we).points=[];for(let e=0;e<i(this,pt).spaces.length;e++){let r=i(this,or).getById("point-of-interest",i(this,pt).spaces[e].id);r&&i(this,we).points.push(r)}return i(this,we).points}get spaces(){if(i(this,we).spaces)return i(this,we).spaces;i(this,we).spaces=[];let e=Array.isArray(i(this,pt).spaces)?i(this,pt).spaces:i(this,pt).polygons;for(let r=0;r<e.length;r++){let o=i(this,or).getById("space",e[r].id);o&&i(this,we).spaces.push(o)}return i(this,we).spaces}get objects(){if(i(this,we).objects)return i(this,we).objects;i(this,we).objects=[];for(let e=0;e<i(this,pt).polygons.length;e++){let r=i(this,or).getById("object",i(this,pt).polygons[e].id);r&&i(this,we).objects.push(r)}return i(this,we).objects}toJSON(){return{__type:ca.__type,id:this.id,name:this.name}}destroy(){for(let e of Object.keys(i(this,we)))delete i(this,we)[e]}};or=new WeakMap,we=new WeakMap,pt=new WeakMap,Es=new WeakMap,f(ca,"__type","enterprise-location");var Gd=ca,Ht=Gd;m();var Ev=new Set,Ko,At,sn,pa=class pa extends lt{constructor(e,r){super(r.mvfData.externalId);f(this,"__type",pa.__type);f(this,"name","");f(this,"color");f(this,"externalId","");f(this,"extra");f(this,"icon");f(this,"iconFromDefaultList");f(this,"sortOrder",-1);f(this,"picture");M(this,Ko);M(this,At,{});M(this,sn);E(this,Ko,e),E(this,sn,r.mvfData);for(let o in r.mvfData)!Ev.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&Object.defineProperty(this,o,{get(){return i(this,Ko).getPropTranslation(this.__type,o,i(this,sn).id,i(this,sn)[o])}})}static is(e){return e.__type===pa.__type}get children(){if(i(this,At).children)return i(this,At).children;i(this,At).children=[];for(let e=0;e<i(this,sn).children.length;e++){let r=i(this,Ko).getById("enterprise-category",i(this,sn).children[e]);r&&i(this,At).children.push(r)}return i(this,At).children}get locations(){if(i(this,At).locations)return i(this,At).locations;i(this,At).locations=[];for(let e=0;e<i(this,sn).locations.length;e++){let r=i(this,Ko).getById("enterprise-location",i(this,sn).locations[e]);r&&i(this,At).locations.push(r)}return i(this,At).locations}toJSON(){return{__type:pa.__type,id:this.id,name:this.name}}destroy(){for(let e of Object.keys(i(this,At)))delete i(this,At)[e]}};Ko=new WeakMap,At=new WeakMap,sn=new WeakMap,f(pa,"__type","enterprise-category");var Ud=pa,bc=Ud;m();var xv=new Set,xs,ei,da=class da extends lt{constructor(e,r){super(r.mvfData.externalId);f(this,"__type",da.__type);f(this,"countrycode");f(this,"coverImage");f(this,"externalId","");f(this,"defaultLanguage",{code:"en",name:"English"});f(this,"defaultFloor");f(this,"extra");f(this,"icon");f(this,"languages",[]);f(this,"links",[]);f(this,"logo");f(this,"mappedinWebUrl");f(this,"operationHours");f(this,"slug","");f(this,"topLocations");f(this,"tzid");M(this,xs,{});M(this,ei);E(this,ei,r.mvfData);for(let o in r.mvfData)!xv.has(o)&&!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)&&(this[o]=r.mvfData[o])}static is(e){return e.__type===da.__type}get name(){var e;return(e=i(this,ei).name)!=null?e:""}get defaultMap(){var e,r;return(r=(e=i(this,ei).defaultMap)!=null?e:this.defaultFloor)!=null?r:""}get enterpriseType(){var e;return(e=i(this,ei).type)!=null?e:void 0}toJSON(){return{__type:da.__type,id:this.id,name:this.name}}destroy(){for(let e of Object.keys(i(this,xs)))delete i(this,xs)[e]}};xs=new WeakMap,ei=new WeakMap,f(da,"__type","enterprise-venue");var Hd=da,Wd=Hd;m();m();m();m();m();var ug=(a=>(a.Departure="Departure",a.TakeConnection="TakeConnection",a.ExitConnection="ExitConnection",a.Turn="Turn",a.Arrival="Arrival",a))(ug||{}),zd=(s=>(s.Straight="Straight",s.Right="Right",s.SlightRight="SlightRight",s.Left="Left",s.SlightLeft="SlightLeft",s.Back="Back",s))(zd||{}),fg=(d=>(d.stairs="stairs",d.elevator="elevator",d.escalator="escalator",d.door="door",d.ramp="ramp",d.slide="slide",d.portal="portal",d.security="security",d.shuttle="shuttle",d.ladder="ladder",d))(fg||{}),Ic=(e=>(e.Exterior="exterior-walls",e.Interior="interior-walls",e))(Ic||{}),Tc=(e=>(e.Interior="interior-doors",e.Exterior="exterior-doors",e))(Tc||{});m();function $d(n,t,e,r,o){if(n===void 0)return!1;if(typeof n=="boolean")return n;let a=qn(r,o),s=Math.abs(e-t);return Gf(Math.atan2(s,a))>=n}function hg(n){let{fromPosition:t,toPosition:e,junctionInset:r,fromAltitude:o,toAltitude:a}=n;if(r<=0)return null;let s=(t[1]+e[1])/2,{toCartesian:l,toGeographic:c}=Uf(s),p=l(t),d=l(e),h=d.x-p.x,y=d.y-p.y,b=a-o,I=Math.sqrt(h*h+y*y+b*b);if(I<=r*2)return null;let C=r/I,P={x:p.x+h*C,y:p.y+y*C},O=c(P.x,P.y),U=t[2]!==void 0?t[2]+b*C:void 0,H={x:d.x-h*C,y:d.y-y*C},V=c(H.x,H.y),B=e[2]!==void 0?e[2]-b*C:void 0;return{fromPosition:U!==void 0?[O.lon,O.lat,U]:[O.lon,O.lat],toPosition:B!==void 0?[V.lon,V.lat,B]:[V.lon,V.lat]}}function Xd(n,t,e,r,o){let a=hg({fromPosition:n,toPosition:t,junctionInset:e,fromAltitude:r,toAltitude:o});return a?(n[0]=a.fromPosition[0],n[1]=a.fromPosition[1],n[2]!==void 0&&a.fromPosition[2]!==void 0&&(n[2]=a.fromPosition[2]),t[0]=a.toPosition[0],t[1]=a.toPosition[1],t[2]!==void 0&&a.toPosition[2]!==void 0&&(t[2]=a.toPosition[2]),!0):!1}function ir(n){return n.verticalOffset===0?[n.longitude,n.latitude]:[n.longitude,n.latitude,n.verticalOffset]}function Pv(n){return new Map(n.map(t=>{let{properties:e}=t,{id:r}=e;return[r,t]}))}var Jd=(n,t)=>{let e=Pv(t),r={entrances:{type:"FeatureCollection",features:[]},walls:{type:"Feature",properties:{id:n[0].properties.id},geometry:{type:"MultiLineString",coordinates:[]}}};for(let o of n){let a=[o.geometry.coordinates],s=(o.properties.entrances||[]).reduce((l,c)=>(e.has(c)&&l.push(e.get(c)),l),[]);if(s.length){let{entrances:l,obstructions:c}=md(o,s);a=c.map(p=>p.geometry.coordinates),r.entrances.features.push(...l)}r.walls.geometry.coordinates.push(...a)}return r};function mg(n,t){return((t-n+Math.PI)%(Math.PI*2)+Math.PI*2)%(Math.PI*2)-Math.PI}function yg(n,t){let e="Left";return n<=-Math.PI/4?e="Right":n<=-t?e="SlightRight":n<=t?e="Straight":n<=Math.PI/4?e="SlightLeft":e="Left",e}function bg(n){let t={};for(let e in n){let r=n[e];if(r!=null){if(r.id=e,"polygons"in r)for(let o of r.polygons)t[o]=r;else if("lineStrings"in r)for(let o of r.lineStrings)t[o]=r;else if("points"in r)for(let o of r.points)t[o]=r}}return t}function qd(n,t){return n.reduce((e,r)=>{let o=t[r.properties.id];if(o==null)return e;if("textures"in r.properties&&Array.isArray(r.properties.textures)&&r.properties.textures.length>0){let a=W(A({},o),{id:o.id+"-textures"});e.set(a,[r])}else e.has(o)||e.set(o,[]),e.get(o).push(r);return e},new Map)}function ua(n,t={}){var a,s,l,c,p,d,h;let e=W(A({},n),{flipImageToFaceCamera:(a=t==null?void 0:t.flipImagesToFaceCamera)!=null?a:!0}),r=(l=(s=t==null?void 0:t.style)==null?void 0:s.shading)!=null?l:t==null?void 0:t.shadingAndOutlines;r===!0?e.shading={start:.1,end:.15,intensity:.4}:typeof r=="object"&&(e.shading={start:r.start,end:r.end,intensity:r.intensity});let o=(p=(c=t==null?void 0:t.style)==null?void 0:c.outlines)!=null?p:t==null?void 0:t.shadingAndOutlines;if(e.outline=typeof o=="object"?!0:o,"lineStrings"in n){let y=(h=(d=t==null?void 0:t.style)==null?void 0:d.wallTopColor)!=null?h:t==null?void 0:t.wallTopColor;y!=null&&(e.topColor=y)}return e}var Qd=(n,t)=>{var o;let r=((o=t.currentMap)==null?void 0:o.currentFloor).layers.get(Ze);switch(n){case"interior-walls":return r==null?void 0:r.layers.get(no);case"exterior-walls":return r==null?void 0:r.layers.get(tn);case"interior-doors":return r==null?void 0:r.layers.get(Ui);case"exterior-doors":return r==null?void 0:r.layers.get(Hi);default:return typeof n=="string"?n:n==null?void 0:n.id}};function Kd(n){return new Promise(t=>{n.onComplete(t),n.onStop(t)})}function vg(n){return n.bbox?n.bbox:Ei(n)}function fa(n,t,e){return n.floorId&&t.has(n.floorId)?t.get(n.floorId):e}function ha(n){if(qe.is(n)||$t.is(n))return n.id}function Ig(n,t,e){var a,s;let r=n.coordinates.length===2&&n.coordinates[0].floorId!==n.coordinates[1].floorId,o=!0;if(r&&n.coordinates[0].floorId!=null&&n.coordinates[1].floorId!=null){let l=t==null?void 0:t.getById("floor",n.coordinates[0].floorId),c=t==null?void 0:t.getById("floor",n.coordinates[1].floorId);if(l&&c){let p=e.getState(l),d=e.getState(c);p!=null&&d!=null&&(o=p.visible&&d.visible&&p.altitude!==d.altitude)}}else{let l=n.coordinates[0].floorId!=null?t==null?void 0:t.getById("floor",n.coordinates[0].floorId):void 0;o=l&&(s=(a=e.getState(l))==null?void 0:a.visible)!=null?s:!0}return o}function Tg(n,t){let e=n.properties.path.split("/"),r=e[e.length-1].split(".")[0],o=atob(r);return"img_"+ql(o).toString()+"-"+t}function Yd(n="auto",t,e=1,r){return n!=="auto"?n*e:t!=null?t*e:r!=null?r*e:3*e}function gg(n,t,e,r){if(n.maxHeight!=null&&n.maxHeight>0)return Yd(t,n.maxHeight,e,r);let o=Yd(t,void 0,e,r);if(t==="auto"&&"geometryMaxHeight"in n){let a=n.geometryMaxHeight;if(a!=null&&a>0){let s=Math.ceil(a*1.1);if(s>o)return s}}return o}function Sg(n,t="auto",e=1,r,o){if(!n.length)return new Map;let a=n.sort((d,h)=>d.elevation-h.elevation),s=a.findIndex(d=>d.elevation>=0);s===-1&&(s=a.length);let l=0,c=new Map,p=-1;for(let d=s;d<a.length;d+=1){let h=a[d],y=gg(h,t,e,r);if(!o){let b=h.elevation-p-1;b>0&&(l+=b*y)}c.set(h.elevation,{altitude:l,visualHeight:y}),l+=y,p=h.elevation}l=0;for(let d=s-1;d>=0;d-=1){let h=a[d],y=gg(h,t,e,r),b=-(l+y);c.set(h.elevation,{altitude:b,visualHeight:y}),l+=y}return c}function Mg(n,t,e="auto",r=1,o){var p,d;let a=[...n].sort((h,y)=>h.elevation-y.elevation),s=a.findIndex(h=>h.elevation>=0);if(s===-1)return[];let l=[],c=-1;for(let h=s;h<a.length;h+=1){let y=a[h],b=y.elevation-c-1;if(b>0){let I=t.get(y.elevation),C=(p=I==null?void 0:I.visualHeight)!=null?p:Yd(e,void 0,r,o),P=b*C,O=(d=I==null?void 0:I.altitude)!=null?d:0;l.push({altitude:O-P,height:P,floorAboveElevation:y.elevation,missingCount:b})}c=y.elevation}return l}function Sc(n,t){let e=t(n.center);return{center:new re({latitude:e[1],longitude:e[0]}),radius:n.radius}}function Eg(n){if(n.geometry.type==="Polygon")return{type:"Feature",geometry:{type:"Polygon",coordinates:[n.geometry.coordinates[0]]},properties:n.properties};let t=[];for(let e of n.geometry.coordinates)t.push([e[0]]);return{type:"Feature",geometry:{type:"MultiPolygon",coordinates:t},properties:n.properties}}var xg=Math.PI*.1,Ft,Xt,ar,Dn,ti,ma,yr,_g,ga,Cg,uo=class{constructor(t,e,r,o,a){M(this,yr);f(this,"id");M(this,Ft,{});M(this,Xt);M(this,ar);f(this,"departure");f(this,"destination");M(this,Dn);M(this,ti);M(this,ma);var s;this.id=(s=a==null?void 0:a.id)!=null?s:xe(),E(this,Xt,e),E(this,ar,t.features),this.departure=r,this.destination=o}get path(){return i(this,ar).map(t=>i(this,Xt).getById("node",t.properties.id)).filter(Boolean)}get coordinates(){return i(this,Ft).coordinates?i(this,Ft).coordinates:(i(this,Ft).coordinates=i(this,ar).map(t=>new re(t.geometry.coordinates[1],t.geometry.coordinates[0],t.properties.groupBy)),i(this,Ft).coordinates)}get distance(){return i(this,Ft).distance?i(this,Ft).distance:(i(this,Ft).distance=i(this,ar).reduce((t,e)=>t+(e.properties.distance||0),0),i(this,Ft).distance)}get instructions(){if(i(this,ar).length<2)return[];if(i(this,Ft).instructions)return i(this,Ft).instructions;let t=[],e=0;for(let r=0;r<i(this,ar).length;r++){let o=i(this,ar)[r],a=i(this,ar)[r-1],s=i(this,ar)[r+1],l=new re(o.geometry.coordinates[1],o.geometry.coordinates[0],o.properties.groupBy),c=Y(this,yr,_g).call(this,{prevDirection:a,direction:o,nextDirection:s});e+=(a==null?void 0:a.properties.distance)||0;for(let p of c)p&&(t.push({action:p,distance:e,coordinate:l,node:i(this,Xt).getById("node",o.properties.id)}),e=0)}return i(this,Ft).instructions=t,i(this,Ft).instructions}toJSON(){return{id:this.id,directions:i(this,ar),__type:"directions",from:this.departure,to:this.destination,coordinates:this.coordinates,distance:this.distance,instructions:this.instructions}}};Ft=new WeakMap,Xt=new WeakMap,ar=new WeakMap,Dn=new WeakMap,ti=new WeakMap,ma=new WeakMap,yr=new WeakSet,_g=function(t){var I,C;let{prevDirection:e,direction:r,nextDirection:o}=t,a=e&&i(this,Xt).getById("floor",e.properties.groupBy),s=i(this,Xt).getById("floor",r.properties.groupBy),l=o&&i(this,Xt).getById("floor",o.properties.groupBy),c=[];e||c.push({type:"Departure"});let p=i(this,Xt).getMVFFeatureByNodeId("connection",r.properties.id),d=p?i(this,Xt).getById("connection",p.id):void 0,h=p&&p.nodes.length>1,y=i(this,Xt).enterpriseMode&&(!r.properties.destination||!(p!=null&&p.nodes.includes(r.properties.destination))||!(p!=null&&p.nodes.includes(r.properties.id)));if(p&&!(!h||y))if(!i(this,Dn)||i(this,Dn)==="exit")c.push(Y(this,yr,ga).call(this,"TakeConnection",s,l,d,p)),E(this,Dn,"take"),E(this,ti,d),E(this,ma,p);else{let P=i(this,Xt).getMVFFeatureByNodeId("connection",(I=e==null?void 0:e.properties.id)!=null?I:""),O=i(this,Xt).getById("connection",(C=P==null?void 0:P.id)!=null?C:"");c.push(Y(this,yr,ga).call(this,"ExitConnection",s,a,O,P)),E(this,Dn,"exit"),E(this,ti,d),E(this,ma,p)}else i(this,Dn)==="take"?(c.push(Y(this,yr,ga).call(this,"ExitConnection",s,a,i(this,ti),i(this,ma))),E(this,Dn,"exit"),E(this,ti,d)):l&&(s==null?void 0:s.id)!==l.id?c.push(Y(this,yr,ga).call(this,"TakeConnection",s,l,d)):a&&a.id!==(s==null?void 0:s.id)?c.push(Y(this,yr,ga).call(this,"ExitConnection",s,a,d)):c.push(Y(this,yr,Cg).call(this,e,r));return o||c.push({type:"Arrival"}),c},ga=function(t,e,r,o,a){var p,d;let s="none",l=e?e.elevation:0;if(l!=null&&(r==null?void 0:r.elevation)!=null){let h=l-r.elevation;h>0?s="down":h<0&&(s="up")}let c=(d=(p=o==null?void 0:o.type)!=null?p:a==null?void 0:a.type)!=null?d:"stairs";return{type:t,fromFloor:e,toFloor:r,direction:s,connection:o,connectionType:c}},Cg=function(t,e){let r=e.properties.edges;if(!r||r.filter(s=>s.destination.properties.id!==(t==null?void 0:t.properties.id)&&s.destination.properties.id!==e.properties.destination).length===0)return null;let a=t?-mg(t.properties.angle,e.properties.angle):0;return Math.abs(a)>=xg?{type:"Turn",bearing:yg(a,xg),referencePosition:"At"}:null};m();m();m();function Pg(n){return xn(n)?"navigationTarget"in n&&n.navigationTarget!=null:!1}var wv={lineOfSight:!0,mode:"absolute-distance",maxResults:1};function wg(n){return W(A({},wv),{lineOfSight:!n})}var je=new WeakMap;function Mc(n,t,e){var s;let r=wg(e),o=t.Query.__LEGACY_NEAREST_SYNC(n,t.getByType("node"),r),a=(s=o==null?void 0:o[0])==null?void 0:s.feature.id;return a?[a]:[]}async function Ec(n,t,e){var s;let r=wg(e),o=await t.Query.nearest(n,t.getByType("node"),r),a=(s=o==null?void 0:o[0])==null?void 0:s.feature.id;return a?[a]:[]}function Ov(n,t,e){let r=[];for(let o of n.navigationTarget){let a=ya(o,t,e);r.push(...a)}return r}async function Dv(n,t,e){let r=[];for(let o of n.navigationTarget){let a=await fo(o,t,e);r.push(...a)}return r}function Og(n,t){let e=t==null?void 0:t.getMVFFeatureById("entrance",n.id),r=e==null?void 0:e.properties.node;return r?[r]:[]}function Dg(n,t){var r;let e=t==null?void 0:t.getMVFFeatureById("area",n.id);return(r=e==null?void 0:e.properties.destinationNodes)!=null?r:[]}function Ag(n,t){var o,a;let e=t==null?void 0:t.getMVFFeatureById("space",n.id);if(e==null)return[];let r=(o=t.entranceNodeIdsBySpaceId)==null?void 0:o[n.id];return r&&r.length>0?r:(a=e.properties.destinationNodes)!=null?a:[]}function Av(n,t,e){let r=[];for(let o of n.coordinates){let a=Mc(o,t,e);a.length>0&&r.push(a[0])}return r}async function Fv(n,t,e){let r=[];for(let o of n.coordinates){let a=await Ec(o,t,e);a.length>0&&r.push(a[0])}return r}function Fg(n,t){var e;return(e=t==null?void 0:t.objectEntranceNodeIdsByObstructionId[n.id])!=null?e:[]}function kg(n,t){return n.spaces.flatMap(e=>{var r,o;return(o=(r=t==null?void 0:t.getMVFFeatureById("space",e.id))==null?void 0:r.properties.destinationNodes)!=null?o:[]}).filter(e=>typeof e=="string")}function Lg(n){return n.nodes.map(t=>t.id)}function ya(n,t,e){if(je.has(n))return je.get(n);if(Pn.is(n)){let r=Ov(n,t,e);return je.set(n,r),r}else if(Br.is(n)){let r=Mc(n,t,e);return je.set(n,r),r}else if(re.is(n)){let r=Mc(n,t,e);return je.set(n,r),r}else{if(nr.is(n))return Mc(n,t,e);if(Ot.is(n)){let r=Og(n,t);return je.set(n,r),r}else if(gr.is(n)){let r=Dg(n,t);return je.set(n,r),r}else if(qe.is(n)){let r=Ag(n,t);return je.set(n,r),r}else if(Tt.is(n)){let r=Av(n,t,e);return je.set(n,r),r}else if($t.is(n)){let r=Fg(n,t);return je.set(n,r),r}else if(mt.is(n)){let r=kg(n,t);return je.set(n,r),r}else if(Ht.is(n)){let r=Lg(n);return je.set(n,r),r}else if(hr.is(n)){let r=[n.id];return je.set(n,r),r}else return[]}}async function fo(n,t,e){if(je.has(n))return je.get(n);if(Pn.is(n)){let r=await Dv(n,t,e);return je.set(n,r),r}else if(Br.is(n)){let r=await Ec(n,t,e);return je.set(n,r),r}else if(re.is(n)){let r=await Ec(n,t,e);return je.set(n,r),r}else if(nr.is(n)){let r=await Ec(n,t,e);return je.set(n,r),r}else if(Ot.is(n)){let r=Og(n,t);return je.set(n,r),r}else if(gr.is(n)){let r=Dg(n,t);return je.set(n,r),r}else if(qe.is(n)){let r=Ag(n,t);return je.set(n,r),r}else if(Tt.is(n)){let r=await Fv(n,t,e);return je.set(n,r),r}else if($t.is(n)){let r=Fg(n,t);return je.set(n,r),r}else{if(mt.is(n))return kg(n,t);if(Ht.is(n)){let r=Lg(n);return je.set(n,r),r}else if(hr.is(n)){let r=[n.id];return je.set(n,r),r}else return[]}}function Ng(n,t){if(!n.instances||n.instances.length===0)return n;for(let e of n.instances)if(e.nodes.map(o=>o.id).includes(t))return e;return n}function Bg(n,t,e){var a,s;let r=(a=n.features[0])==null?void 0:a.properties.id,o=t[0];if(t.length>1){for(let l of t)if(((s=e.get(l))!=null?s:[]).includes(r)){o=l;break}}return Ht.is(o)&&(o=Ng(o,r)),o}function Rg(n,t,e){var a,s;let r=(a=n.features[n.features.length-1])==null?void 0:a.properties.id,o=t[0];if(t.length>1){for(let l of t)if(((s=e.get(l))!=null?s:[]).includes(r)){o=l;break}}return Ht.is(o)&&(o=Ng(o,r)),o}function eu(n){if(re.is(n))return n;if(!(!Pg(n)||Array.isArray(n.navigationTarget)||!re.is(n.navigationTarget)))return n.navigationTarget}var _s,xc,ba=class{constructor({nodes:t,geojsonCollection:e,connections:r,groupBy:o,multiplicativeDistanceWeightScaling:a,flagDeclarations:s,getDoorByNodeId:l}){f(this,"navigator");f(this,"connections");f(this,"getDirections",async(t,e,r,o)=>{let a=new Map,s=new Map;for(let d of t)a.set(d,await fo(d,o,o.enterpriseMode));for(let d of e)s.set(d,await fo(d,o,o.enterpriseMode));let{originIds:l,destinationNodeIds:c,featureToNodeIdsMap:p}=this.processTargets(a,s,o);return i(this,_s).call(this,t,e,l,c,r,o,p)});f(this,"getDirectionsSync",(t,e,r,o)=>{let a=new Map(t.map(d=>[d,ya(d,o,o.enterpriseMode)])),s=new Map(e.map(d=>[d,ya(d,o,o.enterpriseMode)])),{originIds:l,destinationNodeIds:c,featureToNodeIdsMap:p}=this.processTargets(a,s,o);return i(this,_s).call(this,t,e,l,c,r,o,p)});M(this,_s,(t,e,r,o,a,s,l)=>{var O;let c=this.getDisabledConnectionNodeIds(a.accessible).filter(U=>!r.includes(U)&&!o.includes(U)),p=new Map,d=A({},a.connectionIdWeightMap);for(let U of a.excludedConnections)d[U.id]=1/0;for(let U in d){let H=s.getById("connection",U);H&&i(this,xc).call(this,H,d[U],p)}let y=((O=a.smoothing.__EXPERIMENTAL_METHOD)!=null?O:"greedy-los")!=="greedy-los",b=this.navigator.getDirections({zones:a.zones.map(U=>{var H;return{geometry:U.geometry,cost:U.cost,map:(H=U.floor)==null?void 0:H.id}}),originIds:r,from:y?Vg(t):[],to:y?Vg(e):[],destinationNodeIds:o,disabledConnectionNodeIds:c,simplify:a.smoothing,overrideEdgeWeights:p,multiplicativeDistanceWeightScaling:!s.enterpriseMode});this.addCoordinateDirections(b,t,e);let I=Bg(b,t,l),C=Rg(b,e,l),P=new uo(b,s,I,C);if(!(P.distance===0&&new Set([...r,...o]).size===r.length+o.length))return P});f(this,"getDisabledConnectionNodeIds",t=>t===!1?[]:this.connections.reduce((e,r)=>r.accessible?e:e.concat(r.nodes),[]));M(this,xc,(t,e,r)=>{if(t.nodes.length<2)return;let o=new Set(t.nodes.map(a=>a.id));for(let a of t.nodes){let s=this.navigator.graph.edges[a.id];if(s)for(let l of s)o.has(l.destination.properties.id)&&r.set(l,e)}});f(this,"addCoordinateDirections",(t,[e],[r])=>{if(!t.features.length)return;let o=eu(e);if(o){let s=this.createDirectionFeature(o,this.navigator.getAngle([o.longitude,o.latitude],t.features[0].geometry.coordinates),this.navigator.getDistance([o.longitude,o.latitude],t.features[0].geometry.coordinates));t.features.splice(0,0,s)}let a=eu(r);if(a){let s=this.createDirectionFeature(a,0,0),l=t.features[t.features.length-1];l.properties.distance=this.navigator.getDistance(l.geometry.coordinates,[a.longitude,a.latitude]),l.properties.angle=this.navigator.getAngle(l.geometry.coordinates,[a.longitude,a.latitude]),t.features.push(s)}});f(this,"createDirectionFeature",(t,e,r)=>({type:"Feature",geometry:{type:"Point",coordinates:[t.longitude,t.latitude]},properties:{groupBy:t.floorId,id:t.id,angle:e,distance:r,edges:[]}}));this.navigator=new Jf({nodes:t,geojsonCollection:this.createCollection(e),groupBy:o,multiplicativeDistanceWeightScaling:a,flagDeclarations:s,getDoorByNodeId:l}),this.connections=r}processTargets(t,e,r){let o=[],a=[],s=new Map,l=new Set,c=new Set;for(let[p,d]of t){let h=s.get(p);h||(h=[],s.set(p,h)),qe.is(p)&&l.add(p.id);for(let y of d)h.push(y),o.push(y)}for(let[p,d]of e){let h=s.get(p);h||(h=[],s.set(p,h)),qe.is(p)&&c.add(p.id);for(let y of d)h.push(y),a.push(y)}if(l.size===0&&c.size===0)return{originIds:o,destinationNodeIds:a,featureToNodeIdsMap:s};for(let p of o){let d=r.spaceIdsByNodeId[p]||[];for(let h of d)if(c.has(h)){a.push(p);break}}for(let p of a){let d=r.spaceIdsByNodeId[p]||[];for(let h of d)if(l.has(h)){o.push(p);break}}return{originIds:o,destinationNodeIds:a,featureToNodeIdsMap:s}}createCollection(t){return{type:"FeatureCollection",features:Object.entries(t).reduce((e,[r,o])=>e.concat(o.features.map(a=>(a.properties.map=r,a))),[])}}};_s=new WeakMap,xc=new WeakMap;function kv(n){if(re.is(n))return n.floorId;if(qe.is(n)||Ot.is(n)||nr.is(n)||Br.is(n)||$t.is(n)||gr.is(n)||hr.is(n))return n.floor.id;if((Tt.is(n)||Ht.is(n))&&n.coordinates.length>0)return n.coordinates[0].floorId;if(mt.is(n)&&n.spaces.length>0)return n.spaces[0].floor.id}function Vg(n){return n.reduce((t,e)=>{let r=ro(e);if(!r)return t;let o=kv(e);return t.push({type:"Feature",geometry:{type:"Point",coordinates:[r.longitude,r.latitude]},properties:{id:e.id,neighbors:[],map:o}}),t},[])}m();m();m();import ri from"zod";var va=50,tu=1,ru=!1,jg=ri.object({limit:ri.enum(["same-floor","same-elevation","all-floors"]).optional(),mode:ri.enum(["travel-distance","absolute-distance"]).optional(),lineOfSight:ri.boolean().optional().or(ri.literal("auto")),maxDistance:ri.number().optional(),maxResults:ri.number().optional()}),Gg={lineOfSight:ru,mode:"travel-distance",maxDistance:va,limit:"same-floor",maxResults:tu},dt,Ps,ws,nu,Ia,_c,Cc,Cs=class{constructor(t,e){M(this,ws);M(this,dt);M(this,Ps);f(this,"__LEGACY_NEAREST_SYNC",(t,e,r)=>{let o=A(A({},Gg),r);try{jg.parse(o)}catch(d){k.error(d);return}let a=ro(t);if(!a)return;let s=Y(this,ws,nu).call(this,a,o),l=[],c={},p=[];for(let d of e){let h=ya(d,i(this,dt),i(this,dt).enterpriseMode);if(h)for(let y of h)c[y]||(c[y]=[]),c[y].push(d),p.push(y)}return(r==null?void 0:r.mode)==="absolute-distance"?l=i(this,Ia).call(this,a,s,e,o):l=i(this,Cc).call(this,t,s,p,c,o),l.sort((d,h)=>d.distance-h.distance)});M(this,Ia,(t,e,r,o)=>{var l,c;let a=[],s=new Set(r.map(p=>p.__type));for(let p of e)for(let d of s){let h=i(this,Ps).searchWithIncludedIds([t.longitude,t.latitude],d,i(this,dt).mapName,p,r.filter(y=>y.__type===d).map(y=>y.id),(l=o==null?void 0:o.maxDistance)!=null?l:va,(o==null?void 0:o.lineOfSight)==="auto"?ru:o==null?void 0:o.lineOfSight,(c=o==null?void 0:o.maxResults)!=null?c:1);if(h)for(let y of h)a.push({distance:y.distance,feature:i(this,dt).getById(d,y.node.properties.parentId)||i(this,dt).getById(d,y.node.properties.id)})}return a});M(this,_c,async(t,e,r,o,a)=>{var l,c,p,d;let s=[];for(let h of e){let y,b=0;if(!hr.is(t)){let I=i(this,Ia).call(this,t.anchorTarget,[h],i(this,dt).getByType("node").filter(C=>C.floor.id===h),{limit:"same-floor",lineOfSight:(l=a==null?void 0:a.lineOfSight)!=null?l:!0,mode:"absolute-distance",maxDistance:(c=a==null?void 0:a.maxDistance)!=null?c:va,maxResults:1});I.length>0&&(y=I[0].feature,b=I[0].distance)}if(y){let I=new Set,C=i(this,dt).directions.navigator.findNearestNodesOnGraph(y.id,((p=a==null?void 0:a.maxDistance)!=null?p:va)-b,h,r,!1,(d=a==null?void 0:a.maxResults)!=null?d:tu);for(let P of C)for(let O of o[P.feature.properties.id])I.has(O.id)||(s.push({distance:P.distance+b,feature:O}),I.add(O.id))}}return s});M(this,Cc,(t,e,r,o,a)=>{var l,c,p,d,h;let s=[];for(let y of e){let b;if(hr.is(t)||(b=(p=this.__LEGACY_NEAREST_SYNC(t,i(this,dt).getByType("node"),{lineOfSight:(l=a==null?void 0:a.lineOfSight)!=null?l:!0,mode:"absolute-distance",maxDistance:(c=a==null?void 0:a.maxDistance)!=null?c:va,maxResults:1}))==null?void 0:p[0].feature),b){let I=i(this,dt).directions.navigator.findNearestNodesOnGraph(b.id,(d=a==null?void 0:a.maxDistance)!=null?d:va,y,r,(a==null?void 0:a.lineOfSight)==="auto"?ru:a==null?void 0:a.lineOfSight,(h=a==null?void 0:a.maxResults)!=null?h:tu);for(let C of I)for(let P of o[C.feature.properties.id])s.push({distance:C.distance,feature:P})}}return s});E(this,dt,t),E(this,Ps,e)}async nearest(t,e,r){let o=A(A({},Gg),r);try{jg.parse(o)}catch(h){k.error(h);return}let a=ro(t);if(!a)return;let s=Y(this,ws,nu).call(this,a,o),l=[],c={},p=[],d=[];if((r==null?void 0:r.mode)==="absolute-distance")l=i(this,Ia).call(this,a,s,e,o);else{for(let h of e)d.push(fo(h,i(this,dt),i(this,dt).enterpriseMode).then(y=>{if(y)for(let b of y)c[b]||(c[b]=[]),c[b].push(h),p.push(b)}));await Promise.all(d),l=await i(this,_c).call(this,t,s,p,c,o)}return l.sort((h,y)=>h.distance-y.distance)}};dt=new WeakMap,Ps=new WeakMap,ws=new WeakSet,nu=function(t,e){let r=t.floorId?[t.floorId]:[];if((e==null?void 0:e.limit)==="all-floors")r=i(this,dt).getByType("floor").map(o=>o.id);else if(t.floorId==null)for(let o of i(this,dt).getByType("floor-stack")){let a=o.defaultFloor;a&&r.push(a.id)}else if((e==null?void 0:e.limit)==="same-elevation"){let o=i(this,dt).floorsById[t.floorId];if(o){let a=o==null?void 0:o.elevation;a!=null&&(r=i(this,dt).getByType("floor-stack").map(s=>{var l;return(l=s.floors.find(c=>c.elevation===a))==null?void 0:l.id}).filter(Boolean))}}return r},Ia=new WeakMap,_c=new WeakMap,Cc=new WeakMap;m();var Ta,wc,Ug,Pc=class{constructor(t){M(this,wc);M(this,Ta);E(this,Ta,t)}at(t){let e=[],r=[t.longitude,t.latitude],o=t.floorId?[t.floorId]:i(this,Ta).getAllFloorIds();for(let a of o){let s=i(this,Ta).searchAtCoordinate(t,a);for(let l of s)Y(this,wc,Ug).call(this,r,l)&&e.push(l)}return e}};Ta=new WeakMap,wc=new WeakSet,Ug=function(t,e){let r=e.geoJSON;if(!r||!r.geometry)return!1;let o=r.geometry.type;return o==="Point"?t[0]===r.geometry.coordinates[0]&&t[1]===r.geometry.coordinates[1]:o!=="Polygon"&&o!=="MultiPolygon"?!1:Zf(t,r)};m();m();m();m();function Hg(n){let t=+this._x.call(null,n),e=+this._y.call(null,n);return Wg(this.cover(t,e),t,e,n)}function Wg(n,t,e,r){if(isNaN(t)||isNaN(e))return n;var o,a=n._root,s={data:r},l=n._x0,c=n._y0,p=n._x1,d=n._y1,h,y,b,I,C,P,O,U;if(!a)return n._root=s,n;for(;a.length;)if((C=t>=(h=(l+p)/2))?l=h:p=h,(P=e>=(y=(c+d)/2))?c=y:d=y,o=a,!(a=a[O=P<<1|C]))return o[O]=s,n;if(b=+n._x.call(null,a.data),I=+n._y.call(null,a.data),t===b&&e===I)return s.next=a,o?o[O]=s:n._root=s,n;do o=o?o[O]=new Array(4):n._root=new Array(4),(C=t>=(h=(l+p)/2))?l=h:p=h,(P=e>=(y=(c+d)/2))?c=y:d=y;while((O=P<<1|C)===(U=(I>=y)<<1|b>=h));return o[U]=a,o[O]=s,n}function zg(n){var t,e,r=n.length,o,a,s=new Array(r),l=new Array(r),c=1/0,p=1/0,d=-1/0,h=-1/0;for(e=0;e<r;++e)isNaN(o=+this._x.call(null,t=n[e]))||isNaN(a=+this._y.call(null,t))||(s[e]=o,l[e]=a,o<c&&(c=o),o>d&&(d=o),a<p&&(p=a),a>h&&(h=a));if(c>d||p>h)return this;for(this.cover(c,p).cover(d,h),e=0;e<r;++e)Wg(this,s[e],l[e],n[e]);return this}m();function $g(n,t){if(isNaN(n=+n)||isNaN(t=+t))return this;var e=this._x0,r=this._y0,o=this._x1,a=this._y1;if(isNaN(e))o=(e=Math.floor(n))+1,a=(r=Math.floor(t))+1;else{for(var s=o-e||1,l=this._root,c,p;e>n||n>=o||r>t||t>=a;)switch(p=(t<r)<<1|n<e,c=new Array(4),c[p]=l,l=c,s*=2,p){case 0:o=e+s,a=r+s;break;case 1:e=o-s,a=r+s;break;case 2:o=e+s,r=a-s;break;case 3:e=o-s,r=a-s;break}this._root&&this._root.length&&(this._root=l)}return this._x0=e,this._y0=r,this._x1=o,this._y1=a,this}m();function Xg(){var n=[];return this.visit(function(t){if(!t.length)do n.push(t.data);while(t=t.next)}),n}m();function Yg(n){return arguments.length?this.cover(+n[0][0],+n[0][1]).cover(+n[1][0],+n[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}m();m();function yt(n,t,e,r,o){this.node=n,this.x0=t,this.y0=e,this.x1=r,this.y1=o}function Zg(n,t,e){var r,o=this._x0,a=this._y0,s,l,c,p,d=this._x1,h=this._y1,y=[],b=this._root,I,C;for(b&&y.push(new yt(b,o,a,d,h)),e==null?e=1/0:(o=n-e,a=t-e,d=n+e,h=t+e,e*=e);I=y.pop();)if(!(!(b=I.node)||(s=I.x0)>d||(l=I.y0)>h||(c=I.x1)<o||(p=I.y1)<a))if(b.length){var P=(s+c)/2,O=(l+p)/2;y.push(new yt(b[3],P,O,c,p),new yt(b[2],s,O,P,p),new yt(b[1],P,l,c,O),new yt(b[0],s,l,P,O)),(C=(t>=O)<<1|n>=P)&&(I=y[y.length-1],y[y.length-1]=y[y.length-1-C],y[y.length-1-C]=I)}else{var U=n-+this._x.call(null,b.data),H=t-+this._y.call(null,b.data),V=U*U+H*H;if(V<e){var B=Math.sqrt(e=V);o=n-B,a=t-B,d=n+B,h=t+B,r=b.data}}return r}m();function Jg(n){if(isNaN(d=+this._x.call(null,n))||isNaN(h=+this._y.call(null,n)))return this;var t,e=this._root,r,o,a,s=this._x0,l=this._y0,c=this._x1,p=this._y1,d,h,y,b,I,C,P,O;if(!e)return this;if(e.length)for(;;){if((I=d>=(y=(s+c)/2))?s=y:c=y,(C=h>=(b=(l+p)/2))?l=b:p=b,t=e,!(e=e[P=C<<1|I]))return this;if(!e.length)break;(t[P+1&3]||t[P+2&3]||t[P+3&3])&&(r=t,O=P)}for(;e.data!==n;)if(o=e,!(e=e.next))return this;return(a=e.next)&&delete e.next,o?(a?o.next=a:delete o.next,this):t?(a?t[P]=a:delete t[P],(e=t[0]||t[1]||t[2]||t[3])&&e===(t[3]||t[2]||t[1]||t[0])&&!e.length&&(r?r[O]=e:this._root=e),this):(this._root=a,this)}function qg(n){for(var t=0,e=n.length;t<e;++t)this.remove(n[t]);return this}m();function Qg(){return this._root}m();function Kg(){var n=0;return this.visit(function(t){if(!t.length)do++n;while(t=t.next)}),n}m();function em(n){var t=[],e,r=this._root,o,a,s,l,c;for(r&&t.push(new yt(r,this._x0,this._y0,this._x1,this._y1));e=t.pop();)if(!n(r=e.node,a=e.x0,s=e.y0,l=e.x1,c=e.y1)&&r.length){var p=(a+l)/2,d=(s+c)/2;(o=r[3])&&t.push(new yt(o,p,d,l,c)),(o=r[2])&&t.push(new yt(o,a,d,p,c)),(o=r[1])&&t.push(new yt(o,p,s,l,d)),(o=r[0])&&t.push(new yt(o,a,s,p,d))}return this}m();function tm(n){var t=[],e=[],r;for(this._root&&t.push(new yt(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var o=r.node;if(o.length){var a,s=r.x0,l=r.y0,c=r.x1,p=r.y1,d=(s+c)/2,h=(l+p)/2;(a=o[0])&&t.push(new yt(a,s,l,d,h)),(a=o[1])&&t.push(new yt(a,d,l,c,h)),(a=o[2])&&t.push(new yt(a,s,h,d,p)),(a=o[3])&&t.push(new yt(a,d,h,c,p))}e.push(r)}for(;r=e.pop();)n(r.node,r.x0,r.y0,r.x1,r.y1);return this}m();function rm(n){return n[0]}function nm(n){return arguments.length?(this._x=n,this):this._x}m();function om(n){return n[1]}function im(n){return arguments.length?(this._y=n,this):this._y}function Os(n,t,e){var r=new ou(t==null?rm:t,e==null?om:e,NaN,NaN,NaN,NaN);return n==null?r:r.addAll(n)}function ou(n,t,e,r,o,a){this._x=n,this._y=t,this._x0=e,this._y0=r,this._x1=o,this._y1=a,this._root=void 0}function am(n){for(var t={data:n.data},e=t;n=n.next;)e=e.next={data:n.data};return t}var kt=Os.prototype=ou.prototype;kt.copy=function(){var n=new ou(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,e,r;if(!t)return n;if(!t.length)return n._root=am(t),n;for(e=[{source:t,target:n._root=new Array(4)}];t=e.pop();)for(var o=0;o<4;++o)(r=t.source[o])&&(r.length?e.push({source:r,target:t.target[o]=new Array(4)}):t.target[o]=am(r));return n};kt.add=Hg;kt.addAll=zg;kt.cover=$g;kt.data=Xg;kt.extent=Yg;kt.find=Zg;kt.remove=Jg;kt.removeAll=qg;kt.root=Qg;kt.size=Kg;kt.visit=em;kt.visitAfter=tm;kt.x=nm;kt.y=im;m();function iu(n,t,e,r=0,o=0,a=0,s=0){if(e===void 0){e=n.root();let c=n.extent();if(c&&([[r,o],[a,s]]=c,t(e,r,o,a,s)))return!0;if(!e)return!1}let l=[[r,o,(a+r)/2,(s+o)/2],[(a+r)/2,o,a,(s+o)/2],[r,(s+o)/2,(a+r)/2,s],[(a+r)/2,(s+o)/2,a,s]];for(let c=0;c<4;c++){let p=e[c];if(p){let[d,h,y,b]=l[c];t(p,d,h,y,b)||iu(n,t,p,d,h,y,b)}}return!1}var sm=1e3,Lv=.1,Nv=5,Bv=1.5,Vr,Ds,Dc,lm,_t,ni,Oc=class{constructor(t,e){M(this,Dc);M(this,Vr,{});M(this,Ds,new Map);f(this,"getMaxSearchRadiusForFloorId",(t,e)=>{var a;let r=(a=i(this,Ds).get(i(this,_t).mapName))==null?void 0:a.get(e);if(r)return r;let o=this.getNodeTreeByTypeAndFloorId(t,i(this,_t).mapName,e);if(typeof o.extent=="function")if(o.extent()){let[[s,l],[c,p]]=o.extent(),d=c-s,h=p-l;r=Math.max(d,h)}else r=sm;else r=sm;return i(this,Ds).set(i(this,_t).mapName,new Map([[e,r]])),r});M(this,_t);M(this,ni);E(this,_t,t),E(this,ni,e)}searchWithIncludedIds(t,e,r,o,a,s,l=!1,c=1/0){let p=this.getNodeTreeByTypeAndFloorId(e,r,o),d=new Set,h=[],y=Nv,b=Math.max(s,this.getMaxSearchRadiusForFloorId(e,o));for(;h.length<c&&y<=b;){let I=Y(this,Dc,lm).call(this,t,p,a,y,s,d);I.sort((C,P)=>C.distance-P.distance);for(let C of I){if(h.length>=c)break;l?i(this,_t).directions.navigator.hasLineOfSight(t,C.node.geometry.coordinates,o,Lv)&&h.push(C):h.push(C)}y=y*Bv}return h}getNodeTreeByTypeAndFloorId(t,e,r){var s,l;if(i(this,Vr)[t]||(i(this,Vr)[t]={}),(s=i(this,Vr)[t][e])!=null&&s[r])return i(this,Vr)[t][e][r];i(this,Vr)[t][e]||(i(this,Vr)[t][e]={}),i(this,Vr)[t][e][r]=Os();let o=i(this,Vr)[t][e][r];o.x(c=>{let p=c.geometry.coordinates;return i(this,ni).call(this,p[0],p[1]).x}),o.y(c=>{let p=c.geometry.coordinates;return i(this,ni).call(this,p[0],p[1]).y});let a=[];switch(t){case"space":a=i(this,_t).mvfSpacesByFloorId[r].flatMap(h=>h.properties.destinationNodes).map(h=>{let y=i(this,_t).mvfNodesById[h];return y?W(A({},y),{properties:{id:y.properties.id,parentId:y.properties.space[0]}}):null});break;case"node":a=((l=i(this,_t).mvfNodesByFloorId[r])==null?void 0:l.filter(h=>h.properties.neighbors.length>0))||[];break;case"point-of-interest":a=i(this,_t).mvfPoisByFloorId[r]||[];break;case"door":a=i(this,_t).mvfEntrancesByFloorId[r]||[];break;case"annotation":a=i(this,_t).mvfAnnotationsByFloorId[r]||[];break;case"enterprise-location":let p=i(this,_t).mvfNodesByFloorId[r]||[],d=i(this,_t).locationIdsByNodeId;a=[];for(let h=0;h<p.length;h++){let y=p[h],b=d[y.properties.id];(b==null?void 0:b.length)>0&&a.push(W(A({},y),{properties:{id:y.properties.id,parentId:b[0]}}))}break}return(a==null?void 0:a.length)>0&&o.addAll(a),o}};Vr=new WeakMap,Ds=new WeakMap,Dc=new WeakSet,lm=function(t,e,r,o,a,s){let{x:l,y:c}=i(this,ni).call(this,t[0],t[1]),p=l-o,d=l+o,h=c-o,y=c+o,b=[];return iu(e,(I,C,P,O,U)=>{let H=C>=d||P>=y||O<p||U<h;if("data"in I){let V=I.data,B=V.properties.parentId||V.properties.id;if(r.includes(B)&&!s.has(B)){s.add(B);let q=qn(t,V.geometry.coordinates);q<=a&&b.push({node:V,distance:q})}}return H}),b},_t=new WeakMap,ni=new WeakMap;m();m();m();m();function Ac(n,t,e=0,r=n.length-1,o=Rv){for(;r>e;){if(r-e>600){let c=r-e+1,p=t-e+1,d=Math.log(c),h=.5*Math.exp(2*d/3),y=.5*Math.sqrt(d*h*(c-h)/c)*(p-c/2<0?-1:1),b=Math.max(e,Math.floor(t-p*h/c+y)),I=Math.min(r,Math.floor(t+(c-p)*h/c+y));Ac(n,t,b,I,o)}let a=n[t],s=e,l=r;for(As(n,e,t),o(n[r],a)>0&&As(n,e,r);s<l;){for(As(n,s,l),s++,l--;o(n[s],a)<0;)s++;for(;o(n[l],a)>0;)l--}o(n[e],a)===0?As(n,e,l):(l++,As(n,l,r)),l<=t&&(e=l+1),t<=l&&(r=l-1)}}function As(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function Rv(n,t){return n<t?-1:n>t?1:0}var Ls=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data,r=[];if(!kc(t,e))return r;let o=this.toBBox,a=[];for(;e;){for(let s=0;s<e.children.length;s++){let l=e.children[s],c=e.leaf?o(l):l;kc(t,c)&&(e.leaf?r.push(l):su(t,c)?this._all(l,r):a.push(l))}e=a.pop()}return r}collides(t){let e=this.data;if(!kc(t,e))return!1;let r=[];for(;e;){for(let o=0;o<e.children.length;o++){let a=e.children[o],s=e.leaf?this.toBBox(a):a;if(kc(t,s)){if(e.leaf||su(t,s))return!0;r.push(a)}}e=r.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let r=0;r<t.length;r++)this.insert(t[r]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){let r=this.data;this.data=e,e=r}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Ma([]),this}remove(t,e){if(!t)return this;let r=this.data,o=this.toBBox(t),a=[],s=[],l,c,p;for(;r||a.length;){if(r||(r=a.pop(),c=a[a.length-1],l=s.pop(),p=!0),r.leaf){let d=Vv(t,r.children,e);if(d!==-1)return r.children.splice(d,1),a.push(r),this._condense(a),this}!p&&!r.leaf&&su(r,o)?(a.push(r),s.push(l),l=0,c=r,r=r.children[0]):c?(l++,r=c.children[l],p=!1):r=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){let r=[];for(;t;)t.leaf?e.push(...t.children):r.push(...t.children),t=r.pop();return e}_build(t,e,r,o){let a=r-e+1,s=this._maxEntries,l;if(a<=s)return l=Ma(t.slice(e,r+1)),Sa(l,this.toBBox),l;o||(o=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,o-1))),l=Ma([]),l.leaf=!1,l.height=o;let c=Math.ceil(a/s),p=c*Math.ceil(Math.sqrt(s));cm(t,e,r,p,this.compareMinX);for(let d=e;d<=r;d+=p){let h=Math.min(d+p-1,r);cm(t,d,h,c,this.compareMinY);for(let y=d;y<=h;y+=c){let b=Math.min(y+c-1,h);l.children.push(this._build(t,y,b,o-1))}}return Sa(l,this.toBBox),l}_chooseSubtree(t,e,r,o){for(;o.push(e),!(e.leaf||o.length-1===r);){let a=1/0,s=1/0,l;for(let c=0;c<e.children.length;c++){let p=e.children[c],d=au(p),h=Uv(t,p)-d;h<s?(s=h,a=d<a?d:a,l=p):h===s&&d<a&&(a=d,l=p)}e=l||e.children[0]}return e}_insert(t,e,r){let o=r?t:this.toBBox(t),a=[],s=this._chooseSubtree(o,this.data,e,a);for(s.children.push(t),ks(s,o);e>=0&&a[e].children.length>this._maxEntries;)this._split(a,e),e--;this._adjustParentBBoxes(o,a,e)}_split(t,e){let r=t[e],o=r.children.length,a=this._minEntries;this._chooseSplitAxis(r,a,o);let s=this._chooseSplitIndex(r,a,o),l=Ma(r.children.splice(s,r.children.length-s));l.height=r.height,l.leaf=r.leaf,Sa(r,this.toBBox),Sa(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(r,l)}_splitRoot(t,e){this.data=Ma([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Sa(this.data,this.toBBox)}_chooseSplitIndex(t,e,r){let o,a=1/0,s=1/0;for(let l=e;l<=r-e;l++){let c=Fs(t,0,l,this.toBBox),p=Fs(t,l,r,this.toBBox),d=Hv(c,p),h=au(c)+au(p);d<a?(a=d,o=l,s=h<s?h:s):d===a&&h<s&&(s=h,o=l)}return o||r-e}_chooseSplitAxis(t,e,r){let o=t.leaf?this.compareMinX:jv,a=t.leaf?this.compareMinY:Gv,s=this._allDistMargin(t,e,r,o),l=this._allDistMargin(t,e,r,a);s<l&&t.children.sort(o)}_allDistMargin(t,e,r,o){t.children.sort(o);let a=this.toBBox,s=Fs(t,0,e,a),l=Fs(t,r-e,r,a),c=Fc(s)+Fc(l);for(let p=e;p<r-e;p++){let d=t.children[p];ks(s,t.leaf?a(d):d),c+=Fc(s)}for(let p=r-e-1;p>=e;p--){let d=t.children[p];ks(l,t.leaf?a(d):d),c+=Fc(l)}return c}_adjustParentBBoxes(t,e,r){for(let o=r;o>=0;o--)ks(e[o],t)}_condense(t){for(let e=t.length-1,r;e>=0;e--)t[e].children.length===0?e>0?(r=t[e-1].children,r.splice(r.indexOf(t[e]),1)):this.clear():Sa(t[e],this.toBBox)}};function Vv(n,t,e){if(!e)return t.indexOf(n);for(let r=0;r<t.length;r++)if(e(n,t[r]))return r;return-1}function Sa(n,t){Fs(n,0,n.children.length,t,n)}function Fs(n,t,e,r,o){o||(o=Ma(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let a=t;a<e;a++){let s=n.children[a];ks(o,n.leaf?r(s):s)}return o}function ks(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function jv(n,t){return n.minX-t.minX}function Gv(n,t){return n.minY-t.minY}function au(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function Fc(n){return n.maxX-n.minX+(n.maxY-n.minY)}function Uv(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function Hv(n,t){let e=Math.max(n.minX,t.minX),r=Math.max(n.minY,t.minY),o=Math.min(n.maxX,t.maxX),a=Math.min(n.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,a-r)}function su(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function kc(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function Ma(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function cm(n,t,e,r,o){let a=[t,e];for(;a.length;){if(e=a.pop(),t=a.pop(),e-t<=r)continue;let s=t+Math.ceil((e-t)/r/2)*r;Ac(n,s,t,e,o),a.push(t,s,s,e)}}var ho,Lc=class extends Ls{constructor(e){super();M(this,ho);f(this,"toBBox",e=>{var h,y,b,I;let r=e.geoJSONBoundingBox;r==null&&k.warn('Item "'.concat(e.id,'" has no geoJSONBoundingBox; falling back to zero-size bbox at origin.'));let o=r!=null&&r.length===6,a=(h=r==null?void 0:r[0])!=null?h:0,s=(y=r==null?void 0:r[1])!=null?y:0,l=(b=o?r==null?void 0:r[3]:r==null?void 0:r[2])!=null?b:0,c=(I=o?r==null?void 0:r[4]:r==null?void 0:r[3])!=null?I:0,p=i(this,ho).call(this,a,s),d=i(this,ho).call(this,l,c);return{minX:p.x,minY:p.y,maxX:d.x,maxY:d.y}});f(this,"compareMinX",(e,r)=>{let o=this.toBBox(e),a=this.toBBox(r);return o.minX-a.minX});f(this,"compareMinY",(e,r)=>{let o=this.toBBox(e),a=this.toBBox(r);return o.minY-a.minY});E(this,ho,e)}search(e,r,o,a){if(typeof e=="object")return super.search(e);let s=i(this,ho).call(this,e,r),l=i(this,ho).call(this,o,a);return super.search({minX:s.x,minY:s.y,maxX:l.x,maxY:l.y})}searchCoordinate(e){return this.search(e.longitude,e.latitude,e.longitude,e.latitude)}};ho=new WeakMap;var oi,Ns,Bs,Nc=class{constructor(t,e){M(this,oi);M(this,Ns);M(this,Bs,new Map);E(this,oi,t),E(this,Ns,e)}getTreeByFloorId(t){let e=i(this,Bs).get(t);if(e)return e;let r=new Lc(i(this,Ns)),o=i(this,oi).floorsById[t];if(o){let a=[o,...o.spaces,...o.objects];for(let s of i(this,oi).areas)s.floor.id===t&&a.push(s);r.load(a)}return i(this,Bs).set(t,r),r}searchAtCoordinate(t,e){return this.getTreeByFloorId(e).searchCoordinate(t)}getAllFloorIds(){return i(this,oi).floors.map(t=>t.id)}};oi=new WeakMap,Ns=new WeakMap,Bs=new WeakMap;m();function pm(n,t){let e=111319.9*Math.cos(t*Math.PI/180);return(r,o)=>({x:(r-n)*e,y:(o-t)*111319.9})}var Ea,Vs,js,Gs,Rs=class{constructor(t){M(this,Ea);M(this,Vs);M(this,js);M(this,Gs);f(this,"__LEGACY_NEAREST_SYNC",(t,e,r)=>i(this,Ea).__LEGACY_NEAREST_SYNC(t,e,r));let e=pm(t.mapCenter.longitude,t.mapCenter.latitude);E(this,js,new Oc(t,e)),E(this,Gs,new Nc(t,e)),E(this,Ea,new Cs(t,i(this,js))),E(this,Vs,new Pc(i(this,Gs)))}async nearest(t,e,r){return i(this,Ea).nearest(t,e,r)}async at(t){return i(this,Vs).at(t)}};Ea=new WeakMap,Vs=new WeakMap,js=new WeakMap,Gs=new WeakMap;m();m();var Us,Bc=class{constructor(t){M(this,Us);E(this,Us,t||[])}get raw(){return i(this,Us)}};Us=new WeakMap;var Lt,ae,Ge,_a,xa=class xa extends lt{constructor(e,r){super(r.mvf2Data.id);f(this,"__type",xa.__type);f(this,"id","loc_");f(this,"name","");f(this,"externalId");f(this,"description");f(this,"logo");f(this,"logoImage");f(this,"phone");f(this,"social",[]);f(this,"images",[]);f(this,"links",[]);f(this,"website");f(this,"icon");f(this,"extra");f(this,"searchTags");M(this,Lt);M(this,ae,{});M(this,Ge);M(this,_a);E(this,Lt,e),E(this,Ge,r.mvf2Data),E(this,_a,r.mvf3Data);for(let o in r.mvf2Data)o==="links"?this.links=r.mvf2Data.links.map(a=>new ko({mvfData:a})):o==="pictures"?this.images=r.mvf2Data.pictures.map(a=>{var s;return a.url?new en({mvfData:W(A({},a),{url:(s=a.url)!=null?s:""}),mapData:i(this,Lt)}):void 0}).filter(a=>a!=null):o==="website"?r.mvf2Data.website&&(this.website=new ko({mvfData:r.mvf2Data.website})):o==="icon"?r.mvf2Data.icon&&(this.icon=new en({mvfData:{url:r.mvf2Data.icon},mapData:i(this,Lt)})):o==="logo"?r.mvf2Data.logo&&(this.logoImage=new en({mvfData:{url:r.mvf2Data.logo},mapData:i(this,Lt)}),Object.defineProperty(this,"logo",{get(){var a;return(a=this.logoImage)==null?void 0:a.url}})):Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return i(this,Ge)[o]}});i(this,_a)&&(this.extra=i(this,_a).extra)}static is(e){return e.__type===xa.__type}get spaces(){if(i(this,ae).spaces)return i(this,ae).spaces;if(i(this,Ge).spaces==null)return i(this,ae).spaces=[],i(this,ae).spaces;i(this,ae).spaces=[];for(let e=0;e<i(this,Ge).spaces.length;e++){let r=i(this,Lt).getById("space",i(this,Ge).spaces[e].id);r&&i(this,ae).spaces.push(r)}return i(this,ae).spaces}get points(){if(i(this,ae).points)return i(this,ae).points;if(i(this,Ge).spaces==null)return i(this,ae).points=[],i(this,ae).points;i(this,ae).points=[];for(let e=0;e<i(this,Ge).spaces.length;e++){let r=i(this,Lt).getById("point-of-interest",i(this,Ge).spaces[e].id);r&&i(this,ae).points.push(r)}return i(this,ae).points}get doors(){if(i(this,ae).doors)return i(this,ae).doors;if(i(this,Ge).entrances==null)return i(this,ae).doors=[],i(this,ae).doors;i(this,ae).doors=[];for(let e=0;e<i(this,Ge).entrances.length;e++){let r=i(this,Lt).getById("door",i(this,Ge).entrances[e].id);r&&i(this,ae).doors.push(r)}return i(this,ae).doors}get connections(){if(i(this,ae).connections)return i(this,ae).connections;if(i(this,Ge).connections==null)return i(this,ae).connections=[],i(this,ae).connections;i(this,ae).connections=[];for(let e of i(this,Ge).connections){let r=i(this,Lt).getById("connection",e);r&&i(this,ae).connections.push(r)}return i(this,ae).connections}get annotations(){if(i(this,ae).annotations)return i(this,ae).annotations;if(i(this,Ge).annotations==null)return i(this,ae).annotations=[],i(this,ae).annotations;i(this,ae).annotations=[];for(let e=0;e<i(this,Ge).annotations.length;e++){let r=i(this,Lt).getById("annotation",i(this,Ge).annotations[e].id);r&&i(this,ae).annotations.push(r)}return i(this,ae).annotations}get categories(){return i(this,ae).categories?i(this,ae).categories:i(this,Ge).categories==null?(i(this,ae).categories=[],i(this,ae).categories):(i(this,ae).categories=i(this,Ge).categories.map(e=>i(this,Lt).getById("location-category",e)).filter(e=>e!=null),i(this,ae).categories)}get mapObjects(){return i(this,ae).mapObjects?i(this,ae).mapObjects:i(this,Ge).obstructions==null?(i(this,ae).mapObjects=[],i(this,ae).mapObjects):(i(this,ae).mapObjects=i(this,Ge).obstructions.map(e=>i(this,Lt).getById("object",e.id)).filter(e=>e!=null),i(this,ae).mapObjects)}get areas(){return i(this,ae).areas?i(this,ae).areas:i(this,Ge).areas==null?(i(this,ae).areas=[],i(this,ae).areas):(i(this,ae).areas=i(this,Ge).areas.map(e=>i(this,Lt).getById("area",e.id)).filter(e=>e!=null),i(this,ae).areas)}get focusTarget(){if(i(this,ae).focusTarget)return i(this,ae).focusTarget;let e=[];for(let r of this.spaces)e.push(r);for(let r of this.connections)e.push(...r.coordinates);for(let r of this.doors)e.push(r.focusTarget);for(let r of this.mapObjects)e.push(r.focusTarget);for(let r of this.annotations)e.push(r.focusTarget);for(let r of this.points)e.push(r.focusTarget);for(let r of this.areas)e.push(r.focusTarget);return i(this,ae).focusTarget=e,e}get openingHours(){var e;return i(this,ae).openingHours?i(this,ae).openingHours:(i(this,ae).openingHours=new Bc((e=i(this,Ge).openingHoursSpecification)!=null?e:[]),i(this,ae).openingHours)}get navigationTarget(){if(i(this,ae).navigationTarget)return i(this,ae).navigationTarget;let e=[];for(let r of this.spaces)e.push(r);for(let r of this.connections)e.push(...r.coordinates);for(let r of this.doors)e.push(r.focusTarget);for(let r of this.mapObjects)e.push(r.focusTarget);for(let r of this.annotations)e.push(r.focusTarget);for(let r of this.points)e.push(r.focusTarget);return i(this,ae).navigationTarget=e,e}toJSON(){return{__type:xa.__type,id:this.id,name:this.name}}};Lt=new WeakMap,ae=new WeakMap,Ge=new WeakMap,_a=new WeakMap,f(xa,"__type","location-profile");var lu=xa,Pn=lu;m();var go,Yt,ii,Ca=class Ca extends lt{constructor(e,r){super(r.mvfData.id);f(this,"__type",Ca.__type);f(this,"id","cat_");f(this,"name","");f(this,"icon","");M(this,go);M(this,Yt,{});M(this,ii);E(this,go,e),E(this,ii,r.mvfData);for(let o in r.mvfData)Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),o)||Object.defineProperty(this,o,{enumerable:!0,get(){return i(this,ii)[o]}})}static is(e){return e.__type===Ca.__type}get parent(){return i(this,Yt).parent?i(this,Yt).parent:(i(this,Yt).parent=i(this,ii).parent?i(this,go).getById("location-category",i(this,ii).parent):void 0,i(this,Yt).parent)}get children(){return i(this,Yt).children?i(this,Yt).children:(i(this,Yt).children=i(this,go).locationCategoriesByParentId[this.id]||[],i(this,Yt).children)}get locationProfiles(){if(i(this,Yt).locationProfiles)return i(this,Yt).locationProfiles;let e=[];for(let r of i(this,go).locationProfilesByCategoryId[this.id]||[]){let o=i(this,go).getById("location-profile",r.id);o&&e.push(o)}return i(this,Yt).locationProfiles=e,e}toJSON(){return{__type:Ca.__type,id:this.id,name:this.name}}};go=new WeakMap,Yt=new WeakMap,ii=new WeakMap,f(Ca,"__type","location-category");var cu=Ca,vc=cu;var pu=.75;function Wv(n){let t=[];if(n.geometry.type==="Polygon")for(let e=1;e<n.geometry.coordinates.length;e++)t.push({type:"Feature",geometry:{type:"Polygon",coordinates:[n.geometry.coordinates[e]]},properties:W(A({},n.properties),{id:xe()})});else if(n.geometry.type==="MultiPolygon")for(let e of n.geometry.coordinates)for(let r=1;r<e.length;r++)t.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e[r]]},properties:W(A({},n.properties),{id:xe()})});return t}function zv(n){var r,o;let t={},e=(o=(r=n["floor.geojson"])==null?void 0:r.features)!=null?o:[];for(let a of e){let s=a.properties.id;if(!s)continue;let l=[];if(a.geometry!=null&&a.geometry.coordinates.length>0){let c=Wv(a);for(let p of c)l.push(p)}t[s]={voids:{type:"FeatureCollection",features:l}}}return t}var fe,Hs,Pa,wa,ai=class extends dr{constructor(e,r){var s,l,c,p,d,h;super();f(this,"Analytics");M(this,fe,{});f(this,"Query");f(this,"mvf");f(this,"outdoorViewToken");f(this,"objectEntranceNodeIdsByObstructionId");f(this,"obstructionIdByEntranceId");f(this,"venue");f(this,"tokenManager");f(this,"directions");f(this,"enterpriseMode",!1);f(this,"nodesById");f(this,"spacesById");f(this,"floorsById");f(this,"floorStacksById");f(this,"facadesById");f(this,"facadesBySpaceId");f(this,"connectionsById");f(this,"objectsById");f(this,"doorsById");f(this,"pointsOfInterestById");f(this,"annotationsById");f(this,"areasById");f(this,"locationProfilesById");f(this,"locationCategoriesById");f(this,"locationProfilesByExternalId");f(this,"locationProfilesByCategoryId");f(this,"locationCategoriesByParentId");f(this,"doorsByNodeId");f(this,"mvfAnnotationsById");f(this,"mvfConnectionsById");f(this,"mvfConnectionsByNodeId");f(this,"mvfEntrancesById");f(this,"mvfNodesById");f(this,"mvfObstructionById");f(this,"mvfSpacesById");f(this,"mvfFloorsById");f(this,"mvfFloorStacksById");f(this,"mvfAreasById");f(this,"spacesByExternalId");f(this,"nodesByExternalId");f(this,"objectsByExternalId");f(this,"poisByExternalId");f(this,"floorsByExternalId");f(this,"floorStacksByExternalId");f(this,"doorsByExternalId");f(this,"areasByExternalId");f(this,"locationProfilesByAttachedFeatureId",{});f(this,"entranceNodeIdsBySpaceId",{});f(this,"locationsById",{});f(this,"locationInstancesById",{});f(this,"instanceLocationsByPolygonId",{});f(this,"categoriesById",{});f(this,"mvfLocationsByGeometryId",{});f(this,"locationIdsByNodeId",{});f(this,"spaceIdsByNodeId",{});f(this,"objectIdsByNodeId",{});f(this,"connectionsByExternalId",{});f(this,"locationsByExternalId",{});f(this,"categoriesByExternalId",{});f(this,"destinationNodesIdsBySpaceId",{});f(this,"mvfNodesByFloorId");f(this,"mvfSpacesByFloorId");f(this,"mvfPoisByFloorId");f(this,"mvfEntrancesByFloorId");f(this,"mvfAnnotationsByFloorId");f(this,"voidsByFloorId",{});f(this,"floorImagesByAnchorId",new Map);f(this,"localePacksUrls");f(this,"currentLanguage");f(this,"languagePacks",{});f(this,"tilesets",{});f(this,"navigationFlags");f(this,"binaryBundle");f(this,"envControl");f(this,"getMapDataOptions");M(this,Hs);M(this,Pa,new re(0,0,"initializing"));f(this,"propTranslationCache",new Map);M(this,wa);f(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(e,r,o)=>this.__LEGACY_GET_DIRECTIONS_SYNC(e,r,W(A({},o),{multiDestination:!0})));f(this,"__LEGACY_GET_DIRECTIONS_SYNC",(e,r,o)=>{let{accessible:a=!1,multiDestination:s=!1}=o||{},l=dm(this.enterpriseMode,o),c=(o==null?void 0:o.zones)||[],p={accessible:a,zones:c,smoothing:l,excludedConnections:(o==null?void 0:o.excludedConnections)||[],connectionIdWeightMap:(o==null?void 0:o.connectionIdWeightMap)||{}};if(s&&Array.isArray(r)){let d=Array.isArray(e)?e:[e],h=[];for(let y of r){let b=Array.isArray(y)?y:[y],I=this.directions.getDirectionsSync(d,b,p,this);if(!I){k.error("getDirections failed due to missing directions for one of the segments");return}d=b,h.push(I)}return h}else{let d=Array.isArray(e)?e:[e],h=Array.isArray(r)?r:[r];if(Array.isArray(h[0])){k.error("getDirections does not support multi-destination without multisegment option");return}d[0].id&&h[0].id&&this.Analytics.sendGetDirectionsEvent(d[0].id,h[0].id,a);try{return this.directions.getDirectionsSync(d,h,p,this)}catch(y){k.error("Unable to get directions",y);return}}});f(this,"getDirections",async(e,r,o)=>{let{accessible:a=!1}=o||{},s=dm(this.enterpriseMode,o),l=(o==null?void 0:o.zones)||[],c={accessible:a,zones:l,smoothing:s,excludedConnections:(o==null?void 0:o.excludedConnections)||[],connectionIdWeightMap:(o==null?void 0:o.connectionIdWeightMap)||{}},p=Array.isArray(e)?e:[e],d=Array.isArray(r)?r:[r];if(Array.isArray(d[0])){k.error("getDirections does not support multi-destination without multisegment option");return}p[0].id&&d[0].id&&this.Analytics.sendGetDirectionsEvent(p[0].id,d[0].id,a);try{return this.directions.getDirections(p,d,c,this)}catch(h){k.error("Unable to get directions",h);return}});f(this,"getDirectionsMultiDestination",async(e,r,o)=>Promise.resolve(this.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(e,r,o)));f(this,"getDoorByNodeId",e=>this.doorsByNodeId[e]);f(this,"transformImageRequest",async e=>{var o,a;if(this.enterpriseMode||!this.getMapDataOptions)return{url:e};if(!Jh(e))return{url:e};if(qh(e))return{url:e};let r=Vi(e);if(!r)return{url:e};try{let s=await((o=this.tokenManager)==null?void 0:o.getSasTokensAsync()),l=(a=s==null?void 0:s.tokens)==null?void 0:a[r.mapId];if(l==null)throw new Error("SAS token not found");let[c]=e.split("?");return{url:"".concat(c,"?").concat(l.token)}}catch(s){return k.error("Failed to append SAS token to image request. Requests for private images may fail.",s),{url:e}}});let o=(s=r==null?void 0:r.env)!=null?s:Kn();if(this.envControl=o,this.binaryBundle=r==null?void 0:r.binaryBundle,this.Analytics=new Oi,this.localePacksUrls=(l=r==null?void 0:r.localePacksUrls)!=null?l:{},this.mvf=e,this.outdoorViewToken=r==null?void 0:r.outdoorViewToken,this.getMapDataOptions=r==null?void 0:r.getMapDataOptions,E(this,Hs,r==null?void 0:r.mvf3),((c=e["tileset.json"])==null?void 0:c.default)!=null&&(this.tilesets[e["tileset.json"].default.key]=e["tileset.json"].default,o.updateTileServerBaseUrl(e["tileset.json"].default.url),e["tileset.json"].others!=null))for(let y of e["tileset.json"].others)this.tilesets[y.key]=y;this.navigationFlags=(p=e["navigationFlags.json"])!=null?p:{},this.enterpriseMode=(d=r==null?void 0:r.enterprise)!=null?d:!1,this.tokenManager=r==null?void 0:r.tokenManager;let a=dg(this,e,r==null?void 0:r.mvf3);if(this.nodesById=a.nodesById,this.spacesById=a.spacesById,this.floorsById=a.floorsById,this.floorStacksById=a.floorStacksById,this.facadesById=a.facadesById,this.facadesBySpaceId=a.facadesBySpaceId,this.connectionsById=a.connectionsById,this.objectsById=a.objectsById,this.doorsById=a.doorsById,this.pointsOfInterestById=a.poisById,this.annotationsById=a.annotationsById,this.areasById=a.areasById,this.locationProfilesById=a.locationProfilesById,this.locationCategoriesById=a.locationCategoriesById,this.locationProfilesByCategoryId=a.locationProfilesByCategoryId,this.locationCategoriesByParentId=a.locationCategoriesByParentId,this.spacesByExternalId=a.spacesByExternalId,this.nodesByExternalId=a.nodesByExternalId,this.objectsByExternalId=a.objectsByExternalId,this.floorsByExternalId=a.floorsByExternalId,this.locationProfilesByExternalId=a.locationProfilesByExternalId,this.floorStacksByExternalId=a.floorStacksByExternalId,this.poisByExternalId=a.poisByExternalId,this.doorsByExternalId=a.doorsByExternalId,this.areasByExternalId=a.areasByExternalId,this.mvfAnnotationsById=a.mvfAnnotationsById,this.mvfConnectionsById=a.mvfConnectionsById,this.mvfConnectionsByNodeId=a.mvfConnectionsByNodeId,this.mvfEntrancesById=a.mvfEntrancesById,this.mvfNodesById=a.mvfNodesById,this.mvfObstructionById=a.mvfObstructionById,this.mvfSpacesById=a.mvfSpacesById,this.mvfFloorsById=a.mvfFloorsById,this.mvfFloorStacksById=a.mvfFloorStacksById,this.mvfNodesByFloorId=a.mvfNodesByFloorId,this.mvfSpacesByFloorId=a.mvfSpacesByFloorId,this.mvfPoisByFloorId=a.mvfPoisByFloorId,this.mvfEntrancesByFloorId=a.mvfEntrancesByFloorId,this.mvfAnnotationsByFloorId=a.mvfAnnotationsByFloorId,this.mvfAreasById=a.mvfAreasById,this.doorsByNodeId=a.doorsByNodeId,this.objectEntranceNodeIdsByObstructionId=a.objectEntranceNodeIdsByObstructionId,this.obstructionIdByEntranceId=a.obstructionIdByEntranceId,this.locationProfilesByAttachedFeatureId=a.locationProfilesByAttachedFeatureId,this.entranceNodeIdsBySpaceId=a.entranceNodeIdsBySpaceId,this.spaceIdsByNodeId=a.spaceIdsByNodeId,this.objectIdsByNodeId=a.objectIdsByNodeId,this.destinationNodesIdsBySpaceId=a.destinationNodesIdsBySpaceId,this.voidsByFloorId=zv(e),this.enterpriseMode||Ws()){let y=pg(e,this);if(this.locationsById=y.locationsById,this.locationInstancesById=y.locationInstancesById,this.instanceLocationsByPolygonId=y.instanceLocationsByPolygonId,this.categoriesById=y.categoriesById,this.mvfLocationsByGeometryId=y.mvfLocationsByGeometryId,this.locationIdsByNodeId=y.locationIdsByNodeId,this.connectionsByExternalId=y.connectionsByExternalId,this.locationsByExternalId=y.locationsByExternalId,this.categoriesByExternalId=y.categoriesByExternalId,y.venue.name!=null){this.venue=new Wd(this,{mvfData:y.venue});let b={};for(let I in y.mvfLocationsById)b[I]=y.mvfLocationsById[I];for(let I in y.mvfLocationInstancesById)b[I]=y.mvfLocationInstancesById[I];this.languagePacks[this.venue.defaultLanguage.code]={type:"initial",optimized:{"enterprise-location":b,"enterprise-category":y.mvfCategoriesById,"floor-stack":a.mvfFloorStacksById,floor:a.mvfFloorsById}},(h=r==null?void 0:r.languagePacks)==null||h.forEach(({language:I,localePack:C})=>{this.languagePacks[I.code]=bd(C)}),this.currentLanguage=this.venue.defaultLanguage}}this.directions=new ba({nodes:e["node.geojson"],geojsonCollection:this.enterpriseMode&&e.enterprise?e.space:e.obstruction,connections:e["connection.json"],groupBy:"map",multiplicativeDistanceWeightScaling:!this.enterpriseMode,flagDeclarations:e["navigationFlags.json"],getDoorByNodeId:(y=>{let b=this.doorsByNodeId[y];if(b!=null)return{geoJSON:b.geoJSON}})}),this.Query=new Rs(this)}getEnv(){let e=this;return{get baseUri(){return e.envControl.getBaseUri()},get baseAuthUri(){return e.envControl.getBaseAuthUri()},get analyticsBaseUri(){return e.envControl.getAnalyticsBaseUri()},get tileServerUri(){return e.envControl.getTileServerUri()}}}get mapName(){return this.mvf["manifest.geojson"].features[0].properties.name}get organizationId(){var e;return(e=this.mvf["manifest.geojson"].features[0].properties.org_id)!=null?e:""}get mapCenter(){return i(this,Pa).floorId==="initializing"&&E(this,Pa,new re(this.mvf["manifest.geojson"].features[0].geometry.coordinates[1],this.mvf["manifest.geojson"].features[0].geometry.coordinates[0])),i(this,Pa)}get naturalBearing(){var e;return(e=this.mvf["manifest.geojson"].features[0].properties.naturalBearing)!=null?e:0}get spaces(){return i(this,fe).spaces==null&&(i(this,fe).spaces=globalThis.Object.values(this.spacesById)),i(this,fe).spaces}get objects(){return i(this,fe).objects==null&&(i(this,fe).objects=globalThis.Object.values(this.objectsById)),i(this,fe).objects}get connections(){return i(this,fe).connections==null&&(i(this,fe).connections=globalThis.Object.values(this.connectionsById)),i(this,fe).connections}get floors(){return i(this,fe).floors==null&&(i(this,fe).floors=globalThis.Object.values(this.floorsById)),i(this,fe).floors}get floorStacks(){return i(this,fe).floorStacks==null&&(i(this,fe).floorStacks=globalThis.Object.values(this.floorStacksById)),i(this,fe).floorStacks}get facades(){return i(this,fe).facades==null&&(i(this,fe).facades=globalThis.Object.values(this.facadesById)),i(this,fe).facades}get doors(){return i(this,fe).doors==null&&(i(this,fe).doors=globalThis.Object.values(this.doorsById)),i(this,fe).doors}get pointsOfInterest(){return i(this,fe).pointsOfInterest==null&&(i(this,fe).pointsOfInterest=globalThis.Object.values(this.pointsOfInterestById)),i(this,fe).pointsOfInterest}get annotations(){return i(this,fe).annotations==null&&(i(this,fe).annotations=globalThis.Object.values(this.annotationsById)),i(this,fe).annotations}get areas(){return i(this,fe).areas==null&&(i(this,fe).areas=globalThis.Object.values(this.areasById)),i(this,fe).areas}get nodes(){return i(this,fe).nodes==null&&(i(this,fe).nodes=globalThis.Object.values(this.nodesById)),i(this,fe).nodes}get locations(){return i(this,fe).locations==null&&(i(this,fe).locations=globalThis.Object.values(this.locationsById)),globalThis.Object.values(this.locationsById)}get categories(){return i(this,fe).categories==null&&(i(this,fe).categories=globalThis.Object.values(this.categoriesById)),globalThis.Object.values(this.categoriesById)}get locationProfiles(){return i(this,fe).locationProfiles==null&&(i(this,fe).locationProfiles=globalThis.Object.values(this.locationProfilesById)),i(this,fe).locationProfiles}get locationCategories(){return i(this,fe).locationCategories==null&&(i(this,fe).locationCategories=globalThis.Object.values(this.locationCategoriesById)),i(this,fe).locationCategories}get mvfFloors(){return i(this,fe).mvfFloors==null&&(i(this,fe).mvfFloors=globalThis.Object.values(this.mvfFloorsById)),i(this,fe).mvfFloors}get mvfFloorStacks(){return i(this,fe).mvfFloorStacks==null&&(i(this,fe).mvfFloorStacks=globalThis.Object.values(this.mvfFloorStacksById)),i(this,fe).mvfFloorStacks}getByType(e){switch(e){case"location-profile":return this.locationProfiles;case"location-category":return this.locationCategories;case"area":return this.areas;case"node":return this.nodes;case"space":return this.spaces;case"door":return this.doors;case"floor":return this.floors;case"floor-stack":return this.floorStacks;case"connection":return this.connections;case"object":return this.objects;case"point-of-interest":return this.pointsOfInterest;case"annotation":return this.annotations;case"enterprise-location":return this.locations;case"enterprise-category":return this.categories;case"enterprise-venue":return this.venue;case"facade":return this.facades;default:return[]}}getAllOfTypes(e,r){let o=e instanceof Set?e:new Set(e);return r!=null&&Array.isArray(r)?r.filter(a=>o.has(a.__type)):Array.from(o).flatMap(a=>this.getByType(a))}getById(e,r){let o={"location-profile":this.locationProfilesById,"location-category":this.locationCategoriesById,space:this.spacesById,floor:this.floorsById,"floor-stack":this.floorStacksById,facade:this.facadesById,node:this.nodesById,door:this.doorsById,connection:this.connectionsById,"mvf-connection":this.mvfConnectionsById,object:this.objectsById,"point-of-interest":this.pointsOfInterestById,annotation:this.annotationsById,area:this.areasById,"enterprise-location":l=>{var c;return(c=this.locationsById[l])!=null?c:this.locationInstancesById[l]},"enterprise-category":this.categoriesById},a=l=>{let c=o[l];if(c!=null)return typeof c=="function"?c(r):c[r]},s=()=>{for(let l of Object.keys(o)){let c=a(l);if(c!=null)return c}};return e==="unknown"?s():a(e)}getByExternalId(e,r){var o,a,s,l,c,p,d,h,y,b,I,C;switch(e){case"location-profile":return(o=this.locationProfilesByExternalId[r])!=null?o:[];case"location-category":return[];case"space":return(a=this.spacesByExternalId[r])!=null?a:[];case"floor":return(s=this.floorsByExternalId[r])!=null?s:[];case"floor-stack":return(l=this.floorStacksByExternalId[r])!=null?l:[];case"node":return(c=this.nodesByExternalId[r])!=null?c:[];case"door":return(p=this.doorsByExternalId[r])!=null?p:[];case"connection":return(d=this.connectionsByExternalId[r])!=null?d:[];case"object":return(h=this.objectsByExternalId[r])!=null?h:[];case"point-of-interest":return(y=this.poisByExternalId[r])!=null?y:[];case"area":return(b=this.areasByExternalId[r])!=null?b:[];case"enterprise-location":return(I=this.locationsByExternalId[r])!=null?I:[];case"enterprise-category":return(C=this.categoriesByExternalId[r])!=null?C:[];default:return[]}}getMapDataById(e){var r,o,a,s,l,c,p,d,h,y;return(y=(h=(d=(p=(c=(l=(s=(a=(o=(r=this.spacesById[e])!=null?r:this.floorsById[e])!=null?o:this.floorStacksById[e])!=null?a:this.facadesById[e])!=null?s:this.nodesById[e])!=null?l:this.doorsById[e])!=null?c:this.connectionsById[e])!=null?p:this.objectsById[e])!=null?d:this.pointsOfInterestById[e])!=null?h:this.annotationsById[e])!=null?y:this.areasById[e]}getMVFFeatureById(e,r){switch(e){case"space":return this.mvfSpacesById[r];case"node":return this.mvfNodesById[r];case"obstruction":return this.mvfObstructionById[r];case"floor":return this.mvfFloorsById[r];case"floor-stack":return this.mvfFloorStacksById[r];case"connection":return this.mvfConnectionsById[r];case"entrance":return this.mvfEntrancesById[r];case"annotation":return this.mvfAnnotationsById[r];case"area":return this.mvfAreasById[r];default:throw new Error("Unknown MVF feature type: ".concat(e))}}getMVFFeatureByNodeId(e,r){switch(e){case"connection":return this.mvfConnectionsByNodeId[r];default:throw new Error("Unsupported MVF feature type: ".concat(e))}}getMVFFeatureByType(e){switch(e){case"floor-stack":return this.mvfFloorStacks;case"floor":return this.mvfFloors;default:throw new Error("Unsupported MVF feature type: ".concat(e))}}getPropTranslation(e,r,o,a){var c,p;if(!this.currentLanguage)return a;let{code:s}=this.currentLanguage,l=(p=(c=this.languagePacks[s])==null?void 0:c.optimized)==null?void 0:p[e];if(l){let d=l[o];if(d!=null&&d[r]!==void 0){let h=d[r];if(h!=null&&typeof h=="object"){if(typeof a=="object"&&typeof h=="object"&&!Array.isArray(h)){let y=ql(s+e+o+r.toString());if(this.propTranslationCache.has(y))return this.propTranslationCache.get(y);let b=zf(a,h,["id"]);return this.propTranslationCache.set(y,b),b}return h}return h}}return a}findPreferredLanguage(e){if(!this.venue)return;let r=du(this.venue,e);return(e==null?void 0:e.languageCode)!=null&&e.languageCode.toLowerCase()!==r.code.toLowerCase()&&k.warn('Language code "'.concat(e.languageCode,'" could not be found in the venue. Using "').concat(r.code,'" instead.')),r}async changeLanguage(e){var l;let r=e.toLowerCase();if(!r){k.error("Language code must be defined.");return}if(!this.currentLanguage||!this.venue){k.error("Changing the language is not supported for this map.");return}let o=this.currentLanguage.code,a=(l=this.venue)==null?void 0:l.languages.find(({code:c})=>c.toLowerCase()===r.toLowerCase());if(!a){k.warn('Language code "'.concat(r,'" could not be found in the venue.'));return}if(o===a.code)return;let s=this.languagePacks[a.code];if(!s){let c=this.localePacksUrls[a.code];if(!c){k.error('Locale pack URL not found for language code "'.concat(a.code,'".'));return}i(this,wa)&&i(this,wa).abort();let p=new AbortController;E(this,wa,p);let d;try{d=await Xh(c,{signal:p.signal})}catch(h){k.error('Failed to download language pack for language code "'.concat(a.code,'".'),h);return}if(!d||p.signal.aborted)return;s=bd(d),this.languagePacks[a.code]=s}this.Analytics.sendChangeLanguageEvent({fromLanguage:this.currentLanguage.code}),this.currentLanguage=a,this.publish("language-change",this.currentLanguage)}getDistance(e,r){let o=ro(e),a=ro(r);return qn([o.longitude,o.latitude],[a.longitude,a.latitude])}async toJSONBundle({downloadLanguagePacks:e=!0}={}){var o;let r=[];if(e&&this.enterpriseMode){let a=new AbortController;for(let s of((o=this.venue)==null?void 0:o.languages)||[])try{if(this.localePacksUrls[s.code]){let l=await pd(this.localePacksUrls[s.code],{signal:a.signal}),c=await ki(l);c&&r.push({language:{code:s.code,name:s.name},localePack:c})}}catch(l){k.warn("failed downloading language pack",l)}}return{type:"json",options:{enterprise:this.enterpriseMode,mvf3:i(this,Hs)},languagePacks:r,main:this.mvf}}async toBinaryBundle({downloadLanguagePacks:e=!0}={}){var o;if(!this.binaryBundle){k.error("binary bundle not found");return}let r=[];if(e&&this.enterpriseMode){let a=new AbortController;for(let s of((o=this.venue)==null?void 0:o.languages)||[])try{if(this.localePacksUrls[s.code]){let l=await pd(this.localePacksUrls[s.code],{signal:a.signal});l&&r.push({language:{code:s.code,name:s.name},localePack:l})}}catch(l){k.warn("failed downloading language pack",l)}}return{type:"binary",options:{enterprise:this.enterpriseMode},languagePacks:r,main:this.binaryBundle}}destroy(){for(let e of globalThis.Object.keys(i(this,fe)))i(this,fe)[e]=null;this.propTranslationCache.clear()}};fe=new WeakMap,Hs=new WeakMap,Pa=new WeakMap,wa=new WeakMap;var dm=(n,t)=>{var c,p;let e=!n,r=t==null?void 0:t.smoothing,a=r!=null?typeof r=="object"?(c=r.enabled)!=null?c:e:r:e,s=typeof r=="object"?r.radius:void 0,l=typeof r=="object"&&(p=r.__EXPERIMENTAL_METHOD)!=null?p:"greedy-los";return l==="dp-optimal"?{enabled:a,radius:s!=null?s:pu,__EXPERIMENTAL_METHOD:"dp-optimal",includeDoorBufferNodes:typeof r=="object"&&r.__EXPERIMENTAL_METHOD==="dp-optimal"?r.__EXPERIMENTAL_INCLUDE_DOOR_BUFFER_NODES:void 0}:l==="rdp"?{enabled:a,radius:s!=null?s:pu,__EXPERIMENTAL_METHOD:"rdp",mustIncludeDoorBufferNodes:typeof r=="object"&&r.__EXPERIMENTAL_METHOD==="rdp"?r.__EXPERIMENTAL_MUST_INCLUDE_DOOR_BUFFER_NODES:void 0}:{enabled:a,radius:s!=null?s:pu,__EXPERIMENTAL_METHOD:l}};m();m();m();m();m();var zs=class zs{constructor(t,e,r){f(this,"id");f(this,"text");f(this,"target");f(this,"__type",zs.__type);this.id=t,this.text=e,this.target=r}static is(t){return t.__type===zs.__type}get focusTarget(){return this.target.anchorTarget}get navigationTarget(){return this.target.anchorTarget}};f(zs,"__type","label");var An=zs;m();var si,Oa=class Oa{constructor(t,e,r){f(this,"id");M(this,si);f(this,"__type",Oa.__type);f(this,"contentEl");this.id=t,this.contentEl=e,E(this,si,r)}get target(){return i(this,si)}get coordinate(){return i(this,si).anchorTarget}get navigationTarget(){return this.target.anchorTarget}toJSON(){return{id:this.id,__type:Oa.__type,target:this.target,coordinate:this.coordinate}}static is(t){return t.__type===Oa.__type}get focusTarget(){return this.target.anchorTarget}updateTarget(t){E(this,si,t)}};si=new WeakMap,f(Oa,"__type","marker");var ln=Oa;m();var mo,Da=class Da{constructor(t,e,r){f(this,"id");f(this,"groupId");f(this,"__type",Da.__type);M(this,mo);this.id=t,this.groupId=e,E(this,mo,r)}get target(){return i(this,mo)}static is(t){return t.__type===Da.__type}updateTarget(t){E(this,mo,t)}toJSON(){return{id:this.id,__type:Da.__type,groupId:this.groupId,target:i(this,mo)}}get navigationTarget(){return i(this,mo).anchorTarget}};mo=new WeakMap,f(Da,"__type","model");var li=Da;m();var ci,$s=class $s{constructor(t,e){f(this,"id");f(this,"coordinates");M(this,ci);f(this,"__type",$s.__type);this.id=t,this.coordinates=e}static is(t){return t.__type===$s.__type}get isConnectionSegment(){return this.coordinates.length===2&&this.coordinates[0].floorId!==this.coordinates[1].floorId}get distance(){return i(this,ci)?i(this,ci):(E(this,ci,Td(this.coordinates)),i(this,ci))}get focusTarget(){return this.coordinates}};ci=new WeakMap,f($s,"__type","path-segment");var yo=$s,pi,Aa=class Aa{constructor(t,e,r,o){f(this,"id");f(this,"animation");f(this,"coordinates");f(this,"segments");M(this,pi);f(this,"__type",Aa.__type);this.id=t,this.animation=e,this.coordinates=r,this.segments=o.map(({id:a,coordinates:s})=>new yo(a.toString(),s))}static is(t){return t.__type===Aa.__type}get focusTarget(){return this.coordinates}get distance(){return i(this,pi)?i(this,pi):(E(this,pi,Td(this.coordinates)),i(this,pi))}toJSON(){return{__type:Aa.__type,id:this.id,coordinates:this.coordinates,segments:this.segments}}};pi=new WeakMap,f(Aa,"__type","path");var jr=Aa;m();var $v=7,bo,di,Xs=class{constructor(t,e){M(this,bo);M(this,di);var r;E(this,bo,t),E(this,di,(r=e==null?void 0:e.precision)!=null?r:$v)}toJSON(){return{center:this.center,bearing:this.bearing,pitch:this.pitch,zoomLevel:this.zoomLevel}}get center(){let t=i(this,bo).center;if(i(this,di)===-1)return t;let e=tc(t.latitude,i(this,di)),r=tc(t.longitude,i(this,di));return new re({latitude:e,longitude:r,floorId:t.floorId,verticalOffset:t.verticalOffset})}get bearing(){return i(this,bo).bearing}get pitch(){return i(this,bo).pitch}get zoomLevel(){return tc(i(this,bo).zoomLevel,5)}};bo=new WeakMap,di=new WeakMap;m();var Ys=class Ys{constructor(t){f(this,"id");f(this,"__type",Ys.__type);this.id=t}static is(t){return t.__type===Ys.__type}get focusTarget(){return this}};f(Ys,"__type","shape");var Fn=Ys;m();var Zs=class Zs{constructor(t,e){f(this,"id");f(this,"target");f(this,"__type",Zs.__type);this.id=t,this.target=e}static is(t){return t.__type===Zs.__type}};f(Zs,"__type","text-3d");var kn=Zs;m();m();m();var Xv=new Map([["search-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7C13 8.29583 12.5892 9.49572 11.8907 10.4765L15.4614 14.0472C15.6567 14.2425 15.6567 14.559 15.4614 14.7543L14.7543 15.4614C14.559 15.6567 14.2424 15.6567 14.0472 15.4614L10.4765 11.8907C9.49571 12.5892 8.29583 13 7 13C3.68629 13 1 10.3137 1 7ZM7 11C4.79086 11 3 9.20914 3 7C3 4.79086 4.79086 3 7 3C9.20914 3 11 4.79086 11 7C11 9.20914 9.20914 11 7 11Z"\n stroke="none"\n />\n </svg>'],["close-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M12.5963 1.98959C12.7916 1.79433 13.1082 1.79433 13.3034 1.98959L14.0105 2.6967C14.2058 2.89196 14.2058 3.20855 14.0105 3.40381L3.40392 14.0104C3.20866 14.2057 2.89208 14.2057 2.69682 14.0104L1.98971 13.3033C1.79445 13.108 1.79445 12.7915 1.98971 12.5962L12.5963 1.98959Z"\n stroke="none"\n />\n <path\n d="M1.98971 3.40381C1.79445 3.20855 1.79445 2.89196 1.98971 2.6967L2.69682 1.98959C2.89208 1.79433 3.20866 1.79433 3.40392 1.98959L14.0105 12.5962C14.2058 12.7915 14.2058 13.108 14.0105 13.3033L13.3034 14.0104C13.1082 14.2057 12.7916 14.2057 12.5963 14.0104L1.98971 3.40381Z"\n stroke="none"\n />\n </svg>'],["empty-64x40",'<svg viewBox="0 0 64 40">\n <g>\n <g clipPath="url(#clip0_499_175492)">\n <path\n d="M32 39.7032C49.6731 39.7032 64 36.5925 64 32.7552C64 28.9179 49.6731 25.8071 32 25.8071C14.3269 25.8071 0 28.9179 0 32.7552C0 36.5925 14.3269 39.7032 32 39.7032Z"\n stroke="none"\n fill="#F5F5F5"\n />\n <path\n d="M55 13.6653L44.854 2.24866C44.367 1.47048 43.656 1 42.907 1H21.093C20.344 1 19.633 1.47048 19.146 2.24767L9 13.6663V22.8367H55V13.6653Z"\n fill="none"\n />\n <path\n d="M41.613 16.8128C41.613 15.2197 42.607 13.9046 43.84 13.9036H55V31.9059C55 34.0132 53.68 35.7402 52.05 35.7402H11.95C10.32 35.7402 9 34.0122 9 31.9059V13.9036H20.16C21.393 13.9036 22.387 15.2167 22.387 16.8098V16.8317C22.387 18.4248 23.392 19.7111 24.624 19.7111H39.376C40.608 19.7111 41.613 18.4128 41.613 16.8198V16.8128Z"\n fill="#FAFAFA"\n />\n </g>\n <defs>\n <clipPath id="clip0_499_175492">\n <rect width="64" height="40" fill="white" />\n </clipPath>\n </defs>\n </g>\n </svg>'],["caret-12x12",'<svg viewBox="0 0 12 12">\n <path\n stroke="none"\n d="M8.38828 5.78337L3.92578 1.93493C3.75938 1.79196 3.51562 1.92087 3.51562 2.15173V9.84861C3.51562 10.0795 3.75938 10.2084 3.92578 10.0654L8.38828 6.21696C8.51602 6.10681 8.51602 5.89353 8.38828 5.78337Z"\n />\n </svg>'],["plus-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M7.5 1C7.22386 1 7 1.22386 7 1.5V7H1.5C1.22386 7 1 7.22386 1 7.5L1 8.5C1 8.77614 1.22386 9 1.5 9H7V14.5C7 14.7761 7.22386 15 7.5 15H8.5C8.77614 15 9 14.7761 9 14.5V9H14.5C14.7761 9 15 8.77614 15 8.5V7.5C15 7.22386 14.7761 7 14.5 7H9V1.5C9 1.22386 8.77614 1 8.5 1H7.5Z"\n stroke="none"\n />\n </svg>'],["recenter-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M0 2.5C0 2.22386 0.223858 2 0.5 2H1.5C1.77614 2 2 2.22386 2 2.5V13.5C2 13.7761 1.77614 14 1.5 14H0.5C0.223858 14 0 13.7761 0 13.5V2.5Z" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M4.5 4C4.22386 4 4 4.22386 4 4.5V11.5C4 11.7761 4.22386 12 4.5 12H11.5C11.7761 12 12 11.7761 12 11.5V4.5C12 4.22386 11.7761 4 11.5 4H4.5ZM6 6V10H10V6H6Z"\n />\n <path d="M14.5 2C14.2239 2 14 2.22386 14 2.5V13.5C14 13.7761 14.2239 14 14.5 14H15.5C15.7761 14 16 13.7761 16 13.5V2.5C16 2.22386 15.7761 2 15.5 2H14.5Z" />\n </g>\n </svg>'],["minus-16x16",'<svg viewBox="0 0 16 16">\n <path\n d="M1.5 9C1.22386 9 1 8.77614 1 8.5L1 7.5C1 7.22386 1.22386 7 1.5 7L14.5 7C14.7761 7 15 7.22386 15 7.5V8.5C15 8.77614 14.7761 9 14.5 9L1.5 9Z"\n stroke="none"\n />\n </svg>'],["logo-horizontal-206x48",'<svg viewBox="0 0 206 48">\n <path d="M27.2678 14.2261H22.3187C21.0695 14.2261 20.4695 14.7801 20.4695 15.9852V31.142L10.3966 15.5591C9.69665 14.4784 9.2475 14.2773 7.8475 14.2261H2.97462C1.67462 14.2261 1.07631 14.7801 1.07631 15.9852V44.7665C1.07631 45.9716 1.67462 46.5256 2.97462 46.5256H7.92377C9.22207 46.5256 9.82207 45.9716 9.82207 44.7665V29.6847L19.9441 45.1926C20.695 46.3244 21.095 46.5256 22.4933 46.5256H27.2933C28.5916 46.5256 29.1916 45.9716 29.1916 44.7665V15.9852C29.1407 14.7801 28.5424 14.2261 27.2678 14.2261Z" />\n <path d="M5.44915 10.9602C8.45863 10.9602 10.8983 8.50669 10.8983 5.48011C10.8983 2.45353 8.45863 0 5.44915 0C2.43967 0 0 2.45353 0 5.48011C0 8.50669 2.43967 10.9602 5.44915 10.9602Z" />\n <path d="M61.7899 25.0449C63.2306 23.1903 65.078 22.2051 67.556 22.2051C72.0526 22.2051 74.7611 25.3347 74.7611 29.4511V39.2489C74.8187 39.7125 74.5306 39.9443 74.0695 39.9443H72.5136C72.0526 39.9443 71.7645 39.7125 71.8221 39.2489V29.5091C71.8221 27.1909 69.9187 25.2187 67.4984 25.2187C65.1339 25.2187 63.2323 27.1329 63.2323 29.2773V39.2489C63.2899 39.7125 63.0018 39.9443 62.5407 39.9443H60.9831C60.5221 39.9443 60.2916 39.7125 60.2916 39.2489V29.4511C60.2916 27.1329 58.3899 25.2187 56.0255 25.2187C53.7204 25.2187 51.7594 27.075 51.7594 29.2773V39.3068C51.817 39.7705 51.5289 40.0023 51.0102 40.0023H49.5119C49.0509 40.0023 48.7628 39.7705 48.7628 39.3068V23.25C48.7051 22.7864 48.9933 22.4966 49.5119 22.4966H50.9526C51.356 22.4966 51.5289 22.6704 51.5289 23.0182V24.2352C52.7407 22.9602 54.239 22.2648 56.0255 22.2648C58.4475 22.2068 60.3492 23.192 61.7899 25.0466V25.0449ZM77.1255 31.2477C77.1255 26.3216 81.1018 22.2051 86.1187 22.2051C88.539 22.2051 90.6136 23.1903 92.3441 25.1608V23.1903C92.3441 22.7267 92.5746 22.5528 93.0357 22.5528H94.4187C94.8797 22.5528 95.1102 22.7847 95.1102 23.3062V39.3648C95.1102 39.8284 94.8797 40.0602 94.4187 40.0602H93.0357C92.5746 40.0602 92.3441 39.8284 92.3441 39.4227V37.4523C90.6712 39.3648 88.5967 40.35 86.1746 40.35C81.1018 40.2341 77.1238 36.1773 77.1238 31.2477H77.1255ZM92.1136 31.2477C92.1136 27.8284 89.4611 25.2187 86.0594 25.2187C82.7746 25.2187 80.1221 27.8864 80.1221 31.2477C80.1221 34.6687 82.7746 37.2784 86.1187 37.2784C86.9062 37.2789 87.6861 37.1232 88.4138 36.8202C89.1414 36.5173 89.8026 36.0731 90.3593 35.513C90.9161 34.9528 91.3577 34.2878 91.6587 33.556C91.9597 32.8241 92.1143 32.0397 92.1136 31.2477ZM100.992 37.3943V46.3807C101.049 46.8443 100.761 47.1341 100.298 47.1341H98.7424C98.2814 47.1341 97.9933 46.9023 97.9933 46.3807V23.1903C97.9933 22.7267 98.2238 22.4369 98.7424 22.4369H100.183C100.646 22.379 100.934 22.6687 100.934 23.0744V24.9869C102.605 23.0744 104.68 22.1472 107.044 22.1472C112.002 22.1472 116.037 26.2619 116.037 31.1898C116.037 36.1176 112.059 40.2341 107.044 40.2341C104.622 40.2341 102.603 39.3068 100.992 37.3943ZM106.987 25.2187C103.7 25.2187 101.049 27.8864 101.049 31.2477C101.049 34.6687 103.7 37.2784 107.044 37.2784C110.446 37.2784 113.039 34.6108 113.039 31.2477C113.039 27.8864 110.388 25.2187 106.987 25.2187ZM121.11 37.3943V46.3807C121.168 46.8443 120.88 47.1341 120.419 47.1341H118.861C118.4 47.1341 118.112 46.9023 118.112 46.3807V23.1903C118.112 22.7267 118.342 22.4369 118.861 22.4369H120.302C120.764 22.379 121.053 22.6687 121.053 23.0744V24.9869C122.724 23.0744 124.798 22.1472 127.163 22.1472C132.12 22.1472 136.156 26.2619 136.156 31.1898C136.156 36.1176 132.178 40.2341 127.163 40.2341C124.742 40.2341 122.781 39.3068 121.11 37.3943ZM127.105 25.2187C123.819 25.2187 121.168 27.8864 121.168 31.2477C121.168 34.6687 123.819 37.2784 127.163 37.2784C130.564 37.2784 133.158 34.6108 133.158 31.2477C133.158 27.8864 130.507 25.2187 127.107 25.2187H127.105ZM153.97 32.3506H141.054C141.342 35.2483 143.995 37.4523 147.164 37.4523C148.893 37.4523 150.393 37.0466 151.719 36.0597C152.007 35.8858 152.295 35.7699 152.353 35.7699C152.583 35.7699 152.756 35.8858 152.929 36.1773L153.505 37.1625C153.622 37.3364 153.68 37.4523 153.68 37.5682C153.68 37.8 153.507 38.0318 153.103 38.3216C151.258 39.5966 149.183 40.292 146.992 40.292C141.688 40.292 137.883 36.3511 137.883 31.2477C137.883 26.204 141.803 22.2051 146.703 22.2051C151.546 22.2051 154.717 25.7983 154.717 31.0176C154.717 31.5972 154.717 32.3506 153.968 32.3506H153.97ZM141.056 30.0324H151.72C151.432 26.8432 149.473 24.929 146.648 24.929C145.241 24.8904 143.875 25.3995 142.833 26.3501C141.791 27.3007 141.154 28.6194 141.056 30.0307V30.0324ZM156.332 31.2477C156.332 26.3216 160.31 22.2051 165.326 22.2051C167.748 22.2051 169.707 23.1324 171.32 25.0449V16.2324C171.263 15.7687 171.551 15.479 172.012 15.479H173.57C174.031 15.479 174.319 15.7108 174.319 16.2324V39.3068C174.319 39.7705 174.088 40.0023 173.57 40.0023H172.129C171.666 40.0602 171.378 39.7705 171.378 39.3648V37.3943C169.649 39.3068 167.632 40.292 165.268 40.292C160.31 40.2341 156.332 36.1773 156.332 31.2477ZM171.264 31.2477C171.264 27.8284 168.612 25.2187 165.21 25.2187C161.924 25.2187 159.273 27.8864 159.273 31.2477C159.273 34.6687 161.924 37.2784 165.268 37.2784C166.057 37.2838 166.839 37.1316 167.569 36.8304C168.299 36.5292 168.962 36.0852 169.52 35.5241C170.077 34.963 170.519 34.296 170.818 33.5619C171.117 32.8277 171.268 32.0411 171.263 31.2477H171.264ZM177.72 19.0739C177.715 18.8594 177.754 18.646 177.833 18.4468C177.912 18.2476 178.031 18.0667 178.182 17.915C178.333 17.7633 178.512 17.6439 178.71 17.5642C178.909 17.4845 179.121 17.446 179.334 17.4511C179.546 17.4507 179.756 17.4923 179.952 17.5737C180.148 17.6551 180.326 17.7746 180.476 17.9254C180.626 18.0762 180.745 18.2553 180.826 18.4523C180.907 18.6494 180.948 18.8606 180.948 19.0739C180.953 19.2884 180.914 19.5017 180.835 19.7009C180.756 19.9001 180.637 20.081 180.486 20.2327C180.335 20.3845 180.156 20.5038 179.957 20.5835C179.759 20.6633 179.547 20.7017 179.334 20.6966C178.412 20.7545 177.72 20.0591 177.72 19.0739ZM177.836 39.2489V23.1903C177.836 22.7267 178.066 22.4369 178.527 22.4369H180.083C180.544 22.4369 180.832 22.6687 180.775 23.1903V39.2489C180.832 39.7125 180.544 39.9443 180.083 39.9443H178.527C178.066 39.9443 177.836 39.7125 177.836 39.2489ZM186.944 23.0165V24.1756C188.212 22.8426 189.71 22.2051 191.497 22.2051C195.937 22.2051 198.646 25.2767 198.646 29.3932V39.2489C198.703 39.7125 198.415 39.9443 197.954 39.9443H196.398C195.936 39.9443 195.705 39.7125 195.705 39.2489V29.4511C195.705 27.1329 193.803 25.2187 191.439 25.2187C189.134 25.2187 187.175 27.075 187.175 29.2773V39.3068C187.232 39.7705 186.944 40.0023 186.424 40.0023H184.868C184.407 40.0023 184.119 39.7705 184.119 39.3068V23.1903C184.061 22.7267 184.349 22.4949 184.868 22.4949H186.309C186.712 22.4949 186.944 22.6687 186.944 23.0165Z" />\n <path d="M204 40C205.115 40 206 39.0857 206 38V37.9886C206 36.9029 205.126 36 204 36C202.885 36 202 36.9143 202 38V38.0114C202 39.0971 202.874 40 204 40ZM204 39.7829C202.989 39.7829 202.23 38.9829 202.23 38.0114V38C202.23 37.0286 203 36.2171 204 36.2171C205.011 36.2171 205.77 37.0171 205.77 37.9886V38C205.77 38.9714 205 39.7829 204 39.7829ZM203.218 38.9714H203.609V38.2743H204.034L204.517 38.9714H204.989L204.448 38.2057C204.724 38.1257 204.92 37.92 204.92 37.5886C204.92 37.1657 204.586 36.9486 204.138 36.9486H203.218V38.9714ZM203.609 37.9543V37.2914H204.103C204.368 37.2914 204.517 37.4057 204.517 37.6229C204.517 37.8171 204.368 37.9543 204.103 37.9543H203.609Z" />\n </svg>'],["share-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M13 6C14.6569 6 16 4.65685 16 3C16 1.34315 14.6569 0 13 0C11.3431 0 10 1.34315 10 3C10 3.13463 10.0089 3.26719 10.0261 3.39712L6.82972 5.17286C6.10576 4.44825 5.10523 4 4 4C1.79086 4 0 5.79086 0 8C0 10.2091 1.79086 12 4 12C5.10523 12 6.10576 11.5518 6.82972 10.8271L10.0261 12.6029C10.0089 12.7328 10 12.8654 10 13C10 14.6569 11.3431 16 13 16C14.6569 16 16 14.6569 16 13C16 11.3431 14.6569 10 13 10C12.2011 10 11.4752 10.3123 10.9376 10.8214L7.84579 9.1037C7.94622 8.75313 8 8.38284 8 8C8 7.61716 7.94622 7.24687 7.84579 6.8963L10.9376 5.17864C11.4752 5.68775 12.2011 6 13 6ZM13 4C13.5523 4 14 3.55228 14 3C14 2.44772 13.5523 2 13 2C12.4477 2 12 2.44772 12 3C12 3.55228 12.4477 4 13 4ZM4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10ZM14 13C14 13.5523 13.5523 14 13 14C12.4477 14 12 13.5523 12 13C12 12.4477 12.4477 12 13 12C13.5523 12 14 12.4477 14 13Z"\n stroke="none"\n />\n </svg>'],["checkmark-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M15.387 3.31662C15.6008 3.49148 15.6323 3.80649 15.4574 4.02021L6.77402 14.6332C6.58509 14.8642 6.30292 14.9986 6.00457 15C5.70622 15.0013 5.42285 14.8694 5.23184 14.6402L0.551937 9.02429C0.375155 8.81215 0.403817 8.49687 0.615956 8.32009L1.38418 7.67991C1.59632 7.50312 1.9116 7.53179 2.08838 7.74392L5.99299 12.4295L13.9095 2.75374C14.0844 2.54002 14.3994 2.50852 14.6131 2.68338L15.387 3.31662Z"\n stroke="none"\n />\n </svg>'],["arrow-right-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.35355 1.64645C8.54881 1.45118 8.8654 1.45118 9.06066 1.64645L14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L9.06066 14.3536C8.8654 14.5488 8.54882 14.5488 8.35355 14.3536L7.64645 13.6464C7.45118 13.4512 7.45118 13.1346 7.64645 12.9393L11.5858 9H0.5C0.223858 9 0 8.77614 0 8.5V7.5C0 7.22386 0.223858 7 0.5 7H11.5858L7.64645 3.06066C7.45118 2.8654 7.45118 2.54882 7.64645 2.35355L8.35355 1.64645Z"\n stroke="none"\n />\n </svg>'],["arrow-up-16x16",'<svg viewBox="0 0 16 16">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"\n stroke="none"\n />\n </svg>'],["connection-stairs-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M1 11.5C1 11.2239 1.22386 11 1.5 11H6V13.5C6 13.7761 5.77614 14 5.5 14H1.5C1.22386 14 1 13.7761 1 13.5V11.5Z" />\n <path d="M4 8.5C4 8.22386 4.22386 8 4.5 8H9V10.5C9 10.7761 8.77614 11 8.5 11H4V8.5Z" />\n <path d="M7 5.5C7 5.22386 7.22386 5 7.5 5H12V7.5C12 7.77614 11.7761 8 11.5 8H7V5.5Z" />\n <path d="M10 2.5C10 2.22386 10.2239 2 10.5 2H14.5C14.7761 2 15 2.22386 15 2.5V4.5C15 4.77614 14.7761 5 14.5 5H10V2.5Z" />\n </g>\n </svg>'],["connection-stairs-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M5.25 12H2.5C2.225 12 2 11.7429 2 11.4286C2 11.1143 2.225 10.8571 2.5 10.8571H4.25V7.91429H6.5V4.94286H8.75V2H11.5C11.775 2 12 2.25714 12 2.57143C12 2.88571 11.775 3.14286 11.5 3.14286H9.75V6.08571H7.5V9.02857H5.25V12Z"\n stroke="none"\n />\n </svg>'],["connection-stairs-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />\n <path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />\n <path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />\n <path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />\n </svg>'],["connection-escalator-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M3.63008 12H2C0.895431 12 0 12.8954 0 14C0 15.1046 0.89543 16 2 16H4.63008C4.86879 16 5.09962 15.9146 5.28087 15.7593L11.7191 10.2407C11.9004 10.0854 12.1312 10 12.3699 10H14C15.1046 10 16 9.10457 16 8C16 6.89543 15.1046 6 14 6H11.3699C11.1312 6 10.9004 6.08539 10.7191 6.24074L4.28087 11.7593C4.09962 11.9146 3.86879 12 3.63008 12Z" />\n <path d="M5 6C5 4.89543 5.89543 4 7 4C8.10457 4 9 4.89543 9 6L5 9.5V6Z" />\n <path d="M9 2C9 3.10457 8.10457 4 7 4C5.89543 4 5 3.10457 5 2C5 0.89543 5.89543 0 7 0C8.10457 0 9 0.89543 9 2Z" />\n </g>\n </svg>'],["connection-escalator-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M5.26686 2.98522C5.26686 2.44335 5.71573 2 6.26436 2C6.81299 2 7.26187 2.44335 7.26187 2.98522C7.26187 3.5271 6.81299 3.97045 6.26436 3.97045C5.71573 3.97045 5.26686 3.50246 5.26686 2.98522Z"\n stroke="none"\n />\n <path\n d="M7.26188 5.48588V5.25125C7.26188 4.85716 6.91275 4.53696 6.48881 4.53696H6.03993C5.61599 4.53696 5.26687 4.88179 5.26687 5.25125V7.66458L4.3192 8.6995H3.67082C2.74813 8.6995 2 9.43842 2 10.3498C2 11.2611 2.74813 12 3.67082 12H4.61845C5.36658 12 6.11471 11.6798 6.61347 11.1133L9.6808 7.76354H10.3292C11.2519 7.76354 12 7.02463 12 6.11329C12 5.20196 11.2519 4.46305 10.3292 4.46305H9.38155C8.60848 4.46305 7.88529 4.78324 7.38653 5.34975L7.26188 5.48588ZM4.61846 11.0148H3.67083C3.29677 11.0148 2.99751 10.7192 2.99751 10.3498C2.99751 9.9803 3.29677 9.68473 3.67083 9.68473H4.61846C4.71821 9.68473 4.81796 9.63547 4.86784 9.56158L8.13467 5.99015C8.45886 5.64532 8.90774 5.44828 9.38155 5.44828H10.3292C10.7032 5.44828 11.0025 5.74384 11.0025 6.1133C11.0025 6.48276 10.7032 6.77833 10.3292 6.77833H9.38155C9.2818 6.77833 9.18205 6.82759 9.13218 6.87685L5.86534 10.4729C5.54115 10.8177 5.09228 11.0148 4.61846 11.0148Z"\n stroke="none"\n />\n </svg>'],["connection-elevator-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path d="M3 5.5C3 6.32843 2.32843 7 1.5 7C0.671573 7 0 6.32843 0 5.5C0 4.67157 0.671573 4 1.5 4C2.32843 4 3 4.67157 3 5.5Z" />\n <path d="M3 10.5C3 11.3284 2.32843 12 1.5 12C0.671573 12 0 11.3284 0 10.5C0 9.67157 0.671573 9 1.5 9C2.32843 9 3 9.67157 3 10.5Z" />\n <path d="M11 1H14C14.5523 1 15 1.44772 15 2V14C15 14.5523 14.5523 15 14 15H11V1Z" />\n <path d="M9 1H6C5.44772 1 5 1.44772 5 2V14C5 14.5523 5.44772 15 6 15H9V1Z" />\n </g>\n </svg>'],["connection-elevator-14x14",'<svg viewBox="0 0 14 14">\n <path\n d="M7.476 2H2.72693C1.77095 2 1 2.72464 1 3.62319V10.3768C1 11.2754 1.77095 12 2.72693 12H7.476C8.43198 12 9.20293 11.2754 9.20293 10.3768V3.62319C9.17209 2.72464 8.40114 2 7.476 2ZM7.476 3.15942C7.75354 3.15942 7.96941 3.36232 7.96941 3.62319V10.3768C7.96941 10.6377 7.75354 10.8406 7.476 10.8406H5.71824V3.15942H7.476ZM4.48472 3.15942V10.8406H2.72693C2.44939 10.8406 2.23352 10.6377 2.23352 10.3768V3.62319C2.23352 3.36232 2.44939 3.15942 2.72693 3.15942H4.48472Z"\n stroke="none"\n />\n <path\n d="M12.4643 6.19064H10.6638C10.4456 6.19064 10.2546 6.06243 10.1728 5.88294C10.0909 5.70346 10.1455 5.47269 10.2819 5.31884L11.1821 4.47269C11.4004 4.26756 11.755 4.26756 11.946 4.47269L12.8462 5.31884C13.0099 5.47269 13.0371 5.67781 12.9553 5.88294C12.8735 6.08807 12.6825 6.19064 12.4643 6.19064Z"\n stroke="none"\n />\n <path\n d="M11.564 9.65216C11.4276 9.65216 11.2912 9.60088 11.1821 9.49831L10.2819 8.65216C10.1182 8.49831 10.0909 8.29319 10.1728 8.08806C10.2546 7.90857 10.4456 7.78036 10.6638 7.78036H12.4643C12.6825 7.78036 12.8735 7.90857 12.9553 8.08806C13.0371 8.26754 12.9826 8.49831 12.8462 8.65216L11.9459 9.49831C11.8641 9.60088 11.7004 9.65216 11.564 9.65216Z"\n stroke="none"\n />\n </svg>'],["connection-elevator-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <circle cx="1.9375" cy="4.4375" r="0.9375" />\n <circle cx="1.9375" cy="7.5625" r="0.9375" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"\n />\n </svg>'],["new-tab-14x14",'<svg viewBox="0 0 14 14">\n <g stroke="none">\n <path d="M2.625 2.625H5.6875C5.92913 2.625 6.125 2.42912 6.125 2.1875V1.3125C6.125 1.07088 5.92913 0.875 5.6875 0.875H1.3125C1.07088 0.875 0.875 1.07088 0.875 1.3125V12.6875C0.875 12.9291 1.07088 13.125 1.3125 13.125H12.6875C12.9291 13.125 13.125 12.9291 13.125 12.6875V8.3125C13.125 8.07088 12.9291 7.875 12.6875 7.875H11.8125C11.5709 7.875 11.375 8.07088 11.375 8.3125V11.375H2.625V2.625Z" />\n <path d="M12.9063 0.875H8.40311C8.20822 0.875 8.11063 1.11062 8.24843 1.24843L9.88124 2.88124L5.8156 6.94688C5.64475 7.11774 5.64475 7.39475 5.8156 7.5656L6.43432 8.18432C6.60517 8.35517 6.88218 8.35517 7.05304 8.18432L11.1187 4.11868L12.7516 5.75157C12.8894 5.88938 13.125 5.79178 13.125 5.59689V1.09375C13.125 0.972938 13.0271 0.875 12.9063 0.875Z" />\n </g>\n </svg>'],["compress-16x16",'<svg viewBox="0 0 16 16">\n <g stroke="none">\n <path\n id="Vector"\n d="M4.67773 10.7154H0.713449C0.556306 10.7154 0.427734 10.844 0.427734 11.0011V11.8583C0.427734 12.0154 0.556306 12.144 0.713449 12.144H3.82059V15.2868C3.82059 15.444 3.94916 15.5725 4.10631 15.5725H4.96345C5.12059 15.5725 5.24916 15.444 5.24916 15.2868V11.2868C5.24916 10.9708 4.99381 10.7154 4.67773 10.7154ZM4.96345 0.429688H4.10631C3.94916 0.429688 3.82059 0.558259 3.82059 0.715402V3.85826H0.713449C0.556306 3.85826 0.427734 3.98683 0.427734 4.14397V5.00112C0.427734 5.15826 0.556306 5.28683 0.713449 5.28683H4.67773C4.99381 5.28683 5.24916 5.03147 5.24916 4.7154V0.715402C5.24916 0.558259 5.12059 0.429688 4.96345 0.429688ZM15.2849 10.7154H11.3206C11.0045 10.7154 10.7492 10.9708 10.7492 11.2868V15.2868C10.7492 15.444 10.8777 15.5725 11.0349 15.5725H11.892C12.0492 15.5725 12.1777 15.444 12.1777 15.2868V12.144H15.2849C15.442 12.144 15.5706 12.0154 15.5706 11.8583V11.0011C15.5706 10.844 15.442 10.7154 15.2849 10.7154ZM15.2849 3.85826H12.1777V0.715402C12.1777 0.558259 12.0492 0.429688 11.892 0.429688H11.0349C10.8777 0.429688 10.7492 0.558259 10.7492 0.715402V4.7154C10.7492 5.03147 11.0045 5.28683 11.3206 5.28683H15.2849C15.442 5.28683 15.5706 5.15826 15.5706 5.00112V4.14397C15.5706 3.98683 15.442 3.85826 15.2849 3.85826Z"\n />\n </g>\n </svg>'],["washroom-14x14",'<svg viewBox="0 0 14 14" stroke="none">\n <path d="M4.55125 3.09062C4.55125 3.69326 4.07639 4.18176 3.49058 4.18176C2.90525 4.18176 2.43039 3.69326 2.43039 3.09062C2.43039 2.4885 2.90525 2 3.49058 2C4.07639 2 4.55125 2.4885 4.55125 3.09062Z" />\n <path d="M5.1193 5.48047C4.81653 4.83116 4.17252 4.41571 3.47822 4.41571C2.78392 4.41571 2.13986 4.83116 1.83714 5.48047L1.04175 7.22034C0.940664 7.441 1.02893 7.70073 1.24393 7.81791C1.47077 7.90871 1.72324 7.81791 1.82433 7.59725L2.49349 6.15554L2.21587 11.4407C2.20305 11.7263 2.41805 11.9734 2.69567 11.9993C2.97329 12.0124 3.21344 11.7913 3.23859 11.5057L3.4028 8.285H3.567L3.73121 11.5057C3.74403 11.7913 3.97086 11.9993 4.23616 11.9993H4.26131C4.53893 11.9861 4.75343 11.7395 4.74111 11.4407L4.46349 6.15554L5.13265 7.59725C5.20858 7.75298 5.35997 7.85697 5.52418 7.85697C5.5873 7.85697 5.65042 7.84379 5.71354 7.81792C5.92804 7.71393 6.0163 7.44153 5.91572 7.22035L5.1193 5.48047Z" />\n <path d="M12.9582 7.22034L12.1505 5.48047C11.8477 4.83116 11.2037 4.41571 10.5094 4.41571C9.81513 4.41571 9.17107 4.83116 8.86836 5.48047L8.06064 7.22034C7.95955 7.441 8.04782 7.70073 8.26282 7.81791C8.47732 7.9219 8.7298 7.8311 8.84371 7.60993L9.52519 6.12977L9.46207 7.2204L8.57842 8.92184C8.47733 9.11663 8.61638 9.36316 8.83089 9.36316H9.33584L9.22242 11.4668C9.2096 11.7397 9.41177 11.9862 9.68939 11.9994C9.95469 12.0126 10.1943 11.8046 10.2072 11.519L10.3581 9.33723H10.6737L10.7871 11.5058C10.7999 11.7787 11.0144 11.9862 11.2792 11.9862H11.3043C11.5696 11.973 11.7841 11.7396 11.7713 11.4535L11.6579 9.33718H12.1628C12.3773 9.33718 12.5287 9.09066 12.4153 8.89586L11.5317 7.19442L11.4685 6.1038L12.1757 7.5972C12.2516 7.75293 12.403 7.85692 12.5672 7.85692C12.6303 7.85692 12.6934 7.84373 12.7566 7.81786C12.9711 7.70068 13.0593 7.44102 12.9582 7.22034Z" />\n <path d="M11.5696 3.09062C11.5696 3.69326 11.0948 4.18176 10.5094 4.18176C9.92363 4.18176 9.44876 3.69326 9.44876 3.09062C9.44876 2.4885 9.92363 2 10.5094 2C11.0948 2 11.5696 2.4885 11.5696 3.09062Z" />\n <path d="M6.99996 2.00006C6.76031 2.00006 6.57095 2.19485 6.57095 2.44138V11.5575C6.57095 11.804 6.76031 11.9988 6.99996 11.9988C7.2396 11.9988 7.42896 11.804 7.42896 11.5575V2.44138C7.42896 2.19485 7.2396 2.00006 6.99996 2.00006Z" />\n </svg>'],["point-of-interest-12x12",'<svg viewBox="0 0 12 12" stroke="none">\n <path\n stroke="none"\n id="Subtract"\n // Do not change these to fillRule or clipRule, since they need to be rendered as actual SVGs in labels, not React SVGs\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"\n />\n </svg>'],["flag-20x20",'<svg viewBox="0 0 20 20" stroke="none">\n <path\n d="M16.9987 4.27111C16.936 5.06715 16.3836 5.93162 15.5238 6.57845C14.7549 7.15682 13.0885 8.04927 10.5434 7.55174C8.32167 7.1164 6.82156 8.02129 6.08085 10.2416L8.24615 17.3998C8.31833 17.6471 8.17711 17.9059 7.9292 17.9813C7.88527 17.9938 7.83976 18 7.79426 18C7.58634 18 7.40277 17.8647 7.34236 17.6673L5.1644 10.4686C5.13773 10.4173 5.12125 10.3613 5.11419 10.3038L3.41956 4.70042C3.38112 4.63512 3.35994 4.56127 3.3568 4.48587L3.02101 3.37886C2.98413 3.25992 2.9959 3.13165 3.05553 3.02203C3.11437 2.91242 3.21479 2.83079 3.33482 2.79504C3.45564 2.75928 3.5851 2.7725 3.69494 2.83235C3.80477 2.89144 3.88637 2.99172 3.92167 3.11143L3.9813 3.31355C4.38847 2.85956 4.90472 2.51439 5.48136 2.30915C6.97201 1.75566 8.95216 1.95467 10.6469 2.83156C11.6888 3.36951 14.3374 4.54493 16.3647 3.79553C16.5154 3.74111 16.684 3.76599 16.8127 3.86239C16.9406 3.95879 17.0105 4.11251 16.9987 4.27111Z"\n stroke="none"\n />\n </svg>'],["link-16x16",'<svg viewBox="0 0 16 16" stroke="none">\n <path\n d="M9.10678 11.2433C9.07993 11.2167 9.04367 11.2018 9.00589 11.2018C8.9681 11.2018 8.93184 11.2167 8.90499 11.2433L6.82999 13.3183C5.86928 14.279 4.24785 14.3808 3.18714 13.3183C2.12464 12.2558 2.22642 10.6362 3.18714 9.67546L5.26214 7.60046C5.31749 7.5451 5.31749 7.45403 5.26214 7.39868L4.55142 6.68796C4.52457 6.66138 4.48832 6.64646 4.45053 6.64646C4.41274 6.64646 4.37649 6.66138 4.34964 6.68796L2.27464 8.76296C0.763923 10.2737 0.763923 12.7183 2.27464 14.2272C3.78535 15.7362 6.22999 15.738 7.73892 14.2272L9.81392 12.1522C9.86928 12.0969 9.86928 12.0058 9.81392 11.9505L9.10678 11.2433ZM13.7246 2.77903C12.2139 1.26832 9.76928 1.26832 8.26035 2.77903L6.18357 4.85403C6.15698 4.88088 6.14207 4.91714 6.14207 4.95493C6.14207 4.99271 6.15698 5.02897 6.18357 5.05582L6.89249 5.76475C6.94785 5.8201 7.03892 5.8201 7.09428 5.76475L9.16928 3.68975C10.13 2.72903 11.7514 2.62725 12.8121 3.68975C13.8746 4.75225 13.7729 6.37189 12.8121 7.3326L10.7371 9.4076C10.7106 9.43445 10.6956 9.47071 10.6956 9.5085C10.6956 9.54628 10.7106 9.58254 10.7371 9.60939L11.4479 10.3201C11.5032 10.3755 11.5943 10.3755 11.6496 10.3201L13.7246 8.2451C15.2336 6.73439 15.2336 4.28975 13.7246 2.77903ZM9.75142 6.00939C9.72457 5.9828 9.68832 5.96789 9.65053 5.96789C9.61275 5.96789 9.57649 5.9828 9.54964 6.00939L5.50499 10.0522C5.47841 10.0791 5.46349 10.1154 5.46349 10.1531C5.46349 10.1909 5.47841 10.2272 5.50499 10.254L6.21214 10.9612C6.26749 11.0165 6.35857 11.0165 6.41392 10.9612L10.4568 6.91832C10.5121 6.86296 10.5121 6.77189 10.4568 6.71653L9.75142 6.00939Z"\n stroke="none"\n />\n </svg>']]),Yv=/<svg([^>]*)>/g;function um(n,t,e){let r=Xv.get(n);return r?r.replace(Yv,'<svg$1 style="fill:'.concat(t,"; width:").concat(e,"px; height:").concat(e,'px">')):""}var Zv=n=>'\n <div class="pin-shadow" style="background: '.concat(n,'"></div>\n <svg width="').concat(20*.9,'px" height="').concat(48*.9,'px" viewBox="0 0 20 48">\n <path\n d="M1.37965 29.3246C1.5778 31.2167 2.27661 33.0694 3.83078 33.775C4.0998 37.1861 4.7451 40.2227 5.65918 42.4784C6.14556 43.6787 6.72883 44.71 7.41453 45.4578C8.10027 46.2056 8.97065 46.7527 9.99989 46.7527C11.0292 46.7527 11.8995 46.2055 12.585 45.4576C13.2706 44.7098 13.8536 43.6785 14.3398 42.4783C15.2536 40.2226 15.8988 37.186 16.1688 33.7752C17.7232 33.0697 18.422 31.2169 18.6201 29.3247C18.8386 27.2385 18.5165 24.6502 17.6475 22.0285L17.6473 22.0278C16.9657 19.9761 16.0319 18.1622 14.9848 16.7474C17.0884 15.1587 18.4471 12.5964 18.4471 9.7152C18.4471 4.93539 14.6967 1 9.99966 1C5.30272 1 1.54993 4.93527 1.54993 9.7152C1.54993 12.5961 2.90839 15.1583 5.01167 16.747C3.9635 18.1625 3.03185 19.977 2.3522 22.0286C1.48319 24.6503 1.16118 27.2385 1.37965 29.3246Z"\n fill="').concat(n,'"\n stroke="white"\n strokeWidth="2"\n />\n </svg>\n '),Jv=n=>'\n <div class="pin-shadow" style="background: '.concat(n,'"></div>\n <svg width="36" height="42" viewBox="-2 -2 40 46">\n <path\n d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"\n fill="none"\n stroke="white"\n strokeWidth="4"\n />\n <path\n d="M35.8372 5.86776C35.6765 7.92448 34.2625 10.158 32.0612 11.8292C30.0929 13.3235 25.8269 15.6292 19.3114 14.3438C13.6237 13.219 9.78333 15.5569 7.88708 21.2934L13.4303 39.7879C13.6151 40.4267 13.2536 41.0955 12.6189 41.2903C12.5064 41.3225 12.39 41.3385 12.2735 41.3385C11.7412 41.3385 11.2712 40.989 11.1166 40.4789L5.54093 21.88C5.47265 21.7474 5.43047 21.6028 5.41239 21.4542L1.07409 6.97696C0.975678 6.80825 0.921449 6.61744 0.913417 6.42263L0.053779 3.56251C-0.0406172 3.2552 -0.0104927 2.92379 0.142154 2.64058C0.29279 2.35738 0.549874 2.14649 0.857157 2.05411C1.16646 1.96172 1.49786 1.99587 1.77906 2.15052C2.06025 2.30317 2.26912 2.56226 2.35951 2.87155L2.51215 3.39375C3.55453 2.22081 4.87615 1.32902 6.35237 0.798742C10.1685 -0.631292 15.2377 -0.117113 19.5763 2.14846C22.2435 3.53834 29.0241 6.57524 34.2141 4.63904C34.5998 4.49845 35.0316 4.56272 35.361 4.81178C35.6884 5.06083 35.8673 5.45801 35.8372 5.86776Z"\n fill="').concat(n,'"\n />\n </svg>\n '),uu="#722ED1",fu="#1890FF",fm=({type:n="departure",color:t=fu,animated:e})=>{let r=e===!1?"":"dropped-pin-wrapper";return'<div class="'.concat(r,'">\n ').concat(n==="departure"?Zv(t):Jv(t),"\n </div>")},qv=n=>{switch(n){case"default":return 28;case"selection":return 28;case"navigation":return 32}},hm=({type:n="stairs",color:t=uu,direction:e="up",animated:r})=>{let o=qv("default"),a=o/2+2,s=e&&e!=="none";return'<div class="mappedin-connection-marker">\n <div class="connection-circle"\n role="button"\n style="background:'.concat(t,"; width:").concat(o,"px; height:").concat(o,'px;"\n >\n ').concat(um("connection-"+n+"-16x16","white",a)||"","\n </div>\n ").concat(s?'<div style="margin-left: -'.concat(o*.2,'px;">\n <div class="').concat(r===!1?"":"bouncey",'">\n <div class="connection-circle"\n role="button"\n style="width: ').concat(o,"px; height: ").concat(o,'px;">\n <div class="').concat(e==="up"?"":"arrow--down",'">\n <svg viewBox="0 0 16 16" style="fill: white; width: ').concat(a,"px; height: ").concat(a,'px">\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M8.00015 0.5C8.34685 0.5 8.67835 0.642318 8.91714 0.893677L15.6517 7.98267C15.8441 8.18525 15.8359 8.50548 15.6333 8.69793L14.533 9.7433C14.3304 9.93575 14.0101 9.92754 13.8177 9.72496L9.26497 4.93262V15.4249C9.26497 15.7043 9.03846 15.9308 8.75904 15.9308H7.24125C6.96184 15.9308 6.73532 15.7043 6.73532 15.4249V4.93262L2.1826 9.72496C1.99015 9.92754 1.66992 9.93575 1.46734 9.7433L0.366945 8.69793C0.164367 8.50548 0.156156 8.18525 0.348604 7.98267L7.08315 0.893677C7.32194 0.642318 7.65344 0.5 8.00015 0.5Z"\n stroke="none"\n />\n </svg>\n </div>\n </div>\n </div>\n </div>'):"","\n </div>")};m();var gm=63710088e-1,Rc=new WeakMap,mm=async n=>new Promise(t=>setTimeout(t,n));function Vc(n,t,e){let r=n.distance,o=eI(n,t,e);return o?(r-(o==null?void 0:o.distance))/r:0}function hu(n,t){if(n.coordinates.length===0)return[];if(Rc.has(n)&&Rc.get(n).has(t))return Rc.get(n).get(t);let e=n.coordinates.map(r=>jc(r,t));return Rc.set(n,new Map([[t,e]])),e}function jc(n,t){let e=t.latitude,r=t.longitude,o=n.latitude-e,a=n.longitude-r,s=Math.PI*gm/180,l=s*Math.cos(e*Math.PI/180),c=a*l,p=o*s;return{x:c,y:p}}function Qv(n,t){if(n.length===0)return;let e,r=1/0;for(let o=0;o<n.length;o++){let a=n[o],s=hu(a,t);for(let l=0;l<s.length-1;l++){let c=s[l],p=s[l+1],d=Gc(c,p,{x:0,y:0}),h=xi({x:0,y:0},d);h<r&&(r=h,e=d)}}if(e)return Kv(e,t)}function Gc(n,t,e){let r=t.x-n.x,o=t.y-n.y,a=e.x-n.x,s=e.y-n.y,l=r*r+o*o;if(l===0)return{x:n.x,y:n.y};let c=(a*r+s*o)/l,p=Math.max(0,Math.min(1,c));return{x:n.x+p*r,y:n.y+p*o}}function Kv(n,t){let r=Math.PI*gm/180,o=r*Math.cos(t.latitude*Math.PI/180),a=n.y/r,s=n.x/o,l=t.latitude+a,c=t.longitude+s;return new re({latitude:l,longitude:c,floorId:t.floorId,verticalOffset:t.verticalOffset})}function eI(n,t,e){let r=Qv([n],t);if(!r)return;let o=hu(n,e),a=jc(r,e),s=-1,l=1/0;for(let p=0;p<o.length-1;p++){let d=o[p],h=o[p+1],y=Gc(d,h,a),b=xi(y,a);b<1&&b<l&&(l=b,s=p)}if(s===-1){let p=0,d=1/0;for(let h=0;h<o.length;h++){let y=o[h],b=xi(y,a);b<d&&(d=b,p=h)}s=Math.max(0,p-1)}let c=[r];for(let p=s+1;p<n.coordinates.length;p++)c.push(n.coordinates[p]);return new yo("".concat(n.id,"_remaining"),c)}function Uc(n,t,e,r){var h;let o,a,s=1/0,l=1/0,c=jc(t,r),p=jc(e,r);for(let y of n)for(let b of y.segments){if(b.isConnectionSegment)continue;let I=(h=b.coordinates[0])==null?void 0:h.floorId,C=I===t.floorId,P=I===e.floorId;if(!C&&!P)continue;let O=hu(b,r);if(C){let U=1/0;for(let H=0;H<O.length-1;H++){let V=O[H],B=O[H+1],q=Gc(V,B,c),N=xi(q,c);N<U&&(U=N)}U<s&&(s=U,o=b)}if(P){let U=1/0;for(let H=0;H<O.length-1;H++){let V=O[H],B=O[H+1],q=Gc(V,B,p),N=xi(q,p);N<U&&(U=N)}U<l&&(l=U,a=b)}}if(!o||!a)return;let d=[];if(o.id===a.id)return d.push({segment:o,startHighlightFraction:Vc(o,t,r),endHighlightFraction:Vc(a,e,r)}),d;for(let y of n)for(let b of y.segments)b.id===o.id?d.push({segment:b,startHighlightFraction:Vc(b,t,r),endHighlightFraction:1}):b.id===a.id?d.push({segment:b,startHighlightFraction:0,endHighlightFraction:Vc(b,e,r)}):d.push({segment:b,startHighlightFraction:0,endHighlightFraction:1});return d}var ym=.01,bm=.02,vm={drawDuration:1e3,color:"#40A9FF",interactive:!1,accentColor:"blue",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},tI={drawDuration:1e3,color:"#B3DDFF",interactive:!1,accentColor:"#40A9FF",width:{on:"zoom-level",input:[17,22],output:[2,.5]},displayArrowsOnPath:!1,animateArrowsOnPath:!1},vo={setMapOnConnectionClick:!0,setMapToDeparture:!0,createMarkers:{departure:!0,destination:!0,connection:!0},pathOptions:vm,inactivePathOptions:tI,markerOptions:{departureColor:fu,destinationColor:uu},animatePathDrawing:!0};function Im(n){let t=A({},n);return t.__EXPERIMENTAL_ENDCAP_EXTENSION=[0,0],n.__EXPERIMENTAL__CONNECTION_COLOR!==void 0&&(t.color=n.__EXPERIMENTAL__CONNECTION_COLOR),n.__EXPERIMENTAL__CONNECTION_BILLBOARDING!==void 0&&(t.__EXPERIMENTAL_BILLBOARDING=n.__EXPERIMENTAL__CONNECTION_BILLBOARDING),n.__EXPERIMENTAL__CONNECTION_JUNCTION_INSET!==void 0&&(t.__EXPERIMENTAL_JUNCTION_INSET=n.__EXPERIMENTAL__CONNECTION_JUNCTION_INSET),n.__EXPERIMENTAL__CONNECTION_DASHED!==void 0&&(t.dashed=n.__EXPERIMENTAL__CONNECTION_DASHED),n.__EXPERIMENTAL__CONNECTION_GEOMETRY!==void 0&&(t.__EXPERIMENTAL_GEOMETRY=n.__EXPERIMENTAL__CONNECTION_GEOMETRY),t}var rI=W(A({},vo),{connectionPathOptions:Im(vm)}),Ln,br,Oe,Se,Nn,ui,et,Zt,vr,Io,Ee,Tm,Sm,gu,mu,Js,Mm,yu,qs,Hc,Fa,bu,ka,Qs=class{constructor(t){M(this,Ee);M(this,Ln,new Map);M(this,br,new Map);M(this,Oe);M(this,Se,rI);M(this,Nn);M(this,ui);M(this,et,[]);M(this,Zt);M(this,vr,new Map);M(this,Io,new Map);M(this,ka,t=>{var e;if((e=i(this,Se).createMarkers)!=null&&e.connection&&t.markers!=null&&t.markers.length>0){let{instruction:r}=i(this,Ln).get(t.markers[0].id);r!=null&&r.action.toFloor&&(i(this,Se).setMapOnConnectionClick&&i(this,Oe).setFloor(r.action.toFloor.id,"navigation-connection-click"),i(this,Oe).publish("navigation-connection-click",{instruction:r,fromFloor:r.action.fromFloor,toFloor:r.action.toFloor}))}});E(this,Oe,t)}get isMultiFloor(){if(!i(this,et).length)return!1;let t=new Set;for(let e of i(this,et))for(let r of e.coordinates)if(r.floorId&&(t.add(r.floorId),t.size>1))return!0;return!1}getPathById(t){return i(this,br).get(t)}getMarkerById(t){return i(this,Ln).get(t)}get paths(){let t=new Set;return i(this,br).forEach(e=>t.add(e)),Array.from(t)}get activeDirections(){return i(this,Io).get(i(this,Zt))}get activePath(){if(i(this,Zt))return i(this,br).get(i(this,Zt).id)}get floorStacks(){let t=i(this,Oe).getMapData();if(!i(this,et).length||!t)return[];let e=new Set;for(let r of i(this,et))for(let o of r.coordinates)if(o.floorId){let a=t.getById("floor",o.floorId);a&&e.add(a.floorStack)}return Array.from(e)}get floors(){let t=i(this,Oe).getMapData();if(!i(this,et).length||!t)return[];let e=new Set;for(let r of i(this,et))for(let o of r.coordinates)if(o.floorId){let a=t.getById("floor",o.floorId);a&&e.add(a)}return Array.from(e)}setActivePathByIndex(t){let e=i(this,et)[t];if(!i(this,et).length){k.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!i(this,et)[t]){k.warn("Direction #".concat(t," does not exist"));return}let r=i(this,vr).get(e);if(!r){k.warn("The direction is not a part of muli-direcional path");return}Y(this,Ee,Hc).call(this,r)}setActivePath(t){if(!i(this,et).length){k.warn("Cannot set an active path before drawing. Call Navigation.draw() first.");return}if(!i(this,Io).get(t)){k.warn('Path "'.concat(t.id,'" is not a part of muli-direcional path'));return}Y(this,Ee,Hc).call(this,t)}setActivePathByDirections(t){if(!i(this,et).length){k.warn("[setActivePathByDirections] Cannot set an active path before drawing. Call Navigation.draw() first.");return}let e=i(this,vr).get(t);if(!e){let r=i(this,et).find(o=>o.id===t.id);if(!r){k.warn("[setActivePathByDirections] Cannot find directions for id");return}e=i(this,vr).get(r)}if(!e){k.warn("[setActivePathByDirections] Cannot find path for directions");return}Y(this,Ee,Hc).call(this,e)}clearHighlightedPathSection(){for(let t of this.paths)for(let e of t.segments)i(this,Oe).updateState(e,{highlightCompleteFraction:0})}highlightPathSection(t,e,r){var d;let o=(d=r==null?void 0:r.animationDuration)!=null?d:1500,a=i(this,Oe).getMapData().mapCenter,s=Uc(this.paths,t,e,a);if(!s)return;this.clearHighlightedPathSection();let l=s.map(h=>{var y,b;return i(this,Oe).updateState(h.segment,{highlightStartFraction:h.startHighlightFraction,highlightEndFraction:h.endHighlightFraction,highlightColor:(y=r==null?void 0:r.color)!=null?y:"red",highlightWidthMultiplier:(b=r==null?void 0:r.widthMultiplier)!=null?b:1}),new vn({fraction:0}).to({fraction:1},o).onUpdate(I=>{i(this,Oe).updateState(h.segment,{highlightCompleteFraction:I.fraction})})}),c=()=>{},p=new Promise(h=>{c=h});return l.length>0&&(l.forEach((h,y)=>{y<l.length-1&&h.chain(l[y+1]),i(this,Oe).tweenGroup().add(l[y])}),l[0].start(),l[l.length-1].onComplete(()=>{i(this,Oe).tweenGroup().remove(l[l.length-1]),c()})),{animation:p}}drawSync(t,e={}){var l,c,p;i(this,ui)&&this.clear(),E(this,ui,!0),Y(this,Ee,yu).call(this,e);let r=Array.isArray(t)?t:[t],o=r[0],a=r[r.length-1],s=o.coordinates[0];E(this,et,r),s.floorId&&i(this,Se).setMapToDeparture&&i(this,Oe).setFloor(s.floorId),(l=i(this,Se).createMarkers)!=null&&l.departure&&Y(this,Ee,Fa).call(this,"departure",o.instructions[0]);for(let d=0;d<r.length;d++){let h=r[d],y=d?A({},i(this,Se).inactivePathOptions):A({},i(this,Se).pathOptions);if(h.coordinates.length<2){k.warn("Directions must have at least 2 coordinates");return}let b=W(A({},i(this,Se).connectionPathOptions),{animateDrawing:i(this,Se).animatePathDrawing,verticalOffset:Y(this,Ee,Js).call(this,d===0?"active":"inactive")}),I=Y(this,Ee,gu).call(this,h.coordinates,W(A({},y),{animateDrawing:i(this,Se).animatePathDrawing,verticalOffset:Y(this,Ee,Js).call(this,d===0?"active":"inactive")}),b);i(this,vr).set(h,I),i(this,Io).set(I,h),(c=i(this,Se).createMarkers)!=null&&c.connection&&Y(this,Ee,bu).call(this,h.instructions,"connection"),d===0&&(E(this,Zt,i(this,vr).get(i(this,et)[0])),i(this,Oe).externalPubSub.on("click",i(this,ka)))}(p=i(this,Se).createMarkers)!=null&&p.destination&&Y(this,Ee,Fa).call(this,"destination",a.instructions[a.instructions.length-1]),i(this,Oe).mapObjects.forEach(d=>{d.processFloorChange(d.currentFloorId)}),Y(this,Ee,qs).call(this)}async draw(t,e={}){i(this,Nn)&&this.clear(),Y(this,Ee,yu).call(this,e);let r=Array.isArray(t)?t:[t],a=r[0].coordinates[0];return E(this,et,r),a.floorId&&i(this,Se).setMapToDeparture&&i(this,Oe).setFloor(a.floorId),Y(this,Ee,Mm).call(this,r)}clear(){i(this,Ln).forEach(t=>{t!=null&&t.marker&&i(this,Oe).currentMap.Markers.remove(t.marker.id.toString())}),i(this,Ln).clear(),i(this,br).forEach(t=>{i(this,Oe).currentMap.Paths.remove(t.segments.map(e=>e.id.toString()))}),i(this,br).clear(),i(this,Nn)&&(i(this,Nn).cancel(),E(this,Nn,void 0)),i(this,ui)&&E(this,ui,!1),E(this,et,[]),i(this,vr).clear(),i(this,Io).clear(),E(this,Zt,void 0),i(this,Oe).externalPubSub.off("click",i(this,ka)),i(this,Oe).mapObjects.forEach(t=>{t.processFloorChange(t.currentFloorId)}),Y(this,Ee,qs).call(this)}};Ln=new WeakMap,br=new WeakMap,Oe=new WeakMap,Se=new WeakMap,Nn=new WeakMap,ui=new WeakMap,et=new WeakMap,Zt=new WeakMap,vr=new WeakMap,Io=new WeakMap,Ee=new WeakSet,Tm=function(t){return t!=null&&["TakeConnection","ExitConnection","TakeVortex","ExitVortex"].includes(t.type)},Sm=function(){if(!i(this,Zt))return;let t=i(this,br).get(i(this,Zt).id);if(t){for(let e of i(this,br).values())if(e.id.includes("internal-"))if(e.id===i(this,Zt).id)for(let r of t.segments)i(this,Oe).updateState(r,{verticalOffset:bm});else i(this,Oe).updateState(e,{verticalOffset:ym})}},gu=function(t,e,r){var l,c;let o=(c=(l=e.id)==null?void 0:l.toString())!=null?c:xe(),a=i(this,Oe).currentMap.Paths.add(t,e,r),s=new jr(o,a.animation,t,a.paths);i(this,br).set(o,s);for(let p of a.paths)i(this,br).set(p.id.toString(),s);return s},mu=function(t,e,r=!1){let o=i(this,Se).markerOptions.animated,a=i(this,Oe).currentMap.Markers.add(t.coordinate,e,{interactive:r,placement:"top",rank:"always-visible",animated:o}),s=i(this,Oe).currentMap.Markers.getContentEl(a.id.toString());if(!s)throw new Error("marker component should exist");return new ln(a.id.toString(),s,t.coordinate)},Js=function(t){var e,r,o,a;return t==="active"?bm+((r=(e=i(this,Se).pathOptions)==null?void 0:e.verticalOffset)!=null?r:0):ym+((a=(o=i(this,Se).inactivePathOptions)==null?void 0:o.verticalOffset)!=null?a:0)},Mm=function(t){let e=t[0],r=t[t.length-1],o=!1;return E(this,Nn,{promise:new Promise(async a=>{var s,l,c;if(x.env.NODE_ENV!=="test"&&await mm(500),o||!t.length){a();return}(s=i(this,Se).createMarkers)!=null&&s.departure&&Y(this,Ee,Fa).call(this,"departure",e.instructions[0]);for(let p=0;p<t.length;p++){let d=t[p],h=p===0?A({},i(this,Se).pathOptions):A({},i(this,Se).inactivePathOptions);if(d.coordinates.length<2){k.warn("Directions must have at least 2 coordinates"),a();return}let y=W(A({},i(this,Se).connectionPathOptions),{animateDrawing:i(this,Se).animatePathDrawing,verticalOffset:Y(this,Ee,Js).call(this,p===0?"active":"inactive")}),b=Y(this,Ee,gu).call(this,d.coordinates,W(A({},h),{animateDrawing:i(this,Se).animatePathDrawing,verticalOffset:Y(this,Ee,Js).call(this,p===0?"active":"inactive")}),y);if(i(this,vr).set(d,b),i(this,Io).set(b,d),p===0&&(E(this,Zt,i(this,vr).get(i(this,et)[0])),i(this,Oe).externalPubSub.on("click",i(this,ka))),x.env.NODE_ENV!=="test"&&await b.animation,o){a();return}(l=i(this,Se).createMarkers)!=null&&l.connection&&Y(this,Ee,bu).call(this,d.instructions,"connection")}if((c=i(this,Se).createMarkers)!=null&&c.destination&&Y(this,Ee,Fa).call(this,"destination",r.instructions[r.instructions.length-1]),o){a();return}i(this,Oe).mapObjects.forEach(p=>{p.processFloorChange(p.currentFloorId)}),Y(this,Ee,qs).call(this),a()}),cancel:()=>{o=!0}}),i(this,Nn).promise},yu=function(t){var r,o,a;let e=A(A({},vo.pathOptions),t.pathOptions);E(this,Se,{setMapOnConnectionClick:(r=t.setMapOnConnectionClick)!=null?r:vo.setMapOnConnectionClick,setMapToDeparture:(o=t.setMapToDeparture)!=null?o:vo.setMapToDeparture,pathOptions:e,inactivePathOptions:A(A({},vo.inactivePathOptions),t.inactivePathOptions),connectionPathOptions:Im(e),createMarkers:A(A({},vo.createMarkers),t.createMarkers),markerOptions:A(A({},vo.markerOptions),t.markerOptions),animatePathDrawing:(a=t.animatePathDrawing)!=null?a:vo.animatePathDrawing})},qs=function(){i(this,Oe).publish("navigation-state-change",{isMultiFloor:this.isMultiFloor,floorStacks:this.floorStacks,floors:this.floors,activeDirections:this.activeDirections,activePath:this.activePath,paths:this.paths})},Hc=function(t){E(this,Zt,t),i(this,et).forEach(e=>{let r=i(this,vr).get(e);if(r){let o=r.id===i(this,Zt).id?A({},i(this,Se).pathOptions):A({},i(this,Se).inactivePathOptions);i(this,Oe).updateState(r,o)}}),i(this,Oe).publish("navigation-active-path-change",{directions:this.activeDirections,path:this.activePath}),Y(this,Ee,Sm).call(this),Y(this,Ee,qs).call(this)},Fa=function(t,e){var r,o,a,s,l;if(t==="connection"&&e){let c=e.action.type==="ExitConnection"?i(this,Se).markerOptions.departureColor:i(this,Se).markerOptions.destinationColor,p;typeof((r=i(this,Se).createMarkers)==null?void 0:r.connection)=="function"?(p=i(this,Se).createMarkers.connection(e),i(this,Oe).updateState(p,{interactive:!0})):p=Y(this,Ee,mu).call(this,e,hm({type:(a=(o=e.action.connection)==null?void 0:o.type)!=null?a:e.action.connectionType,color:c,direction:e.action.direction,animated:i(this,Se).markerOptions.animated}),!0),i(this,Ln).set(p.id,{instruction:e,marker:p})}else{let c=t==="departure"?i(this,Se).markerOptions.departureColor:i(this,Se).markerOptions.destinationColor,p;typeof((s=i(this,Se).createMarkers)==null?void 0:s.departure)=="function"&&t==="departure"?p=i(this,Se).createMarkers.departure(e):typeof((l=i(this,Se).createMarkers)==null?void 0:l.destination)=="function"&&t==="destination"?p=i(this,Se).createMarkers.destination(e):p=Y(this,Ee,mu).call(this,e,fm({type:t,color:c,animated:i(this,Se).markerOptions.animated})),i(this,Ln).set(p.id,{instruction:e,marker:p})}},bu=function(t,e){t.filter(o=>Y(this,Ee,Tm).call(this,o.action)).forEach(o=>{Y(this,Ee,Fa).call(this,e,o)})},ka=new WeakMap;m();var be,el,Bn,Wc,vu,Ks=class{constructor(t){M(this,Bn);M(this,be);M(this,el);f(this,"interactions",{set:t=>{(t==null?void 0:t.pan)!=null&&(i(this,be).getSystems().cameraSystem.enablePan=t.pan),(t==null?void 0:t.zoom)!=null&&(i(this,be).getSystems().cameraSystem.enableZoom=t.zoom),(t==null?void 0:t.bearingAndPitch)!=null&&(i(this,be).getSystems().cameraSystem.enableRotate=t.bearingAndPitch)},enable:()=>{i(this,be).getSystems().cameraSystem.enablePan=!0,i(this,be).getSystems().cameraSystem.enableZoom=!0,i(this,be).getSystems().cameraSystem.enableRotate=!0},disable:()=>{i(this,be).getSystems().cameraSystem.enablePan=!1,i(this,be).getSystems().cameraSystem.enableZoom=!1,i(this,be).getSystems().cameraSystem.enableRotate=!1}});f(this,"setMinPitch",t=>{i(this,be).camera.setMinPitch(t)});f(this,"setMaxPitch",t=>{i(this,be).camera.setMaxPitch(t)});f(this,"setMinZoomLevel",t=>{i(this,be).camera.setMinZoomLevel(t,!0)});f(this,"setMaxZoomLevel",t=>{i(this,be).camera.setMaxZoomLevel(t)});E(this,el,t),E(this,be,t.core)}setScreenOffsets(t){i(this,be).camera.setInsetPadding(t)}get screenOffsets(){return i(this,be).camera.insetsPadding}get panMode(){return i(this,be).camera.panMode}setPanMode(t){if(t!=="default"&&t!=="elevation")throw new Error("Invalid pan mode");t!==this.panMode&&i(this,be).camera.setPanMode(t)}getFocusOnTransform(t,e){var o,a,s;let r=i(this,be).camera.getCameraFrameForCoordinates(Y(this,Bn,vu).call(this,t),{pitch:e==null?void 0:e.pitch,bearing:e==null?void 0:e.bearing,padding:(e==null?void 0:e.screenOffsets)||this.screenOffsets,maxZoomLevel:e==null?void 0:e.maxZoomLevel,verticalPadding:(o=e==null?void 0:e.axisAlignedPadding)==null?void 0:o.vertical,minZoomLevel:e==null?void 0:e.minZoomLevel,duration:e==null?void 0:e.duration,easing:e==null?void 0:e.easing});return{center:new re(r.center[1],r.center[0]),zoomLevel:r.zoomLevel,bearing:(a=e==null?void 0:e.bearing)!=null?a:this.bearing,pitch:(s=e==null?void 0:e.pitch)!=null?s:this.pitch}}focusOn(t,e){var r;return i(this,be).camera.focusOn(Y(this,Bn,vu).call(this,t),{pitch:e==null?void 0:e.pitch,bearing:e==null?void 0:e.bearing,padding:(e==null?void 0:e.screenOffsets)||this.screenOffsets,maxZoomLevel:e==null?void 0:e.maxZoomLevel,minZoomLevel:e==null?void 0:e.minZoomLevel,duration:e==null?void 0:e.duration,verticalPadding:(r=e==null?void 0:e.axisAlignedPadding)==null?void 0:r.vertical,easing:e==null?void 0:e.easing})}animateTo(t,e){var c;let{center:r,zoomLevel:o,bearing:a,pitch:s}=t,l=r!=null?r:this.center;return i(this,be).camera.animateTo({center:r!=null?[l.longitude,l.latitude,i(this,be).camera.elevation]:void 0,zoomLevel:o,bearing:a,pitch:s,duration:(c=e==null?void 0:e.duration)!=null?c:600,easing:e==null?void 0:e.easing})}set(t){let{center:e=this.center,zoomLevel:r=this.zoomLevel,bearing:o=this.bearing,pitch:a=this.pitch}=t,s=[e.longitude,e.latitude];i(this,be).camera.setCenter(s),i(this,be).camera.setZoomLevel(r),i(this,be).camera.setBearing(o),i(this,be).camera.setPitch(a)}get center(){let t=i(this,be).camera.center;return new re(t[1],t[0],void 0)}setAutoMinZoomLevel(t){i(this,be).camera.setAutoMinZoomLevel(t)}get autoMinZoomLevel(){return i(this,be).camera.autoMinZoomLevel}get zoomLevel(){return i(this,be).camera.zoomLevel}get pitch(){return i(this,be).camera.pitch}get minPitch(){return i(this,be).camera.minPitch}get maxPitch(){return i(this,be).camera.maxPitch}get bearing(){let t=i(this,be).camera.bearing;return(t<0?t+360:t)%360}get minZoomLevel(){return i(this,be).camera.minZoomLevel}get maxZoomLevel(){return i(this,be).camera.maxZoomLevel}setElevation(t){i(this,be).camera.setElevation(t)}get elevation(){return i(this,be).camera.elevation}animateElevation(t,e){return i(this,be).camera.animateElevation(t,e)}get bounds(){return Sc(i(this,be).getSystems().cameraSystem.panBounds,i(this,be).convert3DMapPositionToCoordinate)}get isAnimating(){return i(this,be).camera.isAnimating}cancelAnimation(){i(this,be).camera.cancelAnimation()}updateFacadesInView(){i(this,be).getSystems().geometryInFocusSystem.compute()}};be=new WeakMap,el=new WeakMap,Bn=new WeakSet,Wc=function(t){var r,o,a,s,l,c;let e=i(this,be).camera.elevation;return re.is(t)&&t.floorId!=null?(o=(r=i(this,be).getState(t.floorId))==null?void 0:r.altitude)!=null?o:e:zt.is(t)?(s=(a=i(this,be).getState(t.id))==null?void 0:a.altitude)!=null?s:e:"floor"in t&&zt.is(t.floor)&&(c=(l=i(this,be).getState(t.floor.id))==null?void 0:l.altitude)!=null?c:e},vu=function(t){var a;let e=[],o=(Array.isArray(t)?t:[t]).flatMap(s=>{var l;return(l=s==null?void 0:s.focusTarget)!=null?l:[s]});for(let s of o)if(s!=null)if(re.is(s)){let l=Y(this,Bn,Wc).call(this,s);e.push([s.longitude,s.latitude,l])}else if((s==null?void 0:s.id)!=null){let l=Y(this,Bn,Wc).call(this,s);if(zt.is(s)&&((a=i(this,el).getMapDataInternal())!=null&&a.enterpriseMode)){e.push(s.id);continue}else if("geoJSON"in s&&s.geoJSON.geometry.coordinates.length>0){Rf(s.geoJSON,p=>{e.push([p[0],p[1],l])});continue}let c=i(this,be).getBoundingArea(s.id);if(c)e.push(...c.map(p=>[p[0],p[1],l]));else if("geoJSONBoundingBox"in s){let p=Y(this,Bn,Wc).call(this,s);if(s.geoJSONBoundingBox!=null){let d=[[s.geoJSONBoundingBox[0],s.geoJSONBoundingBox[1],p],[s.geoJSONBoundingBox[2],s.geoJSONBoundingBox[3],p]];e.push(...d)}}}else Kh(s)&&e.push(s);return e};m();var La,tl=class{constructor({currentMapGetter:t}){M(this,La);E(this,La,t)}get currentMap(){return i(this,La).call(this)}async getCurrentSceneGLTF(t){let e=i(this,La).call(this);return e?e==null?void 0:e.Exporter.getCurrentSceneGLTF(t):(k.error("There is no map to export. Please load a map first."),new Blob)}};La=new WeakMap;m();var Gr,nl,rl=class{constructor({currentMapGetter:t}){M(this,Gr,new Map);M(this,nl);E(this,nl,t)}get currentMap(){return i(this,nl).call(this)}getAll(){return Array.from(i(this,Gr).values()).map(t=>t.label)}getById(t){return i(this,Gr).get(t)}add(t,e,r){let o=t.anchorTarget,a=this.currentMap;if(!a)throw new Error("currentMap should exist");let s=a.Labels.add(o,e,W(A({},r),{attachTo:ha(t),rank:(r==null?void 0:r.rank)==null||(r==null?void 0:r.rank)==="initial"?"medium":r.rank})),l=new An(s.id.toString(),e,t);return i(this,Gr).set(l.id,{label:l,entityId:l.id}),l}__EXPERIMENTAL__all(t){var r;let e=[];return(r=this.currentMap)==null||r.Labels.all({onCreate:(o,a,s)=>{let l=new An(o.toString(),a,s);i(this,Gr).set(l.id,{label:l,entityId:l.id}),e.push(l)},labelOptions:t}),e}remove(t){var r;let e=i(this,Gr).get(t.id);e&&((r=this.currentMap)==null||r.Labels.remove(e),i(this,Gr).delete(t.id.toString()))}removeAll(){let t=[];return i(this,Gr).forEach(({label:e})=>{this.remove(e),t.push(e),i(this,Gr).delete(e.id.toString())}),t}};Gr=new WeakMap,nl=new WeakMap;m();m();m();m();var Em=Jl(Bd(),1);function nI(n,t){var e=Ci(n),r=Ci(t),o=n.properties||{},a=Em.default.difference(e.coordinates,r.coordinates);return a.length===0?null:a.length===1?Ql(a[0],o):Kl(a,o)}var xm=nI;var _m=.2,Cm=.1,Na=251,oI=!1;function Pm(n){if(!n||n.length<3)return null;let t=[],e=0;for(let l=0;l<n.length;l++){let c=n[l],p="".concat(c[0],",").concat(c[1]),d=!1;for(let h=0;h<t.length;h++)if(t[h]===p){d=!0;break}d||(t.push(p),e++)}if(e<3)return null;let r=n[0],o=n[n.length-1];if(r[0]===o[0]&&r[1]===o[1])return n;let s=[];for(let l=0;l<n.length;l++)s.push(n[l]);return s.push(r),s}function wm(n,t){let e=[];if(n.type==="Polygon"){let r=Pm(n.coordinates[0]);r&&e.push(r)}else if(n.type==="MultiPolygon")for(let r of n.coordinates){let o=Pm(r[0]);o&&e.push(o)}return{type:"Feature",geometry:{type:"MultiLineString",coordinates:e},properties:t||{}}}var ol=class{constructor(t,e,r,o){f(this,"renderer");f(this,"mapObject");f(this,"config");f(this,"wallsId");f(this,"maskedWallsId");f(this,"voidWallsId");f(this,"maskedVoidWallsId");f(this,"ceilingId");f(this,"ceilingMaskId");f(this,"basementMaskId");f(this,"footprintColor");f(this,"layer");f(this,"groupContainer");var s;this.renderer=t,this.mapObject=e,this.config=o;let a=Rn;if(o.obstructions!=null&&o.obstructions.features.length>0){let l=o.obstructions.features.filter(c=>{var p;return c.geometry.type==="LineString"&&((p=c.properties.kind)==null?void 0:p.toLowerCase())==="wall"&&c.properties.footprintComponent===!0});if(l!=null&&l.length>0){let c=o.styleMap[(s=l[0].properties)==null?void 0:s.id];c!=null&&(a=c)}}this.footprintColor=a.color,this.groupContainer=this.renderer.addGroupContainer("Footprint-".concat(o.floorId),{visible:!1},r),this.layer=this.renderer.addGroupContainer("".concat(Ts,"-").concat(o.floorId),{visible:!1},this.groupContainer.id.toString())}getFloorAltitudes(){return this.mapObject.getFloorStackAltitudeData(this.config.floorStackId)}getVisualHeight(){var r,o;if(this.config.fixedHeight!=null)return this.config.fixedHeight;let e=((r=this.getFloorAltitudes())!=null?r:new Map).get(this.config.elevation);return(o=e==null?void 0:e.visualHeight)!=null?o:0}get footprintGeometry(){return this.config.footprintGeometry}buildWalls(){let r=wm(this.config.footprintGeometry.geometry,{id:"Footprint-Floor-".concat(this.config.floorId)}).geometry.coordinates.map((l,c)=>({type:"Feature",geometry:{type:"LineString",coordinates:l},properties:{id:"Footprint-Floor-Section-".concat(this.config.floorId,"-").concat(c)}})),o=this.getVisualHeight(),a="front";this.wallsId="Footprint-Walls-".concat(this.config.floorId);let s={color:this.footprintColor,height:o,altitude:0,width:Cm,outline:!1,visible:!0,opacity:1,side:a,renderOrder:2};this.config.elevation<0&&(s.__EXPERIMENTAL_maskMode="masked-object",s.__EXPERIMENTAL_maskEffect="reveal",s.__EXPERIMENTAL_maskEnabled=!0,s.__EXPERIMENTAL_maskId=Na),this.renderer.addGeometryGroup(this.wallsId,{features:r},s,this.groupContainer)}buildVoidWalls(t){if(!t||t.length===0)return;let e=[],r=0;for(let l of t){let c=wm(l.geometry,{id:"Void-Wall-".concat(this.config.floorId,"-").concat(r)});for(let p of c.geometry.coordinates)e.push({type:"Feature",geometry:{type:"LineString",coordinates:p},properties:{id:"Void-Wall-Section-".concat(this.config.floorId,"-").concat(r)}}),r++}if(e.length===0)return;let o=this.getVisualHeight(),a="front";this.voidWallsId="Void-Walls-".concat(this.config.floorId);let s={color:this.footprintColor,height:o,altitude:0,width:Cm,outline:!1,visible:!0,opacity:1,side:a,renderOrder:2};this.config.elevation<0&&(s.__EXPERIMENTAL_maskMode="masked-object",s.__EXPERIMENTAL_maskEffect="reveal",s.__EXPERIMENTAL_maskEnabled=!0,s.__EXPERIMENTAL_maskId=Na),this.renderer.addGeometryGroup(this.voidWallsId,{features:e},s,this.groupContainer)}buildCeiling(t){let e=A({},this.config.footprintGeometry);e=Om(e),(t==null?void 0:t.length)>0&&(e=iI(e,t));let r="front";this.ceilingId="Ceiling-".concat(this.config.floorId);let o=this.getVisualHeight(),a={color:this.footprintColor,height:-_m,altitude:o,visible:!0,outline:!1,opacity:1,side:r};this.config.elevation<0&&(a.__EXPERIMENTAL_maskMode="masked-object",a.__EXPERIMENTAL_maskEffect="reveal",a.__EXPERIMENTAL_maskEnabled=!0,a.__EXPERIMENTAL_maskId=Na),this.renderer.addGeometryGroup(this.ceilingId,{features:[W(A({},e),{properties:{id:"Footprint-Ceiling-".concat(this.config.floorId),externalId:this.config.externalId,elevation:this.config.elevation}})]},a,this.groupContainer)}buildBasementMask(){let t=this.config.footprintGeometry;t=Om(t),this.basementMaskId="Footprint-Basement-Mask-".concat(this.config.floorId),this.renderer.addGeometryGroup(this.basementMaskId,{features:[W(A({},t),{properties:{id:"Footprint-Basement-Mask-Geometry-".concat(this.config.floorId)}})]},{color:Dm(-1),altitude:0,visible:!1,height:.01,outline:!1,__EXPERIMENTAL_maskEnabled:!0,__EXPERIMENTAL_maskMode:"mask",__EXPERIMENTAL_maskId:Na},"outdoors-container"),oI&&this.renderer.addGeometryGroup(this.basementMaskId+"debug",{features:[W(A({},t),{properties:{id:"Footprint-Basement-Mask-Geometry-".concat(this.config.floorId,"-debug")}})]},{color:Dm(-1),altitude:0,opacity:.5,visible:!1,height:.01,outline:!1},"outdoors-container")}update(t){var a;if(t.basementMaskEnabled!==void 0&&this.basementMaskId&&(this.renderer.setState(this.basementMaskId,{visible:t.basementMaskEnabled}),this.renderer.setState(this.basementMaskId+"debug",{visible:t.basementMaskEnabled})),(a=this.config.multiFloorView)!=null&&a.footprintsHidden)return;let e={};t.altitude!==void 0&&(e.altitude=t.altitude),t.visible!==void 0&&(e.visible=t.visible),Object.keys(e).length>0&&this.renderer.setState(this.groupContainer.id,e);let r={};t.opacity!==void 0&&(r.opacity=t.opacity),t.side!==void 0&&(r.side=t.side),t.color!==void 0&&(r.color=t.color),t.outline!==void 0&&(r.outline=t.outline);let o={};if(t.height!==void 0&&(r.height=t.height,o.altitude=t.height),this.wallsId&&Object.keys(r).length>0&&this.renderer.setState(this.wallsId,r),this.voidWallsId&&Object.keys(r).length>0&&this.renderer.setState(this.voidWallsId,r),this.maskedWallsId&&Object.keys(r).length>0){let s=r,{outline:p}=s,d=Qt(s,["outline"]);Object.keys(d).length>0&&this.renderer.setState(this.maskedWallsId,d)}if(this.maskedVoidWallsId&&Object.keys(r).length>0){let l=r,{outline:p}=l,d=Qt(l,["outline"]);Object.keys(d).length>0&&this.renderer.setState(this.maskedVoidWallsId,d)}if(t.opacity!==void 0&&(o.opacity=t.opacity),t.color!==void 0&&(o.color=t.color),t.ceilingVisible!==void 0&&(o.visible=t.ceilingVisible),t.outline!==void 0&&(o.outline=t.outline),this.ceilingId&&Object.keys(o).length>0&&this.renderer.setState(this.ceilingId,o),this.ceilingMaskId&&Object.keys(o).length>0){let c=o,{outline:p}=c,d=Qt(c,["outline"]);Object.keys(d).length>0&&this.renderer.setState(this.ceilingMaskId,d)}}getState(){var c,p;let t=this.renderer.getState(this.groupContainer.id),e=t.altitude,r=t.visible,o=this.ceilingId?this.renderer.getState(this.ceilingId):void 0,a=o==null?void 0:o.visible,s=(c=o==null?void 0:o.height)!=null?c:_m,l=this.basementMaskId?(p=this.renderer.getState(this.basementMaskId))==null?void 0:p.visible:void 0;if(this.wallsId){let d=this.renderer.getState(this.wallsId),h=d.height;return{altitude:e,visible:r,opacity:d.opacity,side:d.side,color:d.color,height:h,ceilingVisible:a,basementMaskEnabled:l,outline:d.outline,ceilingThickness:s}}return{altitude:e,visible:r,ceilingVisible:a,basementMaskEnabled:l,ceilingThickness:s}}};function Om(n){if(n.geometry.type==="Polygon")return{type:"Feature",geometry:{type:"Polygon",coordinates:[n.geometry.coordinates[0]]},properties:n.properties};let t=[];for(let e of n.geometry.coordinates)t.push([e[0]]);return{type:"Feature",geometry:{type:"MultiPolygon",coordinates:t},properties:n.properties}}function iI(n,t){let e;if(Array.isArray(t))if(t.length>0&&"geometry"in t[0])e=t;else{e=[];for(let o of t)for(let a of o.coordinates)e.push({type:"Feature",geometry:{type:"Polygon",coordinates:a},properties:{}})}else{e=[];for(let o of t.coordinates)e.push({type:"Feature",geometry:{type:"Polygon",coordinates:o},properties:{}})}if(e.length===0)return n;let r=n;for(let o of e){if(r===null)break;r=xm(r,o)}return r===null?{type:"Feature",geometry:{type:"MultiPolygon",coordinates:[]},properties:n.properties}:W(A({},r),{properties:n.properties})}var Dm=n=>n===0?"red":n===-1?"blue":n===-2?"green":"black";var aI={color:"#ffffff",opacity:1},Rn={altitude:0,height:1,color:"#ffffff",opacity:1,width:.15},Am={opacity:.25,color:"#a7d1ec",height:.8,width:.05,altitude:.1,cap:"square",visible:!1},Iu={color:"red",opacity:.2,height:Rn.height+.1,visible:!0,borderVisible:!1},Fm=.5,sr=class{constructor(t,e,r=new Map){f(this,"containerId");f(this,"layers");f(this,"renderer");this.containerId=e,this.layers=r,this.renderer=t}get visible(){var t;return((t=this.renderer.getState(this.containerId))==null?void 0:t.visible)===!0}setVisible(t){this.visible!==t&&this.renderer.setState(this.containerId,{visible:t})}},km=0,fi,il=class{constructor(t,e,r,o,a,s,l,c){f(this,"id");f(this,"name");f(this,"elevation");f(this,"maxHeight");f(this,"containerId");f(this,"externalId");f(this,"metadata");f(this,"shortName");f(this,"subtitle");f(this,"occluderId");f(this,"loaded",!1);f(this,"styleMap",{});f(this,"obstructions");f(this,"entrances");f(this,"spaces");f(this,"floorImages");f(this,"floorText");f(this,"areas");f(this,"renderer");f(this,"mapObject");f(this,"options");f(this,"layers",new Map);f(this,"footprint");f(this,"ceiling");f(this,"floorStackId");f(this,"multiFloorView");f(this,"mapDataInternal");f(this,"_computedMaxHeight");f(this,"facadesByStyleId",new Map);f(this,"footprintObject");f(this,"gapFootprintObject");M(this,fi);f(this,"load",(t=!1)=>{var l,c,p,d,h,y,b,I,C,P,O,U,H,V,B,q,N,J;if(this.loaded)return this;((l=this.footprint)==null?void 0:l.geometry)==null&&((c=this.obstructions)==null?void 0:c.features.length)===0&&((p=this.spaces)==null?void 0:p.features.length)===0&&k.warn("Floor ".concat(this.id," exists in the data but contains no geometry.")),this.loaded=!0;let e=this.renderer.addGroupContainer("".concat(rn,"-").concat(this.id),{},this.id);this.layers.set(rn,new sr(this.renderer,e.id.toString()));let r=this.renderer.addGroupContainer("".concat(Fr,"-").concat(this.id),{},this.id);this.layers.set(Fr,new sr(this.renderer,r.id.toString()));let o=this.renderer.addGroupContainer("".concat(Ze,"-").concat(this.id),{focusable:t},this.id);this.layers.set(Ze,new sr(this.renderer,o.id.toString()));let a=this.renderer.addGroupContainer("".concat(nn,"-").concat(this.id),{},this.id);this.layers.set(nn,new sr(this.renderer,a.id.toString()));let s=this.renderer.addGroupContainer("".concat(kr,"-").concat(this.id),{},this.id);if(this.layers.set(kr,new sr(this.renderer,s.id.toString())),(d=this.multiFloorView)!=null&&d.__EXPERIMENTAL_DEBUG_showVoids){let se=0;for(let z of this.voids)this.renderer.addGeometryGroup("Void-".concat(this.id,"-").concat(se),{features:[z]},{color:"red"},o),se++}if((h=this.multiFloorView)!=null&&h.__EXPERIMENTAL_DEBUG_showOpenToBelow){let se=0;for(let z of this.spacesOpenToBelow)this.renderer.addGeometryGroup("SpacesOpenToBelow-".concat(this.id,"-").concat(se),{features:[z]},{color:"blue"},o),se++}if(this.spaces!=null&&this.spaces.features.length>0){let se=[],z=new Map,ie=(y=this.multiFloorView)==null?void 0:y.__EXPERIMENTAL_excludeSpaceIdsInAutoHeightCalculation,me=ie!=null&&ie.length>0?new Set(ie):void 0;for(let X of this.spaces.features){if(X.geometry.type!=="Polygon")continue;let $=(b=X.properties.kind)==null?void 0:b.toLowerCase();if($==="void"||$==="otb")continue;let he=this.styleMap[X.properties.id];if(he!=null&&"height"in he&&(he==null?void 0:he.height)!=null&&(me==null||!me.has(X.properties.id))){let ne=((I=he.altitude)!=null?I:0)+he.height;(this._computedMaxHeight==null||ne>this._computedMaxHeight)&&(this._computedMaxHeight=ne)}let ee=(C=this.mapDataInternal)==null?void 0:C.facadesBySpaceId[X.properties.id];if(ee){let ne=z.get(ee.id);ne==null&&(ne=[],z.set(ee.id,ne)),ne.push(X)}else se.push(X)}let ve=this.renderer.addGroupContainer("spaces-".concat(this.id),{},o),ye=this.renderer.addGeometryGroup("Spaces-".concat(this.id,"-0"),{features:se},X=>{var $;return(($=X==null?void 0:X.properties)==null?void 0:$.id)!=null&&this.styleMap[X.properties.id]!=null?ua(this.styleMap[X.properties.id],this.options):aI},ve);if(this.layers.get(Ze).layers.set("Spaces",ye.id.toString()),z.size>0){let X=this.renderer.addGroupContainer("".concat(jo,"-").concat(this.id),{},this.id);this.layers.set(jo,new sr(this.renderer,X.id.toString()));for(let[$,he]of z){let ee=this.renderer.addGroupContainer($,{focusable:!0},X),ne=this.renderer.addGroupContainer("".concat($,"-geometry"),{},ee),de=qd(he,this.styleMap),ge=0;for(let[Le,Me]of de){let We=this.renderer.addGeometryGroup("Facades-".concat(this.id,"-").concat($,"-").concat(ge),{features:Me},W(A({},ua(Le,this.options)),{renderOrder:3}),ne);ge++;let _e=Le.id||We.id.toString();this.layers.get(jo).layers.set("".concat($,"-").concat(_e),We.id.toString()),this.facadesByStyleId.has(_e)?(P=this.facadesByStyleId.get(_e))==null||P.push($):this.facadesByStyleId.set(_e,[$])}}}}if(((O=this.footprint)==null?void 0:O.geometry)!=null&&this.footprint.geometry.coordinates.length>0&&this.styleMap!=null&&(this.footprintObject=new ol(this.renderer,this.mapObject,this.id,{floorId:this.id,externalId:this.externalId,elevation:this.elevation,floorStackId:this.floorStackId,footprintGeometry:this.footprint,obstructions:this.obstructions,styleMap:this.styleMap,multiFloorView:this.multiFloorView}),this.layers.set(Ts,new sr(this.renderer,this.footprintObject.layer.id.toString())),this.footprint=Eg(this.footprint)),this.obstructions!=null&&this.obstructions.features.length>0){let se=this.obstructions.features.filter(ee=>ee.geometry.type==="Polygon"&&(ee.properties.kind==="object"||ee.properties.kind==="unknown")),z=qd(se,this.styleMap),ie=this.renderer.addGroupContainer("objects-".concat(this.id),{},o),me=0;for(let[ee,ne]of z){let de=this.renderer.addGeometryGroup("Objects-".concat(this.id,"-").concat(me),{features:ne},ua(ee,this.options),ie);me++;let ge=ie.id.toString();this.layers.get(Ze).layers.set(ee.id||ge,de.id.toString())}let ve=this.obstructions.features.filter(ee=>{var ne;return ee.geometry.type==="LineString"&&((ne=ee.properties.kind)==null?void 0:ne.toLowerCase())==="wall"&&ee.properties.footprintComponent===!1}),ye=this.obstructions.features.filter(ee=>{var ne;return ee.geometry.type==="LineString"&&((ne=ee.properties.kind)==null?void 0:ne.toLowerCase())==="wall"&&ee.properties.footprintComponent===!0}),X=this.entrances,$=Rn,he=Rn;if(ve!=null&&ve.length>0){let ee=this.styleMap[(U=ve[0].properties)==null?void 0:U.id];ee!=null&&($=A({},ee)),he=$;let{walls:ne,entrances:de}=Jd(ve,(X==null?void 0:X.features)||[]),ge=Math.max($.height-.11,Fm),Le=W(A({},Am),{height:ge}),Me=this.renderer.addGeometryGroup("InteriorDoors-".concat(this.id),de,Le,o);this.layers.get(Ze).layers.set(Ui,Me.id.toString());let We=this.renderer.addGeometryGroup("Walls-".concat(this.id),{features:[ne]},ua($,this.options),o);this.layers.get(Ze).layers.set(no,We.id.toString())}if(ye!=null&&ye.length>0){let ee=this.styleMap[(H=ye[0].properties)==null?void 0:H.id];ee!=null&&(he=W(A({},ee),{id:tn}));let{walls:ne,entrances:de}=Jd(ye,(X==null?void 0:X.features)||[]),ge=Math.max(he.height-.11,Fm),Le=W(A({},Am),{height:ge}),Me=this.renderer.addGeometryGroup("ExteriorDoors-".concat(this.id),de,Le,o);this.layers.get(Ze).layers.set(Hi,Me.id.toString());let We=this.renderer.addGeometryGroup("ExteriorWalls-".concat(this.id),{features:[ne]},ua(he,this.options),o);this.layers.get(Ze).layers.set(tn,We.id.toString())}}if(this.floorImages!=null){let se=this.renderer.addGroupContainer("images-".concat(this.id),{},this.id);for(let z of this.floorImages.features||[]){let ie="anchorId"in z.properties?z.properties.anchorId:null,me=ie==null,ve=ie!=null&&this.mapDataInternal!=null&&this.mapDataInternal.pointsOfInterestById[ie]!=null;if(me||ve){let ye=Tg(z,km),$=(((V=z.properties.rotation)!=null?V:0)%360+360)%360;if(ve){let he=new re({latitude:z.geometry.coordinates[1],longitude:z.geometry.coordinates[0],floorId:this.id});this.mapDataInternal.Query.at(he).then(ee=>{var de,ge,Le;let ne=0;for(let Me of ee)if(qe.is(Me)){let We=(ge=(de=this.renderer.getState(Me.id))==null?void 0:de.height)!=null?ge:0;We>ne&&(ne=We)}this.mapObject.api.Image3D.add(new re({latitude:z.geometry.coordinates[1],longitude:z.geometry.coordinates[0],floorId:this.id,verticalOffset:ne}),z.properties.path,W(A({id:ye,flipImageToFaceCamera:(Le=this.options.flipImagesToFaceCamera)!=null?Le:!0},z.properties),{rotation:$}))})}else this.mapObject.api.Image3D.add(new re({latitude:z.geometry.coordinates[1],longitude:z.geometry.coordinates[0],floorId:this.id}),z.properties.path,W(A({id:ye,flipImageToFaceCamera:(B=this.options.flipImagesToFaceCamera)!=null?B:!0},z.properties),{rotation:$}));km++}}this.layers.set(Wi,new sr(this.renderer,se.id.toString()))}if(this.floorText!=null)for(let se of this.floorText.features||[]){let z=0;"geometryId"in se.properties?z=(N=(q=this.renderer.getState(se.properties.geometryId))==null?void 0:q.height)!=null?N:0:z=(J=se.properties.verticalOffset)!=null?J:0,this.renderer.addText3D(xe(),W(A({},se),{properties:W(A({},se.properties),{verticalOffset:z})}),{appearance:{flipToFaceCamera:!1}},this.id)}if(this.areas!=null){let se=this.renderer.addGroupContainer("areas-".concat(this.id),{},this.id);this.layers.set(Vo,new sr(this.renderer,se.id.toString()));let z=this.renderer.addGeometryGroup("Areas-".concat(this.id),{features:this.areas.features},{color:Iu.color,height:Iu.height},se);for(let ie of this.areas.features||[])this.renderer.setState(ie.properties.id,W(A({},Iu),{visible:!1}));this.layers.get(Vo).layers.set(z.id.toString(),z.id.toString())}return this.renderer.render(),this});var d,h,y,b,I,C;this.mapObject=r,this.renderer=r.renderer,this.id=e.id,this.options=a;let p=this.renderer.addGroupContainer(this.id,{visible:!1,interactive:!0,preloadGeometry:(d=a.preloadFloors)==null?void 0:d.map(P=>P.id).includes(e.id)},t);if(this.containerId=p.id.toString(),this.externalId=e.externalId,this.metadata=e.metadata,this.shortName=e.shortName,this.subtitle=e.subtitle,this.name=e.name,this.maxHeight=e.maxHeight,this.elevation=e.elevation,s!=null&&l!=null){this.styleMap=l,this.spaces=s.space[this.id],this.entrances=s.entrance[this.id],this.areas=(h=s.area)==null?void 0:h[this.id],this.obstructions=s.obstruction[this.id],this.floorImages=(y=s.floorImages)==null?void 0:y[this.id],this.floorText=(I=(b=s.enterprise)==null?void 0:b.floorText)==null?void 0:I[this.id];let P=(C=s["floor.geojson"])==null?void 0:C.features.find(O=>O.properties.id===e.id);P&&P.geometry!=null&&P.geometry.coordinates.length>0&&(this.footprint=P)}this.floorStackId=t,this.multiFloorView=o,this.mapDataInternal=c}get geometryMaxHeight(){return this._computedMaxHeight}get spacesOpenToBelowEnabled(){var t,e;return(e=(t=this.multiFloorView)==null?void 0:t.spacesOpenToBelowEnabled)!=null?e:!1}get voids(){var t,e,r,o;return(o=(r=(e=(t=this.mapDataInternal)==null?void 0:t.voidsByFloorId[this.id])==null?void 0:e.voids)==null?void 0:r.features)!=null?o:[]}get spacesOpenToBelow(){var e,r;if(!this.spaces)return[];let t=[];for(let o of this.spaces.features){if(o.geometry.type!=="Polygon")continue;(((e=o.properties.kind)==null?void 0:e.toLowerCase())==="void"||((r=o.properties.kind)==null?void 0:r.toLowerCase())==="otb")&&t.push(o)}return t}get geoJSONBoundingBox(){if(i(this,fi))return i(this,fi);if(!this.footprint){k.warn("Attempting to get bounding box with no footprint for floor ".concat(this.id));return}return E(this,fi,vg(this.footprint)),i(this,fi)}addOccluder(){var r;if(((r=this.footprint)==null?void 0:r.geometry)==null)return;let t=this.renderer.addGroupContainer("".concat(Ro,"-").concat(this.id),{},this.id),e=new sr(this.renderer,t.id.toString());this.layers.set(Ro,e),this.occluderId=this.renderer.addOccluder(this.footprint,e.containerId)}get hasFacadeGeometry(){return this.facadesByStyleId.size>0}get visible(){return this.renderer.getState(this.containerId).visible}setVisible(t){this.renderer.setState(this.containerId,{visible:t})}buildCeiling(t){this.footprintObject&&this.footprintObject.buildCeiling(t)}buildBasementMask(){this.footprintObject&&this.footprintObject.buildBasementMask()}buildGapFootprint(t,e){var r;((r=this.footprint)==null?void 0:r.geometry)!=null&&(this.gapFootprintObject=new ol(this.renderer,this.mapObject,this.id,{floorId:"gap-below-".concat(this.id),externalId:this.externalId,elevation:this.elevation,floorStackId:this.floorStackId,footprintGeometry:this.footprint,obstructions:void 0,styleMap:{},multiFloorView:this.multiFloorView,fixedHeight:t}),this.gapFootprintObject.buildWalls(),this.gapFootprintObject.buildCeiling(e),this.gapFootprintObject.update({altitude:-t,visible:!1}))}getFootprintStyle(){var e;let t=Rn;if(this.obstructions!=null&&this.obstructions.features.length>0){let r=this.obstructions.features.filter(o=>{var a;return o.geometry.type==="LineString"&&((a=o.properties.kind)==null?void 0:a.toLowerCase())==="wall"&&o.properties.footprintComponent===!0});r!=null&&r.length>0&&(t=this.styleMap[(e=r[0].properties)==null?void 0:e.id])}return t}buildFootprint(){if(!this.footprintObject)return;this.footprintObject.buildWalls(),this.footprintObject.buildVoidWalls(this.voids);let t=new sr(this.renderer,this.footprintObject.layer.id.toString());this.layers.set(Ts,t)}setBatchedTextVisible(t){let e=this.renderer.getInternalState().geometry3DMap.get(this.id);if(e&&e instanceof sh){let r=this.renderer.getSystems().text3DSystem.batchedTextMap.get(e);r&&r.then(o=>{o.visible=t})}}};fi=new WeakMap;m();var Ba,al=class{constructor(t,e,r,o){f(this,"id");f(this,"externalId");f(this,"name");f(this,"type");f(this,"floorIds");f(this,"defaultFloorId");f(this,"floorObjects",[]);f(this,"floorObjectsByElevation",new Map);f(this,"metadata");f(this,"containerId");f(this,"facade");f(this,"renderer");f(this,"altitudeMap",new Map);M(this,Ba);var s;this.id=t.id,this.externalId=t.externalId,this.name=t.name,this.type=t.type,this.metadata=t.metadata,this.floorIds=(s=t.floors)!=null?s:t.maps,this.defaultFloorId=t.defaultFloor;let a=r.addGroupContainer(this.id,{visible:!0,interactive:!0},e);this.containerId=a.id.toString(),this.facade=o,this.renderer=r}get defaultFloor(){if(i(this,Ba)==null){if(this.floorObjects.length===0)throw new tt("No floors in floor stack (".concat(this.id,"). Could not get default floor."));let t;this.defaultFloorId&&(t=this.floorObjects.find(e=>e.id===this.defaultFloorId)),t||(t=this.floorObjects.reduce((e,r)=>Math.abs(r.elevation)<Math.abs(e.elevation)?r:e)),E(this,Ba,t)}return i(this,Ba)}get isOutdoors(){var e;return((e=this.type)==null?void 0:e.toLowerCase())==="outdoor"?!0:this.facade!=null?!1:this.floorObjects.some(r=>r.hasFacadeGeometry)}addFloor(t){if(this.floorObjectsByElevation.has(t.elevation)){k.error("Floor with same elevation ".concat(t.elevation," already exists in Stack (").concat(this.id,"). Floor (").concat(t.id,") will not be added."));return}this.floorObjects.push(t),this.floorObjectsByElevation.set(t.elevation,t)}loadAllFloors(t){this.floorObjects.sort((e,r)=>e.elevation-r.elevation);for(let e of this.floorObjects)e.load(this.facade!=null),!this.isOutdoors&&!e.hasFacadeGeometry&&e.footprint!=null&&e.addOccluder();if(this.altitudeMap=Sg(this.floorObjects,t==null?void 0:t.floorGap,t==null?void 0:t.floorGapMultiplier,t==null?void 0:t.floorGapFallback,t==null?void 0:t.__EXPERIMENTAL_disableGapFilling),t!=null&&t.enabled)for(let e of this.floorObjects){let r=this.altitudeMap.get(e.elevation);r&&this.renderer.setState(e.id,{altitude:r.altitude})}if(!this.isOutdoors){for(let e of this.floorObjects){let r=this.floorObjectsByElevation.get(e.elevation+1),o=[];if(e.spacesOpenToBelowEnabled){for(let a of e.voids)o.push(a);if(r)for(let a of r.spacesOpenToBelow)o.push(a)}e.buildCeiling(o),e.buildFootprint(),e.elevation<=0&&e.buildBasementMask()}if(t!=null&&t.enabled&&!t.__EXPERIMENTAL_disableGapFilling){let e=Mg(this.floorObjects,this.altitudeMap,t.floorGap,t.floorGapMultiplier,t.floorGapFallback);for(let r of e){let o=this.floorObjectsByElevation.get(r.floorAboveElevation);if(!o)continue;let a=o.spacesOpenToBelow;o.buildGapFootprint(r.height,a)}}}}};Ba=new WeakMap;m();var sI=5,lI="#ffffff";function cI(n,t){var e;return typeof n=="string"?n:(e=n[t])!=null?e:lI}function pI(n){return n.spacesOpenToBelow.length>0}function Tu(n,t,e,r,o){var y,b,I,C,P,O,U,H,V,B,q,N,J,se;let a={outdoorOpacity:"initial",floorStates:[]},{spacesOpenToBelowEnabled:s}=o,l=(y=o.spacesOpenToBelowVisualEffectEnabled)!=null?y:!0,c=(I=(b=r.get(t.elevation))==null?void 0:b.altitude)!=null?I:0,p=c;for(let[z,ie]of r)z<t.elevation&&ie.altitude<p&&(p=ie.altitude);let d=c-p+sI,h=n.sort((z,ie)=>z.elevation-ie.elevation);for(let z of h){let ie=(P=(C=r.get(z.elevation))==null?void 0:C.visualHeight)!=null?P:0,me=(O=o.opacity)!=null?O:z.elevation<0?1:.4,ve=!1;if(s){let de=z.elevation<t.elevation?n.find(ge=>ge.elevation===z.elevation+1):null;ve=de?pI(de):!1}let ye={maskEnabled:z.elevation<0,maskId:Na,maskEffect:"reveal",maskMode:"masked-object"},X=s?z.elevation===t.elevation||ve:!1,$=s?z.elevation<t.elevation:z.elevation===t.elevation&&z.elevation<0,he=(t.elevation>=0?z.elevation===0:z.elevation===t.elevation)&&((H=(U=z.floorStack)==null?void 0:U.type)==null?void 0:H.toLowerCase())!=="outdoor",ee={color:cI(o.color,z.id),ceilingVisible:z.elevation<t.elevation,visible:$,basementMaskEnabled:he,outline:o.outline,ceilingThickness:.5,height:ie,opacity:me},ne={floor:z,state:{type:"floor",visible:X,geometry:s?W(A({visible:X},ye),{effectStart:z.elevation<t.elevation&&l?c:0,effectDistance:z.elevation<t.elevation&&l?d:0,darkenAmount:l?(V=o.spacesOpenToBelowVisualEffectDarkenAmount)!=null?V:.2:0,darkenUseDepth:(B=o.spacesOpenToBelowVisualEffectDarkenUseDepth)!=null?B:!0,desaturateAmount:l&&(q=o.spacesOpenToBelowVisualEffectDesaturateAmount)!=null?q:0,desaturateUseDepth:(N=o.spacesOpenToBelowVisualEffectDesaturateUseDepth)!=null?N:!0,washOutAmount:l&&(J=o.spacesOpenToBelowVisualEffectWashOutAmount)!=null?J:0,washOutUseDepth:(se=o.spacesOpenToBelowVisualEffectWashOutUseDepth)!=null?se:!1}):W(A({},ye),{visible:!1}),labels:{enabled:!1},markers:{enabled:!1},footprint:ee,occlusion:{enabled:!1},areas:{visible:!1},text3d:{visible:!1},images:{visible:!1,collisionsEnabled:z.id===t.id},paths:{visible:!1},models:{visible:!1}}};a.floorStates.push(ne),z.id===t.id?(ne.state.visible=!0,ne.state.images.visible=!0,ne.state.paths.visible=!0,ne.state.geometry.visible=!0,ne.state.models.visible=!0,ne.state.labels.enabled=!0,ne.state.markers.enabled=!0,ne.state.occlusion.enabled=!0,ne.state.areas.visible=!0,ne.state.text3d.visible=!0,z.elevation<0&&(ne.state.footprint.height=ie*Math.abs(z.elevation),ne.state.footprint.visible=!0,a.outdoorOpacity=.2)):e.includes(z.id)&&z.elevation<t.elevation?(ne.state.visible=!0,ne.state.geometry.visible=!0,ne.state.models.visible=!0,ne.state.paths.visible=!0,ne.state.markers.enabled=!0,ne.state.occlusion.enabled=!0,ne.state.footprint.visible=!0,ne.state.footprint.height=ie,z.elevation<0&&(a.outdoorOpacity=.2)):t.elevation>0&&z.elevation<t.elevation&&z.elevation>=0&&(ne.state.visible=!0,ne.state.footprint.visible=!0,ne.state.footprint.height=ie)}return a}m();import Te from"zod";m();import{z as Lm}from"zod";function Nm(n){try{let t=n.shape;if("type"in t){let e=t.type;if(e instanceof Lm.ZodOptional&&(e=e._def.innerType),"value"in e)return String(e.value);if(e instanceof Lm.ZodDefault&&"value"in e._def.innerType)return String(e._def.innerType.value)}return"unknown"}catch(t){return"unknown"}}function Bm(n){if(n.success)return{};let t={};for(let e of n.error.issues)if(e.path.length>0){let r=String(e.path[0]);t[r]||(t[r]=[]),t[r].push(e.message)}return t}function Rm(n,t){let e=Object.entries(n);if(e.length>0){let r=e.map(([o,a])=>"".concat(o,": ").concat(a.join(", "))).join("; ");k.warn("".concat(e.length," invalid field(s) in ").concat(t!=null?t:"unknown"," state: [").concat(r,"]"))}}function ke(n,t,e){if(e!=null&&e.disableValidation)return t;if(t==null||typeof t!="object")return{};let r=n.safeParse(t);if(r.success){let s={};for(let l of Object.keys(t))l in r.data&&(s[l]=t[l]);return s}let o=Bm(r);e!=null&&e.warn&&Rm(o,Nm(n));let a={};for(let s of Object.keys(t))!(s in o)&&s in n.shape&&(a[s]=t[s]);return a}function bt(n,t,e){if(e!=null&&e.disableValidation)return t;let r=n.safeParse(t);if(r.success)return r.data;if((e==null?void 0:e.warn)===!0){let o=Bm(r);Rm(o,Nm(n))}return t}var Vm="path",Ur={color:"#4b90e2",width:1,completeFraction:0,visible:!0,verticalOffset:.1,xrayOpacity:.25,__EXPERIMENTAL_SMOOTHING_TENSION:Hp.tension,__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:Hp.cornerRadius,dashed:!1,__EXPERIMENTAL_ENDCAP_EXTENSION:[.5,.5],__EXPERIMENTAL_BILLBOARDING:!1,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:!1},Su=Te.object({type:Te.literal(Vm).default(Vm),color:Te.string().default(Ur.color),width:Te.union([Te.number(),Te.any()]),completeFraction:Te.number().default(Ur.completeFraction),visible:Te.boolean().default(Ur.visible),verticalOffset:Te.number().default(Ur.verticalOffset),highlightStartFraction:Te.number().default(0),highlightEndFraction:Te.number().default(0),highlightColor:Te.string().default("red"),highlightWidthMultiplier:Te.number().default(1.1),highlightCompleteFraction:Te.number().default(1),xrayOpacity:Te.number().min(0).max(1).default(Ur.xrayOpacity),__EXPERIMENTAL_SMOOTHING_TENSION:Te.number().default(Ur.__EXPERIMENTAL_SMOOTHING_TENSION),__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:Te.number().default(Ur.__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS),dashed:Te.boolean().default(Ur.dashed),__EXPERIMENTAL_DASH_OPTIONS:Te.discriminatedUnion("__EXPERIMENTAL_DASH_MODE",[Te.object({__EXPERIMENTAL_DASH_MODE:Te.literal("length-scaling"),__EXPERIMENTAL_DASH_LENGTH:Te.number().min(0).max(1).default(.1),__EXPERIMENTAL_DASH_GAP:Te.number().min(0).max(1).default(.1)}),Te.object({__EXPERIMENTAL_DASH_MODE:Te.literal("width-scaling"),__EXPERIMENTAL_DASH_SIZE:Te.number().min(0).default(3),__EXPERIMENTAL_GAP_SIZE:Te.number().min(0).default(2)}),Te.object({__EXPERIMENTAL_DASH_MODE:Te.literal("absolute"),__EXPERIMENTAL_DASH_METERS:Te.number().min(0).default(1),__EXPERIMENTAL_GAP_METERS:Te.number().min(0).default(.5)})]).optional(),__EXPERIMENTAL_GEOMETRY:Te.enum(["tube","ribbon"]).default("tube"),__EXPERIMENTAL_ENDCAP_EXTENSION:Te.tuple([Te.number(),Te.number()]).default(Ur.__EXPERIMENTAL_ENDCAP_EXTENSION),__EXPERIMENTAL_BILLBOARDING:Te.boolean().default(Ur.__EXPERIMENTAL_BILLBOARDING),__EXPERIMENTAL_BORDER:Te.object({enabled:Te.boolean(),color:Te.custom(n=>typeof n=="string"),width:Te.number().optional()}).optional(),__EXPERIMENTAL_PREVENT_SELF_OVERLAP:Te.boolean().default(Ur.__EXPERIMENTAL_PREVENT_SELF_OVERLAP)}),Mu=Su.partial(),M8=Te.strictObject(Su.shape);function jm(n){let{color:t,visible:e,width:r,verticalOffset:o,completeFraction:a,highlightStartFraction:s,highlightEndFraction:l,highlightColor:c,highlightWidthMultiplier:p,highlightCompleteFraction:d,xrayOpacity:h,smoothingTension:y,smoothingCornerRadius:b,dashed:I,dashLength:C,dashGap:P,dashRelativeToWidth:O,dashSize:U,gapSize:H,dashAbsolute:V,dashMeters:B,gapMeters:q,__EXPERIMENTAL_GEOMETRY:N,__EXPERIMENTAL_ENDCAP_EXTENSION:J,__EXPERIMENTAL_BILLBOARDING:se,__EXPERIMENTAL_BORDER:z,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:ie}=n,me;return V?me={__EXPERIMENTAL_DASH_MODE:"absolute",__EXPERIMENTAL_DASH_METERS:B,__EXPERIMENTAL_GAP_METERS:q}:O?me={__EXPERIMENTAL_DASH_MODE:"width-scaling",__EXPERIMENTAL_DASH_SIZE:U,__EXPERIMENTAL_GAP_SIZE:H}:me={__EXPERIMENTAL_DASH_MODE:"length-scaling",__EXPERIMENTAL_DASH_LENGTH:C,__EXPERIMENTAL_DASH_GAP:P},bt(Su,{color:t,visible:e,width:r,verticalOffset:o,completeFraction:a,highlightStartFraction:s,highlightEndFraction:l,highlightColor:c,highlightWidthMultiplier:p,highlightCompleteFraction:d,xrayOpacity:h,__EXPERIMENTAL_SMOOTHING_TENSION:y,__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS:b,dashed:I,__EXPERIMENTAL_DASH_OPTIONS:me,__EXPERIMENTAL_GEOMETRY:N,__EXPERIMENTAL_ENDCAP_EXTENSION:J,__EXPERIMENTAL_BILLBOARDING:se,__EXPERIMENTAL_BORDER:z,__EXPERIMENTAL_PREVENT_SELF_OVERLAP:ie})}function Ra(n){let t={};for(let e in n)if(e==="__EXPERIMENTAL_SMOOTHING_TENSION"){let r=n[e];r!==void 0&&(t.smoothingTension=r)}else if(e==="__EXPERIMENTAL_SMOOTHING_CORNER_RADIUS"){let r=n[e];r!==void 0&&(t.smoothingCornerRadius=r)}else if(e==="__EXPERIMENTAL_DASH_OPTIONS"){let r=n[e];r&&(r.__EXPERIMENTAL_DASH_MODE==="length-scaling"?(t.dashRelativeToWidth=!1,t.dashAbsolute=!1,r.__EXPERIMENTAL_DASH_LENGTH!==void 0&&(t.dashLength=r.__EXPERIMENTAL_DASH_LENGTH),r.__EXPERIMENTAL_DASH_GAP!==void 0&&(t.dashGap=r.__EXPERIMENTAL_DASH_GAP)):r.__EXPERIMENTAL_DASH_MODE==="width-scaling"?(t.dashRelativeToWidth=!0,t.dashAbsolute=!1,r.__EXPERIMENTAL_DASH_SIZE!==void 0&&(t.dashSize=r.__EXPERIMENTAL_DASH_SIZE),r.__EXPERIMENTAL_GAP_SIZE!==void 0&&(t.gapSize=r.__EXPERIMENTAL_GAP_SIZE)):r.__EXPERIMENTAL_DASH_MODE==="absolute"&&(t.dashAbsolute=!0,t.dashRelativeToWidth=!1,r.__EXPERIMENTAL_DASH_METERS!==void 0&&(t.dashMeters=r.__EXPERIMENTAL_DASH_METERS),r.__EXPERIMENTAL_GAP_METERS!==void 0&&(t.gapMeters=r.__EXPERIMENTAL_GAP_METERS)))}else t[e]=n[e];return t}var Ne,sl=class extends dr{constructor(e,r,o,a){var p,d,h,y;super();f(this,"floorStacksById",new Map);f(this,"floorsById",new Map);f(this,"startingFloorId","");f(this,"currentFloorId","");f(this,"currentFloorStackId","");f(this,"outdoorFloorStacks",new Set);f(this,"id");f(this,"renderer");f(this,"api");f(this,"mvf");f(this,"options",{});f(this,"styleMap");f(this,"animations",new Map);f(this,"Models",{add:(e,r,o)=>{var b;let y=o,{floorId:a,scale:s}=y,l=Qt(y,["floorId","scale"]),c=a?this.floorsById.get(a):void 0,p=c==null?void 0:c.layers.get(kr),d=A({},l);s!=null&&(d.scale=Array.isArray(o.scale)?o.scale:[o.scale,o.scale,o.scale]);let h=this.renderer.addModelGroup(e,{type:"FeatureCollection",features:r.map(I=>({type:"Feature",properties:{id:xe(),rotation:o.rotation,scale:d.scale,interactive:o.interactive},geometry:{type:"Point",coordinates:ir(I)}}))},d,{parent:(b=p==null?void 0:p.containerId)!=null?b:c==null?void 0:c.id});if(h==null)throw new tt("error creating model");return this.renderer.getState(h).children},remove:(e,r)=>{this.renderer.remove(e)}});f(this,"Image3D",{add:(e,r,o)=>{var y;let h=o,{floorId:a,flipImageToFaceCamera:s,maxImageSize:l}=h,c=Qt(h,["floorId","flipImageToFaceCamera","maxImageSize"]),p=a?this.floorsById.get(a):this.currentFloor,d={type:"Feature",properties:c,geometry:{type:"Point",coordinates:e}};return this.renderer.addImage((y=o.id)!=null?y:xe(),d,{url:r,flipImageToFaceCamera:s!=null?s:!1,maxImageSize:l},p.id)},remove:e=>{this.renderer.remove(e)},removeAll:()=>{}});f(this,"Markers",{add:(e,r,o)=>{let a=fa(e,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),h=o,{attachTo:s}=h,l=Qt(h,["attachTo"]),c=l;l.rank==="initial"&&(c.rank="medium");let p=a.layers.get(Fr),d=this.renderer.addMarker2D(ir(e),r,W(A({},c),{occluderId:a==null?void 0:a.occluderId,attachTo:s}),p==null?void 0:p.containerId);if(!d)throw new tt("Failed to create Marker");return d},remove:e=>{this.renderer.remove(e)},getContentEl:e=>{let r=this.renderer.getState(e);if((r==null?void 0:r.type)==="marker")return r.element},removeAll:()=>{},setPosition:(e,r,o)=>{var l;let a=this.renderer.getState(e),s=o?this.floorsById.get(o):this.currentFloor;if(!a){k.error('Failed to retrieve state for Marker with id "'.concat(e,'".'));return}if(a.type!=="marker"){k.error('Geometry with id "'.concat(e,'" is not of type "marker".'));return}this.renderer.setState(a,{position:r,parent:(l=s==null?void 0:s.layers.get(Fr))==null?void 0:l.containerId})},animateTo:(e,r,o,a)=>{let s=this.renderer.getState(e),l=o?this.floorsById.get(o):this.currentFloor;if(!s)return k.error('Failed to retrieve state for Marker with id "'.concat(e,'".')),Promise.resolve();if(s.type!=="marker")return k.error('Geometry with id "'.concat(e,'" is not of type "marker".')),Promise.resolve();let c=A({duration:1e3,easing:"ease-in-out"},a);this.cancelAnimation(e);let p=new vn({lon:s.position[0],lat:s.position[1]}).to({lon:r[0],lat:r[1]},c.duration).easing(Pi[c.easing]).onUpdate(({lon:d,lat:h})=>{var b;if(!this.renderer.getState(e))this.cancelAnimation(e);else{let I=(b=l==null?void 0:l.layers.get(Fr))==null?void 0:b.containerId;I&&this.Markers.setPosition(e,[d,h],I)}}).start();return this.renderer.getInternalTweenGroup().add(p),this.renderer.render(),this.animations.set(e,p),Kd(p).then(()=>{this.animations.delete(e)})}});f(this,"Exporter",{getCurrentSceneGLTF:async e=>this.renderer.getCurrentSceneGLTF(e)});f(this,"Shapes",{add:(e,r,o)=>{let a=o!=null&&o.floorId?this.floorsById.get(o==null?void 0:o.floorId):this.currentFloor,s="shape-"+xe();return this.renderer.addGeometryGroup(s,e,r,a.id),s},remove:e=>(this.renderer.remove(e.id),e.id)});f(this,"Text3D",{label:(e,r,o)=>{var s;if(!((s=this.api.getMapDataInternal())!=null&&s.enterpriseMode)){k.warn("Enterprise mode is not enabled, skipping label creation");return}let a=Gm(this.renderer,e,r,o);if(a)return{textInfo:a,target:e}},labelAll:(e={})=>{var a;if(!((a=this.api.getMapDataInternal())!=null&&a.enterpriseMode))return k.warn("Enterprise mode is not enabled, skipping label creation"),[];let r=this.api.getMapData();if(!r)return[];let o=[];return r.getByType("space").forEach(s=>{var l,c;if(s.enterpriseLocations[0]){let p=Gm(this.renderer,s,(c=(l=s.enterpriseLocations[0])==null?void 0:l.name)!=null?c:s.name,e);p&&o.push({textInfo:p,target:s})}}),o},add:(e,r,o)=>{var C;let{rotation:a=0,appearance:s}=o,{fontSize:l=12,color:c="black",font:p=""}=s!=null?s:{},d=fa(e,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),y={type:"Feature",properties:{text:r,rotation:a,verticalOffset:(C=e.verticalOffset)!=null?C:0,fontSize:l,color:c,align:"center",visible:!0,fontFamily:p},geometry:{type:"Point",coordinates:ir(e)}},b=xe();return this.renderer.addText3D(b,y,{appearance:W(A({},s),{fontSize:l,color:c,font:p||void 0})},d.id)},remove:e=>(this.renderer.remove(e),e)});f(this,"Labels",{all:({onCreate:e,labelOptions:r={}})=>{for(let o of Object.entries(this.mvf.space)){let[a,s]=o;s&&s.features.forEach(l=>{var C,P,O,U;let c=(C=this.api.getMapData())==null?void 0:C.getById("space",l.properties.id);if(!c)return;let p=(P=this.styleMap[l.properties.id])==null?void 0:P.showImage,d=(O=l.properties.details)==null?void 0:O.images,h=p&&((U=d==null?void 0:d[0])!=null&&U.url)?{icon:d[0].url}:{},y=A({icon:h.icon},r.appearance),I=(a?this.floorsById.get(a):this.currentFloor).layers.get(rn);if(l.properties.center&&c.name!==""){let H=this.renderer.addLabel2D(l.properties.center,c.name,W(A({id:l.properties.id+"-label"},r),{appearance:y,rank:r.rank,attachTo:ha(c)}),qe.is(c)?c.id:I==null?void 0:I.containerId);H&&e(H.id,c.name,c)}})}},add:(e,r,o={})=>{let d=o,{attachTo:a}=d,s=Qt(d,["attachTo"]),l=fa(e,this.floorsById,this.api.mapObjects[0].floorsById.get("default-floor")),c=l.layers.get(rn),p=this.renderer.addLabel2D(ir(e),r,W(A({},s),{occluderId:l.occluderId,attachTo:a}),c==null?void 0:c.containerId);if(!p)throw new tt("label creating failed");return p},remove:({entityId:e})=>{this.renderer.remove(e)},removeAll:()=>{}});f(this,"Paths",{add:(e,r,o)=>{var h,y;let a=r?Ra(r):void 0,s=(h=r==null?void 0:r.animateDrawing)!=null?h:!0,l=[],c=e[0].floorId||"root",p=0;for(let b of e){let I=(y=b.floorId)!=null?y:c,{latitude:C,longitude:P}=b;I!==c&&(p++,c=I),l[p]==null&&l.push({floorId:I,coordinates:[]});let O=b.floorId===I?b:new re({longitude:P,latitude:C,floorId:I});l[p].coordinates.push(O)}let d=l.reduce((b,{floorId:I,coordinates:C},P)=>{var H,V,B,q,N,J,se,z,ie;if(P!==0){let me=l[P-1],ve=me.coordinates[me.coordinates.length-1],ye=C[0],X=ir(ve),$=ir(ye),he=this.floorsById.get(me.floorId),ee=this.floorsById.get(I),ne=he==null?void 0:he.floorStackId,de=ee==null?void 0:ee.floorStackId,ge=ne?this.getFloorStackAltitudeData(ne):void 0,Le=de?this.getFloorStackAltitudeData(de):void 0,Me=(B=(V=ge==null?void 0:ge.get((H=he==null?void 0:he.elevation)!=null?H:0))==null?void 0:V.altitude)!=null?B:0,We=(J=(N=Le==null?void 0:Le.get((q=ee==null?void 0:ee.elevation)!=null?q:0))==null?void 0:N.altitude)!=null?J:0,_e=(se=o==null?void 0:o.__EXPERIMENTAL_JUNCTION_INSET)!=null?se:0;Xd(X,$,_e,Me,We);let It=$d(o==null?void 0:o.__EXPERIMENTAL_BILLBOARDING,Me,We,X,$),qt=o?W(A({},o),{__EXPERIMENTAL_BILLBOARDING:It}):a,Er=qt?Ra(qt):a,cr=this.renderer.addPath({type:"FeatureCollection",features:[{type:"Feature",properties:{parentId:me.floorId},geometry:{type:"Point",coordinates:X}},{type:"Feature",properties:{parentId:I},geometry:{type:"Point",coordinates:$}}]},Er,this.id);cr&&(s&&this.renderer.setState(cr.id,{completeFraction:0}),b.push(W(A({},cr),{coordinates:[ve,ye]})))}if(C.length<2)return b;let O=(ie=(z=this.floorsById.get(I))==null?void 0:z.layers.get(nn))==null?void 0:ie.containerId,U=this.renderer.addPath({type:"FeatureCollection",features:C.map(me=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:ir(me)}}))},a,O!=null?O:I);return U&&(s&&this.renderer.setState(U.id,{completeFraction:0}),b.push(W(A({},U),{coordinates:C}))),b},[]);if(s){let b=[],I=this.api.getMapData();return d.forEach(C=>{var O;let P=Ig(C,I,this.api);b.push(new vn({fraction:0}).to({fraction:1},P?(O=r==null?void 0:r.drawDuration)!=null?O:1500:0).onUpdate(U=>{this.renderer.setState(C.id,{completeFraction:U.fraction})}))}),b.forEach((C,P)=>{P<b.length-1&&C.chain(b[P+1]),this.renderer.getInternalTweenGroup().add(C)}),b[0].start(),this.renderer.render(),this.animations.set(d[0].id.toString(),b[0]),{paths:d,animation:Kd(b[b.length-1]).then(()=>{this.animations.delete(d[0].id.toString())})}}else return{paths:d,animation:Promise.resolve()}},remove:e=>{e.forEach(r=>{this.cancelAnimation(r),this.renderer.remove(r)})}});M(this,Ne,{enabled:!1,floorGap:"auto",updateCameraElevationOnFloorChange:!0,footprintColor:Rn.color,footprintOpacity:void 0,footprintOutline:!0,spacesOpenToBelowEnabled:!1});this.renderer=a.core,this.api=a,this.id=e,this.renderer.addGroupContainer(e,{},"root"),this.options=o!=null?o:{},this.mvf=(p=r==null?void 0:r.mvf)!=null?p:{};let s=bg(this.mvf["styles.json"]||{});if(this.styleMap=s,E(this,Ne,A(A({},i(this,Ne)),o==null?void 0:o.multiFloorView)),!r){this.id!=="outdoors-container"&&k.warn("Map (".concat(this.id,") created with no data."));let b=new al({id:"default-stack",externalId:"default-stack",name:"Default Stack",maps:["default-floor"]},this.id,this.renderer);this.floorStacksById.set(b.id,b),this.currentFloorStackId=b.id;let I=new il(b.id,{id:"default-floor",externalId:"default-floor",name:"Default Floor",elevation:0},this,i(this,Ne),o!=null?o:{});this.floorsById.set(I.id,I),b.addFloor(I),this.setFloor(I.id);return}let l=r.getMVFFeatureByType("floor-stack");if(l==null||l.length===0)throw new tt("MVF does not contain any Floor Stacks.");for(let b of l){let I=new al(b,this.id,this.renderer,(d=this.mvf.facade)==null?void 0:d[b.id]);for(let C of I.floorIds){let P=r.getMVFFeatureById("floor",C);if(P!=null){let O=new il(I.id,P,this,i(this,Ne),o!=null?o:{},this.mvf,s,r);this.floorsById.set(O.id,O),I.addFloor(O)}}if(I.floorObjects.length<1){k.warn("Floor stack ".concat(b.id," has no floors. It will not be loaded."));continue}this.floorStacksById.set(b.id,I),this.currentFloorStackId||(this.currentFloorStackId=b.id)}for(let[b]of Object.entries(r.facadesBySpaceId)){let I=r.getById("space",b);I&&(this.outdoorFloorStacks.add(I.floor.floorStack.id),(h=this.floorsById.get(I.floor.id))==null||h.setVisible(!0))}let c=(y=this.mvf.enterprise)==null?void 0:y.venue.defaultMap;if(o!=null&&o.initialFloor){let b=ms(o.initialFloor);b&&this.floorsById.has(b)?c=b:k.error("Invalid initial floor specified (".concat(o.initialFloor,"), using default behavior instead"))}c||(c=this.currentFloorStack.defaultFloor.id),this.startingFloorId=c}get currentFloorStack(){let e=this.floorStacksById.get(this.currentFloorStackId);if(!e)throw new tt('Current floor stack with id "'.concat(this.currentFloorStackId,'" not found'));return e}setFloorStack(e,r){if(this.currentFloorStackId===e)return;let o=this.floorStacksById.get(e);if(o==null){k.error("Invalid floor stack passed to setFloorStack (".concat(e,"), the floor stack was not changed. Current floor stack is still ").concat(this.currentFloorStack.id,"."));return}if(o.floorObjects.length===0){k.error("Floor stack (".concat(e,") has no floors. The floor stack was not changed. Current floor stack is still ").concat(this.currentFloorStack.id,"."));return}this.setFloor(o.defaultFloor.id,r)}get currentFloor(){let e=this.floorsById.get(this.currentFloorId);if(!e)throw new tt('Floor with id "'.concat(this.currentFloorId,'" not found'));return e}get floors(){return Array.from(this.floorsById.values())}processFloorChange(e){var a,s,l,c,p,d,h,y,b,I,C,P,O;if(this.api.manualFloorVisibility===!0)return;let r=(a=this.api.getMapDataInternal())==null?void 0:a.getById("floor",e),o=(s=this.api.getMapDataInternal())==null?void 0:s.getById("floor-stack",this.currentFloorStackId);if(r&&o){let U=r.floorStack.id===(o==null?void 0:o.id),H=(l=this.api.getMapDataInternal())==null?void 0:l.getById("floor-stack",r.floorStack.id);if((c=i(this,Ne))!=null&&c.enabled&&H){if(!U)for(let B of this.floorStacksById.values())B.id!==H.id&&B.floorObjects.forEach(q=>{q.setVisible(!1)});let V=Tu(H.floors,r,((d=(p=this.api.Navigation)==null?void 0:p.floors)==null?void 0:d.map(B=>B.id))||[],this.getFloorStackAltitudeData(H.id),{color:(h=i(this,Ne).footprintColor)!=null?h:Rn.color,opacity:i(this,Ne).footprintOpacity,outline:(y=i(this,Ne).footprintOutline)!=null?y:!0,spacesOpenToBelowEnabled:(b=i(this,Ne).spacesOpenToBelowEnabled)!=null?b:!1,spacesOpenToBelowVisualEffectEnabled:i(this,Ne).spacesOpenToBelowVisualEffectEnabled,spacesOpenToBelowVisualEffectDarkenAmount:i(this,Ne).spacesOpenToBelowVisualEffectDarkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:i(this,Ne).spacesOpenToBelowVisualEffectDarkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:i(this,Ne).spacesOpenToBelowVisualEffectDesaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:i(this,Ne).spacesOpenToBelowVisualEffectDesaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:i(this,Ne).spacesOpenToBelowVisualEffectWashOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:i(this,Ne).spacesOpenToBelowVisualEffectWashOutUseDepth});if((C=(I=this.api)==null?void 0:I.Outdoor)==null||C.setOpacity(V.outdoorOpacity),V.floorStates.forEach(B=>{var q;if(B.floor){let N=(q=this.api.getMapData())==null?void 0:q.getById("floor",B.floor.id);N&&this.api.updateState(N,B.state)}}),i(this,Ne).updateCameraElevationOnFloorChange){let B=this.getFloorStackAltitudeData(H.id);this.api.Camera.setElevation((O=(P=B.get(r.elevation))==null?void 0:P.altitude)!=null?O:0)}}else for(let V of this.floorStacksById.values())V.floorObjects.forEach(B=>{B.id!==e&&B.setVisible(!1)})}}updateMultiFloorViewEffects(e){E(this,Ne,A(A({},i(this,Ne)),e)),this.processFloorChange(this.currentFloorId)}getMultiFloorViewEffects(){var e,r,o,a,s,l,c;return{spacesOpenToBelowVisualEffectEnabled:(e=i(this,Ne).spacesOpenToBelowVisualEffectEnabled)!=null?e:!0,spacesOpenToBelowVisualEffectDarkenAmount:(r=i(this,Ne).spacesOpenToBelowVisualEffectDarkenAmount)!=null?r:.2,spacesOpenToBelowVisualEffectDarkenUseDepth:(o=i(this,Ne).spacesOpenToBelowVisualEffectDarkenUseDepth)!=null?o:!0,spacesOpenToBelowVisualEffectDesaturateAmount:(a=i(this,Ne).spacesOpenToBelowVisualEffectDesaturateAmount)!=null?a:0,spacesOpenToBelowVisualEffectDesaturateUseDepth:(s=i(this,Ne).spacesOpenToBelowVisualEffectDesaturateUseDepth)!=null?s:!0,spacesOpenToBelowVisualEffectWashOutAmount:(l=i(this,Ne).spacesOpenToBelowVisualEffectWashOutAmount)!=null?l:0,spacesOpenToBelowVisualEffectWashOutUseDepth:(c=i(this,Ne).spacesOpenToBelowVisualEffectWashOutUseDepth)!=null?c:!1}}setFloor(e,r){if(this.currentFloorId===e)return;if(!this.floorsById.get(e)){k.error("Invalid floor passed to setFloor (".concat(e,"), the floor was not changed. Current floor is still ").concat(this.currentFloor.id));return}let a=this.currentFloorId;this.publish("floor-change-start",{previousFloorId:a,floorId:e,reason:r}),this.currentFloorStack&&this.processFloorChange(e),this.currentFloorId=e,this.currentFloorStackId=this.currentFloor.floorStackId,this.currentFloor.setVisible(!0),this.updateOutdoorPathLayerVisibility(),this.publish("floor-change",{reason:r,floorId:this.currentFloor.id,previousFloorId:a})}updateOutdoorPathLayerVisibility(){var r;let e=this.api.hidePathsNotOnCurrentFloor===!0&&!((r=this.options.multiFloorView)!=null&&r.enabled);for(let o of this.floorsById.values()){let a=this.floorStacksById.get(o.floorStackId);if(!(a!=null&&a.isOutdoors))continue;let s=o.layers.get(nn);if(!s)continue;let l=!e||o.id===this.currentFloor.id;s.setVisible(l)}}getFloorStackAltitudeData(e){var r,o;return(o=(r=this.floorStacksById.get(e))==null?void 0:r.altitudeMap)!=null?o:new Map}cancelAnimation(e){let r=this.animations.get(e);r&&(r.stop(),this.animations.delete(e),this.renderer.getInternalTweenGroup().remove(r))}loadAllFloors(){for(let e of this.floorStacksById.values())e.loadAllFloors(i(this,Ne))}};Ne=new WeakMap;function Gm(n,t,e,r){return n.labelText3D(t.id,e!=null?e:t.name,W(A({},r),{parentId:t.floor.id}))}m();var Ir,cl,ll=class{constructor({currentMapGetter:t}){M(this,Ir,new Map);M(this,cl);E(this,cl,t)}get currentMap(){return i(this,cl).call(this)}getAll(){return Array.from(i(this,Ir).values()).map(({marker:t})=>t)}getById(t){return i(this,Ir).get(t)}add(t,e,r){var p;let o=t.anchorTarget;if(!o)throw new Error("get coordinate failed");let a=this.currentMap;if(!a)throw new Error("currentMap should exist");let s=a.Markers.add(o,e,W(A({},r),{rank:(r==null?void 0:r.rank)||"medium",dynamicResize:(p=r==null?void 0:r.dynamicResize)!=null?p:!0,attachTo:ha(t)}));if(s==null)throw new Error("error creating marker");let l=a.Markers.getContentEl(s.id.toString());if(!l)throw new Error("marker component should exist");let c=new ln(s.id.toString(),l,t);return i(this,Ir).set(c.id,{marker:c,entityId:s.id.toString()}),c}remove(t){var r;let e=i(this,Ir).get(t.id);e&&((r=this.currentMap)==null||r.Markers.remove(e.entityId),i(this,Ir).delete(t.id.toString()))}removeAll(){let t=[];return i(this,Ir).forEach(({marker:e})=>{this.remove(e),t.push(e),i(this,Ir).delete(e.id.toString())}),t}setPosition(t,e){var s;let r=e.anchorTarget;if(!r){k.error("Cannot determine coordinate from target.");return}let o=this.currentMap;if(!o){k.error("Cannot determine the current map.");return}let a=i(this,Ir).get(t.id);if(!a){k.error('Cannot find the Marker with id "'.concat(t.id,'".'));return}o.Markers.setPosition(a.entityId,ir(r),(s=r.floorId)!=null?s:o.currentFloorId),a.marker.updateTarget(e)}animateTo(t,e,r){var l;let o=e.anchorTarget;if(!o)return k.error("Cannot determine coordinate from target."),Promise.resolve();let a=this.currentMap;if(!a)return k.error("Cannot determine the current map."),Promise.resolve();let s=i(this,Ir).get(t.id);return s?(s.marker.updateTarget(e),a.Markers.animateTo(s.entityId,ir(o),(l=o.floorId)!=null?l:a.currentFloorId,r)):(k.error('Cannot find the Marker with id "'.concat(t.id,'".')),Promise.resolve())}};Ir=new WeakMap,cl=new WeakMap;m();var Vn,dl,Va,zc,Um,pl=class{constructor({currentMapGetter:t,mapDataInternalGetter:e}){M(this,zc);M(this,Vn,new Map);M(this,dl);M(this,Va);E(this,dl,t),E(this,Va,e)}get currentMap(){return i(this,dl).call(this)}getById(t){return i(this,Vn).get(t)}add(t,e,r){var p,d,h;let o=t.anchorTarget;if(!o)throw new Error("Target does not implement IAnchorable.");let a=this.currentMap;if(!a)throw new Error("currentMap should exist");let s=a.Image3D.add(ir(o),e,W(A({},r),{floorId:o.floorId,verticalOffset:o.verticalOffset+((p=r.verticalOffset)!=null?p:0)}));if(!s)throw new Error("image component should exist");let l=(d=i(this,Va))==null?void 0:d.call(this),c=new rr(s.id.toString(),e,t,l==null?void 0:l.tokenManager);if(i(this,Vn).set(c.id,{image:c,entityId:s.id.toString(),anchorId:r.anchorId}),r.anchorId!=null&&l!=null){let y=(h=l.floorImagesByAnchorId.get(r.anchorId))!=null?h:[];y.push(c),l.floorImagesByAnchorId.set(r.anchorId,y)}return c}remove(t){var r;let e=i(this,Vn).get(t.id);e&&((r=this.currentMap)==null||r.Image3D.remove(e.entityId),i(this,Vn).delete(t.id),Y(this,zc,Um).call(this,e.anchorId,t))}removeAll(){let t=[];return i(this,Vn).forEach(({image:e})=>{this.remove(e),t.push(e),i(this,Vn).delete(e.id.toString())}),t}};Vn=new WeakMap,dl=new WeakMap,Va=new WeakMap,zc=new WeakSet,Um=function(t,e){var s,l;if(t==null)return;let r=(l=(s=i(this,Va))==null?void 0:s.call(this))==null?void 0:l.floorImagesByAnchorId;if(r==null)return;let o=r.get(t);if(o==null)return;let a=o.filter(c=>c!==e);a.length===0?r.delete(t):r.set(t,a)};m();var cn,fl,hl,ul=class{constructor({currentMapGetter:t,mapDataInternalGetter:e}){M(this,cn,new Map);M(this,fl);M(this,hl);E(this,fl,t),E(this,hl,e)}get currentMap(){return i(this,fl).call(this)}getById(t){return i(this,cn).get(t)}add(t,e,r){let o=[t],a=o.reduce((c,p)=>{var h,y;if(!p)return k.error("Cannot determine coordinate from options."),c;let d=(h=fa(p,this.currentMap.floorsById,this.currentMap.floorsById.get("default-floor")))==null?void 0:h.id;return c.has(d)||c.set(d,[]),(y=c.get(d))==null||y.push(p),c},new Map);if(!o.length)throw new Error("targets should not be empty when adding a model");let s=this.currentMap;if(!s)throw new Error("currentMap should exist");let l=[];return a.forEach((c,p)=>{var y;let d=xe();s.Models.add(d,c,W(A({},r),{url:e,floorId:p,verticalOffset:c[0].verticalOffset+((y=r==null?void 0:r.verticalOffset)!=null?y:0)})).forEach(b=>{let I=new li(b.toString(),d,c[0]);i(this,cn).set(I.id,{model:I,entityId:b.toString(),groupId:d}),l.push(I)})}),l[0]}all(){var a,s,l;let t=(a=i(this,hl))==null?void 0:a.call(this);if(!t)return[];let e=t.getByType("enterprise-venue");if(!e)return[];let r=(s=e.extra)==null?void 0:s.models;if(!((l=r==null?void 0:r.models)!=null&&l.length))return[];let o=[];for(let c of r.models){if(!(c!=null&&c.url)||!c.coordinate||!t.getById("floor",c.coordinate.floorId))continue;let d=new re({latitude:c.coordinate.latitude,longitude:c.coordinate.longitude,floorId:c.coordinate.floorId,verticalOffset:c.coordinate.verticalOffset}),h=this.add(d,c.url,{visible:!0,rotation:c.rotation,scale:c.scale,material:{Default:{color:c.color},Fabric:{color:c.color}},EXPERIMENTAL_clippingEnabled:!!c.manifolded});o.push(h)}return o}remove(t){var r;let e=i(this,cn).get(t.id);e&&((r=this.currentMap)==null||r.Models.remove(e.entityId,e.groupId),i(this,cn).delete(t.id.toString()))}removeAll(){let t=[];return i(this,cn).forEach(({model:e})=>{var o;let r=i(this,cn).get(e.id);r&&(t.push(e),(o=this.currentMap)==null||o.Models.remove(r.entityId,r.groupId),i(this,cn).delete(e.id.toString()))}),t}};cn=new WeakMap,fl=new WeakMap,hl=new WeakMap;m();var Hr,ml,gl=class{constructor({currentMapGetter:t}){M(this,Hr,new Map);M(this,ml);E(this,ml,t)}get currentMap(){return i(this,ml).call(this)}getById(t){var e;return(e=i(this,Hr).get(t))==null?void 0:e.path}add(t,e){let r=this.currentMap;if(!r)throw new Error("currentMap should exist");let o=r.Paths.add(t,e),a=o.paths.map(l=>l.id.toString()),s=new jr((e==null?void 0:e.id)||xe(),o.animation,t,o.paths);for(let l of a)i(this,Hr).set(l,{path:s,entityIds:a});return i(this,Hr).set(s.id,{path:s,entityIds:a}),s}highlightPathSection(t,e,r,o){var h,y,b,I;let a=(y=(h=this.currentMap)==null?void 0:h.api.getMapData())==null?void 0:y.mapCenter;if(!a)return;let s=Uc([t],e,r,a);if(!s)return;let l=(b=o==null?void 0:o.animationDuration)!=null?b:1500,c=()=>{},p=new Promise(C=>{c=C}),d=new vn({fraction:0}).to({fraction:1},l).onUpdate(C=>{var P;for(let O of s)(P=this.currentMap)==null||P.api.updateState(O.segment,{highlightCompleteFraction:C.fraction})}).onStart(()=>{var C,P,O;for(let U of s)(O=this.currentMap)==null||O.api.updateState(U.segment,{highlightStartFraction:U.startHighlightFraction,highlightEndFraction:U.endHighlightFraction,highlightColor:(C=o==null?void 0:o.color)!=null?C:"red",highlightWidthMultiplier:(P=o==null?void 0:o.widthMultiplier)!=null?P:1})}).onComplete(()=>{var C;c(),(C=this.currentMap)==null||C.api.removeTween(d)});return(I=this.currentMap)==null||I.api.tweenGroup().add(d),d.start(),{animation:p}}clearHighlightedPathSection(t){var e;(e=this.currentMap)==null||e.api.updateState(t,{highlightCompleteFraction:0,highlightStartFraction:0,highlightEndFraction:0})}clearAllHighlightedPathSections(){for(let t of i(this,Hr).values())this.clearHighlightedPathSection(t.path)}remove(t){var r;let e=i(this,Hr).get(t.id);e&&((r=this.currentMap)==null||r.Paths.remove(e.entityIds),i(this,Hr).delete(t.id),e.entityIds.forEach(o=>i(this,Hr).delete(o)))}removeAll(){let t=[];return i(this,Hr).forEach(({path:e})=>{this.remove(e),t.push(e)}),t}};Hr=new WeakMap,ml=new WeakMap;m();var jn,bl,yl=class{constructor({currentMapGetter:t}){M(this,jn,new Map);M(this,bl);E(this,bl,t)}get currentMap(){return i(this,bl).call(this)}getById(t){return i(this,jn).get(t)}add(t,e,r){let o=this.currentMap;if(!o)throw new Error("currentMap should exist");let a=o.Shapes.add(t,e||{},{floorId:r==null?void 0:r.id}),s=new Fn(a);return i(this,jn).set(s.id,s),s}remove(t){var r;i(this,jn).get(t.id)&&((r=this.currentMap)==null||r.Shapes.remove(t),i(this,jn).delete(t.id.toString()))}removeAll(){let t=[];return i(this,jn).forEach(e=>{this.remove(e),t.push(e.id),i(this,jn).delete(e.id.toString())}),t}};jn=new WeakMap,bl=new WeakMap;m();var Il,vl=class{constructor({currentMapGetter:t}){M(this,Il);E(this,Il,t)}get currentMap(){return i(this,Il).call(this)}setFromStyleCollection(t){var e,r,o,a,s;for(let l in t)for(let c of((e=this.currentMap)==null?void 0:e.floors)||[]){if(t[l]==null||!c.layers.has(Ze))continue;let p=c.layers.get(Ze);for(let y of Object.values(t))if(y&&"polygons"in y&&"color"in y)for(let b of y.polygons)(r=this.currentMap)==null||r.renderer.setState(b,{color:y.color});if(p!=null&&p.layers.has(l)&&"color"in t[l]){let y=p.layers.get(l);y&&((o=this.currentMap)==null||o.renderer.setState(y,{color:t[l].color}))}if(p&&l===no&&!(tn in t)){let y=p.layers.get(tn);y&&"color"in t[l]&&((a=this.currentMap)==null||a.renderer.setState(y,{color:t[l].color}))}if(!c.layers.has(jo))continue;let d=c.layers.get(jo),h=c.facadesByStyleId.get(l);if(h&&h.length>0)for(let y of h){let b=d.layers.get("".concat(y,"-").concat(l));b&&"color"in t[l]&&((s=this.currentMap)==null||s.renderer.setState(b,{color:t[l].color}))}}}};Il=new WeakMap;m();var Eu={opacity:1},Ct,Tl,Sl,To,Gn,hi,xu,Hm,ja=class{constructor(t,e){M(this,hi);M(this,Ct);M(this,Tl,[]);M(this,Sl,{opacity:"initial"});M(this,To,{opacity:new Map});M(this,Gn,new Set);E(this,Ct,t),E(this,Tl,e||[]);let r=i(this,Ct).map;r&&r.on("idle",()=>{i(this,To).opacity.size||Y(this,hi,xu).call(this,r)})}setStyle(t){var e,r;if(i(this,Ct).map){(e=i(this,Ct).map)==null||e.setStyle(t),i(this,Gn).size&&(i(this,Gn).clear(),this.hide()),Y(this,hi,Hm).call(this),Y(this,hi,xu).call(this,i(this,Ct).map),this.setOpacity(i(this,Sl).opacity),(r=i(this,Ct).map)==null||r.moveLayer(th);for(let[o,a]of i(this,Tl)||[])i(this,Ct).hideOutdoorLayersIntersectingPolygons(o,a)}}get map(){return i(this,Ct).map}get enabled(){return!!i(this,Ct).map}get visible(){return i(this,Gn).size===0}show(){let t=i(this,Ct).map;if(!t)return;let e=t.getStyle().layers;e&&(e.forEach(r=>{i(this,Gn).has(r.id)&&t.setLayoutProperty(r.id,"visibility","visible")}),i(this,Gn).clear())}hide(t=[]){let e=i(this,Ct).map;if(!e)return;let r=e.getStyle().layers;r&&r.forEach(o=>{let a=e.getLayoutProperty(o.id,"visibility");!t.includes(o.id)&&a!=="none"&&(e.setLayoutProperty(o.id,"visibility","none"),i(this,Gn).add(o.id))})}setOpacity(t,e=[]){var a,s,l;let r=i(this,Ct).map;if(!r)return;let o=(l=(s=(a=i(this,Ct).map)==null?void 0:a.getStyle)==null?void 0:s.call(a))==null?void 0:l.layers;o&&r.once("idle",()=>{o.forEach(c=>{let p=r.getLayoutProperty(c.id,"visibility");if(!e.includes(c.id)&&p!=="none")try{let d=i(this,To).opacity.get(c.id);d!==void 0&&(c.id==="background"||(c.type==="symbol"?(r.setPaintProperty(c.id,"icon-opacity",t==="initial"?d[0]:t),r.setPaintProperty(c.id,"text-opacity",t==="initial"?d[1]:t)):r.setPaintProperty(c.id,"".concat(c.type,"-opacity"),t==="initial"?d[0]:t)),i(this,Sl).opacity=t)}catch(d){k.warn("Error setting opacity:",d)}})})}};Ct=new WeakMap,Tl=new WeakMap,Sl=new WeakMap,To=new WeakMap,Gn=new WeakMap,hi=new WeakSet,xu=function(t){let e=t.getStyle().layers;e&&e.forEach(r=>{var a,s,l;t.getLayoutProperty(r.id,"visibility")!=="none"&&(r.id==="background"||(r.type==="symbol"?i(this,To).opacity.set(r.id,[(a=t.getPaintProperty(r.id,"icon-opacity"))!=null?a:Eu.opacity,(s=t.getPaintProperty(r.id,"text-opacity"))!=null?s:Eu.opacity]):i(this,To).opacity.set(r.id,[(l=t.getPaintProperty(r.id,"".concat(r.type,"-opacity")))!=null?l:Eu.opacity,void 0])))})},Hm=function(){Object.values(i(this,To)).forEach(t=>t.clear())};m();function dI(){oh(!1)}var pn,dn,Wr,Ml=class{constructor({currentMapGetter:t}){M(this,pn);M(this,dn,new Map);M(this,Wr,new Map);E(this,pn,t)}labelAll(t={}){var o,a;let e=[],r=new Set;return(a=(o=i(this,pn).call(this))==null?void 0:o.Text3D.labelAll(t))==null||a.forEach(({textInfo:s,target:l})=>{let c=s.id.toString(),p=i(this,Wr).get(c);if(p){r.has(c)||e.push(p.text3DView),r.add(c);return}r.add(c);let d=new kn(c,l);i(this,dn).set(d.id,{targetId:l.id,text3d:c,text3DView:d}),i(this,Wr).set(c,{text3DView:d}),e.push(d)}),e}label(t,e,r={}){var a;if(i(this,pn).call(this))if(qe.is(t)){let s=(a=i(this,pn).call(this))==null?void 0:a.Text3D.label(t,e,r);if(!s)return;let l=s.textInfo.id.toString(),c=i(this,Wr).get(l);if(c)return c.text3DView;let p=new kn(l,s.target);return i(this,dn).set(p.id,{targetId:s.target.id,text3d:l,text3DView:p}),i(this,Wr).set(l,{text3DView:p}),p}else throw new Error("Non-space target is not supported")}add(t,e,r={}){let o=i(this,pn).call(this);if(!o)throw new Error("Current map not found.");if(!re.is(t))throw new Error("Target must be a Coordinate");let a=t.anchorTarget,s=o.Text3D.add(a,e,r);if(!s)throw new Error("Failed to add Text3D.");let l=s.id.toString(),c=i(this,Wr).get(l);if(c)return k.warn("Text3DView with ID ".concat(l," already exists. A new Text3DView will not be created. Returning existing. ")),c.text3DView;let p=new kn(l,t);return i(this,dn).set(p.id,{targetId:t.id,text3d:l,text3DView:p}),i(this,Wr).set(l,{text3DView:p}),p}remove(t){var o;let e=typeof t=="string"?t:t.id,r=i(this,dn).get(e);r&&((o=i(this,pn).call(this))==null||o.Text3D.remove(r.text3d),i(this,dn).delete(e),i(this,Wr).delete(r.text3d))}removeAll(){i(this,dn).forEach(t=>{var e;(e=i(this,pn).call(this))==null||e.Text3D.remove(t.text3d)}),i(this,dn).clear(),i(this,Wr).clear()}};pn=new WeakMap,dn=new WeakMap,Wr=new WeakMap;m();m();import zr from"zod";var Wm="doors",_u=zr.object({type:zr.literal(Wm).default(Wm),color:zr.string().default("#ffffff"),topColor:zr.string().optional(),texture:zr.object({url:zr.string().optional()}).optional(),topTexture:zr.object({url:zr.string().optional()}).optional(),visible:zr.boolean().default(!1),opacity:zr.number().default(1)}),$c=_u.partial(),Bw=zr.strictObject(_u.shape);function zm(n){let{color:t,topColor:e,texture:r,topTexture:o,visible:a,opacity:s}=n;return bt(_u,{visible:a,color:t,topColor:e,opacity:s,texture:r?{url:r}:void 0,topTexture:o?{url:o}:void 0})}function Xc(n,t){var r,o;let e={};return t==null||(n.color&&(n.color==="initial"?e.color=t.initialColor:e.color=n.color),n.topColor&&(n.topColor==="initial"?e.topColor=t.initialTopColor:e.topColor=n.topColor),n.visible!==void 0&&(e.visible=n.visible),((r=n.texture)==null?void 0:r.url)!==void 0&&(e.texture=n.texture.url),((o=n.topTexture)==null?void 0:o.url)!==void 0&&(e.topTexture=n.topTexture.url),n.opacity!==void 0&&(e.opacity=n.opacity)),e}m();import{z as El}from"zod";var $m="facade",Cu=El.object({type:El.literal($m).default($m),opacity:El.number().default(1),visible:El.boolean().default(!0)}),Xm=Cu.partial(),Uw=El.strictObject(Cu.shape);function Ym(n){return bt(Cu,{opacity:n.opacity,visible:n.visible})}m();import{z as oe}from"zod";var $r="floor",Zm="".concat($r,".footprint"),Jm="".concat($r,".geometry"),qm="".concat($r,".labels"),Qm="".concat($r,".markers"),Km="".concat($r,".images"),ey="".concat($r,".occlusion"),ty="".concat($r,".paths"),ry="".concat($r,".areas"),ny="".concat($r,".models"),gi=oe.object({type:oe.literal(Zm).default(Zm),altitude:oe.number().default(0),visible:oe.boolean().default(!1),height:oe.number().default(0),opacity:oe.number().default(1),side:oe.enum(["double","front","back"]).default("double"),color:oe.string().default("#ffffff"),ceilingVisible:oe.boolean().default(!0),basementMaskEnabled:oe.boolean().default(!1),outline:oe.boolean().default(!0),ceilingThickness:oe.number().default(.2)}),Zw=gi.partial(),Yc=oe.object({type:oe.literal(Jm).default(Jm),opacity:oe.number().default(1),visible:oe.boolean().default(!0),maskId:oe.number().nullable().default(null),maskEffect:oe.enum(["hide","reveal"]).default("hide"),maskMode:oe.enum(["mask","masked-object"]).default("mask"),maskEnabled:oe.boolean().default(!1),effectStart:oe.number().default(0),effectDistance:oe.number().default(0),darkenAmount:oe.number().default(0),darkenUseDepth:oe.boolean().default(!0),desaturateAmount:oe.number().default(0),desaturateUseDepth:oe.boolean().default(!0),washOutAmount:oe.number().default(0),washOutUseDepth:oe.boolean().default(!1)}),oy=Yc.partial(),Zc=oe.object({type:oe.literal(qm).default(qm),enabled:oe.boolean().default(!0)}),iy=Zc.partial(),Jc=oe.object({type:oe.literal(Qm).default(Qm),enabled:oe.boolean().default(!0)}),ay=Jc.partial(),qc=oe.object({type:oe.literal(Km).default(Km),visible:oe.boolean().default(!0),collisionsEnabled:oe.boolean().default(!1)}),sy=qc.partial(),Qc=oe.object({type:oe.literal(ey).default(ey),enabled:oe.boolean().default(!0)}),ly=Qc.partial(),Kc=oe.object({type:oe.literal(ty).default(ty),visible:oe.boolean().default(!0)}),cy=Kc.partial(),ep=oe.object({type:oe.literal($r).default($r),visible:oe.boolean().default(!1),altitude:oe.number().default(0)}),tp=oe.object({type:oe.literal(ry).default(ry),visible:oe.boolean().default(!0)}),py=tp.partial(),rp=oe.object({visible:oe.boolean().default(!0)}),dy=rp.partial(),np=oe.object({type:oe.literal(ny).default(ny),visible:oe.boolean().default(!0)}),uy=np.partial(),uI=oe.object(W(A({},ep.shape),{geometry:Yc,labels:Zc,markers:Jc,images:qc,footprint:gi,occlusion:Qc,paths:Kc,areas:tp,text3d:rp,models:np})),fy=ep.partial(),Jw=oe.object(W(A({},ep.shape),{geometry:Yc.partial(),labels:Zc.partial(),markers:Jc.partial(),images:qc.partial(),footprint:gi.partial(),occlusion:Qc.partial(),paths:Kc.partial(),areas:tp.partial(),text3d:rp.partial(),models:np.partial()})).partial(),qw=oe.strictObject(W(A({},ep.shape),{geometry:oe.strictObject(Yc.shape),labels:oe.strictObject(Zc.shape),markers:oe.strictObject(Jc.shape),images:oe.strictObject(qc.shape),footprint:oe.strictObject(gi.shape),occlusion:oe.strictObject(Qc.shape),paths:oe.strictObject(Kc.shape),areas:oe.strictObject(tp.shape),text3d:oe.strictObject(rp.shape),models:oe.strictObject(np.shape)}));function hy(n,t,e){var se,z,ie,me;if(!t){k.error("Floor is not defined. Cannot get floor state.");return}let r=t.layers.get(Ze),o=r?e==null?void 0:e.getState(r.containerId):void 0,a=t.layers.get(rn),s=t.layers.get(Fr),l=(se=t.footprintObject)==null?void 0:se.getState(),c=t.layers.get(Ro),p=c?e==null?void 0:e.getState(c.containerId):void 0,d=t.layers.get(Wi),h=d?e==null?void 0:e.getState(d.containerId):void 0,y=!1;if(r!=null&&r.layers)for(let ve of r.layers.values()){let ye=e==null?void 0:e.getState(ve);if((z=ye==null?void 0:ye.children)!=null&&z[0]){let X=e==null?void 0:e.getState(ye.children[0]);y=(ie=X==null?void 0:X.enableImageCollisions)!=null?ie:!1;break}}let b=t.layers.get(nn),I=b?e==null?void 0:e.getState(b.containerId):void 0,C=t.layers.get(Vo),P=C?e==null?void 0:e.getState(C.containerId):void 0,O=t.layers.get(kr),U=O?e==null?void 0:e.getState(O.containerId):void 0,H=!0,V=!0,B=!0,q=!0;for(let[,ve]of r.layers){let ye=e==null?void 0:e.getState(ve);ye!=null&&ye.maskId||(H=!1),ye!=null&&ye.maskEffect||(V=!1),ye!=null&&ye.maskMode||(B=!1),ye!=null&&ye.maskEnabled||(q=!1)}let N=e==null?void 0:e.getInternalState().geometry3DMap.get(t.id),J=!1;if((N==null?void 0:N.type)==="group-container"){let ve=N?e==null?void 0:e.getSystems().text3DSystem.getBatchedText(N):void 0;J=(me=ve==null?void 0:ve.visible)!=null?me:!0}return bt(uI,{geometry:{opacity:o==null?void 0:o.opacity,visible:o==null?void 0:o.visible,maskId:H,maskEffect:V,maskMode:B,maskEnabled:q},labels:{enabled:a==null?void 0:a.visible},markers:{enabled:s==null?void 0:s.visible},footprint:{altitude:l==null?void 0:l.altitude,visible:l==null?void 0:l.visible,height:l==null?void 0:l.height,opacity:l==null?void 0:l.opacity,side:l==null?void 0:l.side,color:l==null?void 0:l.color,ceilingVisible:l==null?void 0:l.ceilingVisible,basementMaskEnabled:l==null?void 0:l.basementMaskEnabled,outline:l==null?void 0:l.outline,ceilingThickness:l==null?void 0:l.ceilingThickness},images:{visible:h==null?void 0:h.visible,collisionsEnabled:y},occlusion:{enabled:p==null?void 0:p.visible},paths:{visible:I==null?void 0:I.visible},areas:{visible:P==null?void 0:P.visible},text3d:{visible:J},models:{visible:U==null?void 0:U.visible},visible:n.visible,altitude:n.altitude})}m();import{z as Ue}from"zod";var gy="geometry",Pu=Ue.object({type:Ue.literal(gy).default(gy),visible:Ue.boolean().default(!0),color:Ue.union([Ue.string(),Ue.literal("initial")]).default("#ffffff"),topColor:Ue.union([Ue.string(),Ue.literal("initial")]).optional(),hoverColor:Ue.union([Ue.string(),Ue.literal("initial")]).optional(),interactive:Ue.boolean().default(!1),opacity:Ue.number().default(1),height:Ue.number().default(0),altitude:Ue.number().default(0),texture:Ue.object({url:Ue.string()}).optional(),topTexture:Ue.object({url:Ue.string()}).optional(),flipImageToFaceCamera:Ue.boolean().default(!1),enableImageCollisions:Ue.boolean().default(!1),borderVisible:Ue.boolean().default(!1),borderColor:Ue.string().optional(),borderWidth:Ue.number().optional()}),wu=Pu.partial(),n9=Ue.strictObject(Pu.shape);function my(n){let{altitude:t,interactive:e,hoverColor:r,color:o,visible:a,opacity:s,height:l,texture:c,topTexture:p,flipImageToFaceCamera:d,enableImageCollisions:h,topColor:y,borderVisible:b,borderColor:I,borderWidth:C}=n;return bt(Pu,{interactive:e,hoverColor:r,color:o,visible:a,opacity:s,height:l,texture:c?{url:n.texture}:void 0,topTexture:p?{url:p}:void 0,flipImageToFaceCamera:d,enableImageCollisions:h,topColor:y,altitude:t,borderVisible:b,borderColor:I,borderWidth:C})}function yy(n,t){var r,o;let e={};return t==null||(n.color&&(n.color==="initial"?e.color=t.initialColor:e.color=n.color),n.topColor&&(n.topColor==="initial"?e.topColor=t.initialTopColor:e.topColor=n.topColor),n.visible!==void 0&&(e.visible=n.visible),((r=n.texture)==null?void 0:r.url)!==void 0&&(e.texture=n.texture.url),((o=n.topTexture)==null?void 0:o.url)!==void 0&&(e.topTexture=n.topTexture.url),n.hoverColor!==void 0&&(e.hoverColor=n.hoverColor),n.interactive!==void 0&&(e.interactive=n.interactive),n.height!==void 0&&(e.height=n.height),n.opacity!==void 0&&(e.opacity=n.opacity),n.flipImageToFaceCamera!==void 0&&(e.flipImageToFaceCamera=n.flipImageToFaceCamera),n.enableImageCollisions!==void 0&&(e.enableImageCollisions=n.enableImageCollisions),n.altitude!==void 0&&(e.altitude=n.altitude),n.borderVisible!==void 0&&(e.borderVisible=n.borderVisible),n.borderColor!==void 0&&(e.borderColor=n.borderColor),n.borderWidth!==void 0&&(e.borderWidth=n.borderWidth)),e}m();import Tr from"zod";var Ou="label",fI=Tr.object({type:Tr.literal(Ou).default(Ou),text:Tr.string(),rank:Tr.custom(n=>rc.safeParse(n).success||n==="initial"),appearance:Tr.custom(n=>ih.safeParse(n).success),interactive:Tr.boolean().default(!1),enabled:Tr.boolean().default(!0),textPlacement:Tr.union([Tr.enum(Zp),Tr.array(Tr.enum(Zp))]).default(Jp),occlude:Tr.boolean().default(!0)}),by=fI.partial();function vy(n){var o,a,s,l,c;let{text:t,enabled:e,options:r}=n;return{type:Ou,text:t!=null?t:"",appearance:ah((o=r==null?void 0:r.appearance)!=null?o:{}),rank:(a=r==null?void 0:r.rank)!=null?a:"medium",enabled:e!=null?e:!0,interactive:(s=r==null?void 0:r.interactive)!=null?s:!1,textPlacement:(l=r==null?void 0:r.textPlacement)!=null?l:Jp,occlude:(c=r==null?void 0:r.occlude)!=null?c:!0}}function Iy(n,t){let e={options:{}};if(!e.options)throw new Error("options should exist");return n.text&&(e.text=n.text),n.appearance&&(e.options.appearance=n.appearance),n.textPlacement&&(e.options.textPlacement=n.textPlacement),n.rank!=null&&(n.rank==="initial"?e.options.rank=t.initialRank||2:e.options.rank=n.rank),n.enabled!==void 0&&(e.enabled=n.enabled),n.interactive!==void 0&&(e.options.interactive=n.interactive),n.occlude!==void 0&&(e.options.occlude=n.occlude),n.enabled!==void 0&&(e.enabled=n.enabled),e}m();import nt from"zod";var Du="marker",hI=nt.object({type:nt.literal(Du).default(Du),rank:nt.custom(n=>rc.safeParse(n).success||n==="initial"),placement:nt.union([nt.enum(qp),nt.array(nt.enum(qp))]).optional(),interactive:nt.union([nt.boolean(),nt.literal("pointer-events-auto")]).default(!1),dynamicResize:nt.boolean().default(!0),enabled:nt.boolean().default(!0),zIndex:nt.number().optional(),lowPriorityPin:nt.object({enabled:nt.boolean().optional(),size:nt.number().positive().optional(),color:nt.string().optional()}).optional(),element:nt.custom(n=>n instanceof HTMLElement,{error:"Must be an HTMLElement instance"}),contentHTML:nt.string(),occlude:nt.boolean().default(!0)}),Ty=hI.omit({element:!0}).partial();function Sy(n,t){var y,b,I,C,P;let e=t!=null&&t.target?t.target.anchorTarget:void 0,{enabled:r,placement:o,element:a,dynamicResize:s,contentHTML:l,options:c,position:p,parent:d}=n,h=typeof d=="object"?d.id:d;return e==null&&(e=new re({latitude:(y=p==null?void 0:p[1])!=null?y:0,longitude:(b=p==null?void 0:p[0])!=null?b:0,floorId:h==null?void 0:h.toString()})),{type:Du,rank:(I=c==null?void 0:c.rank)!=null?I:"medium",interactive:(C=c==null?void 0:c.interactive)!=null?C:!1,enabled:r!=null?r:!0,element:a,placement:o!=null?o:[],zIndex:c==null?void 0:c.zIndex,dynamicResize:s!=null?s:!0,lowPriorityPin:c==null?void 0:c.lowPriorityPin,contentHTML:l!=null?l:"",occlude:(P=c==null?void 0:c.occlude)!=null?P:!0}}function My(n,t){let e={};return e.options={},n.rank!=null&&(n.rank==="initial"?e.options.rank=t.initialRank||2:e.options.rank=n.rank),n.dynamicResize!=null&&(e.options.dynamicResize=n.dynamicResize),n.enabled!=null&&(e.enabled=n.enabled),n.interactive!=null&&(e.options.interactive=n.interactive),n.enabled!=null&&(e.enabled=n.enabled),n.contentHTML!=null&&(e.contentHTML=n.contentHTML),n.placement!=null&&(e.placement=n.placement),n.occlude!=null&&(e.options.occlude=n.occlude),n.zIndex!=null&&(e.options.zIndex=n.zIndex),e}m();import{z as Pt}from"zod";var Ey="shape",Au=Pt.object({type:Pt.literal(Ey).default(Ey),visible:Pt.boolean().default(!0),altitude:Pt.number().default(0),color:Pt.string().default("#ffffff"),height:Pt.number().default(0),opacity:Pt.number().default(1),interactive:Pt.boolean().default(!1),bevel:Pt.object({enabled:Pt.boolean().optional(),thickness:Pt.number().optional(),size:Pt.number().optional(),offset:Pt.number().optional(),segments:Pt.number().optional()}).optional(),position:Pt.custom(n=>re.is(n))}),Fu=Au.partial(),v9=Pt.strictObject(Au.shape);function xy(n){let{altitude:t,visible:e,color:r,opacity:o,interactive:a,height:s,children:l,bevel:c,position:p}=n;if(l==null||l.length<1){k.error("Expected at least one child for Shape (".concat(n.id,"). Cannot get shape state."));return}return bt(Au,{altitude:t,visible:e,color:r,height:s,opacity:o,interactive:a,bevel:c,position:new re({latitude:p[1],longitude:p[0],verticalOffset:t!=null?t:0})})}function _y(n){let t=ke(Fu,n,{warn:!0}),e={};if(t.visible!==void 0&&(e.visible=t.visible),t.color!==void 0&&(e.color=t.color),t.opacity!==void 0&&(e.opacity=t.opacity),t.altitude!==void 0&&(e.altitude=t.altitude),t.height!==void 0&&(e.height=t.height),t.interactive!==void 0&&(e.interactive=t.interactive),t.bevel!==void 0){let r={enabled:t.bevel.enabled||!1,thickness:t.bevel.thickness,size:t.bevel.size,offset:t.bevel.offset,segments:t.bevel.segments};e.bevel=r}return t.position!==void 0&&(e.position=[t.position.longitude,t.position.latitude],e.altitude=t.position.verticalOffset),e}m();import op from"zod";var Cy="text3d",Py=op.object({type:op.literal(Cy).default(Cy),position:op.custom(n=>n instanceof re,{error:"Must be a Coordinate instance"})}),wy=Kf.extend(A({},Py.shape)),Oy=eh.extend(A({},Py.shape)).partial(),_9=op.strictObject(wy.shape);function Dy(n){var V,B;let{position:t,visible:e,color:r,flipToFaceCamera:o,font:a,fontSize:s,outlineColor:l,outlineOpacity:c,outlineBlur:p,outlineWidth:d,outlineOffsetX:h,outlineOffsetY:y,strokeWidth:b,strokeOpacity:I,strokeColor:C,fillOpacity:P,hoverColor:O,rotation:U,content:H}=n;return bt(wy,{position:new re({latitude:(V=t==null?void 0:t[1])!=null?V:0,longitude:(B=t==null?void 0:t[0])!=null?B:0}),visible:e,color:r,flipToFaceCamera:o,font:a,fontSize:s,outlineColor:l,outlineOpacity:c,outlineBlur:p,outlineWidth:d,outlineOffsetX:h,outlineOffsetY:y,strokeWidth:b,strokeOpacity:I,strokeColor:C,fillOpacity:P,hoverColor:O,rotation:U,content:H})}m();import Jt from"zod";var Ay="walls",ku=Jt.object({type:Jt.literal(Ay).default(Ay),color:Jt.string().default("#ffffff"),topColor:Jt.string().optional(),texture:Jt.object({url:Jt.string()}).or(Jt.undefined()),topTexture:Jt.object({url:Jt.string()}).or(Jt.undefined()),visible:Jt.boolean().default(!0),height:Jt.number().default(0),opacity:Jt.number().default(1)}),Lu=ku.partial(),A9=Jt.strictObject(ku.shape);function Fy(n){let{color:t,topColor:e,texture:r,topTexture:o,visible:a,height:s,opacity:l}=n;return bt(ku,{visible:a,color:t,topColor:e,texture:r?{url:r}:void 0,topTexture:o?{url:o}:void 0,height:s,opacity:l})}function Nu(n,t){var r,o;let e={};return t==null||(n.color&&(n.color==="initial"?e.color=t.initialColor:e.color=n.color),n.topColor&&(n.topColor==="initial"?e.topColor=t.initialTopColor:e.topColor=n.topColor),n.visible!==void 0&&(e.visible=n.visible),((r=n.texture)==null?void 0:r.url)!==void 0&&(e.texture=n.texture.url),((o=n.topTexture)==null?void 0:o.url)!==void 0&&(e.topTexture=n.topTexture.url),n.height!==void 0&&(e.height=n.height),n.opacity!==void 0&&(e.opacity=n.opacity)),e}m();import{z as un}from"zod";var Bu="image3d",gI=un.object({type:un.literal(Bu).default(Bu),visible:un.boolean().default(!0),opacity:un.number().min(0).max(1).default(1),position:un.custom(n=>n instanceof re,{error:"Must be a Coordinate instance"}),width:un.number().default(1),height:un.number().default(1),rotation:un.number().default(0),verticalOffset:un.number().default(0),flipImagesToFaceCamera:un.boolean().default(!1)}),ky=gI.partial();function Ly(n){var e,r,o,a,s,l,c,p,d;let{position:t}=n;return{type:Bu,visible:(e=n.visible)!=null?e:!0,opacity:(r=n.opacity)!=null?r:1,position:new re({latitude:(o=t==null?void 0:t[1])!=null?o:0,longitude:(a=t==null?void 0:t[0])!=null?a:0,verticalOffset:t==null?void 0:t[2]}),width:(s=n.width)!=null?s:1,height:(l=n.height)!=null?l:1,rotation:(c=n.rotation)!=null?c:0,verticalOffset:(p=n.verticalOffset)!=null?p:0,flipImagesToFaceCamera:(d=n.flipImageToFaceCamera)!=null?d:!1}}m();import{z as De}from"zod";var Ny="model",Ru=qf.extend({type:De.literal(Ny).default(Ny),color:De.string().optional(),position:De.custom(n=>re.is(n),{error:"Expected a Coordinate"}),visible:De.boolean().default(!0),rotation:De.tuple([De.number(),De.number(),De.number()]).default([0,0,0]),scale:De.tuple([De.number(),De.number(),De.number()]).default([1,1,1]),verticalOffset:De.number().default(0),opacity:De.number().default(1),material:De.record(De.string(),Qf).optional(),interactive:De.boolean().default(!1),clippingPlaneZOffset:De.custom(n=>typeof n=="number"&&!Number.isNaN(n),{message:"Must be a valid number (including Infinity)"}).default(1/0),clippingPlaneTopColor:De.string().default("#E67B5B"),clippingPlaneTopVisible:De.boolean().default(!0)}),By=Ru.extend({scale:De.union([De.number(),De.tuple([De.number(),De.number(),De.number()])]),rotation:De.union([De.number(),De.tuple([De.number(),De.number(),De.number()])])}).partial(),W9=De.strictObject(Ru.shape);function Ry(n){var O,U,H;let{color:t,position:e,rotation:r,scale:o,visible:a,interactive:s,opacity:l,material:c,verticalOffset:p,parent:d,clippingPlaneZOffset:h,clippingPlaneTopColor:y,clippingPlaneTopVisible:b}=n,I=typeof d=="object"?(O=d==null?void 0:d.id)==null?void 0:O.toString():d==null?void 0:d.toString(),C="".concat(kr,"-"),P=I!=null&&I.startsWith(C)?I.slice(C.length):I;return bt(Ru,{color:t,position:new re({latitude:(U=e==null?void 0:e[1])!=null?U:0,longitude:(H=e==null?void 0:e[0])!=null?H:0,verticalOffset:e==null?void 0:e[2],floorId:P}),rotation:r,scale:o,visible:a,interactive:s,opacity:l,material:c,verticalOffset:p,clippingPlaneZOffset:h,clippingPlaneTopColor:y,clippingPlaneTopVisible:b})}m();m();m();var Ua=Jl(P1());Ua.registerHelper({});Ua.registerPartial({});var w1=Ua.template({compiler:[8,">= 4.3.0"],main:function(n,t,e,r,o){var a=n.lambda,s=n.escapeExpression,l=n.lookupProperty||function(c,p){if(Object.prototype.hasOwnProperty.call(c,p))return c[p]};return"<div class='mappedin-annotation-marker'>\n <div style='width: "+s(a(t!=null?l(t,"size"):t,t))+"px; height: "+s(a(t!=null?l(t,"size"):t,t))+"px'>\n <img src='"+s(a(t!=null?l(t,"icon"):t,t))+"' alt='"+s(a(t!=null?l(t,"name"):t,t))+"' width='"+s(a(t!=null?l(t,"size"):t,t))+"' height='"+s(a(t!=null?l(t,"size"):t,t))+"' />\n </div>\n</div>"},useData:!0});var $T=30,O1=new Set(["annotation"]);function XT(n){var t,e;return w1({size:$T,icon:(e=(t=n.icon)==null?void 0:t.url)!=null?e:"",name:n.name})}function YT(n={}){return A({rank:"high",placement:["center"],interactive:!0},n)}function ZT(n,t){return t.Markers.add(n.coordinate,XT(n),YT())}function D1(n,t){let e=[];for(let r of t)xn(r)&&Br.is(r)&&r.icon!=null&&typeof r.icon.url=="string"&&r.icon.url.length>0&&e.push(ZT(r,n));return e}m();var A1=new Set(["space","object"]);function F1(n,t){t.forEach(e=>{eg(e)&&n.updateState(e,{interactive:!0})})}m();m();function k1(n){return xn(n)?"anchorTarget"in n&&n.anchorTarget!=null:!1}m();m();var{entries:W1,setPrototypeOf:L1,isFrozen:JT,getPrototypeOf:qT,getOwnPropertyDescriptor:QT}=Object,{freeze:Bt,seal:Sr,create:z1}=Object,{apply:pf,construct:df}=typeof Reflect<"u"&&Reflect;Bt||(Bt=function(t){return t});Sr||(Sr=function(t){return t});pf||(pf=function(t,e,r){return t.apply(e,r)});df||(df=function(t,e){return new t(...e)});var Sp=Rt(Array.prototype.forEach),KT=Rt(Array.prototype.lastIndexOf),N1=Rt(Array.prototype.pop),wl=Rt(Array.prototype.push),e2=Rt(Array.prototype.splice),Ep=Rt(String.prototype.toLowerCase),of=Rt(String.prototype.toString),B1=Rt(String.prototype.match),Ol=Rt(String.prototype.replace),t2=Rt(String.prototype.indexOf),r2=Rt(String.prototype.trim),Yr=Rt(Object.prototype.hasOwnProperty),Nt=Rt(RegExp.prototype.test),Dl=n2(TypeError);function Rt(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return pf(n,t,r)}}function n2(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return df(n,e)}}function Ce(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ep;L1&&L1(n,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let a=e(o);a!==o&&(JT(t)||(t[r]=a),o=a)}n[o]=!0}return n}function o2(n){for(let t=0;t<n.length;t++)Yr(n,t)||(n[t]=null);return n}function zn(n){let t=z1(null);for(let[e,r]of W1(n))Yr(n,e)&&(Array.isArray(r)?t[e]=o2(r):r&&typeof r=="object"&&r.constructor===Object?t[e]=zn(r):t[e]=r);return t}function Al(n,t){for(;n!==null;){let r=QT(n,t);if(r){if(r.get)return Rt(r.get);if(typeof r.value=="function")return Rt(r.value)}n=qT(n)}function e(){return null}return e}var R1=Bt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),af=Bt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),sf=Bt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),i2=Bt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lf=Bt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),a2=Bt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),V1=Bt(["#text"]),j1=Bt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),cf=Bt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G1=Bt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mp=Bt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),s2=Sr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),l2=Sr(/<%[\w\W]*|[\w\W]*%>/gm),c2=Sr(/\$\{[\w\W]*/gm),p2=Sr(/^data-[\-\w.\u00B7-\uFFFF]+$/),d2=Sr(/^aria-[\-\w]+$/),$1=Sr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),u2=Sr(/^(?:\w+script|data):/i),f2=Sr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X1=Sr(/^html$/i),h2=Sr(/^[a-z][.\w]*(-[.\w]+)+$/i),U1=Object.freeze({__proto__:null,ARIA_ATTR:d2,ATTR_WHITESPACE:f2,CUSTOM_ELEMENT:h2,DATA_ATTR:p2,DOCTYPE_NAME:X1,ERB_EXPR:l2,IS_ALLOWED_URI:$1,IS_SCRIPT_OR_DATA:u2,MUSTACHE_EXPR:s2,TMPLIT_EXPR:c2}),Fl={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},g2=function(){return typeof window>"u"?null:window},m2=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";e&&e.hasAttribute(o)&&(r=e.getAttribute(o));let a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch(s){return console.warn("TrustedTypes policy "+a+" could not be created."),null}},H1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Y1(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g2(),t=ue=>Y1(ue);if(t.version="3.2.6",t.removed=[],!n||!n.document||n.document.nodeType!==Fl.document||!n.Element)return t.isSupported=!1,t;let{document:e}=n,r=e,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:p,NamedNodeMap:d=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:h,DOMParser:y,trustedTypes:b}=n,I=c.prototype,C=Al(I,"cloneNode"),P=Al(I,"remove"),O=Al(I,"nextSibling"),U=Al(I,"childNodes"),H=Al(I,"parentNode");if(typeof s=="function"){let ue=e.createElement("template");ue.content&&ue.content.ownerDocument&&(e=ue.content.ownerDocument)}let V,B="",{implementation:q,createNodeIterator:N,createDocumentFragment:J,getElementsByTagName:se}=e,{importNode:z}=r,ie=H1();t.isSupported=typeof W1=="function"&&typeof H=="function"&&q&&q.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:me,ERB_EXPR:ve,TMPLIT_EXPR:ye,DATA_ATTR:X,ARIA_ATTR:$,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:ne}=U1,{IS_ALLOWED_URI:de}=U1,ge=null,Le=Ce({},[...R1,...af,...sf,...lf,...V1]),Me=null,We=Ce({},[...j1,...cf,...G1,...Mp]),_e=Object.seal(z1(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),It=null,qt=null,Er=!0,cr=!0,_o=!1,Si=!0,Qe=!1,Yn=!0,ut=!1,Zn=!1,Qa=!1,mn=!1,yn=!1,Co=!1,zl=!0,$l=!1,Xl="user-content-",Ka=!0,Po=!1,ft={},wo=null,Np=Ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Bp=null,Rp=Ce({},["audio","video","img","source","image","track"]),es=null,w=Ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),u="http://www.w3.org/1998/Math/MathML",g="http://www.w3.org/2000/svg",v="http://www.w3.org/1999/xhtml",S=v,T=!1,L=null,F=Ce({},[u,g,v],of),j=Ce({},["mi","mo","mn","ms","mtext"]),R=Ce({},["annotation-xml"]),te=Ce({},["title","style","font","a","script"]),D=null,G=["application/xhtml+xml","text/html"],Q="text/html",le=null,pe=null,Pe=e.createElement("form"),Ie=function(_){return _ instanceof RegExp||_ instanceof Function},Be=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(pe&&pe===_)){if((!_||typeof _!="object")&&(_={}),_=zn(_),D=G.indexOf(_.PARSER_MEDIA_TYPE)===-1?Q:_.PARSER_MEDIA_TYPE,le=D==="application/xhtml+xml"?of:Ep,ge=Yr(_,"ALLOWED_TAGS")?Ce({},_.ALLOWED_TAGS,le):Le,Me=Yr(_,"ALLOWED_ATTR")?Ce({},_.ALLOWED_ATTR,le):We,L=Yr(_,"ALLOWED_NAMESPACES")?Ce({},_.ALLOWED_NAMESPACES,of):F,es=Yr(_,"ADD_URI_SAFE_ATTR")?Ce(zn(w),_.ADD_URI_SAFE_ATTR,le):w,Bp=Yr(_,"ADD_DATA_URI_TAGS")?Ce(zn(Rp),_.ADD_DATA_URI_TAGS,le):Rp,wo=Yr(_,"FORBID_CONTENTS")?Ce({},_.FORBID_CONTENTS,le):Np,It=Yr(_,"FORBID_TAGS")?Ce({},_.FORBID_TAGS,le):zn({}),qt=Yr(_,"FORBID_ATTR")?Ce({},_.FORBID_ATTR,le):zn({}),ft=Yr(_,"USE_PROFILES")?_.USE_PROFILES:!1,Er=_.ALLOW_ARIA_ATTR!==!1,cr=_.ALLOW_DATA_ATTR!==!1,_o=_.ALLOW_UNKNOWN_PROTOCOLS||!1,Si=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=_.SAFE_FOR_TEMPLATES||!1,Yn=_.SAFE_FOR_XML!==!1,ut=_.WHOLE_DOCUMENT||!1,mn=_.RETURN_DOM||!1,yn=_.RETURN_DOM_FRAGMENT||!1,Co=_.RETURN_TRUSTED_TYPE||!1,Qa=_.FORCE_BODY||!1,zl=_.SANITIZE_DOM!==!1,$l=_.SANITIZE_NAMED_PROPS||!1,Ka=_.KEEP_CONTENT!==!1,Po=_.IN_PLACE||!1,de=_.ALLOWED_URI_REGEXP||$1,S=_.NAMESPACE||v,j=_.MATHML_TEXT_INTEGRATION_POINTS||j,R=_.HTML_INTEGRATION_POINTS||R,_e=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Ie(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Ie(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_e.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qe&&(cr=!1),yn&&(mn=!0),ft&&(ge=Ce({},V1),Me=[],ft.html===!0&&(Ce(ge,R1),Ce(Me,j1)),ft.svg===!0&&(Ce(ge,af),Ce(Me,cf),Ce(Me,Mp)),ft.svgFilters===!0&&(Ce(ge,sf),Ce(Me,cf),Ce(Me,Mp)),ft.mathMl===!0&&(Ce(ge,lf),Ce(Me,G1),Ce(Me,Mp))),_.ADD_TAGS&&(ge===Le&&(ge=zn(ge)),Ce(ge,_.ADD_TAGS,le)),_.ADD_ATTR&&(Me===We&&(Me=zn(Me)),Ce(Me,_.ADD_ATTR,le)),_.ADD_URI_SAFE_ATTR&&Ce(es,_.ADD_URI_SAFE_ATTR,le),_.FORBID_CONTENTS&&(wo===Np&&(wo=zn(wo)),Ce(wo,_.FORBID_CONTENTS,le)),Ka&&(ge["#text"]=!0),ut&&Ce(ge,["html","head","body"]),ge.table&&(Ce(ge,["tbody"]),delete It.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Dl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Dl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');V=_.TRUSTED_TYPES_POLICY,B=V.createHTML("")}else V===void 0&&(V=m2(b,o)),V!==null&&typeof B=="string"&&(B=V.createHTML(""));Bt&&Bt(_),pe=_}},ot=Ce({},[...af,...sf,...i2]),Je=Ce({},[...lf,...a2]),ht=function(_){let Z=H(_);(!Z||!Z.tagName)&&(Z={namespaceURI:S,tagName:"template"});let ce=Ep(_.tagName),Xe=Ep(Z.tagName);return L[_.namespaceURI]?_.namespaceURI===g?Z.namespaceURI===v?ce==="svg":Z.namespaceURI===u?ce==="svg"&&(Xe==="annotation-xml"||j[Xe]):!!ot[ce]:_.namespaceURI===u?Z.namespaceURI===v?ce==="math":Z.namespaceURI===g?ce==="math"&&R[Xe]:!!Je[ce]:_.namespaceURI===v?Z.namespaceURI===g&&!R[Xe]||Z.namespaceURI===u&&!j[Xe]?!1:!Je[ce]&&(te[ce]||!ot[ce]):!!(D==="application/xhtml+xml"&&L[_.namespaceURI]):!1},Re=function(_){wl(t.removed,{element:_});try{H(_).removeChild(_)}catch(Z){P(_)}},it=function(_,Z){try{wl(t.removed,{attribute:Z.getAttributeNode(_),from:Z})}catch(ce){wl(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute(_),_==="is")if(mn||yn)try{Re(Z)}catch(ce){}else try{Z.setAttribute(_,"")}catch(ce){}},at=function(_){let Z=null,ce=null;if(Qa)_="<remove></remove>"+_;else{let st=B1(_,/^[\r\n\t ]+/);ce=st&&st[0]}D==="application/xhtml+xml"&&S===v&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");let Xe=V?V.createHTML(_):_;if(S===v)try{Z=new y().parseFromString(Xe,D)}catch(st){}if(!Z||!Z.documentElement){Z=q.createDocument(S,"template",null);try{Z.documentElement.innerHTML=T?B:Xe}catch(st){}}let St=Z.body||Z.documentElement;return _&&ce&&St.insertBefore(e.createTextNode(ce),St.childNodes[0]||null),S===v?se.call(Z,ut?"html":"body")[0]:ut?Z.documentElement:St},jt=function(_){return N.call(_.ownerDocument||_,_,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},wt=function(_){return _ instanceof h&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof d)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},Gt=function(_){return typeof l=="function"&&_ instanceof l};function Ke(ue,_,Z){Sp(ue,ce=>{ce.call(t,_,Z,pe)})}let pr=function(_){let Z=null;if(Ke(ie.beforeSanitizeElements,_,null),wt(_))return Re(_),!0;let ce=le(_.nodeName);if(Ke(ie.uponSanitizeElement,_,{tagName:ce,allowedTags:ge}),Yn&&_.hasChildNodes()&&!Gt(_.firstElementChild)&&Nt(/<[/\w!]/g,_.innerHTML)&&Nt(/<[/\w!]/g,_.textContent)||_.nodeType===Fl.progressingInstruction||Yn&&_.nodeType===Fl.comment&&Nt(/<[/\w]/g,_.data))return Re(_),!0;if(!ge[ce]||It[ce]){if(!It[ce]&&Yl(ce)&&(_e.tagNameCheck instanceof RegExp&&Nt(_e.tagNameCheck,ce)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(ce)))return!1;if(Ka&&!wo[ce]){let Xe=H(_)||_.parentNode,St=U(_)||_.childNodes;if(St&&Xe){let st=St.length;for(let Ut=st-1;Ut>=0;--Ut){let bn=C(St[Ut],!0);bn.__removalCount=(_.__removalCount||0)+1,Xe.insertBefore(bn,O(_))}}}return Re(_),!0}return _ instanceof c&&!ht(_)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&Nt(/<\/no(script|embed|frames)/i,_.innerHTML)?(Re(_),!0):(Qe&&_.nodeType===Fl.text&&(Z=_.textContent,Sp([me,ve,ye],Xe=>{Z=Ol(Z,Xe," ")}),_.textContent!==Z&&(wl(t.removed,{element:_.cloneNode()}),_.textContent=Z)),Ke(ie.afterSanitizeElements,_,null),!1)},Jn=function(_,Z,ce){if(zl&&(Z==="id"||Z==="name")&&(ce in e||ce in Pe))return!1;if(!(cr&&!qt[Z]&&Nt(X,Z))){if(!(Er&&Nt($,Z))){if(!Me[Z]||qt[Z]){if(!(Yl(_)&&(_e.tagNameCheck instanceof RegExp&&Nt(_e.tagNameCheck,_)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(_))&&(_e.attributeNameCheck instanceof RegExp&&Nt(_e.attributeNameCheck,Z)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(Z))||Z==="is"&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&Nt(_e.tagNameCheck,ce)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(ce))))return!1}else if(!es[Z]){if(!Nt(de,Ol(ce,ee,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&_!=="script"&&t2(ce,"data:")===0&&Bp[_])){if(!(_o&&!Nt(he,Ol(ce,ee,"")))){if(ce)return!1}}}}}}return!0},Yl=function(_){return _!=="annotation-xml"&&B1(_,ne)},Zl=function(_){Ke(ie.beforeSanitizeAttributes,_,null);let{attributes:Z}=_;if(!Z||wt(_))return;let ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Me,forceKeepAttr:void 0},Xe=Z.length;for(;Xe--;){let St=Z[Xe],{name:st,namespaceURI:Ut,value:bn}=St,ts=le(st),jp=bn,Mt=st==="value"?jp:r2(jp);if(ce.attrName=ts,ce.attrValue=Mt,ce.keepAttr=!0,ce.forceKeepAttr=void 0,Ke(ie.uponSanitizeAttribute,_,ce),Mt=ce.attrValue,$l&&(ts==="id"||ts==="name")&&(it(st,_),Mt=Xl+Mt),Yn&&Nt(/((--!?|])>)|<\/(style|title)/i,Mt)){it(st,_);continue}if(ce.forceKeepAttr)continue;if(!ce.keepAttr){it(st,_);continue}if(!Si&&Nt(/\/>/i,Mt)){it(st,_);continue}Qe&&Sp([me,ve,ye],kf=>{Mt=Ol(Mt,kf," ")});let Ff=le(_.nodeName);if(!Jn(Ff,ts,Mt)){it(st,_);continue}if(V&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!Ut)switch(b.getAttributeType(Ff,ts)){case"TrustedHTML":{Mt=V.createHTML(Mt);break}case"TrustedScriptURL":{Mt=V.createScriptURL(Mt);break}}if(Mt!==jp)try{Ut?_.setAttributeNS(Ut,st,Mt):_.setAttribute(st,Mt),wt(_)?Re(_):N1(t.removed)}catch(kf){it(st,_)}}Ke(ie.afterSanitizeAttributes,_,null)},Vp=function ue(_){let Z=null,ce=jt(_);for(Ke(ie.beforeSanitizeShadowDOM,_,null);Z=ce.nextNode();)Ke(ie.uponSanitizeShadowNode,Z,null),pr(Z),Zl(Z),Z.content instanceof a&&ue(Z.content);Ke(ie.afterSanitizeShadowDOM,_,null)};return t.sanitize=function(ue){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ce=null,Xe=null,St=null;if(T=!ue,T&&(ue="<!-->"),typeof ue!="string"&&!Gt(ue))if(typeof ue.toString=="function"){if(ue=ue.toString(),typeof ue!="string")throw Dl("dirty is not a string, aborting")}else throw Dl("toString is not a function");if(!t.isSupported)return ue;if(Zn||Be(_),t.removed=[],typeof ue=="string"&&(Po=!1),Po){if(ue.nodeName){let bn=le(ue.nodeName);if(!ge[bn]||It[bn])throw Dl("root node is forbidden and cannot be sanitized in-place")}}else if(ue instanceof l)Z=at("<!---->"),ce=Z.ownerDocument.importNode(ue,!0),ce.nodeType===Fl.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?Z=ce:Z.appendChild(ce);else{if(!mn&&!Qe&&!ut&&ue.indexOf("<")===-1)return V&&Co?V.createHTML(ue):ue;if(Z=at(ue),!Z)return mn?null:Co?B:""}Z&&Qa&&Re(Z.firstChild);let st=jt(Po?ue:Z);for(;Xe=st.nextNode();)pr(Xe),Zl(Xe),Xe.content instanceof a&&Vp(Xe.content);if(Po)return ue;if(mn){if(yn)for(St=J.call(Z.ownerDocument);Z.firstChild;)St.appendChild(Z.firstChild);else St=Z;return(Me.shadowroot||Me.shadowrootmode)&&(St=z.call(r,St,!0)),St}let Ut=ut?Z.outerHTML:Z.innerHTML;return ut&&ge["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Nt(X1,Z.ownerDocument.doctype.name)&&(Ut="<!DOCTYPE "+Z.ownerDocument.doctype.name+">\n"+Ut),Qe&&Sp([me,ve,ye],bn=>{Ut=Ol(Ut,bn," ")}),V&&Co?V.createHTML(Ut):Ut},t.setConfig=function(){let ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Be(ue),Zn=!0},t.clearConfig=function(){pe=null,Zn=!1},t.isValidAttribute=function(ue,_,Z){pe||Be({});let ce=le(ue),Xe=le(_);return Jn(ce,Xe,Z)},t.addHook=function(ue,_){typeof _=="function"&&wl(ie[ue],_)},t.removeHook=function(ue,_){if(_!==void 0){let Z=KT(ie[ue],_);return Z===-1?void 0:e2(ie[ue],Z,1)[0]}return N1(ie[ue])},t.removeHooks=function(ue){ie[ue]=[]},t.removeAllHooks=function(){ie=H1()},t}var Z1=Y1();var y2={"connection-stairs-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path d="M1.625 8.1875C1.625 8.01491 1.76491 7.875 1.9375 7.875H4.75V9.4375C4.75 9.61009 4.61009 9.75 4.4375 9.75H1.9375C1.76491 9.75 1.625 9.61009 1.625 9.4375V8.1875Z" />\n <path d="M3.5 6.3125C3.5 6.13991 3.63991 6 3.8125 6H6.625V7.5625C6.625 7.73509 6.48509 7.875 6.3125 7.875H3.5V6.3125Z" />\n <path d="M5.375 4.4375C5.375 4.26491 5.51491 4.125 5.6875 4.125H8.5V5.6875C8.5 5.86009 8.36009 6 8.1875 6H5.375V4.4375Z" />\n <path d="M7.25 2.5625C7.25 2.38991 7.38991 2.25 7.5625 2.25H10.0625C10.2351 2.25 10.375 2.38991 10.375 2.5625V3.8125C10.375 3.98509 10.2351 4.125 10.0625 4.125H7.25V2.5625Z" />\n </svg>',"connection-elevator-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <circle cx="1.9375" cy="4.4375" r="0.9375" />\n <circle cx="1.9375" cy="7.5625" r="0.9375" />\n <path\n fillRule="evenodd"\n clipRule="evenodd"\n d="M7.6 2H9.4C9.73137 2 10 2.26863 10 2.6V9.41328C10 9.74465 9.73137 10.0133 9.4 10.0133H7.6V2ZM6.4 2H4.6C4.26863 2 4 2.26863 4 2.6V9.41328C4 9.74465 4.26863 10.0133 4.6 10.0133H6.4V2Z"\n />\n </svg>',"point-of-interest-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path\n stroke="none"\n id="Subtract"\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M6.24724 10.7516C7.94597 9.0358 9.85962 6.89195 9.85962 4.85965C9.85962 2.72802 8.13159 1 5.99997 1C3.86834 1 2.14032 2.72802 2.14032 4.85965C2.14032 6.89195 4.05397 9.0358 5.7527 10.7516C5.88904 10.8893 6.1109 10.8893 6.24724 10.7516ZM5.99994 6.26317C6.77508 6.26317 7.40345 5.6348 7.40345 4.85967C7.40345 4.08453 6.77508 3.45616 5.99994 3.45616C5.22481 3.45616 4.59644 4.08453 4.59644 4.85967C4.59644 5.6348 5.22481 6.26317 5.99994 6.26317Z"\n />\n </svg>',"door-12x12":'<svg viewBox="0 0 13 12">\n <path\n stroke="none"\n d="M4.02533 0.662341H9.61421C9.95171 0.662341 10.2264 0.937033 10.2264 1.27453V10.726C10.2264 11.0639 9.95218 11.3382 9.61421 11.3382H4.02533C3.69721 11.3382 3.42674 11.078 3.41408 10.7504V1.24696C3.4272 0.919297 3.69721 0.659149 4.02533 0.659149V0.662341ZM5.96969 5.22798H6.64563V6.7725H5.96969V5.22798ZM4.94219 1.39218L7.31267 2.6541C7.43501 2.71973 7.50533 2.84488 7.50533 2.97473C7.50721 4.99181 7.50674 7.00877 7.50674 9.02585C7.50674 9.17679 7.41487 9.30663 7.28361 9.36195L4.94217 10.6084H9.49653V1.39227L4.94219 1.39218Z"\n />\n </svg>',"building-12x12":'<svg viewBox="0 0 12 12" stroke="none">\n <path\n d="M11.2374 9.75H10.5V4.5C10.5 4.30109 10.421 4.11032 10.2804 3.96967C10.1397 3.82902 9.94894 3.75 9.75003 3.75H7.68753C7.6378 3.75 7.59011 3.76976 7.55495 3.80492C7.51978 3.84008 7.50003 3.88777 7.50003 3.9375V9.75H6.75003V1.51922C6.75127 1.4024 6.72592 1.28683 6.67589 1.18125C6.62587 1.07567 6.55248 0.982864 6.46128 0.909845C6.33697 0.812924 6.18528 0.757635 6.02776 0.751829C5.87024 0.746023 5.71489 0.789995 5.58378 0.877501L1.83378 3.375C1.73091 3.44364 1.6466 3.53664 1.58837 3.64574C1.53014 3.75484 1.4998 3.87665 1.50003 4.00031V9.75H0.762687C0.66578 9.74857 0.571927 9.78389 0.500006 9.84885C0.428085 9.91382 0.383432 10.0036 0.37503 10.1002C0.371625 10.1515 0.378802 10.2029 0.396116 10.2513C0.413431 10.2997 0.440513 10.344 0.47568 10.3815C0.510847 10.419 0.553349 10.4489 0.600545 10.4693C0.647741 10.4897 0.698623 10.5001 0.75003 10.5H11.25C11.3014 10.5001 11.3523 10.4897 11.3995 10.4693C11.4467 10.4489 11.4892 10.419 11.5244 10.3815C11.5595 10.344 11.5866 10.2997 11.6039 10.2513C11.6213 10.2029 11.6284 10.1515 11.625 10.1002C11.6166 10.0036 11.572 9.91382 11.5001 9.84885C11.4281 9.78389 11.3343 9.74857 11.2374 9.75ZM3.56253 8.625C3.56264 8.67641 3.55219 8.72729 3.53181 8.77449C3.51143 8.82168 3.48156 8.86418 3.44406 8.89935C3.40657 8.93452 3.36224 8.9616 3.31383 8.97892C3.26543 8.99623 3.21398 9.00341 3.16269 9C3.06605 8.99159 2.9762 8.94688 2.91122 8.87485C2.84624 8.80283 2.81098 8.70886 2.81253 8.61188V7.88766C2.81121 7.79078 2.84657 7.69699 2.91151 7.62509C2.97645 7.55319 3.06618 7.50851 3.16269 7.5C3.21398 7.4966 3.26543 7.50377 3.31383 7.52109C3.36224 7.5384 3.40657 7.56548 3.44406 7.60065C3.48156 7.63582 3.51143 7.67832 3.53181 7.72552C3.55219 7.77271 3.56264 7.82359 3.56253 7.875V8.625ZM3.56253 6C3.56264 6.05141 3.55219 6.10229 3.53181 6.14949C3.51143 6.19668 3.48156 6.23918 3.44406 6.27435C3.40657 6.30952 3.36224 6.3366 3.31383 6.35392C3.26543 6.37123 3.21398 6.37841 3.16269 6.375C3.06609 6.36649 2.9763 6.32174 2.91135 6.24974C2.84639 6.17774 2.81109 6.08383 2.81253 5.98688V5.26266C2.81121 5.16578 2.84657 5.07199 2.91151 5.00009C2.97645 4.92819 3.06618 4.88351 3.16269 4.875C3.21398 4.8716 3.26543 4.87877 3.31383 4.89609C3.36224 4.9134 3.40657 4.94048 3.44406 4.97565C3.48156 5.01082 3.51143 5.05332 3.53181 5.10052C3.55219 5.14771 3.56264 5.19859 3.56253 5.25V6ZM5.43753 8.625C5.43764 8.67641 5.42719 8.72729 5.40681 8.77449C5.38643 8.82168 5.35656 8.86418 5.31906 8.89935C5.28157 8.93452 5.23724 8.9616 5.18883 8.97892C5.14043 8.99623 5.08898 9.00341 5.03769 9C4.94122 8.9916 4.8515 8.94702 4.78654 8.8752C4.72159 8.80338 4.68622 8.70964 4.68753 8.61281V7.88766C4.68633 7.79086 4.72174 7.69718 4.78667 7.62539C4.8516 7.55359 4.94126 7.50897 5.03769 7.50047C5.08898 7.49706 5.14043 7.50424 5.18883 7.52156C5.23724 7.53887 5.28157 7.56595 5.31906 7.60112C5.35656 7.63629 5.38643 7.67879 5.40681 7.72598C5.42719 7.77318 5.43764 7.82406 5.43753 7.87547V8.625ZM5.43753 6C5.43764 6.05141 5.42719 6.10229 5.40681 6.14949C5.38643 6.19668 5.35656 6.23918 5.31906 6.27435C5.28157 6.30952 5.23724 6.3366 5.18883 6.35392C5.14043 6.37123 5.08898 6.37841 5.03769 6.375C4.94126 6.3665 4.8516 6.32188 4.78667 6.25008C4.72174 6.17829 4.68633 6.08461 4.68753 5.98781V5.26266C4.68633 5.16586 4.72174 5.07218 4.78667 5.00039C4.8516 4.92859 4.94126 4.88397 5.03769 4.87547C5.08898 4.87206 5.14043 4.87924 5.18883 4.89656C5.23724 4.91387 5.28157 4.94095 5.31906 4.97612C5.35656 5.01129 5.38643 5.05379 5.40681 5.10098C5.42719 5.14818 5.43764 5.19906 5.43753 5.25047V6Z"\n stroke="none"\n />\n </svg>',"ladder-12x12":'<svg viewBox="0 0 12 12">\n <g id="surface1">\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.34375 0.375 L 2.53125 0.375 L 2.625 11.53125 L 2.34375 11.625 L 2.25 0.46875 Z M 2.34375 0.375 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 9.46875 0.375 L 9.65625 0.375 L 9.75 11.53125 L 9.46875 11.625 L 9.375 0.46875 Z M 9.46875 0.375 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 2.25 L 2.25 1.875 L 9.75 1.875 L 9.75 2.25 Z M 2.25 2.25 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 4.875 L 2.25 4.5 L 9.75 4.5 L 9.75 4.875 Z M 2.25 4.875 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 7.5 L 2.25 7.125 L 9.75 7.125 L 9.75 7.5 Z M 2.25 7.5 "/>\n <path style=" stroke:none;fill-rule:nonzero;fill:rgb(94.117647%,94.117647%,94.117647%);fill-opacity:1;" d="M 2.25 10.125 L 2.25 9.75 L 9.75 9.75 L 9.75 10.125 Z M 2.25 10.125 "/>\n </g>\n </svg>'},b2=/<svg([^>]*)>/g;function J1(n,t,e){let r=y2[n];return r?r.replace(b2,'<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:'.concat(t,"; width:").concat(e,"px; height:").concat(e,'px">')):null}function v2(n){return Z1.sanitize(n,{USE_PROFILES:{svg:!0}})}function I2(n,t){let o=new DOMParser().parseFromString(n,"image/svg+xml").documentElement;return o==null||o.tagName==="parsererror"||o.tagName.toLowerCase()!=="svg"?(k.error("Failed to parse SVG",{svg:n,tagName:o==null?void 0:o.tagName}),n):(t!=null&&(o.setAttribute("color",t),o.querySelectorAll("*").forEach(l=>{(l.getAttribute("fill")!=null||l.tagName==="path")&&l.getAttribute("fill")!=="none"&&l.setAttribute("fill","currentColor"),l.getAttribute("stroke")!=null&&l.getAttribute("stroke")!=="none"&&l.setAttribute("stroke","currentColor")})),new XMLSerializer().serializeToString(o))}async function q1(n,t){let e="";try{if(n.trim()==="")throw new Error("URL is empty!");(t==null?void 0:t.style)==="fill"&&(n=n.replace(".svg","-fill.svg"));let r=await Kt()(n),o=r.headers.get("content-type");if(o!=null&&o.includes("image/svg+xml")){let a=await r.text();return e=v2(a),(t==null?void 0:t.color)!=null&&(e=I2(e,t.color)),{icon:e,type:"svg"}}else{if(o!=null&&o.includes("image"))return{icon:n,type:"image"};throw new Error("Expected SVG or Image content, but received: ".concat(o))}}catch(r){return k.error("Failed to fetch icon from ".concat(n,"."),r),null}}m();function Q1(n){return n.locationProfiles.some(t=>t.categories.some(e=>e.name.includes("Restroom")))}function K1(n){return n.locationProfiles.some(t=>t.categories.some(e=>e.name.includes("Parking")))}var tb=new Set(["connection","point-of-interest","space","object","door","facade"]),bi={default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F",parking:"#418425",door:"#A0552C"},Ha={elevator:"connection-elevator-12x12",escalator:"connection-stairs-12x12",stairs:"connection-stairs-12x12",point:"point-of-interest-12x12",door:"door-12x12",building:"building-12x12",ladder:"ladder-12x12"};function T2(n){let t=null;if(Tt.is(n))switch(n.type){case"elevator":t=Ha.elevator;break;case"ladder":t=Ha.ladder;break;case"escalator":case"stairs":default:t=Ha.stairs}else nr.is(n)?t=Ha.point:Ot.is(n)?t=Ha.door:mt.is(n)&&(t=Ha.building);return t!=null?J1(t,"#FFFFFF",12):null}function eb(n){return Tt.is(n)?bi.connection:mt.is(n)?bi.default:Q1(n)?bi.washroom:K1(n)?bi.parking:nr.is(n)?bi.point:Ot.is(n)?bi.door:bi.default}async function S2(n,t){var o;let e=null,r="locationProfiles"in n?(o=n.locationProfiles.find(a=>a.icon!=null))==null?void 0:o.icon:null;if((r==null?void 0:r.url)!=null&&(e=await q1(r.url,{color:t.color,style:"fill"})),e==null){let a=T2(n);a!=null&&(e={icon:a,type:"svg"})}return e}function M2(n){return Tt.is(n)||Ot.is(n)?"low":nr.is(n)||mt.is(n)?"high":"medium"}async function E2(n){let t={appearance:{color:eb(n),pinOutlineColor:eb(n),iconPadding:8,iconSize:24,textSize:12.5,iconScale:{on:"zoom-level",input:[18,20],output:[.7,1]}},rank:M2(n),interactive:!0},e=await S2(n,{color:"#FFFFFF"});return e!=null&&(t.appearance.icon=e.icon,e.type==="svg"?mt.is(n)&&(t.appearance.iconSize=30,t.appearance.iconPadding=10):e.type==="image"&&(t.appearance.iconSize=48,t.appearance.iconPadding=2,t.appearance.pinOutlineColor="#FFFFFF",t.rank="high")),t}async function rb(n,t){return(await Promise.all(t.map(async r=>{let o=[];if(!xn(r))return o;let a=await E2(r);return Tt.is(r)?o=r.coordinates.map(s=>n.Labels.add(s,r.name,a)):mt.is(r)?r.spaces.length>0&&r.floorStack.name!=null&&r.floorStack.name!==""&&o.push(n.Labels.add(r.spaces[0],r.floorStack.name,a)):k1(r)&&Sd(r)&&o.push(n.Labels.add(r,r.name,a)),o}))).flat()}async function nb(n,t){let e=n.getMapDataInternal();if(!e)throw new Error("Map data not found");let r=e.getAllOfTypes(tb,t),o=e.getAllOfTypes(O1,t),a=e.getAllOfTypes(A1,t),[s,l]=await Promise.all([r.length>0?rb(n,r):[],o.length>0?D1(n,o):[],a.length>0?F1(n,a):[]]);return{labels:s,markers:l}}var xp=.05,Ll,Nl,kl=class extends dr{constructor(e,r,o){super();f(this,"core");f(this,"mapObjects",[]);f(this,"id");f(this,"mapDataExternal",{});f(this,"mapsByFloorId",{});f(this,"mapData");f(this,"currentMap");f(this,"hiddenOutdoorGeometries",[]);f(this,"lastFacadeIntersected");M(this,Ll,!1);M(this,Nl,!1);f(this,"mapView");f(this,"externalPubSub");f(this,"Camera");f(this,"Labels");f(this,"Text3D");f(this,"Markers");f(this,"Models");f(this,"Paths");f(this,"Exporter");f(this,"Navigation");f(this,"Outdoor");f(this,"Shapes");f(this,"Style");f(this,"Image3D");f(this,"update",()=>{this.core.render()});this.core=e,this.mapView=r,this.externalPubSub=o,this.Camera=new Ks(this),this.id=this.core.addGroupContainer("root").id.toString();let a=new sl("outdoors-container",void 0,void 0,this);this.mapObjects.push(a),this.currentMap=a,this.core.on("pre-render",()=>{o.publish("pre-render")},{signal:this.signal}),this.core.on("post-render",()=>{o.publish("post-render")},{signal:this.signal}),this.core.on("resize",()=>{o.publish("resize")},{signal:this.signal}),this.core.on("render-error",({error:d})=>{o.publish("render-error",{error:new Wf(d instanceof Error?d.message:"Unknown error")})},{signal:this.signal});let s=d=>{let h=d;d.startsWith("".concat(Ze,"-"))&&(h=d.slice(Ze.length+1));let y=this.getMapDataObject(h);switch(y==null?void 0:y.__type){case"facade":return y;case"floor":return y.floorStack.facade;default:return null}};this.core.on("geometry-in-focus",d=>{let h=new Set;for(let y of d){let b=s(y);b&&h.add(b)}o.publish("facades-in-view-change",{facades:Array.from(h)})},{signal:this.signal}),this.core.getSystems().renderSystem.on("camera-state-change",()=>{o.publish("state-change-internal",{Camera:this.getCameraState()})},{signal:this.signal});let l=new Xs(this.Camera,{precision:7});this.core.on("camera-change",()=>{o.publish("camera-change",l)},{signal:this.signal}),this.core.on("pan-bounds-change",d=>{o.publish("camera-bounds-change",Sc(d,this.core.convert3DMapPositionToCoordinate))},{signal:this.signal});let c=d=>h=>{let y=[],b=[],I=[],C=[];h.labels.forEach(N=>{let J=this.Labels.getById(N.toString());J&&y.push(J.label)}),h.markers.forEach(N=>{let J=this.Markers.getById(N.toString())||this.Navigation.getMarkerById(N.toString());J&&b.push(J.marker)}),h.models.forEach(N=>{let J=this.Models.getById(N.toString());J&&I.push(J.model)}),h.paths.forEach(N=>{let J=this.Paths.getById(N.toString())||this.Navigation.getPathById(N.toString());J&&!C.includes(J)&&C.push(J)});let P=h.geometry,O;P.length>0&&(O=P.map(N=>{var J;return(J=this.getMapDataInternal())==null?void 0:J.getById("space",N)}).filter(Boolean)[0],O||(O=P.map(N=>{var J;return(J=this.getMapDataInternal())==null?void 0:J.getById("object",N)}).filter(Boolean)[0]),O||(O=P.map(N=>{var J;return(J=this.getMapDataInternal())==null?void 0:J.getById("area",N)}).filter(Boolean)[0]),O||(O=P.map(N=>this.Shapes.getById(N)).filter(Boolean)[0]));let U=h.containers.reduce((N,J)=>{var z;let se=(z=this.getMapDataInternal())==null?void 0:z.getById("floor",J);return se&&zt.is(se)&&N.push(se),N},[]),H,V=0;if(U.length>0){H=U[0].id;let N=this.core.getState(H);V=h.coordinate[2]?h.coordinate[2]-N.altitude:V}let B;this.lastFacadeIntersected&&this.lastFacadeIntersected.spaces.forEach(N=>{this.core.setState(N.id,{hovered:!1})}),O&&qe.is(O)&&(B=P.map(N=>{var J;return(J=this.getMapDataInternal())==null?void 0:J.facadesBySpaceId[N]}).filter(Boolean)[0],B&&B.spaces.forEach(N=>{this.core.setState(N.id,{hovered:!0})})),this.lastFacadeIntersected=B;let q={coordinate:new re({latitude:h.coordinate[1],longitude:h.coordinate[0],floorId:H,verticalOffset:V}),spaces:O&&qe.is(O)?[O]:[],objects:O&&$t.is(O)?[O]:[],areas:O&&gr.is(O)?[O]:[],shapes:O&&Fn.is(O)?[O]:[],markers:b,labels:y,models:I,paths:C,floors:U,facades:B?[B]:[]};"pointerEvent"in h&&(q.pointerEvent=h.pointerEvent),o.publish(d,q)};this.core.on("hover",c("hover"),{signal:this.signal}),this.core.on("click",c("click"),{signal:this.signal}),this.core.on("user-interaction-start",()=>{o.publish("user-interaction-start")},{signal:this.signal}),this.core.on("user-interaction-end",()=>{o.publish("user-interaction-end")},{signal:this.signal});let p={currentMapGetter:()=>this.currentMap,mapDataInternalGetter:()=>{var d;return(d=this.mapData)==null?void 0:d.internal}};this.Markers=new ll(p),this.Models=new ul(p),this.Labels=new rl(p),this.Text3D=new Ml(p),this.Exporter=new tl(p),this.Paths=new gl(p),this.Navigation=new Qs(this),this.on("navigation-state-change",d=>{this.externalPubSub.publish("state-change-internal",{Navigation:d})}),this.on("navigation-connection-click",d=>{this.externalPubSub.publish("navigation-connection-click",d)}),this.on("navigation-active-path-change",d=>{this.externalPubSub.publish("navigation-active-path-change",d)}),this.Outdoor=new ja(this.core,this.hiddenOutdoorGeometries),this.Outdoor.enabled&&(this.core.on("outdoor-view-loaded",()=>{o.publish("outdoor-view-loaded")},{signal:this.signal}),this.core.on("outdoor-style-loaded",()=>{o.publish("outdoor-style-loaded")},{signal:this.signal})),this.Image3D=new pl(p),this.Shapes=new yl(p),this.Style=new vl(p)}get manualFloorVisibility(){return i(this,Ll)}set manualFloorVisibility(e){E(this,Ll,e),this.externalPubSub.publish("state-change-internal",{manualFloorVisibility:e})}get hidePathsNotOnCurrentFloor(){return i(this,Nl)}set hidePathsNotOnCurrentFloor(e){var r;E(this,Nl,e),(r=this.currentMap)==null||r.updateOutdoorPathLayerVisibility()}preloadFloors(e){e.forEach(r=>{r instanceof zt&&this.core.setState(r.id,{preloadGeometry:!0})})}updateState(e,r){var s,l,p,d,h,y,b,I,C,P,O,U,H,V;if(r==null||typeof r!="object")return;let o=(l=(s=this.currentMap.options)==null?void 0:s.disableUpdateStateValidation)!=null?l:!1;if(e==="interior-walls"){this.currentMap.floors.forEach(B=>{let q=B.layers.get(Ze);if(q){let N=q.layers.get(no);N&&this.core.hasState(N)&&this.core.setState(N,Nu(ke(Lu,r,{warn:!0,disableValidation:o}),this.core.getState(N)))}});return}if(e==="exterior-walls"){this.currentMap.floors.forEach(B=>{let q=B.layers.get(Ze);if(q){let N=q.layers.get(tn);N&&this.core.hasState(N)&&this.core.setState(N,Nu(ke(Lu,r,{warn:!0,disableValidation:o}),this.core.getState(N)))}});return}if(e==="interior-doors"){this.currentMap.floors.forEach(B=>{let q=B.layers.get(Ze);if(q){let N=q.layers.get(Ui);N&&this.core.hasState(N)&&this.core.setState(N,Xc(ke($c,r,{warn:!0,disableValidation:o}),this.core.getState(N)))}});return}if(e==="exterior-doors"){this.currentMap.floors.forEach(B=>{let q=B.layers.get(Ze);if(q){let N=q.layers.get(Hi);N&&this.core.hasState(N)&&this.core.setState(N,Xc(ke($c,r,{warn:!0,disableValidation:o}),this.core.getState(N)))}});return}let a=typeof e=="string"?this.getMapDataObject(e):e;if(a){if(a.__type!==jr.__type&&!this.core.hasState(a.id)){k.warn('Failed to update state for "'.concat(a.id,'". No ').concat(a.__type," found with that ID."));return}if(An.is(a))return this.core.setState(a.id,Iy(ke(by,r,{warn:!0,disableValidation:o}),this.core.getState(a.id)));if(ln.is(a))return this.core.setState(a.id,My(ke(Ty,r,{warn:!0,disableValidation:o}),this.core.getState(a.id)));if(qe.is(a)||$t.is(a)){let B=this.core.getState(a.id);B!=null&&this.core.setState(a.id,yy(ke(wu,r,{warn:!0,disableValidation:o}),B))}if(gr.is(a)&&this.core.setState(a.id,ke(wu,r,{warn:!0,disableValidation:o})),rr.is(a)&&this.core.setState(a.id,ke(ky,r,{warn:!0,disableValidation:o})),Ot.is(a)&&this.core.setState(a.id,Xc(ke($c,r,{warn:!0,disableValidation:o}),this.core.getState(a.id))),Fn.is(a)&&this.core.setState(a.id,_y(ke(Fu,r,{warn:!0,disableValidation:o}))),li.is(a)){let c=ke(By,r,{warn:!0,disableValidation:o}),{position:B,scale:q,rotation:N}=c,se=Qt(c,["position","scale","rotation"]);B&&(se.position=[B.longitude,B.latitude,B.verticalOffset]),q!=null&&(Array.isArray(q)?se.scale=q:se.scale=[q,q,q]),N!=null&&(Array.isArray(N)?se.rotation=N:se.rotation=[N,N,N]),B&&a.updateTarget(B),this.core.setState(a.id,se)}if(zt.is(a)){let B=this.currentMap.floorsById.get(a.id);if(B==null)return;let q=ke(fy,r,{warn:!0,disableValidation:o});this.core.setState(a.id,q);let N=B.layers.get(Ze);if(N!=null&&"geometry"in r&&r.geometry){this.core.setState(N.containerId,ke(oy,r.geometry,{warn:!0,disableValidation:o}));for(let X of N.layers.keys())this.core.setState(N.layers.get(X),{maskId:(p=r.geometry.maskId)!=null?p:void 0,maskEffect:(d=r.geometry.maskEffect)!=null?d:void 0,maskMode:(h=r.geometry.maskMode)!=null?h:void 0,maskEnabled:(y=r.geometry.maskEnabled)!=null?y:void 0,effectStart:(b=r.geometry.effectStart)!=null?b:void 0,effectDistance:(I=r.geometry.effectDistance)!=null?I:void 0,darkenAmount:(C=r.geometry.darkenAmount)!=null?C:void 0,darkenUseDepth:(P=r.geometry.darkenUseDepth)!=null?P:void 0,desaturateAmount:(O=r.geometry.desaturateAmount)!=null?O:void 0,desaturateUseDepth:(U=r.geometry.desaturateUseDepth)!=null?U:void 0,washOutAmount:(H=r.geometry.washOutAmount)!=null?H:void 0,washOutUseDepth:(V=r.geometry.washOutUseDepth)!=null?V:void 0})}let J=B.layers.get(rn);if(J!=null&&"labels"in r&&r.labels){let X=ke(iy,r.labels,{warn:!0,disableValidation:o});"enabled"in X&&typeof X.enabled=="boolean"&&J.setVisible(X.enabled)}let se=B.layers.get(Fr);if(se!=null&&"markers"in r&&r.markers){let X=ke(ay,r.markers,{warn:!0,disableValidation:o});"enabled"in X&&typeof X.enabled=="boolean"&&se.setVisible(X.enabled)}if(B.footprintObject&&"footprint"in r&&r.footprint){let X=ke(gi,r.footprint,{warn:!0,disableValidation:o});B.footprintObject.update({altitude:X.altitude,visible:X.visible,height:X.height,opacity:X.opacity,side:X.side,color:X.color,ceilingVisible:X.ceilingVisible,ceilingThickness:X.ceilingThickness,basementMaskEnabled:X.basementMaskEnabled,outline:X.outline})}if(B.gapFootprintObject&&"visible"in r){let X={visible:r.visible};if("footprint"in r&&r.footprint){let $=ke(gi,r.footprint,{warn:!0,disableValidation:o});$.color!==void 0&&(X.color=$.color),$.opacity!==void 0&&(X.opacity=$.opacity),$.outline!==void 0&&(X.outline=$.outline)}B.gapFootprintObject.update(X)}let z=B.layers.get(Ro);if(z!=null&&"occlusion"in r&&r.occlusion){let X=ke(ly,r.occlusion,{warn:!0,disableValidation:o});"enabled"in X&&typeof X.enabled=="boolean"&&z.setVisible(X.enabled)}let ie=B.layers.get(Wi);if(ie!=null&&"images"in r&&r.images){let X=ke(sy,r.images,{warn:!0,disableValidation:o});if("visible"in X&&typeof X.visible=="boolean"&&ie.setVisible(X.visible),"collisionsEnabled"in X&&typeof X.collisionsEnabled=="boolean"&&N!=null)for(let $ of N.layers.values()){let he=this.core.getState($);if(he!=null&&he.children)for(let ee of he.children)this.core.setState(ee,{enableImageCollisions:X.collisionsEnabled})}}let me=B.layers.get(nn);if(me!=null&&"paths"in r&&r.paths!=null){let X=ke(cy,r.paths,{warn:!0,disableValidation:o});X.visible!=null&&typeof X.visible=="boolean"&&me.setVisible(X.visible)}let ve=B.layers.get(Vo);if(ve!=null&&"areas"in r&&r.areas!=null){let X=ke(py,r.areas,{warn:!0,disableValidation:o});X.visible!=null&&typeof X.visible=="boolean"&&ve.setVisible(X.visible)}let ye=B.layers.get(kr);if(ye!=null&&"models"in r&&r.models!=null){let X=ke(uy,r.models,{warn:!0,disableValidation:o});X.visible!=null&&typeof X.visible=="boolean"&&ye.setVisible(X.visible)}if("text3d"in r&&r.text3d!=null){let X=ke(dy,r.text3d,{warn:!0,disableValidation:o});X.visible!=null&&B.setBatchedTextVisible(X.visible)}}if(mt.is(a)){let B=this.core.getState(a.id);for(let q of B.children)q.type==="group-container"&&this.core.setState(q.id,ke(Xm,r,{warn:!0,disableValidation:o}))}if(kn.is(a)&&this.core.setState(a.id,ke(Oy,r,{warn:!0,disableValidation:o})),jr.is(a)){let B=ke(Mu,r,{warn:!0,disableValidation:o}),q=Ra(B);for(let N of a.segments)this.core.setState(N.id,q)}if(yo.is(a)){let B=ke(Mu,r,{warn:!0,disableValidation:o}),q=Ra(B);this.core.setState(a.id,q)}}}getMapDataObject(e){var r;return(r=this.getMapDataInternal())==null?void 0:r.getMapDataById(e)}getMapDataInternal(){if(this.mapData)return ps(this.mapData)}getMapData(){return this.mapData}addMap(e,r){return new Promise(o=>{var h,y,b,I;let a;try{a=ps(e)}catch(C){k.error("Error adding map",C),o(e);return}this.mapDataExternal[e.mapName]=e,this.mapData=e;let{mvf:s}=a,l=s["manifest.geojson"].features[0].geometry.coordinates;this.core.mode!=="outdoors-overlay"&&this.Camera.set({center:new re(l[1],l[0])});let c=s["manifest.geojson"].features[0].properties.name,p=new sl("mapObject-".concat(c),a,r,this);this.currentMap=p,this.currentMap.loadAllFloors(),this.currentMap.setFloor(this.currentMap.startingFloorId),this.core.renderSync();let d=(y=(h=r==null?void 0:r.outdoorView)==null?void 0:h.layersHiddenByGeometry)!=null?y:[];if(d.length>0){let C=[];for(let P of p.floorStacksById.values())P.isOutdoors===!1&&P.defaultFloor.footprint&&P.defaultFloor.footprint.geometry!=null&&((b=P.defaultFloor.footprint.geometry)==null?void 0:b.coordinates.length)>0&&C.push(P.defaultFloor.footprint);C.length>0&&(this.core.hideOutdoorLayersIntersectingPolygons(C,d),this.hiddenOutdoorGeometries.push([C,d]))}if(this.mapObjects.push(p),a.getMVFFeatureByType("floor").forEach(C=>{this.mapsByFloorId[C.id]=p}),p.on("floor-change-start",C=>{var P,O,U,H;this.externalPubSub.publish("floor-change-start",{reason:C.reason,floor:(O=(P=this.getMapDataInternal())==null?void 0:P.getById("floor",C.floorId))!=null?O:this.currentFloor,previousFloor:(H=(U=this.getMapDataInternal())==null?void 0:U.getById("floor",C.previousFloorId))!=null?H:this.currentFloor})},{signal:this.signal}),p.on("floor-change",C=>{var P,O;this.externalPubSub.publish("floor-change",{reason:C.reason,floor:this.currentFloor,previousFloor:(O=(P=this.getMapDataInternal())==null?void 0:P.getById("floor",C.previousFloorId))!=null?O:this.currentFloor}),this.externalPubSub.publish("state-change-internal",{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack})},{signal:this.signal}),(r==null?void 0:r.zoomLevel)!=null)this.core.camera.setZoomLevel(r.zoomLevel),o(e);else if(this.core.mode!=="outdoors-overlay"&&this.currentFloor){let C=(I=r==null?void 0:r.screenOffsets)!=null?I:{top:xp*this.core.canvasHeight,left:xp*this.core.canvasWidth,right:xp*this.core.canvasWidth,bottom:xp*this.core.canvasHeight};this.Camera.focusOn(this.currentFloor,{duration:tg,screenOffsets:C}).then(()=>{this.Camera.setElevation(this.currentFloor.elevation),o(e)})}else o(e)})}setFloor(e,r){return this.currentMap.setFloor(ms(e),r)}setFloorStack(e,r){return this.currentMap.setFloorStack(ms(e),r)}updateWatermark(e){this.core.updateWatermark(e)}get currentFloorStack(){var o;let e=this.currentMap.currentFloorStack.id;if(!e)throw new tt("Missing currentFloorStack.");let r=(o=this.mapData)==null?void 0:o.getById("floor-stack",e);if(!r)throw new tt("FloorStack was not found in map data.");return r}get currentFloor(){var o;let e=this.currentMap.currentFloor.id;if(!e)throw new tt("Missing currentFloor object from GeoJsonApi");let r=(o=this.mapData)==null?void 0:o.getById("floor",e);if(!r)throw new tt("Missing currentFloor");return r}getState(e){var a,s;typeof e=="object"&&jr.is(e)&&k.warn("Cannot get state of a Path directly. Use getState() on individual segments within Path.segments[] instead.");let r=Qd(e,this),o=this.core.getState(r);if(o){if(["interior-walls","exterior-walls"].includes(e)&&o.type==="geometry-group")return Fy(o);if(["interior-doors","exterior-doors"].includes(e)&&o.type==="geometry-group")return zm(o);if(o.type==="geometry")return my(o);if(o.type==="label"&&o.options.appearance&&o.options.rank!==void 0&&o.options.interactive!==void 0)return vy(o);if(o.type==="marker"&&((a=o.options)==null?void 0:a.rank)!==void 0&&o.options.interactive!==void 0)return Sy(o,(s=this.Markers.getById(o.id.toString()))==null?void 0:s.marker);if(o.type==="model")return Ry(o);if(o.type==="image")return Ly(o);if(o.type==="text3d")return Dy(o);if(o.type==="geometry-group"&&e&&typeof e!="string"&&Fn.is(e))return xy(o);if(o.type==="path")return jm(o);if(o.type==="group-container"&&typeof e!="string"&&zt.is(e))return hy(o,this.currentMap.floorsById.get(e.id),this.core);if(o.type==="group-container"&&o.children.length>0&&typeof e!="string"&&mt.is(e)){let l=this.core.getState(o.children[0].id);return Ym(l)}}}__EXPERIMENTAL__getRenderedState(e){let r=Qd(e,this);if(r)return this.core.getRenderedState(r)}setHoverColor(e){this.core.setState({hoverColor:e})}getHoverColor(){let e=this.core.getState();return(e==null?void 0:e.type)==="map-view"?e.hoverColor:void 0}getFloorStackAltitudeData(e){return this.currentMap.getFloorStackAltitudeData(e)}createCoordinateFromScreenCoordinate(e,r,o){var p;if(o!=null){let d=this.core.projectScreenXYToCoordinate(e,r,!0);return d?new re(d.coordinate[1],d.coordinate[0],o.id):void 0}let a=this.core.projectScreenXYToCoordinate(e,r);if(a==null||a.coordinate==null)return;let{coordinate:s,groupContainers:l}=a,c=(p=l==null?void 0:l.find(d=>{let h=d.userData.entityId.toString();return h.includes("f_")||h.includes("m_")}))==null?void 0:p.userData.entityId.toString();return new re(s[1],s[0],c)}getScreenCoordinateFromCoordinate(e){var o,a,s;let r=0;if(e.floorId!=null){let l=(o=this.mapData)==null?void 0:o.getById("floor",e.floorId);l!=null&&(r=(s=(a=this.getState(l))==null?void 0:a.altitude)!=null?s:0)}return this.core.projectCoordinateToScreenXY([e.longitude,e.latitude,r])}isInView(e){return this.core.isInView(typeof e=="string"?e:e.id)}getInView(e,r){let o=this.core.queryGeometry2DInView({screenOffsets:r==null?void 0:r.screenOffsets,fullyContains:r==null?void 0:r.fullyContains});if(o.length===0)return[];let a=[];switch(e){case An.__type:a=o.map(s=>this.Labels.getById(s)).filter(s=>s!=null).map(s=>s.label);break;case ln.__type:a=o.map(s=>this.Markers.getById(s)).filter(s=>s!=null).map(s=>s.marker)}return a}async __EXPERIMENTAL__auto(e){return await nb(this,e)}tween(e){let r=new vn(e);return this.core.getExternalTweenGroup().add(r),this.core.render(),r}removeTween(e){this.core.getExternalTweenGroup().remove(e)}tweenGroup(){return this.core.getExternalTweenGroup()}get __core(){return this.core}getCameraState(){return this.core.camera.getState()}getNavigationState(){return{isMultiFloor:this.Navigation.isMultiFloor,floorStacks:this.Navigation.floorStacks,floors:this.Navigation.floors,activeDirections:this.Navigation.activeDirections,activePath:this.Navigation.activePath,paths:this.Navigation.paths}}getAllState(){return{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack,Camera:this.getCameraState(),Navigation:this.getNavigationState(),manualFloorVisibility:this.manualFloorVisibility}}publishAllState(){this.externalPubSub.publish("state-change-internal",this.getAllState())}clear(){this.Navigation.clear(),this.Shapes.removeAll(),this.Paths.removeAll(),this.Models.removeAll(),this.Markers.removeAll(),this.Image3D.removeAll(),this.Labels.removeAll()}destroy(){this.clear(),super.destroy(),this.core.destroy()}getOptimalVisualDistanceBetweenFloors(e,r=!1){let o=this.currentMap;if(!o){k.error("Cannot compute optimal visual distance between floors. Missing current map.");return}if(e.length<2){k.warn("Cannot compute optimal visual distance between floors. Must provide at least 2 floors.");return}let a=o.renderer.getInternalState().geometry3DMap.get(e[0].id),s=o.renderer.getInternalState().geometry3DMap.get(e[1].id);if(!a||!s){k.warn("Cannot compute optimal visual distance between floors. Floors not found in current map.");return}Yp(a,"group-container"),Yp(s,"group-container"),r&&typeof o.renderer.debugVisualizeBoundingBoxes=="function"&&o.renderer.debugVisualizeBoundingBoxes(a,s);let l=o.renderer.computeMinZOffsetBetweenContainers(a,s);if(l!==-1)return l}};Ll=new WeakMap,Nl=new WeakMap;function x2(n){if(n===""){zp(""),Xp("");return}Xp("".concat(n,"/").concat(nh)),zp("".concat(n,"/").concat(rh))}m();var Eo,_p=class{constructor(t){f(this,"state");M(this,Eo);f(this,"update");E(this,Eo,t),this.update=t.Debug.update.bind(t.Debug),this.state=t.Debug.state}getCameraState(){let t=i(this,Eo).camera.center,e=i(this,Eo).camera.bearing;return{center:new re({longitude:t[0],latitude:t[1]}),zoomLevel:i(this,Eo).camera.zoomLevel,bearing:e,pitch:i(this,Eo).camera.pitch}}};Eo=new WeakMap;m();import vt from"zod";var ob=vt.strictObject({environment:vt.union([vt.literal("basic"),vt.literal(!1)]).optional(),text3d:vt.object({hoverColor:vt.string().optional()}).optional(),geometry:vt.object({hoverColor:vt.string().optional()}).optional(),backgroundColor:vt.string().optional(),backgroundAlpha:vt.number().optional(),multiFloorView:vt.object({spacesOpenToBelowVisualEffectEnabled:vt.boolean().optional(),spacesOpenToBelowVisualEffectDarkenAmount:vt.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectDarkenUseDepth:vt.boolean().optional(),spacesOpenToBelowVisualEffectDesaturateAmount:vt.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectDesaturateUseDepth:vt.boolean().optional(),spacesOpenToBelowVisualEffectWashOutAmount:vt.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectWashOutUseDepth:vt.boolean().optional()}).optional()});m();var _f=Jl(Fb(),1);m();var Ul=null;function kb(){if(Ul)return Ul;if(typeof OffscreenCanvas<"u")Ul=new OffscreenCanvas(1,1).getContext("2d");else if(typeof document<"u"){let n=document.createElement("canvas");n.width=1,n.height=1,Ul=n.getContext("2d")}return Ul}function Sf(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Mf(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}function Ef(n){let t=kb();if(!t)return[0,0,0];t.fillStyle=n,t.fillRect(0,0,1,1);let[e,r,o]=t.getImageData(0,0,1,1).data;return[Sf(e/255),Sf(r/255),Sf(o/255)]}function Lb(n){let t=Math.round(Math.min(1,Math.max(0,Mf(n[0])))*255),e=Math.round(Math.min(1,Math.max(0,Mf(n[1])))*255),r=Math.round(Math.min(1,Math.max(0,Mf(n[2])))*255);return"#"+(1<<24|t<<16|e<<8|r).toString(16).slice(1)}var bM=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,vM=/^rgba?\(\s*\d+/,IM=/^hsla?\(\s*[\d.]+/;function xf(n){if(n==null||typeof n!="string")return!1;if(bM.test(n)||vM.test(n)||IM.test(n))return!0;let t=kb();return t?(t.fillStyle="#000",t.fillStyle=n,t.fillStyle!=="#000000"||n.toLowerCase()==="black"||n==="#000"||n==="#000000"):!1}var TM=(n,t)=>{let e={},r=(o,a,s)=>{for(let l in a){let c=o[l],p=a[l];typeof p=="object"&&!Array.isArray(p)&&p!==null&&typeof c=="object"&&!Array.isArray(c)&&c!==null?(s[l]={},r(c,p,s[l])):s[l]=c}};return r(n,t,e),e},Nb=(n,t)=>{let e=TM(n,t),r=(0,_f.default)({},e,t),o=(0,_f.default)({},e),a=(s,l,c,p=o)=>{for(let d in l){let h=s[d],y=l[d];if(typeof y=="number"&&typeof h=="number")p[d]=h+(y-h)*c;else if(typeof y=="string"&&typeof h=="string"){if(xf(h)&&xf(y)){let b=Ef(h),I=Ef(y);b&&I?p[d]=Lb([b[0]+(I[0]-b[0])*c,b[1]+(I[1]-b[1])*c,b[2]+(I[2]-b[2])*c]):k.warn('Color "'.concat(d,'" could not be animated!'))}}else typeof y=="object"&&y!==null&&typeof h=="object"&&h!==null?a(h,y,c,p[d]):k.warn('Value "'.concat(d,'" could not be animated!'))}};return s=>(s=Math.min(Math.max(s,0),1),s===0?n:s===1?r:(a(e,t,s),o))};m();function SM(n){return n.getContext("webgl2")||n.getContext("webgl")}function Cf(n){let t=SM(n);if(!t||n.width===0||n.height===0)return null;let e=t;e.PIXEL_PACK_BUFFER!==void 0&&e.bindBuffer(e.PIXEL_PACK_BUFFER,null);let r=new Uint8Array(n.width*n.height*4);t.readPixels(0,0,n.width,n.height,t.RGBA,t.UNSIGNED_BYTE,r);let o=document.createElement("canvas");o.width=n.width,o.height=n.height;let a=o.getContext("2d");if(!a)return null;let s=new ImageData(n.width,n.height);for(let l=0;l<n.height;l++)for(let c=0;c<n.width;c++){let p=((n.height-l-1)*n.width+c)*4,d=(l*n.width+c)*4;s.data[d]=r[p],s.data[d+1]=r[p+1],s.data[d+2]=r[p+2],s.data[d+3]=r[p+3]}return a.putImageData(s,0,0),o}async function Bb(n,t=1e3){let e=null,r=new Promise(s=>{e=()=>{let l=n.getCanvas();s(l?Cf(l):null)},n.once("render",e),n.triggerRepaint()}),o=new Promise(s=>setTimeout(()=>s(null),t)),a=await Promise.race([r,o]);return a===null&&e&&n.off("render",e),a}function Pf(n,t="labels"){let e=n.getContext("2d");if(!e)return null;try{let r=e.getImageData(0,0,n.width,n.height),o=document.createElement("canvas");o.width=n.width,o.height=n.height;let a=o.getContext("2d");return a?(a.putImageData(r,0,0),o):null}catch(r){let o=t==="overlay"?"HTML overlay canvas is tainted and cannot be included in screenshot. This may occur if overlay content contains cross-origin images without proper CORS headers.":"Labels canvas is tainted and cannot be included in screenshot. This may occur if labels contain cross-origin images without proper CORS headers.";return k.warn(o),null}}var hn,K,Vt,Hl=class{constructor(t){M(this,hn);M(this,K);M(this,Vt);f(this,"Camera");f(this,"Labels");f(this,"Text3D");f(this,"Markers");f(this,"Image3D");f(this,"Models");f(this,"Paths");f(this,"Exporter");f(this,"Navigation");f(this,"Style");f(this,"Shapes");f(this,"Outdoor");f(this,"update",()=>{i(this,K).core.render()});f(this,"__LEGACY_GET_DIRECTIONS_SYNC",(t,e,r)=>{var o,a;return(a=(o=i(this,K).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_SYNC(t,e,r))!=null?a:void 0});f(this,"getDirections",(t,e,r)=>{var o,a;return(a=(o=i(this,K).getMapData())==null?void 0:o.getDirections(t,e,r))!=null?a:Promise.resolve(void 0)});f(this,"__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC",(t,e,r)=>{var o,a;return(a=(o=i(this,K).getMapData())==null?void 0:o.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(t,e,r))!=null?a:void 0});f(this,"getDirectionsMultiDestination",(t,e,r)=>{var o,a;return(a=(o=i(this,K).getMapData())==null?void 0:o.getDirectionsMultiDestination(t,e,r))!=null?a:Promise.resolve(void 0)});f(this,"on",(t,e)=>{i(this,hn).on(t,e)});f(this,"off",(t,e)=>{i(this,hn).off(t,e)});f(this,"Debug");E(this,hn,new dr),E(this,Vt,t);let e=new kl(t,this,i(this,hn));E(this,K,e),this.Camera=i(this,K).Camera,this.Markers=i(this,K).Markers,this.Models=i(this,K).Models,this.Labels=i(this,K).Labels,this.Text3D=i(this,K).Text3D,this.Exporter=i(this,K).Exporter,this.Paths=i(this,K).Paths,this.Navigation=i(this,K).Navigation,this.Shapes=i(this,K).Shapes,this.Style=i(this,K).Style,this.Outdoor=i(this,K).Outdoor,this.Image3D=i(this,K).Image3D,i(this,Vt).container.dataset.version=x.env.npm_package_version,this.Debug=new _p(i(this,K).core)}updateState(t,e){return i(this,K).updateState(t,e)}animateState(t,e,r){var c;let o=i(this,K).getState(t);if(o==null)return k.warn("Cannot animate state of ".concat(t,".")),new Promise(d=>d({result:"completed"}));let a=Nb(o,e),s=i(this,K).tween({percent:0}).to({percent:1},(c=r==null?void 0:r.duration)!=null?c:1e3).onUpdate(({percent:p})=>{i(this,K).updateState(t,a(p))});r!=null&&r.easing&&r.easing in Pi&&s.easing(Pi[r.easing]);let l=new Promise(p=>{s.onComplete(()=>{i(this,K).removeTween(s),p({result:"completed"})}).onStop(()=>{i(this,K).removeTween(s),p({result:"cancelled"})}),s.start()});return l.cancel=()=>{s.stop(),i(this,K).updateState(t,a(0))},l}updateGlobalState(t){var e,r,o,a;try{ob.parse(t)}catch(s){k.error("updateGlobalState",s);return}if(typeof t=="object"){let s={};if((e=t.text3d)!=null&&e.hoverColor&&(s.text3dHoverColor=t.text3d.hoverColor),(r=t.geometry)!=null&&r.hoverColor&&(s.hoverColor=t.geometry.hoverColor),t.backgroundColor||t.backgroundAlpha!==void 0){let l=(o=t.backgroundColor)!=null?o:i(this,K).core.backgroundColor,c=(a=t.backgroundAlpha)!=null?a:i(this,K).core.backgroundAlpha;i(this,K).core.setBackgroundColor(l,c)}t.environment!=null&&i(this,K).core.setEnvironment(t.environment),t.multiFloorView!=null&&i(this,K).currentMap.updateMultiFloorViewEffects(t.multiFloorView),i(this,K).core.setState(s),i(this,hn).publish("global-state-change")}}get options(){return og(i(this,K).currentMap.options)}getGlobalState(){let t=i(this,K).core.getState();return{backgroundColor:i(this,K).core.backgroundColor,backgroundAlpha:i(this,K).core.backgroundAlpha,environment:i(this,K).core.getEnvironment(),geometry:{hoverColor:t.hoverColor},text3d:{hoverColor:t.text3dHoverColor},multiFloorView:i(this,K).currentMap.getMultiFloorViewEffects()}}getMapData(){if(i(this,K).mapData==null)throw new tt("MapData not found.");return i(this,K).mapData}getDimensions(){return{width:i(this,Vt).canvasWidth,height:i(this,Vt).canvasHeight}}addMap(t,e){return i(this,K).addMap(t,e)}setFloor(t,e){return i(this,K).setFloor(t,e==null?void 0:e.context)}setFloorStack(t,e){return i(this,K).setFloorStack(t,e==null?void 0:e.context)}preloadFloors(t){i(this,K).preloadFloors(t)}tween(t){return i(this,K).tween(t)}removeTween(t){i(this,K).removeTween(t)}get tweenGroup(){return i(this,K).tweenGroup()}get currentFloorStack(){return i(this,K).currentFloorStack}get currentFloor(){return i(this,K).currentFloor}updateWatermark(t){i(this,K).updateWatermark(t)}getState(t){return i(this,K).getState(t)}getFloorStackAltitudeData(t){let e=typeof t=="string"?t:t.id;return i(this,K).getFloorStackAltitudeData(e)}__EXPERIMENTAL__getRenderedState(t){return i(this,K).__EXPERIMENTAL__getRenderedState(t)}setHoverColor(t){i(this,K).setHoverColor(t)}getHoverColor(){return i(this,K).getHoverColor()}convertAltitudeToMercatorZoomLevel(t){return i(this,K).core.getSystems().cameraSystem.convertAltitudeToZoomLevel(t)}convertMercatorZoomLevelToAltitude(t){return i(this,K).core.getSystems().cameraSystem.convertZoomLevelToAltitude(t)}isInView(t){return i(this,K).isInView(t)}getInView(t,e){return i(this,K).getInView(t,e)}getMetersPerPixel(){return i(this,K).core.getMetersPerPixel()}getDistance(t,e){var r;return(r=i(this,K).getMapData())==null?void 0:r.getDistance(t,e)}createCoordinate(t,e,r){return typeof t=="object"?new re(t):new re(t,e,r==null?void 0:r.id)}createCoordinateFromScreenCoordinate(t,e,r){return i(this,K).createCoordinateFromScreenCoordinate(t,e,r)}getScreenCoordinateFromCoordinate(t){return i(this,K).getScreenCoordinateFromCoordinate(t)}__EXPERIMENTAL__auto(t){return i(this,K).__EXPERIMENTAL__auto(t)}get __core(){if(x.env.INTERNAL==="true")return i(this,K).core;throw new Error("__core is not available.")}get container(){return i(this,Vt).container}publishAllState(){i(this,K).publishAllState()}clear(){i(this,K).clear()}destroy(){i(this,hn).publish("destroy"),i(this,hn).destroy(),i(this,K).destroy()}async enableDebug(t={}){let{Inspector:e}=await import("./inspector-AQXLD4YL.js");await new e(this,i(this,K)).enable(t)}async takeScreenshot(t){var c,p,d,h,y;let e={withOutdoorContext:(c=t==null?void 0:t.withOutdoorContext)!=null?c:!1,withLabels:(p=t==null?void 0:t.withLabels)!=null?p:!1,captureMarkers:t==null?void 0:t.captureMarkers},r=i(this,Vt).rendererDomElement,o=i(this,Vt).map,a=!1,s=!1,l=[];if(this.Outdoor.enabled&&this.Outdoor.visible&&!e.withOutdoorContext&&(this.Outdoor.hide(),a=!0,o)){let b=null;o.triggerRepaint(),await Promise.race([new Promise(C=>{b=()=>C(),o.once("render",b)}),new Promise(C=>setTimeout(C,1e3))])===void 0&&b&&o.off("render",b)}if(this.Outdoor.enabled&&e.withOutdoorContext&&!this.Outdoor.visible){if(o){let b=(d=o.getStyle())==null?void 0:d.layers;b&&(l=b.filter(I=>o.getLayoutProperty(I.id,"visibility")!=="none").map(I=>I.id))}if(this.Outdoor.show(),s=!0,o){let b=null;o.triggerRepaint(),await Promise.race([new Promise(C=>{b=()=>C(),o.once("render",b)}),new Promise(C=>setTimeout(C,1e3))])===void 0&&b&&o.off("render",b)}}try{let b=document.createElement("canvas"),I=b.getContext("2d",{willReadFrequently:!0});if(b.width=r.width,b.height=r.height,!I)throw new Error("Failed to get 2D context");if(e.withOutdoorContext&&o){if(!o.loaded()){let O=null;await Promise.race([new Promise(H=>{O=()=>H(),o.once("idle",O)}),new Promise(H=>setTimeout(H,5e3))])===void 0&&O&&o.off("idle",O)}let P=await Bb(o);P&&I.drawImage(P,0,0,b.width,b.height)}await i(this,Vt).renderSync();let C=Cf(r);if(C&&I.drawImage(C,0,0,b.width,b.height),e.withLabels){let P=i(this,Vt).labelsCanvas;if(P){let O=Pf(P);O&&I.drawImage(O,0,0,b.width,b.height)}}if(e.withLabels&&e.captureMarkers){let P=i(this,Vt).container;if(P)for(let O=0;O<P.children.length;O++){let U=P.children[O],H=U.classList.contains("mappedin-2d-entities");if(!(U.tagName==="CANVAS"||U.offsetWidth===0||U.offsetHeight===0||!H))try{let V=await e.captureMarkers(U),B=Pf(V,"overlay");B&&B.width>0&&B.height>0&&I.drawImage(B,0,0,b.width,b.height)}catch(V){k.warn("Overlay layer capture failed: ".concat(V instanceof Error?V.message:String(V),". Continuing with other layers."))}}}try{return b.toDataURL("image/png")}catch(P){if((P instanceof Error?P.name:P==null?void 0:P.name)==="SecurityError"||((h=P==null?void 0:P.message)==null?void 0:h.includes("tainted"))||((y=P==null?void 0:P.message)==null?void 0:y.includes("security"))){let V=P instanceof Error?"Screenshot failed due to security restrictions: ".concat(P.message):"Screenshot failed due to security restrictions. Ensure all images have proper CORS headers.";throw new tt(V)}let H=P instanceof Error?"Screenshot failed: ".concat(P.message):"Screenshot failed due to an unknown error.";throw new tt(H)}}finally{a&&this.Outdoor.show(),s&&this.Outdoor.hide(l)}}get manualFloorVisibility(){return i(this,K).manualFloorVisibility}set manualFloorVisibility(t){i(this,K).manualFloorVisibility=t}getOptimalVisualDistanceBetweenFloors(t){return i(this,K).getOptimalVisualDistanceBetweenFloors(t)}get __INTERNAL__hidePathsNotOnCurrentFloor(){return i(this,K).hidePathsNotOnCurrentFloor}set __INTERNAL__hidePathsNotOnCurrentFloor(t){i(this,K).hidePathsNotOnCurrentFloor=!!t}registerPlugin(t){i(this,Vt).registerPlugin(t)}unregisterPlugin(t){i(this,Vt).unregisterPlugin(t)}};hn=new WeakMap,K=new WeakMap,Vt=new WeakMap;m();var Rb=(n,{id:t}={})=>{let e=Array.isArray(n)?n:[n];if(!e.every(a=>typeof a=="string"))return;let r=e.join(""),o=null;if(t){let a=document.getElementById(t);a instanceof HTMLStyleElement&&(o=a)}o==null&&(o=document.createElement("style")),t&&t!==""&&(o.id=t),o.textContent=r,document.head.appendChild(o)};m();var MM=1e3*60*60*2,xo,Ya,He,gn,Zr,Mr,Jr,Za,Ja,Wl,$e,Vb,jb,Xa,Lp,wf,Of,Df,qa=class{constructor(t,e){M(this,$e);M(this,xo,new dr);M(this,Ya);M(this,He);M(this,gn);M(this,Zr);M(this,Mr);M(this,Jr);M(this,Za);M(this,Ja);M(this,Wl,()=>{"key"in i(this,He)&&"secret"in i(this,He)&&Y(this,$e,Xa).call(this),Y(this,$e,Lp).call(this)});f(this,"on",(t,e)=>i(this,xo).on(t,e));f(this,"off",(t,e)=>i(this,xo).off(t,e));E(this,Ya,t),E(this,He,e)}setMapIds(t){E(this,Ya,t)}setEnterprise(t){i(this,He).enterprise=t}async readySync(){var o;if((!("key"in i(this,He))||!("secret"in i(this,He)))&&!("accessToken"in i(this,He))){k.error("No API keys or access token provided! Cannot preload tokens.");return}let t=[Y(this,$e,Xa).call(this),null];i(this,He).enterprise||(t[1]=this.getSasTokensAsync());let[e,r]=await Promise.all(t);Y(this,$e,Df).call(this),Y(this,$e,wf).call(this,e),r!=null&&Y(this,$e,Of).call(this,r),ns()&&((o=globalThis.addEventListener)==null||o.call(globalThis,"focus",i(this,Wl)))}async refreshing(){let t=[];return i(this,gn)!=null&&t.push(i(this,gn)),i(this,Zr)!=null&&t.push(i(this,Zr)),Promise.all(t)}getAccessTokenAsync(){return Y(this,$e,Xa).call(this)}getSasTokensAsync(){return Y(this,$e,Lp).call(this)}getAccessToken(){return i(this,Mr)==null?(k.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):i(this,Mr)}getSasToken(t){return this.isEnterpriseMode()?(k.error("SAS tokens are not available in the enterprise mode!"),{token:""}):i(this,Jr)==null?(k.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):t in i(this,Jr).tokens?i(this,Jr).tokens[t]:(k.error("SAS token for map ".concat(t," not found!")),{token:""})}isEnterpriseMode(){var t;return(t=i(this,He).enterprise)!=null?t:!1}destroy(){Y(this,$e,Df).call(this),i(this,xo).destroy(),ns()&&globalThis.removeEventListener("focus",i(this,Wl))}};xo=new WeakMap,Ya=new WeakMap,He=new WeakMap,gn=new WeakMap,Zr=new WeakMap,Mr=new WeakMap,Jr=new WeakMap,Za=new WeakMap,Ja=new WeakMap,Wl=new WeakMap,$e=new WeakSet,Vb=function(t){var r;let e=t.token!==((r=i(this,Mr))==null?void 0:r.token);E(this,Mr,t),e&&i(this,xo).publish("access-token-refreshed",{accessToken:t})},jb=function(t){var r;let e=JSON.stringify(t.tokens)!==JSON.stringify((r=i(this,Jr))==null?void 0:r.tokens);E(this,Jr,t),e&&i(this,xo).publish("sas-tokens-refreshed",{sasTokens:t.tokens})},Xa=async function(t=!1){var e;if("accessToken"in i(this,He)&&typeof i(this,He).accessToken=="string"){let r={token:i(this,He).accessToken,expires:Date.now()+72e5};return E(this,Mr,r),r}if(!("key"in i(this,He))||!("secret"in i(this,He))||typeof i(this,He).key!="string"||typeof i(this,He).secret!="string")throw new Error("No API keys or access token provided!");return i(this,gn)!=null?i(this,gn):i(this,Mr)!=null&&i(this,Mr).expires!=null&&i(this,Mr).expires>Date.now()&&!t?i(this,Mr):(E(this,gn,ds(W(A({},i(this,He)),{key:i(this,He).key,secret:i(this,He).secret}),(e=i(this,He).enterprise)!=null?e:!1).then(r=>{let o={token:r.accessToken,expires:r.expiresTimestamp*1e3};return Y(this,$e,Vb).call(this,o),o}).catch(r=>{throw r}).finally(()=>{E(this,gn,void 0)})),i(this,gn))},Lp=async function(t=!1){return this.isEnterpriseMode()?{tokens:{},expires:1/0}:i(this,Zr)!=null?i(this,Zr):i(this,Jr)!=null&&i(this,Jr).expires>Date.now()&&!t?i(this,Jr):(E(this,Zr,new Promise((e,r)=>{Y(this,$e,Xa).call(this).then(o=>{let a={},s=i(this,Ya).map(l=>td(W(A({},i(this,He)),{mapId:l}),o.token).then(c=>{a[l]={token:c.token,expires:c.expires}}).catch(c=>{k.error("Error getting SAS token for map ".concat(l,":"),c)}));Promise.all(s).then(()=>{let l={tokens:a,expires:Math.min(...Object.values(a).map(c=>{var p;return(p=c.expires)!=null?p:1/0}))};Y(this,$e,jb).call(this,l),e(l)})}).catch(o=>{r(o)})})),i(this,Zr).catch(e=>{throw e}).finally(()=>{E(this,Zr,void 0)}),i(this,Zr))},wf=function(t){if(!("key"in i(this,He))||!("secret"in i(this,He)))return;let e=t.expires!=null?t.expires-Date.now():MM;isFinite(e)&&E(this,Za,setTimeout(()=>{Y(this,$e,Xa).call(this,!0).then(r=>{Y(this,$e,wf).call(this,r)})},e-Dh))},Of=function(t){let e=t.expires-Date.now();isFinite(e)&&E(this,Ja,setTimeout(()=>{Y(this,$e,Lp).call(this,!0).then(r=>{Y(this,$e,Of).call(this,r)})},e-kh))},Df=function(){i(this,Za)!=null&&clearTimeout(i(this,Za)),i(this,Ja)!=null&&clearTimeout(i(this,Ja))};m();var EM=async(n,t)=>{var C,P,O,U,H,V,B,q,N,J,se;let e=(O="mvfVersion"in(t!=null?t:{})?t==null?void 0:t.mvfVersion:void 0)!=null?O:"options"in n&&"version"in((C=n.options)!=null?C:{})?(P=n.options)==null?void 0:P.version:void 0,r=W(A({prefetchTokens:!0},t||{}),{mvfVersion:e}),o,a,s=Kn();s.updateByUserOption(r);let l={};if("type"in n&&typeof n.type=="string"){if(n.type==="binary"&&n.main instanceof Uint8Array){let ie=await cc(n.main,r.mvfVersion);o=ie.mvf2,a=ie.mvf3,l.languagePacks=[];for(let me of(U=n.languagePacks)!=null?U:[])me.localePack instanceof Uint8Array&&l.languagePacks.push({language:me.language,localePack:await ki(me.localePack)})}else if(n.type==="json")o=n.main,a=(H=n.options)==null?void 0:H.mvf3,l.languagePacks=(V=n.languagePacks)!=null?V:[];else throw new Error("Invalid backup type");n.type==="binary"&&n.main instanceof Uint8Array&&(l.binaryBundle=n.main);let z=o.enterprise!=null;((B=n.options)==null?void 0:B.enterprise)!==void 0&&(z?k.warn('The "enterprise" option in hydrateMapData is deprecated and ignored. Enterprise mode is now automatically detected from the MVF data.'):k.warn('The "enterprise" option in hydrateMapData is deprecated and will be removed in a future release. Please ensure your MVF bundle includes enterprise data for automatic detection.')),l.enterprise=z||((N=(q=n.options)==null?void 0:q.enterprise)!=null?N:!1)}else o=n,l.enterprise=o.enterprise!=null;l.mvf3=a,s.setEnterprise((J=l.enterprise)!=null?J:!1);let c=lc(o),p=c.length>0?c:[r.mapId];r.baseAuthUri=s.getBaseAuthUri();let d=new qa(p,W(A({},r),{enterprise:l.enterprise})),h;if("accessToken"in r&&r.accessToken)h=r.accessToken;else if("key"in r&&"secret"in r){let z;try{z=await d.getAccessTokenAsync()}catch(ie){k.error("Failed getting token during hydrateMapData",ie)}h=(z==null?void 0:z.token)||""}if(l.outdoorViewToken=h,l.env=s,l.getMapDataOptions=r,l.tokenManager=d,r.prefetchTokens)try{await d.readySync()}catch(z){k.error("Failed to ready token manager!",z)}Ws()&&(l.enterprise&&k.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),r.mvfVersion!=="3.0.0"&&k.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let y=new ai(o,l);h&&y.Analytics.init(W(A({accessToken:h,mapId:r.mapId,key:"key"in r?r.key:void 0,secret:"secret"in r?r.secret:void 0},r.analytics),{baseUri:s.getAnalyticsBaseUri(),context:(se=r.analytics)==null?void 0:se.context}));let b=new cs(y),I=y.findPreferredLanguage({languageCode:r.language,fallbackToNavigatorLanguage:!1});if(I)try{await b.changeLanguage(I.code)}catch(z){}return typeof(t==null?void 0:t.onMVFParsed)=="function"&&t.onMVFParsed(o),b};var Gb=":root {\n --pin-shadow-hover-scale: 0.9;\n --pin-shadow-width: 12px;\n --pin-shadow-height: 5px;\n --pin-shadow-opacity: 0.35;\n --pin-drop-animation-duration-ms: 250ms;\n}\n\n@keyframes drop-pin {\n 0% {\n transform: translateY(-200%);\n }\n\n 100% {\n transform: translateY(0);\n }\n}\n\n@keyframes pin-shadow {\n 0% {\n transform: scale(var(--pin-shadow-hover-scale));\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n.mappedin-dropped-pin-wrapper {\n position: relative;\n\n width: fit-content;\n height: fit-content;\n width: 36px;\n height: 42px;\n\n & svg {\n position: absolute;\n left: calc(50% - var(--pin-shadow-width));\n animation: drop-pin var(--pin-drop-animation-duration-ms) ease-in;\n }\n\n & > .pin-shadow {\n position: absolute;\n left: calc(50% - (var(--pin-shadow-width) / 2));\n bottom: 0;\n\n height: var(--pin-shadow-height);\n width: var(--pin-shadow-width);\n border-radius: 100%;\n\n opacity: var(--pin-shadow-opacity);\n\n animation: pin-shadow 250ms ease-in;\n }\n}\n\n@keyframes bounce {\n 0% {\n transform: translateY(-10px);\n opacity: 0;\n }\n 12.5% {\n transform: translateY(0);\n opacity: 1;\n }\n 25% {\n transform: translateY(0);\n }\n 37.5% {\n transform: translateY(-10px);\n }\n 50% {\n transform: translateY(0);\n }\n 62.5% {\n transform: translateY(-10px);\n }\n 75% {\n transform: translateY(0);\n }\n 87.5% {\n transform: translateY(-10px);\n }\n 100% {\n transform: translateY(0);\n }\n}\n\n.mappedin-connection-marker {\n position: relative;\n display: flex;\n\n .bouncey {\n animation: bounce 2.5s linear;\n }\n\n .arrow--down {\n transform: rotate(180deg);\n }\n\n .connection-circle {\n display: flex;\n box-sizing: border-box;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n border: 2px solid white;\n box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.15);\n background: #595959;\n }\n}\n";var Ub=".mappedin-marker {\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n font-weight: normal;\n top: 0;\n position: absolute;\n font-weight: bold;\n color: black;\n display: flex;\n flex-direction: row;\n will-change: transform, opacity;\n transition: opacity 150ms ease-in-out;\n justify-content: center;\n opacity: 0;\n}\n\n/* Low priority pin strategy styles */\n\n/* Hide child elements as well */\n.mappedin-marker[data-placement='hidden'] > .mappedin-marker-content {\n visibility: hidden;\n}\n\n/* Create the pin using ::before pseudo-element */\n.mappedin-marker::before {\n content: '';\n display: none;\n border-radius: 50%;\n position: relative;\n /* Default values - will be overridden by inline styles */\n width: var(--mappedin-pin-size, 2px);\n height: var(--mappedin-pin-size, 2px);\n background-color: var(--pin-color, #666);\n}\n\n.mappedin-marker[data-placement='hidden']::before {\n display: block;\n}\n";var Hb=".mappedin__smart-collision-engine__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n /* Enables colliders to use translate3D */\n transform-style: preserve-3d;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n}\n\n.mappedin__smart-collision-engine-debug__container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n transition: opacity 300ms ease-in-out;\n pointer-events: none;\n will-change: opacity;\n &.interacting {\n opacity: 0.2;\n }\n}\n";var Wb=".mappedin-map {\n .mappedin-interactive {\n cursor: grab;\n\n &:active {\n cursor: grabbing;\n }\n\n &.mappedin-interaction-hover {\n cursor: pointer;\n }\n }\n}\n";var zb=".mappedin-map {\n .mappedin-control-container {\n position: absolute;\n left: 0px;\n top: 0px;\n bottom: 0px;\n right: 0px;\n pointer-events: none;\n font-family: 'InterUI-Regular', Helvetica, Arial, sans-serif;\n\n .mappedin-ctrl-top-left,\n .mappedin-ctrl-top-right,\n .mappedin-ctrl-bottom-left,\n .mappedin-ctrl-bottom-right {\n position: absolute;\n pointer-events: none;\n }\n\n .mappedin-ctrl-top-left {\n top: 0;\n left: 0;\n }\n\n .mappedin-ctrl-top-right {\n top: 0;\n right: 0;\n }\n\n .mappedin-ctrl-bottom-left {\n bottom: 0;\n left: 0;\n }\n\n .mappedin-ctrl-bottom-right {\n bottom: 0;\n right: 0;\n }\n\n .mappedin-ctrl-attrib {\n display: block;\n position: relative;\n pointer-events: auto;\n font: 9px/11px 'InterUI-Regular', Helvetica, Arial, sans-serif;\n padding: 3px 5px 1px 5px;\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0;\n min-width: 11px;\n min-height: 11px;\n user-select: none;\n\n summary.mappedin-ctrl-attrib-button {\n appearance: none;\n list-style: none;\n }\n\n summary.mappedin-ctrl-attrib-button::-webkit-details-marker {\n display: none;\n }\n\n &.mappedin-compact .mappedin-ctrl-attrib-button,\n &.mappedin-compact-show .mappedin-ctrl-attrib-inner {\n display: inline-block;\n }\n\n &.mappedin-compact {\n background-color: transparent;\n }\n\n &.mappedin-compact-show {\n min-width: 15px;\n min-height: 15px;\n box-sizing: border-box;\n background-color: rgba(255, 255, 255, 0.5);\n }\n }\n\n .mappedin-ctrl-attrib-top-left {\n float: left;\n border-bottom-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-top-right {\n float: right;\n border-bottom-left-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-left {\n float: left;\n border-top-right-radius: 4px;\n }\n\n .mappedin-ctrl-attrib-bottom-right {\n float: right;\n border-top-left-radius: 4px;\n }\n .mappedin-ctrl-attrib-top-left,\n .mappedin-ctrl-attrib-bottom-left {\n padding: 3px 5px 1px 20px;\n }\n\n .mappedin-ctrl-attrib-inner {\n display: inline-block;\n margin-right: 12px;\n }\n\n .mappedin-ctrl-attrib-inner,\n .mappedin-ctrl-attrib-inner a {\n color: rgba(0, 0, 0, 0.75);\n text-decoration: none;\n }\n\n .mappedin-ctrl-attrib-inner-bold,\n .mappedin-ctrl-attrib-inner-bold a {\n font-weight: bold;\n }\n\n .mappedin-ctrl-attrib-inner a:hover {\n color: #017ef1;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .mappedin-ctrl-attrib-button {\n display: none;\n cursor: pointer;\n position: absolute;\n width: 15px;\n height: 15px;\n box-sizing: border-box;\n border-radius: 50%;\n top: 0;\n right: 2px;\n border: 1px;\n }\n .mappedin-ctrl-attrib-top-left .mappedin-ctrl-attrib-button,\n .mappedin-ctrl-attrib-bottom-left .mappedin-ctrl-attrib-button {\n left: 2px;\n }\n }\n}\n";var $b='.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}';var Xb=".mappedin-annotation-marker {\n --mappedin-annotation-border-radius: 5px;\n --mappedin-annotation-border-width: 2px;\n --mappedin-annotation-background-color: #ffffff;\n --mappedin-annotation-scale: 0.7;\n\n position: relative;\n box-sizing: border-box;\n border-radius: var(--mappedin-annotation-border-radius);\n border: var(--mappedin-annotation-border-width) solid var(--mappedin-annotation-background-color);\n\n transform: scale(var(--mappedin-annotation-scale)) translateY(0rem);\n box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.25);\n\n img {\n position: absolute;\n image-rendering: crisp-edges;\n top: 0px;\n\n object-fit: contain;\n border-radius: calc(var(--mappedin-annotation-border-radius) - var(--mappedin-annotation-border-width));\n }\n}\n";m();function AM(n){var t,e;if(!(!n.languages||!ns()||!((e=(t=globalThis.navigator)==null?void 0:t.languages)!=null&&e.length)))for(let r=0;r<globalThis.navigator.languages.length;r++){let o=n.languages.find(a=>a.code.toLowerCase()===globalThis.navigator.languages[r].toLowerCase());if(o)return{code:o.code,name:o.name}}}function du(n,t){var s,l,c;let e=(s=t==null?void 0:t.languageCode)!=null?s:"",r=(l=t==null?void 0:t.fallbackToNavigatorLanguage)!=null?l:!0,o=(c=n==null?void 0:n.languages)==null?void 0:c.find(p=>p.code.toLowerCase()===e.toLowerCase()),a;if(o)a=o;else if(r==null||r)try{let p=AM(n);p&&(a=p)}catch(p){k.error("fallbackToNavigatorLanguage is set, however, there was an error getting the navigator language",p)}return a!=null?a:n.defaultLanguage}var FM=[Gb,Ub,Hb,Wb,zb,$b,Xb],Yb;function nk(n){Yb=n}var ok=async(n,t)=>{let e,r=Kn();t&&r.updateByUserOption(t);try{t&&(e=(await ds(W(A({},t),{baseAuthUri:r.getBaseAuthUri()}))).accessToken)}catch(s){k.warn("Getting access token failed. Outdoor map disabled.",s)}let o=new ai(n,{outdoorViewToken:e,languagePacks:t==null?void 0:t.languagePacks,env:r});return new cs(o)},Zb=!1;function ik(n){Zb=n}var Jb=!1;function ak(n){Jb=n}function Ws(){return Jb}var kM=async n=>{var O,U;let t=Zb,e,r=Kn();r.updateByUserOption(n);let o=W(A({prefetchTokens:!0},n),{fallbackToNavigatorLanguage:(O=n.fallbackToNavigatorLanguage)!=null?O:!0}),a=new qa([o.mapId],o);if("accessToken"in o&&o.accessToken){e=o.accessToken;let{aud:H,sub:V}=ec(e);(rg.some(B=>H.includes(B))||V&&V.startsWith("client"))&&(t=!0,r.setEnterprise(t),a.setEnterprise(t))}else if("key"in o&&"secret"in o){if(o.key.startsWith("mipk_"))throw new Error("Partner API keys detected! \n\nPartner API keys should not be passed directly to the SDK. See https://developer.mappedin.com/docs/rest-apis/partner for more details.");o.key.startsWith("mik_")||(t=!0,r.setEnterprise(t),a.setEnterprise(t)),o.baseAuthUri=r.getBaseAuthUri();let H;try{H=await a.getAccessTokenAsync(),e=H==null?void 0:H.token}catch(V){throw k.warn("Get access token failed",V.message),new Error("Get access token failed: "+V.message)}}else throw new Error("Missing key or secret.");o.layoutId!=null&&(t?o.layoutId!=="draft"&&k.warn('Invalid layoutId! Use "draft" to load draft data or leave unspecified to load live data.'):k.warn("layoutId is currently unsupported!")),o.baseUri=r.getBaseUri();let s=performance.now(),l,c;if(t){let H=W(A({},o),{venue:o.mapId,clientId:o.key,clientSecret:o.secret,version:"1.0.0",perspective:o.viewId,useDraftData:o.layoutId==="draft"}),V=await dd(H);l=V.compressed,c=V.localePacks}else l=await ud(o,e);let p=performance.now(),{mvf2:d,mvf3:h}=await cc(l,o.mvfVersion),y=performance.now();typeof n.onMVFParsed=="function"&&n.onMVFParsed(d);let b=lc(d);if(b.length>0?a.setMapIds(b):a.setMapIds([o.mapId]),o.prefetchTokens)try{await a.readySync()}catch(H){k.error("Failed to ready token manager!",H)}Ws()&&(t&&k.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),o.mvfVersion!=="3.0.0"&&k.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let I=new ai(d,{env:r,outdoorViewToken:e,tokenManager:a,enterprise:t,localePacksUrls:c,binaryBundle:l,getMapDataOptions:o,mvf3:h}),C=new cs(I,{search:n.search});I.Analytics.init(W(A({accessToken:e,mapId:o.mapId,key:"key"in o?o.key:void 0,secret:"secret"in o?o.secret:void 0},o.analytics),{baseUri:r.getAnalyticsBaseUri(),context:(U=o.analytics)==null?void 0:U.context})),I.Analytics.sendGetMapDataEvent({parseDuration:y-p,downloadDuration:p-s,viewId:o.viewId});let P=I.findPreferredLanguage({languageCode:o.language,fallbackToNavigatorLanguage:o.fallbackToNavigatorLanguage});if(P)try{await C.changeLanguage(P.code)}catch(H){}return C},sk=kM,LM=async()=>{if(Wp===""||$p==="")return!1;let n=[fetch(Wp,{mode:"same-origin"}),fetch($p,{mode:"same-origin"})],[t,e]=[{ok:!1},{ok:!1}];try{[t,e]=await Promise.all(n)}catch(r){}return{collision:t.ok,maplibre:e.ok}},Af=new WeakSet,NM=async(n,t,e)=>{var y,b,I,C,P,O,U,H,V,B,q,N,J,se,z,ie,me;let r=performance.now();Af.has(n)&&k.warn("show3dMap was called on a container that already has an active MapView. Call destroy() on the existing MapView before creating a new one to avoid resource leaks.");let o=xd(e,t);o&&Ed(o),((y=o.injectStyles)==null||y)&&Rb(FM,{id:"mappedin__styles"});let a=ng((b=t.outdoorViewToken)!=null?b:""),s=ps(t);(I=o.outdoorView)!=null&&I.style&&s.envControl.updateTileServerBaseUrl((C=o.outdoorView)==null?void 0:C.style);let l=!1,c=!1,p=await LM();p&&(p.collision||(l=!0),p.maplibre||(c=!0));let d=await lh(n,{center:[t.mapCenter.longitude,t.mapCenter.latitude],bearing:o.bearing,pitch:o.pitch,zoomLevel:o.zoomLevel,backgroundAlpha:(P=o.style)==null?void 0:P.backgroundAlpha,backgroundColor:(O=o.style)==null?void 0:O.backgroundColor,outdoorView:!c&&((U=o.outdoorView)!=null&&U.token)?{headers:{"x-mappedin-tiles-key":(H=o.outdoorView)==null?void 0:H.token},style:t.getEnv().tileServerUri,enabled:!!((V=o.outdoorView)!=null&&V.enabled),lowDpi:(B=o.outdoorView)==null?void 0:B.lowDpi}:void 0,watermark:W(A({},o.watermark),{visible:(N=(q=o.watermark)==null?void 0:q.visible)!=null?N:!s.enterpriseMode&&!a.remove_watermark,onClick:Yb||void 0}),attribution:o.attribution,antialias:typeof o.antialiasing=="boolean"?o.antialiasing:!!((J=o.antialiasing)!=null&&J.enabled),accessToken:t.outdoorViewToken,occlusionEnabled:!0,transformImageRequest:s.enterpriseMode?void 0:s.transformImageRequest,naturalBearing:t.naturalBearing,imagePlacementOptions:o.imagePlacementOptions,onWebGLContextCreationError:o.onWebGLContextCreationError,onWebGLContextLost:o.onWebGLContextLost,onWebGLContextRestored:o.onWebGLContextRestored,onWebGLRendererError:o.onWebGLRendererError,useStandaloneCamera:(se=o.useStandaloneCamera)!=null?se:!1,useWorkers:!((z=o.disableWorkers)!=null&&z),useCollisionWorker:!l,disableUpdateStateValidation:(ie=o.disableUpdateStateValidation)!=null?ie:!1,__EXPERIMENTAL_shadows:o.__EXPERIMENTAL_shadows,outlines:typeof((me=o.style)==null?void 0:me.outlines)=="object"?o.style.outlines:void 0}),h=new Hl(d);return await h.addMap(t,o),s.Analytics.sendMapViewLoadedEvent({firstRenderDuration:performance.now()-r,dimension:h.getDimensions(),collisionWorkerDisabled:l,outdoorsWorkerDisabled:c}),Af.add(n),h.on("destroy",()=>Af.delete(n)),h},lk=()=>x.env.npm_package_version,ck=NM;export{re as a,hr as b,ko as c,en as d,ct as e,Q0 as f,gr as g,Ot as h,qe as i,zt as j,Tt as k,$t as l,nr as m,Br as n,yc as o,mt as p,Ht as q,bc as r,Wd as s,Yh as t,fd as u,cc as v,ug as w,zd as x,fg as y,Ic as z,Tc as A,uo as B,Pn as C,vc as D,Tu as E,dI as F,Ou as G,Du as H,x2 as I,Hl as J,EM as K,du as L,nk as M,ok as N,ik as O,ak as P,Ws as Q,kM as R,sk as S,LM as T,NM as U,lk as V,ck as W};