@mappedin/mappedin-js 6.32.0 → 6.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import{a as kn,d as gs,i as Lp,k as Rp,l as ms}from"./chunk-PQ2OLSSS.js";import{B as fs,Qb as hs,c as Fn,d as us,e as Dn,ua as Dp,y as Fp}from"./chunk-SAPR7Z5M.js";import{A as Ls,B as Rs,C as Ns,E as Vs,F as Bs,G as Gs,H as Hs,I as js,J as Us,K as Ws,L as zs,M as $s,N as Zs,O as Ys,P as Xs,Q as Bn,R as qs,S as Gn,T as Js,U as Ks,V as Qs,W as el,X as tl,a as H,b as Ln,c as ys,d as At,e as go,f as bs,g as Rn,h as Ts,i as Ss,j as vs,k as Nn,l as Cs,m as Ms,n as Is,o as Es,p as ws,q as Os,r as Ps,s as _s,t as xs,u as As,v as ks,w as Vn,x as Fs,y as Ds}from"./chunk-EXOCWBOF.js";import{$ as Na,$a as is,A as Fa,Aa as Ep,B as In,Ba as za,C as vt,Ca as $a,D as Da,Da as Za,E as La,Ea as de,F as mp,Fa as Ya,G as yp,Ga as Xa,H as Qt,Ha as Ot,I as We,Ia as fo,J as Ct,Ja as wn,K as Ra,Ka as qa,L as io,La as Pt,M as ao,Ma as _t,N as Mt,Na as Ja,O as It,Oa as Ka,P as oe,Pa as Qa,Q as er,Qa as es,R as ze,Ra as ho,S as Le,Sa as ts,T as tr,Ta as rs,U as rr,Ua as wp,V as or,Va as Op,W as so,Wa as ar,X as at,Xa as Pp,Y as $e,Ya as _p,Z as st,Za as os,_ as lo,_a as ns,a as ba,aa as Et,ab as as,b as Sa,ba as co,bb as sr,c as va,ca as Va,d as Ca,da as bp,e as Xt,ea as Ba,f as Ma,fa as Ga,g as yn,ga as Ha,h as Ia,ha as ja,i as Ea,ia as Ua,j as bn,ja as po,k as wa,ka as lt,l as qt,la as me,m as Tn,ma as we,n as Sn,na as wt,o as Oa,oa as uo,p as Pa,pa as nr,q as _a,qa as ir,r as St,ra as Tp,s as Qr,sa as Wa,t as Jt,ta as En,u as eo,ua as Oe,v as to,va as Sp,w as B,wa as vp,x as hp,xa as Cp,y as gp,ya as Mp,z as Kt,za as Ip}from"./chunk-TWRTSPVQ.js";import{i as vn,o as ka,q as ro,s as Mn,t as oo,u as it,w as no}from"./chunk-J5TYCDYA.js";import{A as An,B as ds,D as Ap,E as ps,V as kp,m as Re,p as xt,s as ss,t as ls,u as cs,v as On,w as Pn,x as _n,y as xn,z as xp}from"./chunk-ZJEQSG7Y.js";import{a as h,b as E,c as pp,d as up,f as fp,g as C,h as le,l as ge,m as W,n as Ta,q as xa,u as Aa,z as Cn}from"./chunk-7B7J4IXM.js";import{b as ee,d as mn}from"./chunk-PWEV3AFA.js";var ye=ee(pe=>{"use strict";h();pe.__esModule=!0;pe.extend=Ll;pe.indexOf=bu;pe.escapeExpression=Tu;pe.isEmpty=Su;pe.createFrame=vu;pe.blockParams=Cu;pe.appendContextPath=Mu;var hu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},gu=/[&<>"'`=]/g,mu=/[&<>"'`=]/;function yu(o){return hu[o]}function Ll(o){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(o[t]=arguments[e][t]);return o}var ei=Object.prototype.toString;pe.toString=ei;var Qn=function(e){return typeof e=="function"};Qn(/x/)&&(pe.isFunction=Qn=function(o){return typeof o=="function"&&ei.call(o)==="[object Function]"});pe.isFunction=Qn;var Rl=Array.isArray||function(o){return o&&typeof o=="object"?ei.call(o)==="[object Array]":!1};pe.isArray=Rl;function bu(o,e){for(var t=0,r=o.length;t<r;t++)if(o[t]===e)return t;return-1}function Tu(o){if(typeof o!="string"){if(o&&typeof o.toHTML=="function")return o.toHTML();if(o==null)return"";if(!o)return o+"";o=""+o}return mu.test(o)?o.replace(gu,yu):o}function Su(o){return!o&&o!==0?!0:!!(Rl(o)&&o.length===0)}function vu(o){var e=Ll({},o);return e._parent=o,e}function Cu(o,e){return o.path=e,o}function Mu(o,e){return(o?o+".":"")+e}});var qe=ee((Mo,Nl)=>{"use strict";h();Mo.__esModule=!0;var ti=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ri(o,e){var t=e&&e.loc,r=void 0,n=void 0,i=void 0,a=void 0;t&&t.start&&(r=t.start.line,i=t.start.column,t.end&&(n=t.end.line,a=t.end.column),o+=" - "+r+":"+i);for(var s=Error.prototype.constructor.call(this,o),l=0;l<ti.length;l++)this[ti[l]]=s[ti[l]];Error.captureStackTrace&&Error.captureStackTrace(this,ri);try{t&&(this.lineNumber=r,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}ri.prototype=new Error;Mo.default=ri;Nl.exports=Mo.default});var Bl=ee((Io,Vl)=>{"use strict";h();Io.__esModule=!0;var oi=ye();Io.default=function(o){o.registerHelper("blockHelperMissing",function(e,t){var r=t.inverse,n=t.fn;if(e===!0)return n(this);if(e===!1||e==null)return r(this);if(oi.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),o.helpers.each(e,t)):r(this);if(t.data&&t.ids){var i=oi.createFrame(t.data);i.contextPath=oi.appendContextPath(t.data.contextPath,t.name),t={data:i}}return n(e,t)})};Vl.exports=Io.default});var Hl=ee((Eo,Gl)=>{"use strict";h();Eo.__esModule=!0;function Iu(o){return o&&o.__esModule?o:{default:o}}var Rt=ye(),Eu=qe(),wu=Iu(Eu);function Ou(o){try{var e=o.return;Rt.isFunction(e)&&e.call(o)}catch{}}Eo.default=function(o){o.registerHelper("each",function(e,t){if(!t)throw new wu.default("Must pass iterator to #each");var r=t.fn,n=t.inverse,i=0,a="",s=void 0,l=void 0;t.data&&t.ids&&(l=Rt.appendContextPath(t.data.contextPath,t.ids[0])+"."),Rt.isFunction(e)&&(e=e.call(this)),t.data&&(s=Rt.createFrame(t.data));function d(b,I,T,M){s&&(s.key=b,s.index=I,s.first=I===0,s.last=!!T,l&&(s.contextPath=l+b)),a=a+r(M,{data:s,blockParams:Rt.blockParams([M,b],[l+b,null])})}if(e&&typeof e=="object")if(Rt.isArray(e))for(var p=e.length;i<p;i++)i in e&&d(i,i,i===e.length-1,e[i]);else if(typeof Symbol=="function"&&e[Symbol.iterator])for(var u=e[Symbol.iterator](),m=u.next();!m.done;){var y=u.next();try{d(i,i,y.done,m.value)}catch(b){throw y.done||Ou(u),b}m=y,i++}else(function(){var b=void 0;Object.keys(e).forEach(function(I){b!==void 0&&d(b,i-1,!1,e[b]),b=I,i++}),b!==void 0&&d(b,i-1,!0,e[b])})();return i===0&&(a=n(this)),a})};Gl.exports=Eo.default});var Ul=ee((wo,jl)=>{"use strict";h();wo.__esModule=!0;function Pu(o){return o&&o.__esModule?o:{default:o}}var _u=qe(),xu=Pu(_u);wo.default=function(o){o.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new xu.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};jl.exports=wo.default});var Zl=ee((Oo,$l)=>{"use strict";h();Oo.__esModule=!0;function Au(o){return o&&o.__esModule?o:{default:o}}var Wl=ye(),ku=qe(),zl=Au(ku);Oo.default=function(o){o.registerHelper("if",function(e,t){if(arguments.length!=2)throw new zl.default("#if requires exactly one argument");return Wl.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Wl.isEmpty(e)?t.inverse(this):t.fn(this)}),o.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new zl.default("#unless requires exactly one argument");return o.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};$l.exports=Oo.default});var Xl=ee((Po,Yl)=>{"use strict";h();Po.__esModule=!0;Po.default=function(o){o.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var n=1;t.hash.level!=null?n=t.hash.level:t.data&&t.data.level!=null&&(n=t.data.level),e[0]=n,o.log.apply(o,e)})};Yl.exports=Po.default});var Jl=ee((_o,ql)=>{"use strict";h();_o.__esModule=!0;_o.default=function(o){o.registerHelper("lookup",function(e,t,r){return e&&r.lookupProperty(e,t)})};ql.exports=_o.default});var Ql=ee((xo,Kl)=>{"use strict";h();xo.__esModule=!0;function Fu(o){return o&&o.__esModule?o:{default:o}}var Ar=ye(),Du=qe(),Lu=Fu(Du);xo.default=function(o){o.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Lu.default("#with requires exactly one argument");Ar.isFunction(e)&&(e=e.call(this));var r=t.fn;if(Ar.isEmpty(e))return t.inverse(this);var n=t.data;return t.data&&t.ids&&(n=Ar.createFrame(t.data),n.contextPath=Ar.appendContextPath(t.data.contextPath,t.ids[0])),r(e,{data:n,blockParams:Ar.blockParams([e],[n&&n.contextPath])})})};Kl.exports=xo.default});var ni=ee(Ao=>{"use strict";h();Ao.__esModule=!0;Ao.registerDefaultHelpers=qu;Ao.moveHelperToHooks=Ju;function dt(o){return o&&o.__esModule?o:{default:o}}var Ru=Bl(),Nu=dt(Ru),Vu=Hl(),Bu=dt(Vu),Gu=Ul(),Hu=dt(Gu),ju=Zl(),Uu=dt(ju),Wu=Xl(),zu=dt(Wu),$u=Jl(),Zu=dt($u),Yu=Ql(),Xu=dt(Yu);function qu(o){Nu.default(o),Bu.default(o),Hu.default(o),Uu.default(o),zu.default(o),Zu.default(o),Xu.default(o)}function Ju(o,e,t){o.helpers[e]&&(o.hooks[e]=o.helpers[e],t||(o.helpers[e]=void 0))}});var tc=ee((ko,ec)=>{"use strict";h();ko.__esModule=!0;var Ku=ye();ko.default=function(o){o.registerDecorator("inline",function(e,t,r,n){var i=e;return t.partials||(t.partials={},i=function(a,s){var l=r.partials;r.partials=Ku.extend({},l,t.partials);var d=e(a,s);return r.partials=l,d}),t.partials[n.args[0]]=n.fn,i})};ec.exports=ko.default});var rc=ee(ii=>{"use strict";h();ii.__esModule=!0;ii.registerDefaultDecorators=rf;function Qu(o){return o&&o.__esModule?o:{default:o}}var ef=tc(),tf=Qu(ef);function rf(o){tf.default(o)}});var ai=ee((Fo,oc)=>{"use strict";h();Fo.__esModule=!0;var of=ye(),Nt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=of.indexOf(Nt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=Nt.lookupLevel(e),typeof console<"u"&&Nt.lookupLevel(Nt.level)<=e){var t=Nt.methodMap[e];console[t]||(t="log");for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];console[t].apply(console,n)}}};Fo.default=Nt;oc.exports=Fo.default});var si=ee(Vt=>{"use strict";h();Vt.__esModule=!0;Vt.createProtoAccessControl=lf;Vt.resultIsAllowed=cf;Vt.isPrototypeConstructor=df;Vt.resetLoggedProperties=uf;function nf(o){return o&&o.__esModule?o:{default:o}}var nc=ye(),af=ai(),sf=nf(af),Do=Object.create(null);function lf(o){var e=Object.create(null);e.__proto__=!1,nc.extend(e,o.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,nc.extend(t,o.allowedProtoMethods),{properties:{whitelist:e,defaultValue:o.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:o.allowProtoMethodsByDefault}}}function cf(o,e,t){return ic(typeof o=="function"?e.methods:e.properties,t)}function df(o,e,t){return e==="constructor"&&typeof t=="function"&&o===t.prototype}function ic(o,e){return o.whitelist[e]!==void 0?o.whitelist[e]===!0:o.defaultValue!==void 0?o.defaultValue:(pf(e),!1)}function pf(o){Do[o]!==!0&&(Do[o]=!0,sf.default.log("error",'Handlebars: Access has been denied to resolve the property "'+o+`" because it is not an "own property" of its parent.
1
+ import{a as kn,d as gs,i as Lp,k as Rp,l as ms}from"./chunk-GTWQKKFE.js";import{C as fs,Sb as hs,c as Fn,d as us,e as Dn,va as Dp,z as Fp}from"./chunk-DC7JFA2T.js";import{A as Ls,B as Rs,C as Ns,E as Vs,F as Bs,G as Gs,H as Hs,I as js,J as Us,K as Ws,L as zs,M as $s,N as Zs,O as Ys,P as Xs,Q as Bn,R as qs,S as Gn,T as Js,U as Ks,V as Qs,W as el,X as tl,a as H,b as Ln,c as ys,d as At,e as go,f as bs,g as Rn,h as Ts,i as Ss,j as vs,k as Nn,l as Cs,m as Ms,n as Is,o as Es,p as ws,q as Os,r as Ps,s as _s,t as xs,u as As,v as ks,w as Vn,x as Fs,y as Ds}from"./chunk-O74CKEFP.js";import{$ as Na,$a as is,A as Fa,Aa as Ep,B as In,Ba as za,C as vt,Ca as $a,D as Da,Da as Za,E as La,Ea as de,F as mp,Fa as Ya,G as yp,Ga as Xa,H as Qt,Ha as Ot,I as We,Ia as fo,J as Ct,Ja as wn,K as Ra,Ka as qa,L as io,La as Pt,M as ao,Ma as _t,N as Mt,Na as Ja,O as It,Oa as Ka,P as oe,Pa as Qa,Q as er,Qa as es,R as ze,Ra as ho,S as Le,Sa as ts,T as tr,Ta as rs,U as rr,Ua as wp,V as or,Va as Op,W as so,Wa as ar,X as at,Xa as Pp,Y as $e,Ya as _p,Z as st,Za as os,_ as lo,_a as ns,a as ba,aa as Et,ab as as,b as Sa,ba as co,bb as sr,c as va,ca as Va,d as Ca,da as bp,e as Xt,ea as Ba,f as Ma,fa as Ga,g as yn,ga as Ha,h as Ia,ha as ja,i as Ea,ia as Ua,j as bn,ja as po,k as wa,ka as lt,l as qt,la as me,m as Tn,ma as we,n as Sn,na as wt,o as Oa,oa as uo,p as Pa,pa as nr,q as _a,qa as ir,r as St,ra as Tp,s as Qr,sa as Wa,t as Jt,ta as En,u as eo,ua as Oe,v as to,va as Sp,w as B,wa as vp,x as hp,xa as Cp,y as gp,ya as Mp,z as Kt,za as Ip}from"./chunk-N3AVUTI4.js";import{i as vn,o as ka,q as ro,s as Mn,t as oo,u as it,w as no}from"./chunk-IMDMEZEU.js";import{A as An,B as ds,D as Ap,E as ps,V as kp,m as Re,p as xt,s as ss,t as ls,u as cs,v as On,w as Pn,x as _n,y as xn,z as xp}from"./chunk-TFGILZUF.js";import{a as h,b as E,c as pp,d as up,f as fp,g as C,h as le,l as ge,m as W,n as Ta,q as xa,u as Aa,z as Cn}from"./chunk-XBKEAHSJ.js";import{b as ee,d as mn}from"./chunk-PWEV3AFA.js";var ye=ee(pe=>{"use strict";h();pe.__esModule=!0;pe.extend=Ll;pe.indexOf=bu;pe.escapeExpression=Tu;pe.isEmpty=Su;pe.createFrame=vu;pe.blockParams=Cu;pe.appendContextPath=Mu;var hu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},gu=/[&<>"'`=]/g,mu=/[&<>"'`=]/;function yu(o){return hu[o]}function Ll(o){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(o[t]=arguments[e][t]);return o}var ei=Object.prototype.toString;pe.toString=ei;var Qn=function(e){return typeof e=="function"};Qn(/x/)&&(pe.isFunction=Qn=function(o){return typeof o=="function"&&ei.call(o)==="[object Function]"});pe.isFunction=Qn;var Rl=Array.isArray||function(o){return o&&typeof o=="object"?ei.call(o)==="[object Array]":!1};pe.isArray=Rl;function bu(o,e){for(var t=0,r=o.length;t<r;t++)if(o[t]===e)return t;return-1}function Tu(o){if(typeof o!="string"){if(o&&typeof o.toHTML=="function")return o.toHTML();if(o==null)return"";if(!o)return o+"";o=""+o}return mu.test(o)?o.replace(gu,yu):o}function Su(o){return!o&&o!==0?!0:!!(Rl(o)&&o.length===0)}function vu(o){var e=Ll({},o);return e._parent=o,e}function Cu(o,e){return o.path=e,o}function Mu(o,e){return(o?o+".":"")+e}});var qe=ee((Mo,Nl)=>{"use strict";h();Mo.__esModule=!0;var ti=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ri(o,e){var t=e&&e.loc,r=void 0,n=void 0,i=void 0,a=void 0;t&&t.start&&(r=t.start.line,i=t.start.column,t.end&&(n=t.end.line,a=t.end.column),o+=" - "+r+":"+i);for(var s=Error.prototype.constructor.call(this,o),l=0;l<ti.length;l++)this[ti[l]]=s[ti[l]];Error.captureStackTrace&&Error.captureStackTrace(this,ri);try{t&&(this.lineNumber=r,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}ri.prototype=new Error;Mo.default=ri;Nl.exports=Mo.default});var Bl=ee((Io,Vl)=>{"use strict";h();Io.__esModule=!0;var oi=ye();Io.default=function(o){o.registerHelper("blockHelperMissing",function(e,t){var r=t.inverse,n=t.fn;if(e===!0)return n(this);if(e===!1||e==null)return r(this);if(oi.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),o.helpers.each(e,t)):r(this);if(t.data&&t.ids){var i=oi.createFrame(t.data);i.contextPath=oi.appendContextPath(t.data.contextPath,t.name),t={data:i}}return n(e,t)})};Vl.exports=Io.default});var Hl=ee((Eo,Gl)=>{"use strict";h();Eo.__esModule=!0;function Iu(o){return o&&o.__esModule?o:{default:o}}var Rt=ye(),Eu=qe(),wu=Iu(Eu);function Ou(o){try{var e=o.return;Rt.isFunction(e)&&e.call(o)}catch{}}Eo.default=function(o){o.registerHelper("each",function(e,t){if(!t)throw new wu.default("Must pass iterator to #each");var r=t.fn,n=t.inverse,i=0,a="",s=void 0,l=void 0;t.data&&t.ids&&(l=Rt.appendContextPath(t.data.contextPath,t.ids[0])+"."),Rt.isFunction(e)&&(e=e.call(this)),t.data&&(s=Rt.createFrame(t.data));function d(b,I,T,M){s&&(s.key=b,s.index=I,s.first=I===0,s.last=!!T,l&&(s.contextPath=l+b)),a=a+r(M,{data:s,blockParams:Rt.blockParams([M,b],[l+b,null])})}if(e&&typeof e=="object")if(Rt.isArray(e))for(var p=e.length;i<p;i++)i in e&&d(i,i,i===e.length-1,e[i]);else if(typeof Symbol=="function"&&e[Symbol.iterator])for(var u=e[Symbol.iterator](),m=u.next();!m.done;){var y=u.next();try{d(i,i,y.done,m.value)}catch(b){throw y.done||Ou(u),b}m=y,i++}else(function(){var b=void 0;Object.keys(e).forEach(function(I){b!==void 0&&d(b,i-1,!1,e[b]),b=I,i++}),b!==void 0&&d(b,i-1,!0,e[b])})();return i===0&&(a=n(this)),a})};Gl.exports=Eo.default});var Ul=ee((wo,jl)=>{"use strict";h();wo.__esModule=!0;function Pu(o){return o&&o.__esModule?o:{default:o}}var _u=qe(),xu=Pu(_u);wo.default=function(o){o.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new xu.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};jl.exports=wo.default});var Zl=ee((Oo,$l)=>{"use strict";h();Oo.__esModule=!0;function Au(o){return o&&o.__esModule?o:{default:o}}var Wl=ye(),ku=qe(),zl=Au(ku);Oo.default=function(o){o.registerHelper("if",function(e,t){if(arguments.length!=2)throw new zl.default("#if requires exactly one argument");return Wl.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Wl.isEmpty(e)?t.inverse(this):t.fn(this)}),o.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new zl.default("#unless requires exactly one argument");return o.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};$l.exports=Oo.default});var Xl=ee((Po,Yl)=>{"use strict";h();Po.__esModule=!0;Po.default=function(o){o.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var n=1;t.hash.level!=null?n=t.hash.level:t.data&&t.data.level!=null&&(n=t.data.level),e[0]=n,o.log.apply(o,e)})};Yl.exports=Po.default});var Jl=ee((_o,ql)=>{"use strict";h();_o.__esModule=!0;_o.default=function(o){o.registerHelper("lookup",function(e,t,r){return e&&r.lookupProperty(e,t)})};ql.exports=_o.default});var Ql=ee((xo,Kl)=>{"use strict";h();xo.__esModule=!0;function Fu(o){return o&&o.__esModule?o:{default:o}}var Ar=ye(),Du=qe(),Lu=Fu(Du);xo.default=function(o){o.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Lu.default("#with requires exactly one argument");Ar.isFunction(e)&&(e=e.call(this));var r=t.fn;if(Ar.isEmpty(e))return t.inverse(this);var n=t.data;return t.data&&t.ids&&(n=Ar.createFrame(t.data),n.contextPath=Ar.appendContextPath(t.data.contextPath,t.ids[0])),r(e,{data:n,blockParams:Ar.blockParams([e],[n&&n.contextPath])})})};Kl.exports=xo.default});var ni=ee(Ao=>{"use strict";h();Ao.__esModule=!0;Ao.registerDefaultHelpers=qu;Ao.moveHelperToHooks=Ju;function dt(o){return o&&o.__esModule?o:{default:o}}var Ru=Bl(),Nu=dt(Ru),Vu=Hl(),Bu=dt(Vu),Gu=Ul(),Hu=dt(Gu),ju=Zl(),Uu=dt(ju),Wu=Xl(),zu=dt(Wu),$u=Jl(),Zu=dt($u),Yu=Ql(),Xu=dt(Yu);function qu(o){Nu.default(o),Bu.default(o),Hu.default(o),Uu.default(o),zu.default(o),Zu.default(o),Xu.default(o)}function Ju(o,e,t){o.helpers[e]&&(o.hooks[e]=o.helpers[e],t||(o.helpers[e]=void 0))}});var tc=ee((ko,ec)=>{"use strict";h();ko.__esModule=!0;var Ku=ye();ko.default=function(o){o.registerDecorator("inline",function(e,t,r,n){var i=e;return t.partials||(t.partials={},i=function(a,s){var l=r.partials;r.partials=Ku.extend({},l,t.partials);var d=e(a,s);return r.partials=l,d}),t.partials[n.args[0]]=n.fn,i})};ec.exports=ko.default});var rc=ee(ii=>{"use strict";h();ii.__esModule=!0;ii.registerDefaultDecorators=rf;function Qu(o){return o&&o.__esModule?o:{default:o}}var ef=tc(),tf=Qu(ef);function rf(o){tf.default(o)}});var ai=ee((Fo,oc)=>{"use strict";h();Fo.__esModule=!0;var of=ye(),Nt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=of.indexOf(Nt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=Nt.lookupLevel(e),typeof console<"u"&&Nt.lookupLevel(Nt.level)<=e){var t=Nt.methodMap[e];console[t]||(t="log");for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];console[t].apply(console,n)}}};Fo.default=Nt;oc.exports=Fo.default});var si=ee(Vt=>{"use strict";h();Vt.__esModule=!0;Vt.createProtoAccessControl=lf;Vt.resultIsAllowed=cf;Vt.isPrototypeConstructor=df;Vt.resetLoggedProperties=uf;function nf(o){return o&&o.__esModule?o:{default:o}}var nc=ye(),af=ai(),sf=nf(af),Do=Object.create(null);function lf(o){var e=Object.create(null);e.__proto__=!1,nc.extend(e,o.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,nc.extend(t,o.allowedProtoMethods),{properties:{whitelist:e,defaultValue:o.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:o.allowProtoMethodsByDefault}}}function cf(o,e,t){return ic(typeof o=="function"?e.methods:e.properties,t)}function df(o,e,t){return e==="constructor"&&typeof t=="function"&&o===t.prototype}function ic(o,e){return o.whitelist[e]!==void 0?o.whitelist[e]===!0:o.defaultValue!==void 0?o.defaultValue:(pf(e),!1)}function pf(o){Do[o]!==!0&&(Do[o]=!0,sf.default.log("error",'Handlebars: Access has been denied to resolve the property "'+o+`" because it is not an "own property" of its parent.
2
2
  You can add a runtime option to disable the check or this warning:
3
3
  See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function uf(){Object.keys(Do).forEach(function(o){delete Do[o]})}});var pi=ee(xe=>{"use strict";h();xe.__esModule=!0;xe.HandlebarsEnvironment=di;function ac(o){return o&&o.__esModule?o:{default:o}}var pt=ye(),ff=qe(),li=ac(ff),hf=ni(),gf=rc(),mf=ai(),Lo=ac(mf),yf=si(),bf="4.7.10";xe.VERSION=bf;var Tf=8;xe.COMPILER_REVISION=Tf;var Sf=7;xe.LAST_COMPATIBLE_COMPILER_REVISION=Sf;var vf={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"};xe.REVISION_CHANGES=vf;var ci="[object Object]";function di(o,e,t){this.helpers=o||{},this.partials=e||{},this.decorators=t||{},hf.registerDefaultHelpers(this),gf.registerDefaultDecorators(this)}di.prototype={constructor:di,logger:Lo.default,log:Lo.default.log,registerHelper:function(e,t){if(pt.toString.call(e)===ci){if(t)throw new li.default("Arg not supported with multiple helpers");pt.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(pt.toString.call(e)===ci)pt.extend(this.partials,e);else{if(typeof t>"u")throw new li.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(pt.toString.call(e)===ci){if(t)throw new li.default("Arg not supported with multiple decorators");pt.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){yf.resetLoggedProperties()}};var Cf=Lo.default.log;xe.log=Cf;xe.createFrame=pt.createFrame;xe.logger=Lo.default});var lc=ee((Ro,sc)=>{"use strict";h();Ro.__esModule=!0;function ui(o){this.string=o}ui.prototype.toString=ui.prototype.toHTML=function(){return""+this.string};Ro.default=ui;sc.exports=Ro.default});var cc=ee(fi=>{"use strict";h();fi.__esModule=!0;fi.wrapHelper=Mf;function Mf(o,e){if(typeof o!="function")return o;var t=function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),o.apply(this,arguments)};return t}});var hc=ee(Je=>{"use strict";h();Je.__esModule=!0;Je.checkRevision=_f;Je.template=xf;Je.wrapProgram=No;Je.resolvePartial=Af;Je.invokePartial=kf;Je.noop=uc;function If(o){return o&&o.__esModule?o:{default:o}}function Ef(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e.default=o,e}var wf=ye(),ut=Ef(wf),Of=qe(),be=If(Of),Ge=pi(),dc=ni(),Pf=cc(),hi=si();function _f(o){var e=o&&o[0]||1,t=Ge.COMPILER_REVISION;if(!(e>=Ge.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ge.COMPILER_REVISION))if(e<Ge.LAST_COMPATIBLE_COMPILER_REVISION){var r=Ge.REVISION_CHANGES[t],n=Ge.REVISION_CHANGES[e];throw new be.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 ("+n+").")}else throw new be.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+o[1]+").")}function xf(o,e){if(!e)throw new be.default("No environment passed to template");if(!o||!o.main)throw new be.default("Unknown template object: "+typeof o);o.main.decorator=o.main_d,e.VM.checkRevision(o.compiler);var t=o.compiler&&o.compiler[0]===7;function r(a,s,l){l.hash&&(s=ut.extend({},s,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,s,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var d=e.VM.invokePartial.call(this,a,s,l);if(d==null&&ut.isFunction(a))throw new be.default("The partial "+l.name+" returned no output: partials must return a string");if(d==null&&e.compile){if(typeof a!="string")throw new be.default("The partial "+l.name+" could not be compiled: partials must be strings or functions returning strings");l.partials[l.name]=e.compile(a,o.compilerOptions,e),d=l.partials[l.name](s,l)}if(d!=null){if(l.indent){for(var p=d.split(`
4
4
  `),u=0,m=p.length;u<m&&!(!p[u]&&u+1===m);u++)p[u]=l.indent+p[u];d=p.join(`
5
- `)}return d}else throw new be.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var n={strict:function(s,l,d){if(!s||!(l in s))throw new be.default('"'+l+'" not defined in '+s,{loc:d});return n.lookupProperty(s,l)},lookupProperty:function(s,l){var d=s[l];if(d==null||Object.prototype.hasOwnProperty.call(s,l)&&!hi.isPrototypeConstructor(s,l,d)||hi.resultIsAllowed(d,n.protoAccessControl,l))return d},lookup:function(s,l){for(var d=s.length,p=0;p<d;p++){var u=s[p]&&n.lookupProperty(s[p],l);if(u!=null)return u}},lambda:function(s,l){return typeof s=="function"?s.call(l):s},escapeExpression:ut.escapeExpression,invokePartial:r,fn:function(s){var l=o[s];return l.decorator=o[s+"_d"],l},programs:[],program:function(s,l,d,p,u){var m=this.programs[s],y=this.fn(s);return l||u||p||d?m=No(this,s,y,l,d,p,u):m||(m=this.programs[s]=No(this,s,y)),m},data:function(s,l){for(;s&&l--;)s=s._parent;return s},mergeIfNeeded:function(s,l){var d=s||l;return s&&l&&s!==l&&(d=ut.extend({},l,s)),d},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:o.compiler};function i(a){var s=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=s.data;i._setup(s),!s.partial&&o.useData&&(l=Ff(a,l));var d=void 0,p=o.useBlockParams?[]:void 0;o.useDepths&&(s.depths?d=a!=s.depths[0]?[a].concat(s.depths):s.depths:d=[a]);function u(m){return""+o.main(n,m,n.helpers,n.partials,l,p,d)}return u=fc(o.main,u,n,s.depths||[],l,p),u(a,s)}return i.isTop=!0,i._setup=function(a){if(a.partial)n.protoAccessControl=a.protoAccessControl,n.helpers=a.helpers,n.partials=a.partials,n.decorators=a.decorators,n.hooks=a.hooks;else{var s={};pc(s,e.helpers,n),pc(s,a.helpers,n),n.helpers=s,o.usePartial&&(n.partials=n.mergeIfNeeded(a.partials,e.partials)),(o.usePartial||o.useDecorators)&&(n.decorators=ut.extend({},e.decorators,a.decorators)),n.hooks={},n.protoAccessControl=hi.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||t;dc.moveHelperToHooks(n,"helperMissing",l),dc.moveHelperToHooks(n,"blockHelperMissing",l)}},i._child=function(a,s,l,d){if(o.useBlockParams&&!l)throw new be.default("must pass block params");if(o.useDepths&&!d)throw new be.default("must pass parent depths");return No(n,a,o[a],s,0,l,d)},i}function No(o,e,t,r,n,i,a){function s(l){var d=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=a;return a&&l!=a[0]&&!(l===o.nullContext&&a[0]===null)&&(p=[l].concat(a)),t(o,l,o.helpers,o.partials,d.data||r,i&&[d.blockParams].concat(i),p)}return s=fc(t,s,o,a,r,i),s.program=e,s.depth=a?a.length:0,s.blockParams=n||0,s}function Af(o,e,t){return o?typeof o!="function"&&!t.name&&(t.name=o,o=Vo(t.partials,o)):t.name==="@partial-block"?o=Vo(t.data,"partial-block"):o=Vo(t.partials,t.name),o}function kf(o,e,t){var r=Vo(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var n=void 0;if(t.fn&&t.fn!==uc&&(function(){t.data=Ge.createFrame(t.data);var i=t.fn;n=t.data["partial-block"]=function(s){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Ge.createFrame(l.data),l.data["partial-block"]=r,i(s,l)},i.partials&&(t.partials=ut.extend({},t.partials,i.partials))})(),o===void 0&&n&&(o=n),o===void 0)throw new be.default("The partial "+t.name+" could not be found");if(o instanceof Function)return o(e,t)}function uc(){return""}function Vo(o,e){if(o&&Object.prototype.hasOwnProperty.call(o,e))return o[e]}function Ff(o,e){return(!e||!("root"in e))&&(e=e?Ge.createFrame(e):{},e.root=o),e}function fc(o,e,t,r,n,i){if(o.decorator){var a={};e=o.decorator(e,a,t,r&&r[0],n,i,r),ut.extend(e,a)}return e}function pc(o,e,t){e&&Object.keys(e).forEach(function(r){var n=e[r];o[r]=Df(n,t)})}function Df(o,e){var t=e.lookupProperty;return Pf.wrapHelper(o,function(r){return r.lookupProperty=t,r})}});var mc=ee((Bo,gc)=>{"use strict";h();Bo.__esModule=!0;Bo.default=function(o){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;o.noConflict=function(){return globalThis.Handlebars===o&&(globalThis.Handlebars=e),o}};gc.exports=Bo.default});var vc=ee((Go,Sc)=>{"use strict";h();Go.__esModule=!0;function mi(o){return o&&o.__esModule?o:{default:o}}function yi(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e.default=o,e}var Lf=pi(),yc=yi(Lf),Rf=lc(),Nf=mi(Rf),Vf=qe(),Bf=mi(Vf),Gf=ye(),gi=yi(Gf),Hf=hc(),bc=yi(Hf),jf=mc(),Uf=mi(jf);function Tc(){var o=new yc.HandlebarsEnvironment;return gi.extend(o,yc),o.SafeString=Nf.default,o.Exception=Bf.default,o.Utils=gi,o.escapeExpression=gi.escapeExpression,o.VM=bc,o.template=function(e){return bc.template(e,o)},o}var kr=Tc();kr.create=Tc;Uf.default(kr);kr.default=kr;Go.default=kr;Sc.exports=Go.default});var Mc=ee((Vy,Cc)=>{h();Cc.exports=vc().default});h();h();h();h();h();h();h();h();var Hn=2,jn=4;function rl(o){if(o?.enabled!==!0)return null;let e=o.fields??["name","tags"],t=e.includes("name"),r=e.includes("tags");if(!t&&!r)return null;let n=o.maxWords,i=Hn;return typeof n=="number"&&(Number.isFinite(n)?i=Math.floor(n):n>0&&(i=jn)),i=Math.min(jn,Math.max(Hn,i)),n!==void 0&&n!==i&&C.warn(`joinedWords.maxWords ${n} adjusted to ${i} (whole number in ${Hn}\u2013${jn}).`),{maxWords:i,name:t,tags:r}}var lr=class{#e;searchInstance;#t;#r;#o;enabled=!1;constructor(e,t,{enabled:r=!1,joinedWords:n}={}){this.#e=e,this.#t=t,this.#o=rl(n),this.#r=()=>{this.searchInstance?.then(i=>i.populate())},r&&this.enable()}async query(e,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return C.error("Search should be enabled by now"),{places:[],enterpriseLocations:[],enterpriseCategories:[]};try{return await(await this.searchInstance).search(e,t)}catch(r){return C.error("Search.query failed due to",r),{places:[],enterpriseLocations:[],enterpriseCategories:[]}}}async suggest(e,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return C.error("Search should be enabled by now"),[];try{return await(await this.searchInstance).suggest(e,t)}catch(r){return C.error("Search.suggest failed due to",r),[]}}async enable(){this.enabled||(this.enabled=!0,this.searchInstance||(this.searchInstance=import("./internal-WXG4ZPV3.js").then(({InternalSearch:e})=>new e(this.#e,this.#o))),this.#t.on("language-change",this.#r),await this.searchInstance)}};var ol={"enterprise-location":"location-profile","enterprise-category":"location-category"},nl={"location-profile":"enterprise-location","location-category":"enterprise-category"},il=new WeakMap,Un=class{#e;#t;Analytics;Search;Query;Nodes;internal;constructor(e,{search:t}={}){this.#e=new ge,this.#t=e,il.set(this,e),this.Analytics=new ba(e.Analytics),this.Query=e.Query,this.Nodes=e.Nodes,this.internal=e,this.Search=new lr(this,e,t),this.#t.on("language-change",r=>{this.#e.publish("language-change",r)})}on=(e,t)=>{this.#e.on(e,t)};off=(e,t)=>{this.#e.off(e,t)};getEnv(){return this.#t.getEnv()}getAccessToken(){return this.#t.tokenManager?.getAccessToken().token}get updatedAt(){return this.#t.updatedAt}async checkForUpdates(){let e=this.#t,t=e.getMapDataOptions;if(t==null||e.updatedAt==null)throw new W("checkForUpdates requires a MapData loaded via getMapData(). This MapData has no load-time `updated_at` timestamp to compare against (e.g. it was hydrated from a local bundle via hydrateMapData()).");if(t.bundleUri!=null)return{hasChanges:!1,updatedAt:e.updatedAt??""};let r="";if(e.enterpriseMode){let n=qt(t),i=wa(n),{updated_at:a}=await Ea(n,i);r=a??""}else{let n=await e.tokenManager?.getAccessTokenAsync(),{updated_at:i}=await Oa(t,n?.token);r=i??""}return{hasChanges:r!==(e.updatedAt??""),updatedAt:r}}get mapName(){return this.#t.mapName}get mapId(){return this.#t.getMapDataOptions?.mapId}get isEnterpriseMode(){return this.#t.enterpriseMode}get mapCenter(){return this.#t.mapCenter}get organizationId(){return this.#t.organizationId}get outdoorViewToken(){return this.#t.outdoorViewToken}getByType(e){e==="node"&&this.#r("getByType('node')","mapData.Nodes.getByType(floor)");let t=this.#t.getByType(e);if(Array.isArray(t)&&t.length===0){let r=this.isEnterpriseMode;!r&&e in ol?C.warn(`MappedinSDK: getByType('${e}') returned 0 results. This is a Maker map (API key starts with 'mik_'). Use '${ol[e]}' instead. See https://developer.mappedin.com/web-sdk/getting-started`):r&&e in nl&&C.warn(`MappedinSDK: getByType('${e}') returned 0 results. This is an Enterprise map. Use '${nl[e]}' instead. See https://developer.mappedin.com/web-sdk/getting-started`)}return t}getById(e,t){return e==="node"&&this.#r("getById('node', id)","mapData.Nodes.getById(id)"),this.#t.getById(e,t)}getByExternalId(e,t){return e==="node"&&this.#r("getByExternalId('node', id)","mapData.Nodes.getByExternalId(id)"),this.#t.getByExternalId(e,t)}#r(e,t){if(this.#t.mvf==null)throw new W(Sa(e,t))}getGeoJSON(e){return e.geoJSON}async changeLanguage(e){return this.#t.changeLanguage(e)}get currentLanguage(){return this.#t.currentLanguage}get naturalBearing(){return this.#t.naturalBearing??0}__LEGACY_GET_DIRECTIONS_SYNC=(e,t,r)=>this.#t.__LEGACY_GET_DIRECTIONS_SYNC(e,t,r);getDirections=(e,t,r)=>this.#t.getDirections(e,t,r);__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC=(e,t,r)=>this.#t.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(e,t,r);getDirectionsMultiDestination=(e,t,r)=>this.#t.getDirectionsMultiDestination(e,t,r);getDistance(e,t){return this.#t.getDistance(e,t)}toBinaryBundle({downloadLanguagePacks:e=!0}={}){return this.#t.toBinaryBundle({downloadLanguagePacks:e})}toJSONBundle({downloadLanguagePacks:e=!0}={}){return this.#t.toJSONBundle({downloadLanguagePacks:e})}},cr=Un;function dr(o){let e=il.get(o);if(!e)throw new Error("MapDataInternal not found");return e}h();h();h();h();h();var Ne=class o{id;text;target;static __type="label";__type=o.__type;static is(e){return e.__type===o.__type}get focusTarget(){return this.target.anchorTarget}constructor(e,t,r){this.id=e,this.text=t,this.target=r}get navigationTarget(){return this.target.anchorTarget}};h();var Pe=class o{id;static __type="marker";#e;get target(){return this.#e}get coordinate(){return this.#e.anchorTarget}get navigationTarget(){return this.target.anchorTarget}toJSON(){return{id:this.id,__type:o.__type,target:this.target,coordinate:this.coordinate}}__type=o.__type;contentEl;static is(e){return e.__type===o.__type}constructor(e,t,r){this.id=e,this.contentEl=t,this.#e=r}get focusTarget(){return this.target.anchorTarget}updateTarget(e){this.#e=e}};h();var Ze=class o{id;groupId;static __type="model";__type=o.__type;#e;get target(){return this.#e}static is(e){return e.__type===o.__type}constructor(e,t,r){this.id=e,this.groupId=t,this.#e=r}updateTarget(e){this.#e=e}toJSON(){return{id:this.id,__type:o.__type,groupId:this.groupId,target:this.#e}}get navigationTarget(){return this.#e.anchorTarget}};h();var Ye=class o{id;coordinates;#e;static __type="path-segment";__type=o.__type;static is(e){return e.__type===o.__type}constructor(e,t){this.id=e,this.coordinates=t}get isConnectionSegment(){return this.coordinates.length===2&&this.coordinates[0].floorId!==this.coordinates[1].floorId}get distance(){return this.#e?this.#e:(this.#e=In(this.coordinates),this.#e)}get focusTarget(){return this.coordinates}toJSON(){return{__type:o.__type,id:this.id,coordinates:this.coordinates,isConnectionSegment:this.isConnectionSegment,distance:this.distance}}},fe=class o{id;animation;coordinates;segments;#e;static __type="path";__type=o.__type;static is(e){return e.__type===o.__type}get focusTarget(){return this.coordinates}constructor(e,t,r,n){this.id=e,this.animation=t,this.coordinates=r,this.segments=n.map(({id:i,coordinates:a})=>new Ye(i.toString(),a))}get distance(){return this.#e?this.#e:(this.#e=In(this.coordinates),this.#e)}toJSON(){return{__type:o.__type,id:this.id,coordinates:this.coordinates,segments:this.segments}}};h();var Np=7,pr=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t?.precision??Np}toJSON(){return{center:this.center,bearing:this.bearing,pitch:this.pitch,zoomLevel:this.zoomLevel}}get center(){let e=this.#e.center;if(this.#t===-1)return e;let t=ro(e.latitude,this.#t),r=ro(e.longitude,this.#t);return new B({latitude:t,longitude:r,floorId:e.floorId,verticalOffset:e.verticalOffset})}get bearing(){return this.#e.bearing}get pitch(){return this.#e.pitch}get zoomLevel(){return ro(this.#e.zoomLevel,5)}};h();var Ve=class o{id;static __type="shape";__type=o.__type;static is(e){return e.__type===o.__type}get focusTarget(){return this}constructor(e){this.id=e}};h();var Be=class o{id;constructor(e,t){this.id=e,this.target=t}target;static __type="text-3d";__type=o.__type;static is(e){return e.__type===o.__type}};h();h();h();var Vp=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
5
+ `)}return d}else throw new be.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var n={strict:function(s,l,d){if(!s||!(l in s))throw new be.default('"'+l+'" not defined in '+s,{loc:d});return n.lookupProperty(s,l)},lookupProperty:function(s,l){var d=s[l];if(d==null||Object.prototype.hasOwnProperty.call(s,l)&&!hi.isPrototypeConstructor(s,l,d)||hi.resultIsAllowed(d,n.protoAccessControl,l))return d},lookup:function(s,l){for(var d=s.length,p=0;p<d;p++){var u=s[p]&&n.lookupProperty(s[p],l);if(u!=null)return u}},lambda:function(s,l){return typeof s=="function"?s.call(l):s},escapeExpression:ut.escapeExpression,invokePartial:r,fn:function(s){var l=o[s];return l.decorator=o[s+"_d"],l},programs:[],program:function(s,l,d,p,u){var m=this.programs[s],y=this.fn(s);return l||u||p||d?m=No(this,s,y,l,d,p,u):m||(m=this.programs[s]=No(this,s,y)),m},data:function(s,l){for(;s&&l--;)s=s._parent;return s},mergeIfNeeded:function(s,l){var d=s||l;return s&&l&&s!==l&&(d=ut.extend({},l,s)),d},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:o.compiler};function i(a){var s=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=s.data;i._setup(s),!s.partial&&o.useData&&(l=Ff(a,l));var d=void 0,p=o.useBlockParams?[]:void 0;o.useDepths&&(s.depths?d=a!=s.depths[0]?[a].concat(s.depths):s.depths:d=[a]);function u(m){return""+o.main(n,m,n.helpers,n.partials,l,p,d)}return u=fc(o.main,u,n,s.depths||[],l,p),u(a,s)}return i.isTop=!0,i._setup=function(a){if(a.partial)n.protoAccessControl=a.protoAccessControl,n.helpers=a.helpers,n.partials=a.partials,n.decorators=a.decorators,n.hooks=a.hooks;else{var s={};pc(s,e.helpers,n),pc(s,a.helpers,n),n.helpers=s,o.usePartial&&(n.partials=n.mergeIfNeeded(a.partials,e.partials)),(o.usePartial||o.useDecorators)&&(n.decorators=ut.extend({},e.decorators,a.decorators)),n.hooks={},n.protoAccessControl=hi.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||t;dc.moveHelperToHooks(n,"helperMissing",l),dc.moveHelperToHooks(n,"blockHelperMissing",l)}},i._child=function(a,s,l,d){if(o.useBlockParams&&!l)throw new be.default("must pass block params");if(o.useDepths&&!d)throw new be.default("must pass parent depths");return No(n,a,o[a],s,0,l,d)},i}function No(o,e,t,r,n,i,a){function s(l){var d=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=a;return a&&l!=a[0]&&!(l===o.nullContext&&a[0]===null)&&(p=[l].concat(a)),t(o,l,o.helpers,o.partials,d.data||r,i&&[d.blockParams].concat(i),p)}return s=fc(t,s,o,a,r,i),s.program=e,s.depth=a?a.length:0,s.blockParams=n||0,s}function Af(o,e,t){return o?typeof o!="function"&&!t.name&&(t.name=o,o=Vo(t.partials,o)):t.name==="@partial-block"?o=Vo(t.data,"partial-block"):o=Vo(t.partials,t.name),o}function kf(o,e,t){var r=Vo(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var n=void 0;if(t.fn&&t.fn!==uc&&(function(){t.data=Ge.createFrame(t.data);var i=t.fn;n=t.data["partial-block"]=function(s){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Ge.createFrame(l.data),l.data["partial-block"]=r,i(s,l)},i.partials&&(t.partials=ut.extend({},t.partials,i.partials))})(),o===void 0&&n&&(o=n),o===void 0)throw new be.default("The partial "+t.name+" could not be found");if(o instanceof Function)return o(e,t)}function uc(){return""}function Vo(o,e){if(o&&Object.prototype.hasOwnProperty.call(o,e))return o[e]}function Ff(o,e){return(!e||!("root"in e))&&(e=e?Ge.createFrame(e):{},e.root=o),e}function fc(o,e,t,r,n,i){if(o.decorator){var a={};e=o.decorator(e,a,t,r&&r[0],n,i,r),ut.extend(e,a)}return e}function pc(o,e,t){e&&Object.keys(e).forEach(function(r){var n=e[r];o[r]=Df(n,t)})}function Df(o,e){var t=e.lookupProperty;return Pf.wrapHelper(o,function(r){return r.lookupProperty=t,r})}});var mc=ee((Bo,gc)=>{"use strict";h();Bo.__esModule=!0;Bo.default=function(o){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;o.noConflict=function(){return globalThis.Handlebars===o&&(globalThis.Handlebars=e),o}};gc.exports=Bo.default});var vc=ee((Go,Sc)=>{"use strict";h();Go.__esModule=!0;function mi(o){return o&&o.__esModule?o:{default:o}}function yi(o){if(o&&o.__esModule)return o;var e={};if(o!=null)for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e.default=o,e}var Lf=pi(),yc=yi(Lf),Rf=lc(),Nf=mi(Rf),Vf=qe(),Bf=mi(Vf),Gf=ye(),gi=yi(Gf),Hf=hc(),bc=yi(Hf),jf=mc(),Uf=mi(jf);function Tc(){var o=new yc.HandlebarsEnvironment;return gi.extend(o,yc),o.SafeString=Nf.default,o.Exception=Bf.default,o.Utils=gi,o.escapeExpression=gi.escapeExpression,o.VM=bc,o.template=function(e){return bc.template(e,o)},o}var kr=Tc();kr.create=Tc;Uf.default(kr);kr.default=kr;Go.default=kr;Sc.exports=Go.default});var Mc=ee((Vy,Cc)=>{h();Cc.exports=vc().default});h();h();h();h();h();h();h();h();var Hn=2,jn=4;function rl(o){if(o?.enabled!==!0)return null;let e=o.fields??["name","tags"],t=e.includes("name"),r=e.includes("tags");if(!t&&!r)return null;let n=o.maxWords,i=Hn;return typeof n=="number"&&(Number.isFinite(n)?i=Math.floor(n):n>0&&(i=jn)),i=Math.min(jn,Math.max(Hn,i)),n!==void 0&&n!==i&&C.warn(`joinedWords.maxWords ${n} adjusted to ${i} (whole number in ${Hn}\u2013${jn}).`),{maxWords:i,name:t,tags:r}}var lr=class{#e;searchInstance;#t;#r;#o;enabled=!1;constructor(e,t,{enabled:r=!1,joinedWords:n}={}){this.#e=e,this.#t=t,this.#o=rl(n),this.#r=()=>{this.searchInstance?.then(i=>i.populate())},r&&this.enable()}async query(e,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return C.error("Search should be enabled by now"),{places:[],enterpriseLocations:[],enterpriseCategories:[]};try{return await(await this.searchInstance).search(e,t)}catch(r){return C.error("Search.query failed due to",r),{places:[],enterpriseLocations:[],enterpriseCategories:[]}}}async suggest(e,t={}){if(this.enabled||await this.enable(),!this.searchInstance)return C.error("Search should be enabled by now"),[];try{return await(await this.searchInstance).suggest(e,t)}catch(r){return C.error("Search.suggest failed due to",r),[]}}async enable(){this.enabled||(this.enabled=!0,this.searchInstance||(this.searchInstance=import("./internal-UFSDJP46.js").then(({InternalSearch:e})=>new e(this.#e,this.#o))),this.#t.on("language-change",this.#r),await this.searchInstance)}};var ol={"enterprise-location":"location-profile","enterprise-category":"location-category"},nl={"location-profile":"enterprise-location","location-category":"enterprise-category"},il=new WeakMap,Un=class{#e;#t;Analytics;Search;Query;Nodes;internal;constructor(e,{search:t}={}){this.#e=new ge,this.#t=e,il.set(this,e),this.Analytics=new ba(e.Analytics),this.Query=e.Query,this.Nodes=e.Nodes,this.internal=e,this.Search=new lr(this,e,t),this.#t.on("language-change",r=>{this.#e.publish("language-change",r)})}on=(e,t)=>{this.#e.on(e,t)};off=(e,t)=>{this.#e.off(e,t)};getEnv(){return this.#t.getEnv()}getAccessToken(){return this.#t.tokenManager?.getAccessToken().token}get updatedAt(){return this.#t.updatedAt}async checkForUpdates(){let e=this.#t,t=e.getMapDataOptions;if(t==null||e.updatedAt==null)throw new W("checkForUpdates requires a MapData loaded via getMapData(). This MapData has no load-time `updated_at` timestamp to compare against (e.g. it was hydrated from a local bundle via hydrateMapData()).");if(t.bundleUri!=null)return{hasChanges:!1,updatedAt:e.updatedAt??""};let r="";if(e.enterpriseMode){let n=qt(t),i=wa(n),{updated_at:a}=await Ea(n,i);r=a??""}else{let n=await e.tokenManager?.getAccessTokenAsync(),{updated_at:i}=await Oa(t,n?.token);r=i??""}return{hasChanges:r!==(e.updatedAt??""),updatedAt:r}}get mapName(){return this.#t.mapName}get mapId(){return this.#t.getMapDataOptions?.mapId}get isEnterpriseMode(){return this.#t.enterpriseMode}get mapCenter(){return this.#t.mapCenter}get organizationId(){return this.#t.organizationId}get outdoorViewToken(){return this.#t.outdoorViewToken}getByType(e){e==="node"&&this.#r("getByType('node')","mapData.Nodes.getByType(floor)");let t=this.#t.getByType(e);if(Array.isArray(t)&&t.length===0){let r=this.isEnterpriseMode;!r&&e in ol?C.warn(`MappedinSDK: getByType('${e}') returned 0 results. This is a Maker map (API key starts with 'mik_'). Use '${ol[e]}' instead. See https://developer.mappedin.com/web-sdk/getting-started`):r&&e in nl&&C.warn(`MappedinSDK: getByType('${e}') returned 0 results. This is an Enterprise map. Use '${nl[e]}' instead. See https://developer.mappedin.com/web-sdk/getting-started`)}return t}getById(e,t){return e==="node"&&this.#r("getById('node', id)","mapData.Nodes.getById(id)"),this.#t.getById(e,t)}getByExternalId(e,t){return e==="node"&&this.#r("getByExternalId('node', id)","mapData.Nodes.getByExternalId(id)"),this.#t.getByExternalId(e,t)}#r(e,t){if(this.#t.mvf==null)throw new W(Sa(e,t))}getGeoJSON(e){return e.geoJSON}async changeLanguage(e){return this.#t.changeLanguage(e)}get currentLanguage(){return this.#t.currentLanguage}get naturalBearing(){return this.#t.naturalBearing??0}__LEGACY_GET_DIRECTIONS_SYNC=(e,t,r)=>this.#t.__LEGACY_GET_DIRECTIONS_SYNC(e,t,r);getDirections=(e,t,r)=>this.#t.getDirections(e,t,r);__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC=(e,t,r)=>this.#t.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(e,t,r);getDirectionsMultiDestination=(e,t,r)=>this.#t.getDirectionsMultiDestination(e,t,r);getDistance(e,t){return this.#t.getDistance(e,t)}toBinaryBundle({downloadLanguagePacks:e=!0}={}){return this.#t.toBinaryBundle({downloadLanguagePacks:e})}toJSONBundle({downloadLanguagePacks:e=!0}={}){return this.#t.toJSONBundle({downloadLanguagePacks:e})}},cr=Un;function dr(o){let e=il.get(o);if(!e)throw new Error("MapDataInternal not found");return e}h();h();h();h();h();var Ne=class o{id;text;target;static __type="label";__type=o.__type;static is(e){return e.__type===o.__type}get focusTarget(){return this.target.anchorTarget}constructor(e,t,r){this.id=e,this.text=t,this.target=r}get navigationTarget(){return this.target.anchorTarget}};h();var Pe=class o{id;static __type="marker";#e;get target(){return this.#e}get coordinate(){return this.#e.anchorTarget}get navigationTarget(){return this.target.anchorTarget}toJSON(){return{id:this.id,__type:o.__type,target:this.target,coordinate:this.coordinate}}__type=o.__type;contentEl;static is(e){return e.__type===o.__type}constructor(e,t,r){this.id=e,this.contentEl=t,this.#e=r}get focusTarget(){return this.target.anchorTarget}updateTarget(e){this.#e=e}};h();var Ze=class o{id;groupId;static __type="model";__type=o.__type;#e;get target(){return this.#e}static is(e){return e.__type===o.__type}constructor(e,t,r){this.id=e,this.groupId=t,this.#e=r}updateTarget(e){this.#e=e}toJSON(){return{id:this.id,__type:o.__type,groupId:this.groupId,target:this.#e}}get navigationTarget(){return this.#e.anchorTarget}};h();var Ye=class o{id;coordinates;#e;static __type="path-segment";__type=o.__type;static is(e){return e.__type===o.__type}constructor(e,t){this.id=e,this.coordinates=t}get isConnectionSegment(){return this.coordinates.length===2&&this.coordinates[0].floorId!==this.coordinates[1].floorId}get distance(){return this.#e?this.#e:(this.#e=In(this.coordinates),this.#e)}get focusTarget(){return this.coordinates}toJSON(){return{__type:o.__type,id:this.id,coordinates:this.coordinates,isConnectionSegment:this.isConnectionSegment,distance:this.distance}}},fe=class o{id;animation;coordinates;segments;#e;static __type="path";__type=o.__type;static is(e){return e.__type===o.__type}get focusTarget(){return this.coordinates}constructor(e,t,r,n){this.id=e,this.animation=t,this.coordinates=r,this.segments=n.map(({id:i,coordinates:a})=>new Ye(i.toString(),a))}get distance(){return this.#e?this.#e:(this.#e=In(this.coordinates),this.#e)}toJSON(){return{__type:o.__type,id:this.id,coordinates:this.coordinates,segments:this.segments}}};h();var Np=7,pr=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t?.precision??Np}toJSON(){return{center:this.center,bearing:this.bearing,pitch:this.pitch,zoomLevel:this.zoomLevel}}get center(){let e=this.#e.center;if(this.#t===-1)return e;let t=ro(e.latitude,this.#t),r=ro(e.longitude,this.#t);return new B({latitude:t,longitude:r,floorId:e.floorId,verticalOffset:e.verticalOffset})}get bearing(){return this.#e.bearing}get pitch(){return this.#e.pitch}get zoomLevel(){return ro(this.#e.zoomLevel,5)}};h();var Ve=class o{id;static __type="shape";__type=o.__type;static is(e){return e.__type===o.__type}get focusTarget(){return this}constructor(e){this.id=e}};h();var Be=class o{id;constructor(e,t){this.id=e,this.target=t}target;static __type="text-3d";__type=o.__type;static is(e){return e.__type===o.__type}};h();h();h();var Vp=new Map([["search-16x16",`<svg viewBox="0 0 16 16">
6
6
  <path
7
7
  fillRule="evenodd"
8
8
  clipRule="evenodd"
@@ -293,7 +293,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
293
293
  <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 "/>
294
294
  <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 "/>
295
295
  </g>
296
- </svg>`},Vh=/<svg([^>]*)>/g;function Jc(o,e,t){let r=Nh[o];return r?r.replace(Vh,`<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:${e}; width:${t}px; height:${t}px">`):null}function Bh(o){return qc.sanitize(o,{USE_PROFILES:{svg:!0}})}function Gh(o,e){let n=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;return n==null||n.tagName==="parsererror"||n.tagName.toLowerCase()!=="svg"?(C.error("Failed to parse SVG",{svg:o,tagName:n?.tagName}),o):(e!=null&&(n.setAttribute("color",e),n.querySelectorAll("*").forEach(s=>{(s.getAttribute("fill")!=null||s.tagName==="path")&&s.getAttribute("fill")!=="none"&&s.setAttribute("fill","currentColor"),s.getAttribute("stroke")!=null&&s.getAttribute("stroke")!=="none"&&s.setAttribute("stroke","currentColor")})),new XMLSerializer().serializeToString(n))}var ki=new Map;function Fi(o,e){e?.style==="fill"&&(o=o.replace(".svg","-fill.svg"));let t=`${o}|${e?.color??""}`,r=ki.get(t);return r==null&&(r=Hh(o,e).then(n=>(n==null&&ki.delete(t),n)),ki.set(t,r)),r}async function Hh(o,e){let t="";try{if(o.trim()==="")throw new Error("URL is empty!");let r=await Ia()(o),n=r.headers.get("content-type");if(n?.includes("image/svg+xml")){let i=await r.text();return t=Bh(i),e?.color!=null&&(t=Gh(t,e.color)),{icon:t,type:"svg"}}else{if(n?.includes("image"))return{icon:o,type:"image"};throw new Error(`Expected SVG or Image content, but received: ${n}`)}}catch(r){return C.error(`Failed to fetch icon from ${o}.`,r),null}}h();var jh=.3333333333333333,Kc=2,Qc=2.5,Uh=4,Wh=6,zh=30*.7;function ed(o){let e=typeof window>"u"?1:window.devicePixelRatio||1;return Math.ceil(o+Qc/e)}function $h(o){let e=ed(o)-o,t=o/30,n=Kc*t-Qc/2;return Math.max(0,e+n*2)}function Zh(o){let t=15+Kc+Uh-ed(o)/2;return Math.max(Wh,t)}function td(o){let e=zh;return{icon:o,iconSize:e,margin:Zh(e),iconPadding:$h(e),iconBorderRadiusFactor:jh,iconFit:"cover",iconVisible:!0,pinColor:"#FFFFFF",pinOutlineColor:"#FFFFFF",pinOutlineColorInactive:"#FFFFFF"}}h();function rd(o){return o.locationProfiles.some(e=>e.categories.some(t=>t.name.includes("Restroom")))}function od(o){return o.locationProfiles.some(e=>e.categories.some(t=>t.name.includes("Parking")))}var Di=new Set(["connection","point-of-interest","space","object","door","facade"]),ft={default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F",parking:"#418425",door:"#A0552C"},Ht={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 Yh(o){let e=null;if(wt.is(o))switch(o.type){case"elevator":e=Ht.elevator;break;case"ladder":e=Ht.ladder;break;case"escalator":case"stairs":default:e=Ht.stairs}else nr.is(o)?e=Ht.point:lt.is(o)?e=Ht.door:Oe.is(o)&&(e=Ht.building);return e!=null?Jc(e,"#FFFFFF",12):null}function nd(o){return wt.is(o)?ft.connection:Oe.is(o)?ft.default:rd(o)?ft.washroom:od(o)?ft.parking:nr.is(o)?ft.point:lt.is(o)?ft.door:ft.default}async function Xh(o,e){let t=null,r="locationProfiles"in o?o.locationProfiles.find(n=>n.icon!=null)?.icon:null;if(r?.url!=null&&(t=await Fi(r.url,{color:e.color,style:"fill"})),t==null){let n=Yh(o);n!=null&&(t={icon:n,type:"svg"})}return t}function qh(o){return wt.is(o)||lt.is(o)?"low":nr.is(o)||Oe.is(o)?"high":"medium"}async function Jh(o){let e=o.icon?.url?await Fi(o.icon.url):null;return{rank:"medium",interactive:!0,appearance:td(e?.icon)}}async function Kh(o){let e={appearance:{color:nd(o),pinOutlineColor:nd(o),iconPadding:8,iconSize:24,textSize:12.5,iconScale:{on:"zoom-level",input:[18,20],output:[.7,1]}},rank:qh(o),interactive:!0},t=await Xh(o,{color:"#FFFFFF"});return t!=null&&(e.appearance.icon=t.icon,t.type==="svg"?Oe.is(o)&&(e.appearance.iconSize=30,e.appearance.iconPadding=10):t.type==="image"&&(e.appearance.iconSize=48,e.appearance.iconPadding=2,e.appearance.pinOutlineColor="#FFFFFF",e.rank="high")),e}async function Li(o,e){return(await Promise.all(e.map(async r=>{let n=[];if(!vt(r))return n;if(ir.is(r)){if(r.icon!=null&&typeof r.icon.url=="string"&&r.icon.url.length>0){let a=await Jh(r);a.appearance?.icon!=null&&n.push(o.Labels.add(r,"",a))}return n}let i=await Kh(r);return wt.is(r)?n=r.coordinates.map(a=>o.Labels.add(a,r.name,i)):Oe.is(r)?r.spaces.length>0&&r.floorStack.name!=null&&r.floorStack.name!==""&&n.push(o.Labels.add(r.spaces[0],r.floorStack.name,i)):Oc(r)&&Da(r)&&n.push(o.Labels.add(r,r.name,i)),n}))).flat()}var Qh=new Set([...Di,"annotation"]);async function id(o,e){let t=o.getMapDataInternal();if(!t)throw new Error("Map data not found");let r=t.getAllOfTypes(Qh,e),n=t.getAllOfTypes(bi,e),[i]=await Promise.all([r.length>0?Li(o,r):[],n.length>0?Ti(o,n):[]]);return{labels:i,markers:[]}}async function ad(o,e){let t=o.getMapDataInternal();if(!t)throw new Error("Map data not found");let r=t.getAllOfTypes(Di,e),n=t.getAllOfTypes(Ec,e),i=t.getAllOfTypes(bi,e),[a,s]=await Promise.all([r.length>0?Li(o,r):[],n.length>0?wc(o,n):[],i.length>0?Ti(o,i):[]]);return{labels:a,markers:s}}h();h();var Ri=(o,{id:e}={})=>{let t=Array.isArray(o)?o:[o];if(!t.every(i=>typeof i=="string"))return;let r=t.join(""),n=null;if(e){let i=document.getElementById(e);i instanceof HTMLStyleElement&&(n=i)}n==null&&(n=document.createElement("style")),e&&e!==""&&(n.id=e),n.textContent=r,document.head.appendChild(n)};var zo=.05,Vr=class extends ge{core;mapObjects=[];id;mapDataExternal={};mapsByFloorId={};mapData;currentMap;hiddenOutdoorGeometries=[];lastFacadeIntersected;#e;#t=!1;mapView;externalPubSub;get __EXPERIMENTAL__floorHandler(){return this.#e}__EXPERIMENTAL__overrideSetFloorHandler(e){e&&this.#e&&this.#e!==no&&C.warn("overwriting an existing setFloor override handler"),this.#r(e)}get manualFloorVisibility(){return this.#e!==void 0}set manualFloorVisibility(e){let t=this.#e;t&&t!==no&&e&&C.warn("manualFloorVisibility true overwriting an existing setFloor handler to noop"),this.#r(e?no:void 0)}#r(e){let t=this.manualFloorVisibility;this.#e=e,this.manualFloorVisibility!==t&&this.externalPubSub.publish("state-change-internal",{manualFloorVisibility:this.manualFloorVisibility})}get hidePathsNotOnCurrentFloor(){return this.#t}set hidePathsNotOnCurrentFloor(e){this.#t=e,this.currentMap?.updateOutdoorPathLayerVisibility()}Camera;Labels;Text3D;Markers;Models;Paths;Exporter;Navigation;Outdoor;Shapes;Style;Image3D;constructor(e,t,r){super(),this.core=e,this.mapView=t,this.externalPubSub=r,this.Camera=new yr(this),this.id=this.core.addGroupContainer("root").id.toString();let n=new Mr("outdoors-container",void 0,void 0,this);this.mapObjects.push(n),this.currentMap=n,this.core.on("pre-render",()=>{r.publish("pre-render")},{signal:this.signal}),this.core.on("post-render",()=>{r.publish("post-render")},{signal:this.signal}),this.core.on("resize",()=>{r.publish("resize")},{signal:this.signal}),this.core.on("render-error",({error:d})=>{r.publish("render-error",{error:new Ta(d instanceof Error?d.message:"Unknown error")})},{signal:this.signal});let i=d=>{let p=d;d.startsWith(er)&&d.endsWith("-merged")&&(p=d.slice(er.length,-7));let u=this.getMapDataObject(p);switch(u?.__type){case"facade":return u;case"floor":return u.floorStack.facade;default:return null}};this.core.on("geometry-in-focus",d=>{let p=new Set;for(let u of d){let m=i(u);m&&p.add(m)}r.publish("facades-in-view-change",{facades:Array.from(p)})},{signal:this.signal}),this.core.getSystems().renderSystem.on("camera-state-change",()=>{r.publish("state-change-internal",{Camera:this.getCameraState()})},{signal:this.signal});let a=new pr(this.Camera,{precision:7});this.core.on("camera-change",()=>{r.publish("camera-change",a)},{signal:this.signal}),this.core.on("pan-bounds-change",d=>{r.publish("camera-bounds-change",ho(d,this.core.convert3DMapPositionToCoordinate))},{signal:this.signal}),this.core.camera.on("padding-change",({padding:d})=>{r.publish("camera-screen-offsets-change",d)},{signal:this.signal});let s=d=>p=>{let u=[],m=[],y=[],b=[],I=[],T=[];p.labels.forEach(P=>{let S=this.Labels.getById(P.toString());S&&u.push(S.label)}),p.markers.forEach(P=>{let S=this.Markers.getById(P.toString())||this.Navigation.getMarkerById(P.toString());S&&m.push(S.marker)}),p.models.forEach(P=>{let S=this.Models.getByEntityId(P.toString());S&&y.push(S.model)}),p.images.forEach(P=>{let S=this.Image3D.getById(P.toString());S&&b.push(S.image)}),p.text3ds?.forEach(P=>{let S=this.Text3D.getById(P.toString());S&&T.push(S)}),p.paths.forEach(P=>{let S=this.Paths.getById(P.toString())||this.Navigation.getPathById(P.toString());S&&!I.includes(S)&&I.push(S)});let M=p.geometry,O;M.length>0&&(O=M.map(P=>this.getMapDataInternal()?.getById("space",P)).filter(Boolean)[0],O||(O=M.map(P=>this.getMapDataInternal()?.getById("object",P)).filter(Boolean)[0]),O||(O=M.map(P=>this.getMapDataInternal()?.getById("area",P)).filter(Boolean)[0]),O||(O=M.map(P=>this.Shapes.getById(P)).filter(Boolean)[0]));let D=p.containers.reduce((P,S)=>{let L=this.getMapDataInternal()?.getById("floor",S);return L&&we.is(L)&&P.push(L),P},[]),R,x=0;if(D.length>0){R=D[0].id;let P=this.core.getState(R);x=p.coordinate[2]?p.coordinate[2]-P.altitude:x}let _;this.lastFacadeIntersected&&this.lastFacadeIntersected.spaces.forEach(P=>{this.core.setState(P.id,{hovered:!1})}),O&&me.is(O)&&(_=M.map(P=>this.getMapDataInternal()?.facadesBySpaceId[P]).filter(Boolean)[0],_&&_.spaces.forEach(P=>{this.core.setState(P.id,{hovered:!0})})),this.lastFacadeIntersected=_;let N={coordinate:new B({latitude:p.coordinate[1],longitude:p.coordinate[0],floorId:R,verticalOffset:x}),spaces:O&&me.is(O)?[O]:[],objects:O&&uo.is(O)?[O]:[],areas:O&&po.is(O)?[O]:[],shapes:O&&Ve.is(O)?[O]:[],markers:m,labels:u,models:y,images:b,text3ds:T,paths:I,floors:D,facades:_?[_]:[]};"pointerEvent"in p&&(N.pointerEvent=p.pointerEvent),r.publish(d,N)};this.core.on("hover",s("hover"),{signal:this.signal}),this.core.on("click",s("click"),{signal:this.signal}),this.core.on("long-press",s("long-press"),{signal:this.signal}),this.core.on("user-interaction-start",()=>{r.publish("user-interaction-start")},{signal:this.signal}),this.core.on("user-interaction-end",()=>{r.publish("user-interaction-end")},{signal:this.signal});let l={currentMapGetter:()=>this.currentMap,mapDataInternalGetter:()=>this.mapData?.internal};this.Markers=new Ir(l),this.Models=new wr(l),this.Labels=new Tr(l),this.Text3D=new xr(l),this.Exporter=new br(l),this.Paths=new Or(l),this.Navigation=new mr(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 Lt(this.core,this.hiddenOutdoorGeometries),this.Outdoor.enabled&&(this.core.on("outdoor-view-loaded",()=>{r.publish("outdoor-view-loaded")},{signal:this.signal}),this.core.on("outdoor-style-loaded",()=>{r.publish("outdoor-style-loaded")},{signal:this.signal})),this.Image3D=new Er(l),this.Shapes=new Pr(l),this.Style=new _r(l)}preloadFloors(e){e.forEach(t=>{t instanceof we&&this.core.setState(t.id,{preloadGeometry:!0})})}updateState(e,t){if(t==null||typeof t!="object")return;let r=this.currentMap.options?.disableUpdateStateValidation??!1;if(e==="interior-walls"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe);if(s){let l=s.layers.get(Ct);if(l&&this.core.hasState(l)){let d=this.core.getState(l);this.#o(l,Gn(H(Bn,t,{warn:!0,disableValidation:r}),d),d)}}});return}if(e==="exterior-walls"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe);if(s){let l=s.layers.get(We);if(l&&this.core.hasState(l)){let d=this.core.getState(l);this.#o(l,Gn(H(Bn,t,{warn:!0,disableValidation:r}),d),d)}}});return}if(e==="interior-doors"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe),l=a.layers.get(Mt);if(!s)return;let d=s.layers.get(io);if(!d||!this.core.hasState(d))return;let p=Rn(H(go,t,{warn:!0,disableValidation:r}),this.core.getState(d));Object.keys(p.featureCollection).length>0&&this.core.setState(d,p.featureCollection),l&&Object.keys(p.container).length>0&&this.core.setState(l.containerId,p.container)});return}if(e==="exterior-doors"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe),l=a.layers.get(It);if(!s)return;let d=s.layers.get(ao);if(!d||!this.core.hasState(d))return;let p=Rn(H(go,t,{warn:!0,disableValidation:r}),this.core.getState(d));Object.keys(p.featureCollection).length>0&&this.core.setState(d,p.featureCollection),l&&Object.keys(p.container).length>0&&this.core.setState(l.containerId,p.container)});return}let n=typeof e=="string"?this.getMapDataObject(e):e;if(!n)return;let i=Ze.is(n)?fo(n,this)??n.id:n.id;if(n.__type!==fe.__type&&!this.core.hasState(i)){C.warn(`Failed to update state for "${i}". No ${n.__type} found with that ID.`);return}if(Ne.is(n))return this.core.setState(n.id,Ns(H(Ls,t,{warn:!0,disableValidation:r}),this.core.getState(n.id)));if(Pe.is(n))return this.core.setState(n.id,Gs(H(Vs,t,{warn:!0,disableValidation:r}),this.core.getState(n.id)));if(me.is(n)||uo.is(n)){let a=this.core.getState(n.id);a!=null&&this.#o(n.id,Ds(H(Vn,t,{warn:!0,disableValidation:r}),a),a)}if(po.is(n)&&this.core.setState(n.id,H(Vn,t,{warn:!0,disableValidation:r})),Qt.is(n)&&this.core.setState(n.id,Ks(H(Js,t,{warn:!0,disableValidation:r}))),lt.is(n)){let a=this.core.getState(n.id);this.#o(n.id,Ts(H(go,t,{warn:!0,disableValidation:r}),a),a)}if(Ve.is(n)){let a=Us(H(Hs,t,{warn:!0,disableValidation:r}));a.mergedShapeState&&this.core.setState(n.id,a.mergedShapeState)}if(Ze.is(n)){let{position:a,scale:s,rotation:l,...d}=H(el,t,{warn:!0,disableValidation:r}),p=d;a&&(p.position=[a.longitude,a.latitude,a.verticalOffset]),s!=null&&(Array.isArray(s)?p.scale=s:p.scale=[s,s,s]),l!=null&&(Array.isArray(l)?p.rotation=l:p.rotation=[l,l,l]),a&&n.updateTarget(a),this.core.setState(i,p)}if(we.is(n)){let a=this.currentMap.floorsById.get(n.id);if(a==null)return;let s=H(As,t,{warn:!0,disableValidation:r});this.#o(n.id,zs(s,Ws),this.core.getState(n.id));let l=a.layers.get(oe);if(l!=null&&"geometry"in t&&t.geometry){this.core.setState(l.containerId,H(Cs,t.geometry,{warn:!0,disableValidation:r}));let T={heightScale:t.geometry.heightScale??void 0,maskId:t.geometry.maskId??void 0,maskEffect:t.geometry.maskEffect??void 0,maskMode:t.geometry.maskMode??void 0,maskEnabled:t.geometry.maskEnabled??void 0,effectStart:t.geometry.effectStart??void 0,effectDistance:t.geometry.effectDistance??void 0,darkenAmount:t.geometry.darkenAmount??void 0,darkenUseDepth:t.geometry.darkenUseDepth??void 0,desaturateAmount:t.geometry.desaturateAmount??void 0,desaturateUseDepth:t.geometry.desaturateUseDepth??void 0,washOutAmount:t.geometry.washOutAmount??void 0,washOutUseDepth:t.geometry.washOutUseDepth??void 0};for(let M of l.layers.values())this.core.setState(M,T)}let d=a.layers.get(ze);if(d!=null&&"labels"in t&&t.labels){let T=H(Ms,t.labels,{warn:!0,disableValidation:r});"enabled"in T&&typeof T.enabled=="boolean"&&d.setVisible(T.enabled)}let p=a.layers.get(Le);if(p!=null&&"markers"in t&&t.markers){let T=H(Is,t.markers,{warn:!0,disableValidation:r});"enabled"in T&&typeof T.enabled=="boolean"&&p.setVisible(T.enabled)}if(a.footprintObject&&"footprint"in t&&t.footprint){let T=H(Nn,t.footprint,{warn:!0,disableValidation:r});a.footprintObject.update({altitude:T.altitude,visible:T.visible,height:T.height,opacity:T.opacity,side:T.side,color:T.color,ceilingVisible:T.ceilingVisible,ceilingThickness:T.ceilingThickness,basementMaskEnabled:T.basementMaskEnabled,outline:T.outline})}if(a.gapFootprintObject&&"visible"in t){let T={visible:t.visible};if("footprint"in t&&t.footprint){let M=H(Nn,t.footprint,{warn:!0,disableValidation:r});M.color!==void 0&&(T.color=M.color),M.opacity!==void 0&&(T.opacity=M.opacity),M.outline!==void 0&&(T.outline=M.outline)}a.gapFootprintObject.update(T)}let u=a.layers.get(rr);if(u!=null&&"occlusion"in t&&t.occlusion){let T=H(ws,t.occlusion,{warn:!0,disableValidation:r});"enabled"in T&&typeof T.enabled=="boolean"&&u.setVisible(T.enabled)}let m=a.layers.get(so);if(m!=null&&"images"in t&&t.images){let T=H(Es,t.images,{warn:!0,disableValidation:r});if("visible"in T&&typeof T.visible=="boolean"&&m.setVisible(T.visible),"collisionsEnabled"in T&&typeof T.collisionsEnabled=="boolean"&&l!=null)for(let M of l.layers.values()){let O=this.core.getState(M);if(O?.children)for(let D of O.children)this.core.setState(D,{enableImageCollisions:T.collisionsEnabled})}}let y=a.layers.get($e);if(y!=null&&"paths"in t&&t.paths!=null){let T=H(Os,t.paths,{warn:!0,disableValidation:r});T.visible!=null&&typeof T.visible=="boolean"&&y.setVisible(T.visible)}let b=a.layers.get(or);if(b!=null&&"areas"in t&&t.areas!=null){let T=H(Ps,t.areas,{warn:!0,disableValidation:r});T.visible!=null&&typeof T.visible=="boolean"&&b.setVisible(T.visible)}let I=a.layers.get(st);if(I!=null&&"models"in t&&t.models!=null){let T=H(xs,t.models,{warn:!0,disableValidation:r});T.visible!=null&&typeof T.visible=="boolean"&&I.setVisible(T.visible)}if("text3d"in t&&t.text3d!=null){let T=H(_s,t.text3d,{warn:!0,disableValidation:r}),M=a.layers.get(lo);M!=null&&T.visible!=null&&M.setVisible(T.visible),T.geometryText?.visible!=null&&a.setGeometryTextBatchVisible(T.geometryText.visible),T.floorText?.visible!=null&&a.setFloorTextBatchVisible(T.floorText.visible)}}if(Oe.is(n)){let a=this.core.getState(n.id);for(let s of a.children)s.type==="group-container"&&this.core.setState(s.id,H(Ss,t,{warn:!0,disableValidation:r}))}if(Be.is(n)&&this.core.setState(n.id,Ys(H(Zs,t,{warn:!0,disableValidation:r}))),fe.is(n)){let a=H(Ln,t,{warn:!0,disableValidation:r}),s=At(a);for(let l of n.segments)this.core.setState(l.id,s)}if(Ye.is(n)){let a=H(Ln,t,{warn:!0,disableValidation:r}),s=At(a);this.core.setState(n.id,s)}}#o(e,t,r){return r!=null&&$s(t,r)?!1:(this.core.setState(e,t),!0)}getMapDataObject(e){return this.getMapDataInternal()?.getMapDataById(e)}update=()=>{this.core.render()};getMapDataInternal(){if(this.mapData)return dr(this.mapData)}getMapData(){return this.mapData}addMap(e,t){return new Promise(r=>{let n;try{n=dr(e)}catch(l){C.error("Error adding map",l),r(e);return}this.mapDataExternal[e.mapName]=e,this.mapData=e,this.core.mode!=="outdoors-overlay"&&this.Camera.set({center:n.mapCenter});let i=n.manifestRecord.name,a=new Mr(`mapObject-${i}`,n,t,this);this.currentMap=a,this.currentMap.loadAllFloors(),this.currentMap.setFloor(this.currentMap.startingFloorId),this.core.renderSync();let s=t?.outdoorView?.layersHiddenByGeometry??[];if(s.length>0){let l=[];for(let d of a.floorStacksById.values())d.isOutdoors===!1&&d.defaultFloor.footprint&&d.defaultFloor.footprint.geometry!=null&&d.defaultFloor.footprint.geometry?.coordinates.length>0&&l.push(d.defaultFloor.footprint);l.length>0&&(this.core.hideOutdoorLayersIntersectingPolygons(l,s),this.hiddenOutdoorGeometries.push([l,s]))}this.mapObjects.push(a);for(let l of Object.keys(n.floorRecordsById))this.mapsByFloorId[l]=a;if(a.on("floor-change-start",l=>{let d=sd(this.getMapDataInternal(),l.floorId,l.previousFloorId);d&&this.externalPubSub.publish("floor-change-start",{reason:l.reason,...d})},{signal:this.signal}),a.on("floor-change",l=>{let d=sd(this.getMapDataInternal(),l.floorId,l.previousFloorId);d&&this.externalPubSub.publish("floor-change",{reason:l.reason,...d}),this.externalPubSub.publish("state-change-internal",{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack})},{signal:this.signal}),t?.zoomLevel!=null)this.core.camera.setZoomLevel(t.zoomLevel),r(e);else if(this.core.mode!=="outdoors-overlay"&&this.currentFloor){let l=t?.screenOffsets??{top:zo*this.core.canvasHeight,left:zo*this.core.canvasWidth,right:zo*this.core.canvasWidth,bottom:zo*this.core.canvasHeight};this.Camera.focusOn(this.currentFloor,{duration:Ra,screenOffsets:l}).then(()=>{this.Camera.setElevation(this.currentFloor.elevation),r(e)})}else r(e)})}setFloor(e,t){return this.currentMap.setFloor(Kt(e),t)}setFloorStack(e,t){return this.currentMap.setFloorStack(Kt(e),t)}updateWatermark(e){this.core.updateWatermark(e)}get currentFloorStack(){let e=this.currentMap.currentFloorStack.id;if(!e)throw new W("Missing currentFloorStack.");let t=this.mapData?.getById("floor-stack",e);if(!t)throw new W("FloorStack was not found in map data.");return t}get currentFloor(){let e=this.currentMap.currentFloor.id;if(!e)throw new W("Missing currentFloor object from GeoJsonApi");let t=this.mapData?.getById("floor",e);if(!t)throw new W("Missing currentFloor");return t}getState(e){typeof e=="object"&&fe.is(e)&&C.warn("Cannot get state of a Path directly. Use getState() on individual segments within Path.segments[] instead.");let t=fo(e,this),r=this.core.getState(t);if(r){if(["interior-walls","exterior-walls"].includes(e)&&r.type==="feature-collection")return qs(r);if(["interior-doors","exterior-doors"].includes(e)&&r.type==="feature-collection"){let n=e==="interior-doors"?Mt:It,i;for(let a of this.currentMap.floors){let s=a.layers.get(n);if(!s)continue;let l=this.core.getState(s.containerId);if(l){i=l;break}}return bs(r,i)}else{if(r.type==="geometry")return Fs(r);if(r.type==="label"&&r.options.appearance&&r.options.rank!==void 0&&r.options.interactive!==void 0)return Rs(r);if(r.type==="marker"&&r.options?.rank!==void 0&&r.options.interactive!==void 0)return Bs(r,this.Markers.getById(r.id.toString())?.marker);if(r.type==="model")return tl(r);if(r.type==="image")return Qs(r);if(r.type==="text3d")return Xs(r);if(r.type==="feature-collection"&&e&&typeof e!="string"&&Ve.is(e))return js(r);if(r.type==="path")return ys(r);if(r.type==="group-container"&&typeof e!="string"&&we.is(e))return ks(r,this.currentMap.floorsById.get(e.id),this.core);if(r.type==="group-container"&&r.children.length>0&&typeof e!="string"&&Oe.is(e)){let n=this.core.getState(r.children[0].id);return vs(n)}}}}__EXPERIMENTAL__getRenderedState(e){let t=fo(e,this);if(t)return this.core.getRenderedState(t)}setHoverColor(e){this.core.setState({hoverColor:e})}getHoverColor(){let e=this.core.getState();return e?.type==="map-view"?e.hoverColor:void 0}getFloorStackAltitudeData(e){return this.currentMap.getFloorStackAltitudeData(e)}createCoordinateFromScreenCoordinate(e,t,r){if(r!=null){let l=this.core.projectScreenXYToCoordinate(e,t,!0);return l?new B(l.coordinate[1],l.coordinate[0],r.id):void 0}let n=this.core.projectScreenXYToCoordinate(e,t);if(n==null||n.coordinate==null)return;let{coordinate:i,groupContainers:a}=n,s=a?.find(l=>{let d=l.userData.entityId.toString();return d.includes("f_")||d.includes("m_")})?.userData.entityId.toString();return new B(i[1],i[0],s)}getScreenCoordinateFromCoordinate(e){let t=0;if(e.floorId!=null){let r=this.mapData?.getById("floor",e.floorId);r!=null&&(t=this.getState(r)?.altitude??0)}return t+=e.verticalOffset,this.core.projectCoordinateToScreenXY([e.longitude,e.latitude,t])}isInView(e){return this.core.isInView(typeof e=="string"?e:e.id)}getInView(e,t){let r=this.core.queryGeometry2DInView({screenOffsets:t?.screenOffsets,fullyContains:t?.fullyContains});if(r.length===0)return[];let n=[];switch(e){case Ne.__type:n=r.map(i=>this.Labels.getById(i)).filter(i=>i!=null).map(i=>i.label);break;case Pe.__type:n=r.map(i=>this.Markers.getById(i)).filter(i=>i!=null).map(i=>i.marker)}return n}async auto(e){return await id(this,e)}async __EXPERIMENTAL__auto(e){return await ad(this,e)}tween(e){let t=new Re(e);return this.core.getExternalTweenGroup().add(t),this.core.render(),t}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,markers:this.Navigation.markers}}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,t=!1){let r=this.currentMap;if(!r){C.error("Cannot compute optimal visual distance between floors. Missing current map.");return}if(e.length<2){C.warn("Cannot compute optimal visual distance between floors. Must provide at least 2 floors.");return}let n=r.renderer.getInternalState().geometry3DMap.get(e[0].id),i=r.renderer.getInternalState().geometry3DMap.get(e[1].id);if(!n||!i){C.warn("Cannot compute optimal visual distance between floors. Floors not found in current map.");return}kn(n,"group-container"),kn(i,"group-container"),t&&typeof r.renderer.debugVisualizeBoundingBoxes=="function"&&r.renderer.debugVisualizeBoundingBoxes(n,i);let a=r.renderer.computeMinZOffsetBetweenContainers(n,i);if(a!==-1)return a}};function eg(o){if(o===""){Pn(""),xn("");return}xn(`${o}/${cs}`),Pn(`${o}/${ls}`)}function sd(o,e,t){let r=o?.getById("floor",t),n=o?.getById("floor",e);return!r||!n?null:{floor:n,previousFloor:r}}h();var $o=class{state;#e;constructor(e){this.#e=e,this.update=e.Debug.update.bind(e.Debug),this.state=e.Debug.state}update;getCameraState(){let e=this.#e.camera.center,t=this.#e.camera.bearing;return{center:new B({longitude:e[0],latitude:e[1]}),zoomLevel:this.#e.camera.zoomLevel,bearing:t,pitch:this.#e.camera.pitch}}};h();import ne from"zod";var ld=ne.strictObject({environment:ne.union([ne.literal("basic"),ne.literal(!1)]).optional(),text3d:ne.object({hoverColor:ne.string().optional()}).optional(),geometry:ne.object({hoverColor:ne.string().optional()}).optional(),backgroundColor:ne.string().optional(),backgroundAlpha:ne.number().optional(),multiFloorView:ne.object({spacesOpenToBelowVisualEffectEnabled:ne.boolean().optional(),spacesOpenToBelowVisualEffectDarkenAmount:ne.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectDarkenUseDepth:ne.boolean().optional(),spacesOpenToBelowVisualEffectDesaturateAmount:ne.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectDesaturateUseDepth:ne.boolean().optional(),spacesOpenToBelowVisualEffectWashOutAmount:ne.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectWashOutUseDepth:ne.boolean().optional()}).optional()});h();var Ni=mn(kp(),1);var tg=(o,e)=>{let t={},r=(n,i,a)=>{for(let s in i){let l=n[s],d=i[s];typeof d=="object"&&!Array.isArray(d)&&d!==null&&typeof l=="object"&&!Array.isArray(l)&&l!==null?(a[s]={},r(l,d,a[s])):a[s]=l}};return r(o,e,t),t},cd=(o,e)=>{let t=tg(o,e),r=(0,Ni.default)({},t,e),n=(0,Ni.default)({},t),i=(a,s,l,d=n)=>{for(let p in s){let u=a[p],m=s[p];if(typeof m=="number"&&typeof u=="number")d[p]=u+(m-u)*l;else if(typeof m=="string"&&typeof u=="string"){if(Dn(u)&&Dn(m)){let y=Fn(u),b=Fn(m);y&&b?d[p]=us([y[0]+(b[0]-y[0])*l,y[1]+(b[1]-y[1])*l,y[2]+(b[2]-y[2])*l]):C.warn(`Color "${p}" could not be animated!`)}}else typeof m=="object"&&m!==null&&typeof u=="object"&&u!==null?i(u,m,l,d[p]):C.warn(`Value "${p}" could not be animated!`)}};return a=>(a=Math.min(Math.max(a,0),1),a===0?o:a===1?r:(i(t,e,a),n))};h();function rg(o){return o.getContext("webgl2")||o.getContext("webgl")}function Vi(o){let e=rg(o);if(!e||o.width===0||o.height===0)return null;let t=e;t.PIXEL_PACK_BUFFER!==void 0&&t.bindBuffer(t.PIXEL_PACK_BUFFER,null);let r=new Uint8Array(o.width*o.height*4);e.readPixels(0,0,o.width,o.height,e.RGBA,e.UNSIGNED_BYTE,r);let n=document.createElement("canvas");n.width=o.width,n.height=o.height;let i=n.getContext("2d");if(!i)return null;let a=new ImageData(o.width,o.height);for(let s=0;s<o.height;s++)for(let l=0;l<o.width;l++){let d=((o.height-s-1)*o.width+l)*4,p=(s*o.width+l)*4;a.data[p]=r[d],a.data[p+1]=r[d+1],a.data[p+2]=r[d+2],a.data[p+3]=r[d+3]}return i.putImageData(a,0,0),n}async function dd(o,e=1e3){let t=null,r=new Promise(a=>{t=()=>{let s=o.getCanvas();a(s?Vi(s):null)},o.once("render",t),o.triggerRepaint()}),n=new Promise(a=>setTimeout(()=>a(null),e)),i=await Promise.race([r,n]);return i===null&&t&&o.off("render",t),i}function Bi(o,e="labels"){let t=o.getContext("2d");if(!t)return null;try{let r=t.getImageData(0,0,o.width,o.height),n=document.createElement("canvas");n.width=o.width,n.height=o.height;let i=n.getContext("2d");return i?(i.putImageData(r,0,0),n):null}catch{let n=e==="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 C.warn(n),null}}var Br=class{#e;#t;#r;Camera;Labels;Text3D;Markers;Image3D;Models;Paths;Exporter;Navigation;Style;Shapes;Outdoor;constructor(e){this.#e=new ge,this.#r=e;let t=new Vr(e,this,this.#e);this.#t=t,this.Camera=this.#t.Camera,this.Markers=this.#t.Markers,this.Models=this.#t.Models,this.Labels=this.#t.Labels,this.Text3D=this.#t.Text3D,this.Exporter=this.#t.Exporter,this.Paths=this.#t.Paths,this.Navigation=this.#t.Navigation,this.Shapes=this.#t.Shapes,this.Style=this.#t.Style,this.Outdoor=this.#t.Outdoor,this.Image3D=this.#t.Image3D,this.#r.container.dataset.version=E.env.npm_package_version,this.Debug=new $o(this.#t.core)}updateState(e,t){return this.#t.updateState(e,t)}animateState(e,t,r){let n=this.#t.getState(e);if(n==null)return C.warn(`Cannot animate state of ${e}.`),new Promise(d=>d({result:"completed"}));let i=cd(n,t),a=this.#t.tween({percent:0}).to({percent:1},r?.duration??1e3).onUpdate(({percent:l})=>{this.#t.updateState(e,i(l))});r?.easing&&r.easing in xt&&a.easing(xt[r.easing]);let s=new Promise(l=>{a.onComplete(()=>{this.#t.removeTween(a),l({result:"completed"})}).onStop(()=>{this.#t.removeTween(a),l({result:"cancelled"})}),a.start()});return s.cancel=()=>{a.stop(),this.#t.updateState(e,i(0))},s}updateGlobalState(e){try{ld.parse(e)}catch(t){C.error("updateGlobalState",t);return}if(typeof e=="object"){let t={};if(e.text3d?.hoverColor&&(t.text3dHoverColor=e.text3d.hoverColor),e.geometry?.hoverColor&&(t.hoverColor=e.geometry.hoverColor),e.backgroundColor||e.backgroundAlpha!==void 0){let r=e.backgroundColor??this.#t.core.backgroundColor,n=e.backgroundAlpha??this.#t.core.backgroundAlpha;this.#t.core.setBackgroundColor(r,n)}e.environment!=null&&this.#t.core.setEnvironment(e.environment),e.multiFloorView!=null&&this.#t.currentMap.updateMultiFloorViewEffects(e.multiFloorView),this.#t.core.setState(t),this.#e.publish("global-state-change")}}get options(){return Ua(this.#t.currentMap.options)}getGlobalState(){let e=this.#t.core.getState();return{backgroundColor:this.#t.core.backgroundColor,backgroundAlpha:this.#t.core.backgroundAlpha,environment:this.#t.core.getEnvironment(),geometry:{hoverColor:e.hoverColor},text3d:{hoverColor:e.text3dHoverColor},multiFloorView:this.#t.currentMap.getMultiFloorViewEffects()}}update=()=>{this.#t.core.render()};getMapData(){if(this.#t.mapData==null)throw new W("MapData not found.");return this.#t.mapData}getDimensions(){return{width:this.#r.canvasWidth,height:this.#r.canvasHeight}}addMap(e,t){return this.#t.addMap(e,t)}setFloor(e,t){return this.#t.setFloor(e,t?.context)}setFloorStack(e,t){return this.#t.setFloorStack(e,t?.context)}preloadFloors(e){this.#t.preloadFloors(e)}tween(e){return this.#t.tween(e)}removeTween(e){this.#t.removeTween(e)}get tweenGroup(){return this.#t.tweenGroup()}get currentFloorStack(){return this.#t.currentFloorStack}get currentFloor(){return this.#t.currentFloor}updateWatermark(e){this.#t.updateWatermark(e)}getState(e){return this.#t.getState(e)}getFloorStackAltitudeData(e){let t=typeof e=="string"?e:e.id;return this.#t.getFloorStackAltitudeData(t)}__EXPERIMENTAL__getRenderedState(e){return this.#t.__EXPERIMENTAL__getRenderedState(e)}setHoverColor(e){this.#t.setHoverColor(e)}getHoverColor(){return this.#t.getHoverColor()}convertAltitudeToMercatorZoomLevel(e){return this.#t.core.getSystems().cameraSystem.convertAltitudeToZoomLevel(e)}convertMercatorZoomLevelToAltitude(e){return this.#t.core.getSystems().cameraSystem.convertZoomLevelToAltitude(e)}isInView(e){return this.#t.isInView(e)}getInView(e,t){return this.#t.getInView(e,t)}getMetersPerPixel(){return this.#t.core.getMetersPerPixel()}__LEGACY_GET_DIRECTIONS_SYNC=(e,t,r)=>this.#t.getMapData()?.__LEGACY_GET_DIRECTIONS_SYNC(e,t,r)??void 0;getDirections=(e,t,r)=>this.#t.getMapData()?.getDirections(e,t,r)??Promise.resolve(void 0);__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC=(e,t,r)=>this.#t.getMapData()?.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(e,t,r)??void 0;getDirectionsMultiDestination=(e,t,r)=>this.#t.getMapData()?.getDirectionsMultiDestination(e,t,r)??Promise.resolve(void 0);getDistance(e,t){return this.#t.getMapData()?.getDistance(e,t)}createCoordinate(e,t,r){return typeof e=="object"?new B(e):new B(e,t,r?.id)}createCoordinateFromScreenCoordinate(e,t,r){return this.#t.createCoordinateFromScreenCoordinate(e,t,r)}getScreenCoordinateFromCoordinate(e){return this.#t.getScreenCoordinateFromCoordinate(e)}auto(e){return this.#t.auto(e)}__EXPERIMENTAL__auto(e){return C.warn("__EXPERIMENTAL__auto() is deprecated \u2014 use auto() instead."),this.#t.__EXPERIMENTAL__auto(e)}on=(e,t)=>{this.#e.on(e,t)};off=(e,t)=>{this.#e.off(e,t)};get __core(){if(E.env.INTERNAL==="true")return this.#t.core;throw new Error("__core is not available.")}get container(){return this.#r.container}publishAllState(){this.#t.publishAllState()}clear(){this.#t.clear()}destroy(){this.#e.publish("destroy"),this.#e.destroy(),this.#t.destroy()}async enableDebug(e={}){let{Inspector:t}=await import("./inspector-BXOUWL5H.js");await new t(this,this.#t).enable(e)}Debug;async takeScreenshot(e){let t={withOutdoorContext:e?.withOutdoorContext??!1,withLabels:e?.withLabels??!1,captureMarkers:e?.captureMarkers},r=this.#r.rendererDomElement,n=this.#r.map,i=!1,a=!1,s=[];if(this.Outdoor.enabled&&this.Outdoor.visible&&!t.withOutdoorContext&&(this.Outdoor.hide(),i=!0,n)){let l=null;n.triggerRepaint(),await Promise.race([new Promise(p=>{l=()=>p(),n.once("render",l)}),new Promise(p=>setTimeout(p,1e3))])===void 0&&l&&n.off("render",l)}if(this.Outdoor.enabled&&t.withOutdoorContext&&!this.Outdoor.visible){if(n){let l=n.getStyle()?.layers;l&&(s=l.filter(d=>n.getLayoutProperty(d.id,"visibility")!=="none").map(d=>d.id))}if(this.Outdoor.show(),a=!0,n){let l=null;n.triggerRepaint(),await Promise.race([new Promise(p=>{l=()=>p(),n.once("render",l)}),new Promise(p=>setTimeout(p,1e3))])===void 0&&l&&n.off("render",l)}}try{let l=document.createElement("canvas"),d=l.getContext("2d",{willReadFrequently:!0});if(l.width=r.width,l.height=r.height,!d)throw new Error("Failed to get 2D context");if(t.withOutdoorContext&&n){if(!n.loaded()){let m=null;await Promise.race([new Promise(b=>{m=()=>b(),n.once("idle",m)}),new Promise(b=>setTimeout(b,5e3))])===void 0&&m&&n.off("idle",m)}let u=await dd(n);u&&d.drawImage(u,0,0,l.width,l.height)}await this.#r.renderSync();let p=Vi(r);if(p&&d.drawImage(p,0,0,l.width,l.height),t.withLabels){let u=this.#r.labelsCanvas;if(u){let m=Bi(u);m&&d.drawImage(m,0,0,l.width,l.height)}}if(t.withLabels&&t.captureMarkers){let u=this.#r.container;if(u)for(let m=0;m<u.children.length;m++){let y=u.children[m],b=y.classList.contains("mappedin-2d-entities");if(!(y.tagName==="CANVAS"||y.offsetWidth===0||y.offsetHeight===0||!b))try{let I=await t.captureMarkers(y),T=Bi(I,"overlay");T&&T.width>0&&T.height>0&&d.drawImage(T,0,0,l.width,l.height)}catch(I){C.warn(`Overlay layer capture failed: ${I instanceof Error?I.message:String(I)}. Continuing with other layers.`)}}}try{return l.toDataURL("image/png")}catch(u){if((u instanceof Error?u.name:u?.name)==="SecurityError"||u?.message?.includes("tainted")||u?.message?.includes("security")){let I=u instanceof Error?`Screenshot failed due to security restrictions: ${u.message}`:"Screenshot failed due to security restrictions. Ensure all images have proper CORS headers.";throw new W(I)}let b=u instanceof Error?`Screenshot failed: ${u.message}`:"Screenshot failed due to an unknown error.";throw new W(b)}}finally{i&&this.Outdoor.show(),a&&this.Outdoor.hide(s)}}get manualFloorVisibility(){return this.#t.manualFloorVisibility}set manualFloorVisibility(e){this.#t.manualFloorVisibility=e}__EXPERIMENTAL__overrideSetFloorHandler(e){this.#t.__EXPERIMENTAL__overrideSetFloorHandler(e)}getOptimalVisualDistanceBetweenFloors(e){return this.#t.getOptimalVisualDistanceBetweenFloors(e)}get __INTERNAL__hidePathsNotOnCurrentFloor(){return this.#t.hidePathsNotOnCurrentFloor}set __INTERNAL__hidePathsNotOnCurrentFloor(e){this.#t.hidePathsNotOnCurrentFloor=!!e}registerPlugin(e){C.warn("registerPlugin is super experimental and may change or be removed without notice."),this.#r.registerPlugin(e)}unregisterPlugin(e){this.#r.unregisterPlugin(e)}};h();var og=1e3*60*60*2,jt=class{#e=new ge;#t;#r;#o;#n;#i;#s;#p;#a;constructor(e,t){this.#t=e,this.#r=t}#l=()=>{"key"in this.#r&&"secret"in this.#r&&this.#u(),this.#f()};#d(e){let t=e.token!==this.#i?.token;this.#i=e,t&&this.#e.publish("access-token-refreshed",{accessToken:e})}#h(e){let t=JSON.stringify(e.tokens)!==JSON.stringify(this.#s?.tokens);this.#s=e,t&&this.#e.publish("sas-tokens-refreshed",{sasTokens:e.tokens})}async#u(e=!1){if("accessToken"in this.#r&&typeof this.#r.accessToken=="string"){let t={token:this.#r.accessToken,expires:Date.now()+72e5};return this.#i=t,t}if(!("key"in this.#r)||!("secret"in this.#r)||typeof this.#r.key!="string"||typeof this.#r.secret!="string")throw new Error("No API keys or access token provided!");return this.#o!=null?this.#o:this.#i!=null&&this.#i.expires!=null&&this.#i.expires>Date.now()&&!e?this.#i:(this.#o=Xt({...this.#r,key:this.#r.key,secret:this.#r.secret},this.#r.enterprise??!1,e).then(t=>{let r={token:t.accessToken,expires:t.expiresTimestamp*1e3};return this.#d(r),r}).catch(t=>{throw t}).finally(()=>{this.#o=void 0}),this.#o)}async#f(e=!1){return this.isEnterpriseMode()?{tokens:{},expires:1/0}:this.#n!=null?this.#n:this.#s!=null&&this.#s.expires>Date.now()&&!e?this.#s:(this.#n=new Promise((t,r)=>{this.#u().then(n=>{let i={},a=this.#t.map(s=>yn({...this.#r,mapId:s},n.token).then(l=>{i[s]={token:l.token,expires:l.expires}}).catch(l=>{C.error(`Error getting SAS token for map ${s}:`,l)}));Promise.all(a).then(()=>{let s={tokens:i,expires:Math.min(...Object.values(i).map(l=>l.expires??1/0))};this.#h(s),t(s)})}).catch(n=>{r(n)})}),this.#n.catch(t=>{throw t}).finally(()=>{this.#n=void 0}),this.#n)}#c(e){if(!("key"in this.#r)||!("secret"in this.#r))return;let t=e.expires!=null?e.expires-Date.now():og;isFinite(t)&&(this.#p=setTimeout(()=>{this.#u(!0).then(r=>{this.#c(r)})},t-va))}#m(e){let t=e.expires-Date.now();isFinite(t)&&(this.#a=setTimeout(()=>{this.#f(!0).then(r=>{this.#m(r)})},t-Ma))}#y(){this.#p!=null&&clearTimeout(this.#p),this.#a!=null&&clearTimeout(this.#a)}setMapIds(e){this.#t=e}setEnterprise(e){this.#r.enterprise=e}async readySync(){if((!("key"in this.#r)||!("secret"in this.#r))&&!("accessToken"in this.#r)){C.error("No API keys or access token provided! Cannot preload tokens.");return}let e=[this.#u(),null];this.#r.enterprise||(e[1]=this.getSasTokensAsync());let[t,r]=await Promise.all(e);this.#y(),this.#c(t),r!=null&&this.#m(r),Mn()&&globalThis.addEventListener?.("focus",this.#l)}async refreshing(){let e=[];return this.#o!=null&&e.push(this.#o),this.#n!=null&&e.push(this.#n),Promise.all(e)}getAccessTokenAsync(e=!1){return this.#u(e)}getSasTokensAsync(){return this.#f()}getAccessToken(){return this.#i==null?(C.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):this.#i}getSasToken(e){return this.isEnterpriseMode()?(C.error("SAS tokens are not available in the enterprise mode!"),{token:""}):this.#s==null?(C.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):e in this.#s.tokens?this.#s.tokens[e]:(C.error(`SAS token for map ${e} not found!`),{token:""})}isEnterpriseMode(){return this.#r.enterprise??!1}on=(e,t)=>this.#e.on(e,t);off=(e,t)=>this.#e.off(e,t);destroy(){this.#y(),this.#e.destroy(),Mn()&&globalThis.removeEventListener("focus",this.#l)}};h();function Gi(o,e){if(typeof o=="function"){if(e==null){C.warn("onMVFParsed is not called for mvfVersion '3.0.0-native': a native MVFv3 load produces no MVFv2. Use mvfVersion '3.0.0' if you need it.");return}o(e)}}var pd=o=>o.options!=null&&"enterprise"in o.options?o.options.enterprise:void 0;function Hi(o,e,t){if(o!=null)return o;if(e==null)throw new W("No MVF data to build the map from.");if(t||Jt(e))throw new W("mvfVersion '3.0.0-native' supports Maker venues only; load Enterprise venues with mvfVersion '3.0.0'.");return{kind:"v3-native",mvf3:e}}var ng=async(o,e)=>{let t=("mvfVersion"in(e??{})?e?.mvfVersion:void 0)??("options"in o&&"version"in(o.options??{})?o.options?.version:void 0),r={prefetchTokens:!0,...e||{},mvfVersion:t},n,i,a=St();a.updateByUserOption(r);let s={};if("type"in o&&typeof o.type=="string"){if(o.type==="binary"&&o.main instanceof Uint8Array){let O=await to(o.main,r.mvfVersion);O.kind==="v3-native"||(n=O.mvf2),i=O.mvf3,s.languagePacks=[];for(let D of o.languagePacks??[])D.localePack instanceof Uint8Array&&s.languagePacks.push({language:D.language,localePack:await bn(D.localePack)})}else if(o.type==="json"){i=o.options?.mvf3;let O=r.mvfVersion==="3.0.0-native";if(!O&&o.main==null)throw new W("This JSON bundle has no MVFv2; hydrate it with mvfVersion '3.0.0-native'.");n=O?void 0:o.main,s.languagePacks=o.languagePacks??[]}else throw new Error("Invalid backup type");o.type==="binary"&&o.main instanceof Uint8Array&&(s.binaryBundle=o.main);let M=i!=null?Jt(i):n?.enterprise!=null;pd(o)!==void 0&&(M?C.warn('The "enterprise" option in hydrateMapData is deprecated and ignored. Enterprise mode is now automatically detected from the MVF data.'):C.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.')),s.enterprise=M||(pd(o)??!1),s.updatedAt=o.updatedAt}else n=o,s.enterprise=n.enterprise!=null;s.mvf3=i,Gi(e?.onMVFParsed,n);let l="key"in r&&"secret"in r,d="accessToken"in r&&r.accessToken;l&&Ca(r.key)&&(s.enterprise=!1),a.setEnterprise(s.enterprise??!1);let p=n!=null?Qr(n):i!=null?eo(i):[],u=p.length>0?p:[r.mapId];r.baseAuthUri=a.getBaseAuthUri(),r.baseUri=a.getBaseUri();let m=new jt(u,{...r,enterprise:s.enterprise}),y;if(d)y=r.accessToken;else if(l){let M;try{M=await m.getAccessTokenAsync()}catch(O){C.error("Failed getting token during hydrateMapData",O)}y=M?.token||""}if(s.outdoorViewToken=y,s.env=a,s.getMapDataOptions=r,s.tokenManager=m,r.prefetchTokens&&(l||d))try{await m.readySync()}catch(M){C.error("Failed to ready token manager!",M)}ar()&&(s.enterprise&&C.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),r.mvfVersion!=="3.0.0"&&C.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let b=new sr(Hi(n,i,s.enterprise),s);y&&b.Analytics.init({accessToken:y,mapId:r.mapId,key:"key"in r?r.key:void 0,secret:"secret"in r?r.secret:void 0,enterprise:s.enterprise??!1,...r.analytics,baseUri:a.getAnalyticsBaseUri(),context:r.analytics?.context});let I=new cr(b,{search:{enabled:!1,joinedWords:r.search?.joinedWords}}),T=b.findPreferredLanguage({languageCode:r.language,fallbackToNavigatorLanguage:!1});if(T)try{await I.changeLanguage(T.code)}catch{}return I};var ud=`:root {
296
+ </svg>`},Vh=/<svg([^>]*)>/g;function Jc(o,e,t){let r=Nh[o];return r?r.replace(Vh,`<svg$1 xmlns="http://www.w3.org/2000/svg" style="fill:${e}; width:${t}px; height:${t}px">`):null}function Bh(o){return qc.sanitize(o,{USE_PROFILES:{svg:!0}})}function Gh(o,e){let n=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;return n==null||n.tagName==="parsererror"||n.tagName.toLowerCase()!=="svg"?(C.error("Failed to parse SVG",{svg:o,tagName:n?.tagName}),o):(e!=null&&(n.setAttribute("color",e),n.querySelectorAll("*").forEach(s=>{(s.getAttribute("fill")!=null||s.tagName==="path")&&s.getAttribute("fill")!=="none"&&s.setAttribute("fill","currentColor"),s.getAttribute("stroke")!=null&&s.getAttribute("stroke")!=="none"&&s.setAttribute("stroke","currentColor")})),new XMLSerializer().serializeToString(n))}var ki=new Map;function Fi(o,e){e?.style==="fill"&&(o=o.replace(".svg","-fill.svg"));let t=`${o}|${e?.color??""}`,r=ki.get(t);return r==null&&(r=Hh(o,e).then(n=>(n==null&&ki.delete(t),n)),ki.set(t,r)),r}async function Hh(o,e){let t="";try{if(o.trim()==="")throw new Error("URL is empty!");let r=await Ia()(o),n=r.headers.get("content-type");if(n?.includes("image/svg+xml")){let i=await r.text();return t=Bh(i),e?.color!=null&&(t=Gh(t,e.color)),{icon:t,type:"svg"}}else{if(n?.includes("image"))return{icon:o,type:"image"};throw new Error(`Expected SVG or Image content, but received: ${n}`)}}catch(r){return C.error(`Failed to fetch icon from ${o}.`,r),null}}h();var jh=.3333333333333333,Kc=2,Qc=2.5,Uh=4,Wh=6,zh=30*.7;function ed(o){let e=typeof window>"u"?1:window.devicePixelRatio||1;return Math.ceil(o+Qc/e)}function $h(o){let e=ed(o)-o,t=o/30,n=Kc*t-Qc/2;return Math.max(0,e+n*2)}function Zh(o){let t=15+Kc+Uh-ed(o)/2;return Math.max(Wh,t)}function td(o){let e=zh;return{icon:o,iconSize:e,margin:Zh(e),iconPadding:$h(e),iconBorderRadiusFactor:jh,iconFit:"cover",iconVisible:!0,pinColor:"#FFFFFF",pinOutlineColor:"#FFFFFF",pinOutlineColorInactive:"#FFFFFF"}}h();function rd(o){return o.locationProfiles.some(e=>e.categories.some(t=>t.name.includes("Restroom")))}function od(o){return o.locationProfiles.some(e=>e.categories.some(t=>t.name.includes("Parking")))}var Di=new Set(["connection","point-of-interest","space","object","door","facade"]),ft={default:"#3D5676",connection:"#128387",washroom:"#3161B4",point:"#AD468F",parking:"#418425",door:"#A0552C"},Ht={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 Yh(o){let e=null;if(wt.is(o))switch(o.type){case"elevator":e=Ht.elevator;break;case"ladder":e=Ht.ladder;break;case"escalator":case"stairs":default:e=Ht.stairs}else nr.is(o)?e=Ht.point:lt.is(o)?e=Ht.door:Oe.is(o)&&(e=Ht.building);return e!=null?Jc(e,"#FFFFFF",12):null}function nd(o){return wt.is(o)?ft.connection:Oe.is(o)?ft.default:rd(o)?ft.washroom:od(o)?ft.parking:nr.is(o)?ft.point:lt.is(o)?ft.door:ft.default}async function Xh(o,e){let t=null,r="locationProfiles"in o?o.locationProfiles.find(n=>n.icon!=null)?.icon:null;if(r?.url!=null&&(t=await Fi(r.url,{color:e.color,style:"fill"})),t==null){let n=Yh(o);n!=null&&(t={icon:n,type:"svg"})}return t}function qh(o){return wt.is(o)||lt.is(o)?"low":nr.is(o)||Oe.is(o)?"high":"medium"}async function Jh(o){let e=o.icon?.url?await Fi(o.icon.url):null;return{rank:"medium",interactive:!0,appearance:td(e?.icon)}}async function Kh(o){let e={appearance:{color:nd(o),pinOutlineColor:nd(o),iconPadding:8,iconSize:24,textSize:12.5,iconScale:{on:"zoom-level",input:[18,20],output:[.7,1]}},rank:qh(o),interactive:!0},t=await Xh(o,{color:"#FFFFFF"});return t!=null&&(e.appearance.icon=t.icon,t.type==="svg"?Oe.is(o)&&(e.appearance.iconSize=30,e.appearance.iconPadding=10):t.type==="image"&&(e.appearance.iconSize=48,e.appearance.iconPadding=2,e.appearance.pinOutlineColor="#FFFFFF",e.rank="high")),e}async function Li(o,e){return(await Promise.all(e.map(async r=>{let n=[];if(!vt(r))return n;if(ir.is(r)){if(r.icon!=null&&typeof r.icon.url=="string"&&r.icon.url.length>0){let a=await Jh(r);a.appearance?.icon!=null&&n.push(o.Labels.add(r,"",a))}return n}let i=await Kh(r);return wt.is(r)?n=r.coordinates.map(a=>o.Labels.add(a,r.name,i)):Oe.is(r)?r.spaces.length>0&&r.floorStack.name!=null&&r.floorStack.name!==""&&n.push(o.Labels.add(r.spaces[0],r.floorStack.name,i)):Oc(r)&&Da(r)&&n.push(o.Labels.add(r,r.name,i)),n}))).flat()}var Qh=new Set([...Di,"annotation"]);async function id(o,e){let t=o.getMapDataInternal();if(!t)throw new Error("Map data not found");let r=t.getAllOfTypes(Qh,e),n=t.getAllOfTypes(bi,e),[i]=await Promise.all([r.length>0?Li(o,r):[],n.length>0?Ti(o,n):[]]);return{labels:i,markers:[]}}async function ad(o,e){let t=o.getMapDataInternal();if(!t)throw new Error("Map data not found");let r=t.getAllOfTypes(Di,e),n=t.getAllOfTypes(Ec,e),i=t.getAllOfTypes(bi,e),[a,s]=await Promise.all([r.length>0?Li(o,r):[],n.length>0?wc(o,n):[],i.length>0?Ti(o,i):[]]);return{labels:a,markers:s}}h();h();var Ri=(o,{id:e}={})=>{let t=Array.isArray(o)?o:[o];if(!t.every(i=>typeof i=="string"))return;let r=t.join(""),n=null;if(e){let i=document.getElementById(e);i instanceof HTMLStyleElement&&(n=i)}n==null&&(n=document.createElement("style")),e&&e!==""&&(n.id=e),n.textContent=r,document.head.appendChild(n)};var zo=.05,Vr=class extends ge{core;mapObjects=[];id;mapDataExternal={};mapsByFloorId={};mapData;currentMap;hiddenOutdoorGeometries=[];lastFacadeIntersected;#e;#t=!1;mapView;externalPubSub;get __EXPERIMENTAL__floorHandler(){return this.#e}__EXPERIMENTAL__overrideSetFloorHandler(e){e&&this.#e&&this.#e!==no&&C.warn("overwriting an existing setFloor override handler"),this.#r(e)}get manualFloorVisibility(){return this.#e!==void 0}set manualFloorVisibility(e){let t=this.#e;t&&t!==no&&e&&C.warn("manualFloorVisibility true overwriting an existing setFloor handler to noop"),this.#r(e?no:void 0)}#r(e){let t=this.manualFloorVisibility;this.#e=e,this.manualFloorVisibility!==t&&this.externalPubSub.publish("state-change-internal",{manualFloorVisibility:this.manualFloorVisibility})}get hidePathsNotOnCurrentFloor(){return this.#t}set hidePathsNotOnCurrentFloor(e){this.#t=e,this.currentMap?.updateOutdoorPathLayerVisibility()}Camera;Labels;Text3D;Markers;Models;Paths;Exporter;Navigation;Outdoor;Shapes;Style;Image3D;constructor(e,t,r){super(),this.core=e,this.mapView=t,this.externalPubSub=r,this.Camera=new yr(this),this.id=this.core.addGroupContainer("root").id.toString();let n=new Mr("outdoors-container",void 0,void 0,this);this.mapObjects.push(n),this.currentMap=n,this.core.on("pre-render",()=>{r.publish("pre-render")},{signal:this.signal}),this.core.on("post-render",()=>{r.publish("post-render")},{signal:this.signal}),this.core.on("resize",()=>{r.publish("resize")},{signal:this.signal}),this.core.on("render-error",({error:d})=>{r.publish("render-error",{error:new Ta(d instanceof Error?d.message:"Unknown error")})},{signal:this.signal});let i=d=>{let p=d;d.startsWith(er)&&d.endsWith("-merged")&&(p=d.slice(er.length,-7));let u=this.getMapDataObject(p);switch(u?.__type){case"facade":return u;case"floor":return u.floorStack.facade;default:return null}};this.core.on("geometry-in-focus",d=>{let p=new Set;for(let u of d){let m=i(u);m&&p.add(m)}r.publish("facades-in-view-change",{facades:Array.from(p)})},{signal:this.signal}),this.core.getSystems().renderSystem.on("camera-state-change",()=>{r.publish("state-change-internal",{Camera:this.getCameraState()})},{signal:this.signal});let a=new pr(this.Camera,{precision:7});this.core.on("camera-change",()=>{r.publish("camera-change",a)},{signal:this.signal}),this.core.on("pan-bounds-change",d=>{r.publish("camera-bounds-change",ho(d,this.core.convert3DMapPositionToCoordinate))},{signal:this.signal}),this.core.camera.on("padding-change",({padding:d})=>{r.publish("camera-screen-offsets-change",d)},{signal:this.signal});let s=d=>p=>{let u=[],m=[],y=[],b=[],I=[],T=[];p.labels.forEach(P=>{let S=this.Labels.getById(P.toString());S&&u.push(S.label)}),p.markers.forEach(P=>{let S=this.Markers.getById(P.toString())||this.Navigation.getMarkerById(P.toString());S&&m.push(S.marker)}),p.models.forEach(P=>{let S=this.Models.getByEntityId(P.toString());S&&y.push(S.model)}),p.images.forEach(P=>{let S=this.Image3D.getById(P.toString());S&&b.push(S.image)}),p.text3ds?.forEach(P=>{let S=this.Text3D.getById(P.toString());S&&T.push(S)}),p.paths.forEach(P=>{let S=this.Paths.getById(P.toString())||this.Navigation.getPathById(P.toString());S&&!I.includes(S)&&I.push(S)});let M=p.geometry,O;M.length>0&&(O=M.map(P=>this.getMapDataInternal()?.getById("space",P)).filter(Boolean)[0],O||(O=M.map(P=>this.getMapDataInternal()?.getById("object",P)).filter(Boolean)[0]),O||(O=M.map(P=>this.getMapDataInternal()?.getById("area",P)).filter(Boolean)[0]),O||(O=M.map(P=>this.Shapes.getById(P)).filter(Boolean)[0]));let D=p.containers.reduce((P,S)=>{let L=this.getMapDataInternal()?.getById("floor",S);return L&&we.is(L)&&P.push(L),P},[]),R,x=0;if(D.length>0){R=D[0].id;let P=this.core.getState(R);x=p.coordinate[2]?p.coordinate[2]-P.altitude:x}let _;this.lastFacadeIntersected&&this.lastFacadeIntersected.spaces.forEach(P=>{this.core.setState(P.id,{hovered:!1})}),O&&me.is(O)&&(_=M.map(P=>this.getMapDataInternal()?.facadesBySpaceId[P]).filter(Boolean)[0],_&&_.spaces.forEach(P=>{this.core.setState(P.id,{hovered:!0})})),this.lastFacadeIntersected=_;let N={coordinate:new B({latitude:p.coordinate[1],longitude:p.coordinate[0],floorId:R,verticalOffset:x}),spaces:O&&me.is(O)?[O]:[],objects:O&&uo.is(O)?[O]:[],areas:O&&po.is(O)?[O]:[],shapes:O&&Ve.is(O)?[O]:[],markers:m,labels:u,models:y,images:b,text3ds:T,paths:I,floors:D,facades:_?[_]:[]};"pointerEvent"in p&&(N.pointerEvent=p.pointerEvent),r.publish(d,N)};this.core.on("hover",s("hover"),{signal:this.signal}),this.core.on("click",s("click"),{signal:this.signal}),this.core.on("long-press",s("long-press"),{signal:this.signal}),this.core.on("user-interaction-start",()=>{r.publish("user-interaction-start")},{signal:this.signal}),this.core.on("user-interaction-end",()=>{r.publish("user-interaction-end")},{signal:this.signal});let l={currentMapGetter:()=>this.currentMap,mapDataInternalGetter:()=>this.mapData?.internal};this.Markers=new Ir(l),this.Models=new wr(l),this.Labels=new Tr(l),this.Text3D=new xr(l),this.Exporter=new br(l),this.Paths=new Or(l),this.Navigation=new mr(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 Lt(this.core,this.hiddenOutdoorGeometries),this.Outdoor.enabled&&(this.core.on("outdoor-view-loaded",()=>{r.publish("outdoor-view-loaded")},{signal:this.signal}),this.core.on("outdoor-style-loaded",()=>{r.publish("outdoor-style-loaded")},{signal:this.signal})),this.Image3D=new Er(l),this.Shapes=new Pr(l),this.Style=new _r(l)}preloadFloors(e){e.forEach(t=>{t instanceof we&&this.core.setState(t.id,{preloadGeometry:!0})})}updateState(e,t){if(t==null||typeof t!="object")return;let r=this.currentMap.options?.disableUpdateStateValidation??!1;if(e==="interior-walls"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe);if(s){let l=s.layers.get(Ct);if(l&&this.core.hasState(l)){let d=this.core.getState(l);this.#o(l,Gn(H(Bn,t,{warn:!0,disableValidation:r}),d),d)}}});return}if(e==="exterior-walls"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe);if(s){let l=s.layers.get(We);if(l&&this.core.hasState(l)){let d=this.core.getState(l);this.#o(l,Gn(H(Bn,t,{warn:!0,disableValidation:r}),d),d)}}});return}if(e==="interior-doors"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe),l=a.layers.get(Mt);if(!s)return;let d=s.layers.get(io);if(!d||!this.core.hasState(d))return;let p=Rn(H(go,t,{warn:!0,disableValidation:r}),this.core.getState(d));Object.keys(p.featureCollection).length>0&&this.core.setState(d,p.featureCollection),l&&Object.keys(p.container).length>0&&this.core.setState(l.containerId,p.container)});return}if(e==="exterior-doors"){this.currentMap.floors.forEach(a=>{let s=a.layers.get(oe),l=a.layers.get(It);if(!s)return;let d=s.layers.get(ao);if(!d||!this.core.hasState(d))return;let p=Rn(H(go,t,{warn:!0,disableValidation:r}),this.core.getState(d));Object.keys(p.featureCollection).length>0&&this.core.setState(d,p.featureCollection),l&&Object.keys(p.container).length>0&&this.core.setState(l.containerId,p.container)});return}let n=typeof e=="string"?this.getMapDataObject(e):e;if(!n)return;let i=Ze.is(n)?fo(n,this)??n.id:n.id;if(n.__type!==fe.__type&&!this.core.hasState(i)){C.warn(`Failed to update state for "${i}". No ${n.__type} found with that ID.`);return}if(Ne.is(n))return this.core.setState(n.id,Ns(H(Ls,t,{warn:!0,disableValidation:r}),this.core.getState(n.id)));if(Pe.is(n))return this.core.setState(n.id,Gs(H(Vs,t,{warn:!0,disableValidation:r}),this.core.getState(n.id)));if(me.is(n)||uo.is(n)){let a=this.core.getState(n.id);a!=null&&this.#o(n.id,Ds(H(Vn,t,{warn:!0,disableValidation:r}),a),a)}if(po.is(n)&&this.core.setState(n.id,H(Vn,t,{warn:!0,disableValidation:r})),Qt.is(n)&&this.core.setState(n.id,Ks(H(Js,t,{warn:!0,disableValidation:r}))),lt.is(n)){let a=this.core.getState(n.id);this.#o(n.id,Ts(H(go,t,{warn:!0,disableValidation:r}),a),a)}if(Ve.is(n)){let a=Us(H(Hs,t,{warn:!0,disableValidation:r}));a.mergedShapeState&&this.core.setState(n.id,a.mergedShapeState)}if(Ze.is(n)){let{position:a,scale:s,rotation:l,...d}=H(el,t,{warn:!0,disableValidation:r}),p=d;a&&(p.position=[a.longitude,a.latitude,a.verticalOffset]),s!=null&&(Array.isArray(s)?p.scale=s:p.scale=[s,s,s]),l!=null&&(Array.isArray(l)?p.rotation=l:p.rotation=[l,l,l]),a&&n.updateTarget(a),this.core.setState(i,p)}if(we.is(n)){let a=this.currentMap.floorsById.get(n.id);if(a==null)return;let s=H(As,t,{warn:!0,disableValidation:r});this.#o(n.id,zs(s,Ws),this.core.getState(n.id));let l=a.layers.get(oe);if(l!=null&&"geometry"in t&&t.geometry){this.core.setState(l.containerId,H(Cs,t.geometry,{warn:!0,disableValidation:r}));let T={heightScale:t.geometry.heightScale??void 0,maskId:t.geometry.maskId??void 0,maskEffect:t.geometry.maskEffect??void 0,maskMode:t.geometry.maskMode??void 0,maskEnabled:t.geometry.maskEnabled??void 0,effectStart:t.geometry.effectStart??void 0,effectDistance:t.geometry.effectDistance??void 0,darkenAmount:t.geometry.darkenAmount??void 0,darkenUseDepth:t.geometry.darkenUseDepth??void 0,desaturateAmount:t.geometry.desaturateAmount??void 0,desaturateUseDepth:t.geometry.desaturateUseDepth??void 0,washOutAmount:t.geometry.washOutAmount??void 0,washOutUseDepth:t.geometry.washOutUseDepth??void 0};for(let M of l.layers.values())this.core.setState(M,T)}let d=a.layers.get(ze);if(d!=null&&"labels"in t&&t.labels){let T=H(Ms,t.labels,{warn:!0,disableValidation:r});"enabled"in T&&typeof T.enabled=="boolean"&&d.setVisible(T.enabled)}let p=a.layers.get(Le);if(p!=null&&"markers"in t&&t.markers){let T=H(Is,t.markers,{warn:!0,disableValidation:r});"enabled"in T&&typeof T.enabled=="boolean"&&p.setVisible(T.enabled)}if(a.footprintObject&&"footprint"in t&&t.footprint){let T=H(Nn,t.footprint,{warn:!0,disableValidation:r});a.footprintObject.update({altitude:T.altitude,visible:T.visible,height:T.height,opacity:T.opacity,side:T.side,color:T.color,ceilingVisible:T.ceilingVisible,ceilingThickness:T.ceilingThickness,basementMaskEnabled:T.basementMaskEnabled,outline:T.outline})}if(a.gapFootprintObject&&"visible"in t){let T={visible:t.visible};if("footprint"in t&&t.footprint){let M=H(Nn,t.footprint,{warn:!0,disableValidation:r});M.color!==void 0&&(T.color=M.color),M.opacity!==void 0&&(T.opacity=M.opacity),M.outline!==void 0&&(T.outline=M.outline)}a.gapFootprintObject.update(T)}let u=a.layers.get(rr);if(u!=null&&"occlusion"in t&&t.occlusion){let T=H(ws,t.occlusion,{warn:!0,disableValidation:r});"enabled"in T&&typeof T.enabled=="boolean"&&u.setVisible(T.enabled)}let m=a.layers.get(so);if(m!=null&&"images"in t&&t.images){let T=H(Es,t.images,{warn:!0,disableValidation:r});if("visible"in T&&typeof T.visible=="boolean"&&m.setVisible(T.visible),"collisionsEnabled"in T&&typeof T.collisionsEnabled=="boolean"&&l!=null)for(let M of l.layers.values()){let O=this.core.getState(M);if(O?.children)for(let D of O.children)this.core.setState(D,{enableImageCollisions:T.collisionsEnabled})}}let y=a.layers.get($e);if(y!=null&&"paths"in t&&t.paths!=null){let T=H(Os,t.paths,{warn:!0,disableValidation:r});T.visible!=null&&typeof T.visible=="boolean"&&y.setVisible(T.visible)}let b=a.layers.get(or);if(b!=null&&"areas"in t&&t.areas!=null){let T=H(Ps,t.areas,{warn:!0,disableValidation:r});T.visible!=null&&typeof T.visible=="boolean"&&b.setVisible(T.visible)}let I=a.layers.get(st);if(I!=null&&"models"in t&&t.models!=null){let T=H(xs,t.models,{warn:!0,disableValidation:r});T.visible!=null&&typeof T.visible=="boolean"&&I.setVisible(T.visible)}if("text3d"in t&&t.text3d!=null){let T=H(_s,t.text3d,{warn:!0,disableValidation:r}),M=a.layers.get(lo);M!=null&&T.visible!=null&&M.setVisible(T.visible),T.geometryText?.visible!=null&&a.setGeometryTextBatchVisible(T.geometryText.visible),T.floorText?.visible!=null&&a.setFloorTextBatchVisible(T.floorText.visible)}}if(Oe.is(n)){let a=this.core.getState(n.id);for(let s of a.children)s.type==="group-container"&&this.core.setState(s.id,H(Ss,t,{warn:!0,disableValidation:r}))}if(Be.is(n)&&this.core.setState(n.id,Ys(H(Zs,t,{warn:!0,disableValidation:r}))),fe.is(n)){let a=H(Ln,t,{warn:!0,disableValidation:r}),s=At(a);for(let l of n.segments)this.core.setState(l.id,s)}if(Ye.is(n)){let a=H(Ln,t,{warn:!0,disableValidation:r}),s=At(a);this.core.setState(n.id,s)}}#o(e,t,r){return r!=null&&$s(t,r)?!1:(this.core.setState(e,t),!0)}getMapDataObject(e){return this.getMapDataInternal()?.getMapDataById(e)}update=()=>{this.core.render()};getMapDataInternal(){if(this.mapData)return dr(this.mapData)}getMapData(){return this.mapData}addMap(e,t){return new Promise(r=>{let n;try{n=dr(e)}catch(l){C.error("Error adding map",l),r(e);return}this.mapDataExternal[e.mapName]=e,this.mapData=e,this.core.mode!=="outdoors-overlay"&&this.Camera.set({center:n.mapCenter});let i=n.manifestRecord.name,a=new Mr(`mapObject-${i}`,n,t,this);this.currentMap=a,this.currentMap.loadAllFloors(),this.currentMap.setFloor(this.currentMap.startingFloorId),this.core.renderSync();let s=t?.outdoorView?.layersHiddenByGeometry??[];if(s.length>0){let l=[];for(let d of a.floorStacksById.values())d.isOutdoors===!1&&d.defaultFloor.footprint&&d.defaultFloor.footprint.geometry!=null&&d.defaultFloor.footprint.geometry?.coordinates.length>0&&l.push(d.defaultFloor.footprint);l.length>0&&(this.core.hideOutdoorLayersIntersectingPolygons(l,s),this.hiddenOutdoorGeometries.push([l,s]))}this.mapObjects.push(a);for(let l of Object.keys(n.floorRecordsById))this.mapsByFloorId[l]=a;if(a.on("floor-change-start",l=>{let d=sd(this.getMapDataInternal(),l.floorId,l.previousFloorId);d&&this.externalPubSub.publish("floor-change-start",{reason:l.reason,...d})},{signal:this.signal}),a.on("floor-change",l=>{let d=sd(this.getMapDataInternal(),l.floorId,l.previousFloorId);d&&this.externalPubSub.publish("floor-change",{reason:l.reason,...d}),this.externalPubSub.publish("state-change-internal",{currentFloor:this.currentFloor,currentFloorStack:this.currentFloorStack})},{signal:this.signal}),t?.zoomLevel!=null)this.core.camera.setZoomLevel(t.zoomLevel),r(e);else if(this.core.mode!=="outdoors-overlay"&&this.currentFloor){let l=t?.screenOffsets??{top:zo*this.core.canvasHeight,left:zo*this.core.canvasWidth,right:zo*this.core.canvasWidth,bottom:zo*this.core.canvasHeight};this.Camera.focusOn(this.currentFloor,{duration:Ra,screenOffsets:l}).then(()=>{this.Camera.setElevation(this.currentFloor.elevation),r(e)})}else r(e)})}setFloor(e,t){return this.currentMap.setFloor(Kt(e),t)}setFloorStack(e,t){return this.currentMap.setFloorStack(Kt(e),t)}updateWatermark(e){this.core.updateWatermark(e)}get currentFloorStack(){let e=this.currentMap.currentFloorStack.id;if(!e)throw new W("Missing currentFloorStack.");let t=this.mapData?.getById("floor-stack",e);if(!t)throw new W("FloorStack was not found in map data.");return t}get currentFloor(){let e=this.currentMap.currentFloor.id;if(!e)throw new W("Missing currentFloor object from GeoJsonApi");let t=this.mapData?.getById("floor",e);if(!t)throw new W("Missing currentFloor");return t}getState(e){typeof e=="object"&&fe.is(e)&&C.warn("Cannot get state of a Path directly. Use getState() on individual segments within Path.segments[] instead.");let t=fo(e,this),r=this.core.getState(t);if(r){if(["interior-walls","exterior-walls"].includes(e)&&r.type==="feature-collection")return qs(r);if(["interior-doors","exterior-doors"].includes(e)&&r.type==="feature-collection"){let n=e==="interior-doors"?Mt:It,i;for(let a of this.currentMap.floors){let s=a.layers.get(n);if(!s)continue;let l=this.core.getState(s.containerId);if(l){i=l;break}}return bs(r,i)}else{if(r.type==="geometry")return Fs(r);if(r.type==="label"&&r.options.appearance&&r.options.rank!==void 0&&r.options.interactive!==void 0)return Rs(r);if(r.type==="marker"&&r.options?.rank!==void 0&&r.options.interactive!==void 0)return Bs(r,this.Markers.getById(r.id.toString())?.marker);if(r.type==="model")return tl(r);if(r.type==="image")return Qs(r);if(r.type==="text3d")return Xs(r);if(r.type==="feature-collection"&&e&&typeof e!="string"&&Ve.is(e))return js(r);if(r.type==="path")return ys(r);if(r.type==="group-container"&&typeof e!="string"&&we.is(e))return ks(r,this.currentMap.floorsById.get(e.id),this.core);if(r.type==="group-container"&&r.children.length>0&&typeof e!="string"&&Oe.is(e)){let n=this.core.getState(r.children[0].id);return vs(n)}}}}__EXPERIMENTAL__getRenderedState(e){let t=fo(e,this);if(t)return this.core.getRenderedState(t)}setHoverColor(e){this.core.setState({hoverColor:e})}getHoverColor(){let e=this.core.getState();return e?.type==="map-view"?e.hoverColor:void 0}getFloorStackAltitudeData(e){return this.currentMap.getFloorStackAltitudeData(e)}createCoordinateFromScreenCoordinate(e,t,r){if(r!=null){let l=this.core.projectScreenXYToCoordinate(e,t,!0);return l?new B(l.coordinate[1],l.coordinate[0],r.id):void 0}let n=this.core.projectScreenXYToCoordinate(e,t);if(n==null||n.coordinate==null)return;let{coordinate:i,groupContainers:a}=n,s=a?.find(l=>{let d=l.userData.entityId.toString();return d.includes("f_")||d.includes("m_")})?.userData.entityId.toString();return new B(i[1],i[0],s)}getScreenCoordinateFromCoordinate(e){let t=0;if(e.floorId!=null){let r=this.mapData?.getById("floor",e.floorId);r!=null&&(t=this.getState(r)?.altitude??0)}return t+=e.verticalOffset,this.core.projectCoordinateToScreenXY([e.longitude,e.latitude,t])}isInView(e){return this.core.isInView(typeof e=="string"?e:e.id)}getInView(e,t){let r=this.core.queryGeometry2DInView({screenOffsets:t?.screenOffsets,fullyContains:t?.fullyContains});if(r.length===0)return[];let n=[];switch(e){case Ne.__type:n=r.map(i=>this.Labels.getById(i)).filter(i=>i!=null).map(i=>i.label);break;case Pe.__type:n=r.map(i=>this.Markers.getById(i)).filter(i=>i!=null).map(i=>i.marker)}return n}async auto(e){return await id(this,e)}async __EXPERIMENTAL__auto(e){return await ad(this,e)}tween(e){let t=new Re(e);return this.core.getExternalTweenGroup().add(t),this.core.render(),t}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,markers:this.Navigation.markers}}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,t=!1){let r=this.currentMap;if(!r){C.error("Cannot compute optimal visual distance between floors. Missing current map.");return}if(e.length<2){C.warn("Cannot compute optimal visual distance between floors. Must provide at least 2 floors.");return}let n=r.renderer.getInternalState().geometry3DMap.get(e[0].id),i=r.renderer.getInternalState().geometry3DMap.get(e[1].id);if(!n||!i){C.warn("Cannot compute optimal visual distance between floors. Floors not found in current map.");return}kn(n,"group-container"),kn(i,"group-container"),t&&typeof r.renderer.debugVisualizeBoundingBoxes=="function"&&r.renderer.debugVisualizeBoundingBoxes(n,i);let a=r.renderer.computeMinZOffsetBetweenContainers(n,i);if(a!==-1)return a}};function eg(o){if(o===""){Pn(""),xn("");return}xn(`${o}/${cs}`),Pn(`${o}/${ls}`)}function sd(o,e,t){let r=o?.getById("floor",t),n=o?.getById("floor",e);return!r||!n?null:{floor:n,previousFloor:r}}h();var $o=class{state;#e;constructor(e){this.#e=e,this.update=e.Debug.update.bind(e.Debug),this.state=e.Debug.state}update;getCameraState(){let e=this.#e.camera.center,t=this.#e.camera.bearing;return{center:new B({longitude:e[0],latitude:e[1]}),zoomLevel:this.#e.camera.zoomLevel,bearing:t,pitch:this.#e.camera.pitch}}};h();import ne from"zod";var ld=ne.strictObject({environment:ne.union([ne.literal("basic"),ne.literal(!1)]).optional(),text3d:ne.object({hoverColor:ne.string().optional()}).optional(),geometry:ne.object({hoverColor:ne.string().optional()}).optional(),backgroundColor:ne.string().optional(),backgroundAlpha:ne.number().optional(),multiFloorView:ne.object({spacesOpenToBelowVisualEffectEnabled:ne.boolean().optional(),spacesOpenToBelowVisualEffectDarkenAmount:ne.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectDarkenUseDepth:ne.boolean().optional(),spacesOpenToBelowVisualEffectDesaturateAmount:ne.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectDesaturateUseDepth:ne.boolean().optional(),spacesOpenToBelowVisualEffectWashOutAmount:ne.number().min(0).max(1).optional(),spacesOpenToBelowVisualEffectWashOutUseDepth:ne.boolean().optional()}).optional()});h();var Ni=mn(kp(),1);var tg=(o,e)=>{let t={},r=(n,i,a)=>{for(let s in i){let l=n[s],d=i[s];typeof d=="object"&&!Array.isArray(d)&&d!==null&&typeof l=="object"&&!Array.isArray(l)&&l!==null?(a[s]={},r(l,d,a[s])):a[s]=l}};return r(o,e,t),t},cd=(o,e)=>{let t=tg(o,e),r=(0,Ni.default)({},t,e),n=(0,Ni.default)({},t),i=(a,s,l,d=n)=>{for(let p in s){let u=a[p],m=s[p];if(typeof m=="number"&&typeof u=="number")d[p]=u+(m-u)*l;else if(typeof m=="string"&&typeof u=="string"){if(Dn(u)&&Dn(m)){let y=Fn(u),b=Fn(m);y&&b?d[p]=us([y[0]+(b[0]-y[0])*l,y[1]+(b[1]-y[1])*l,y[2]+(b[2]-y[2])*l]):C.warn(`Color "${p}" could not be animated!`)}}else typeof m=="object"&&m!==null&&typeof u=="object"&&u!==null?i(u,m,l,d[p]):C.warn(`Value "${p}" could not be animated!`)}};return a=>(a=Math.min(Math.max(a,0),1),a===0?o:a===1?r:(i(t,e,a),n))};h();function rg(o){return o.getContext("webgl2")||o.getContext("webgl")}function Vi(o){let e=rg(o);if(!e||o.width===0||o.height===0)return null;let t=e;t.PIXEL_PACK_BUFFER!==void 0&&t.bindBuffer(t.PIXEL_PACK_BUFFER,null);let r=new Uint8Array(o.width*o.height*4);e.readPixels(0,0,o.width,o.height,e.RGBA,e.UNSIGNED_BYTE,r);let n=document.createElement("canvas");n.width=o.width,n.height=o.height;let i=n.getContext("2d");if(!i)return null;let a=new ImageData(o.width,o.height);for(let s=0;s<o.height;s++)for(let l=0;l<o.width;l++){let d=((o.height-s-1)*o.width+l)*4,p=(s*o.width+l)*4;a.data[p]=r[d],a.data[p+1]=r[d+1],a.data[p+2]=r[d+2],a.data[p+3]=r[d+3]}return i.putImageData(a,0,0),n}async function dd(o,e=1e3){let t=null,r=new Promise(a=>{t=()=>{let s=o.getCanvas();a(s?Vi(s):null)},o.once("render",t),o.triggerRepaint()}),n=new Promise(a=>setTimeout(()=>a(null),e)),i=await Promise.race([r,n]);return i===null&&t&&o.off("render",t),i}function Bi(o,e="labels"){let t=o.getContext("2d");if(!t)return null;try{let r=t.getImageData(0,0,o.width,o.height),n=document.createElement("canvas");n.width=o.width,n.height=o.height;let i=n.getContext("2d");return i?(i.putImageData(r,0,0),n):null}catch{let n=e==="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 C.warn(n),null}}var Br=class{#e;#t;#r;Camera;Labels;Text3D;Markers;Image3D;Models;Paths;Exporter;Navigation;Style;Shapes;Outdoor;constructor(e){this.#e=new ge,this.#r=e;let t=new Vr(e,this,this.#e);this.#t=t,this.Camera=this.#t.Camera,this.Markers=this.#t.Markers,this.Models=this.#t.Models,this.Labels=this.#t.Labels,this.Text3D=this.#t.Text3D,this.Exporter=this.#t.Exporter,this.Paths=this.#t.Paths,this.Navigation=this.#t.Navigation,this.Shapes=this.#t.Shapes,this.Style=this.#t.Style,this.Outdoor=this.#t.Outdoor,this.Image3D=this.#t.Image3D,this.#r.container.dataset.version=E.env.npm_package_version,this.Debug=new $o(this.#t.core)}updateState(e,t){return this.#t.updateState(e,t)}animateState(e,t,r){let n=this.#t.getState(e);if(n==null)return C.warn(`Cannot animate state of ${e}.`),new Promise(d=>d({result:"completed"}));let i=cd(n,t),a=this.#t.tween({percent:0}).to({percent:1},r?.duration??1e3).onUpdate(({percent:l})=>{this.#t.updateState(e,i(l))});r?.easing&&r.easing in xt&&a.easing(xt[r.easing]);let s=new Promise(l=>{a.onComplete(()=>{this.#t.removeTween(a),l({result:"completed"})}).onStop(()=>{this.#t.removeTween(a),l({result:"cancelled"})}),a.start()});return s.cancel=()=>{a.stop(),this.#t.updateState(e,i(0))},s}updateGlobalState(e){try{ld.parse(e)}catch(t){C.error("updateGlobalState",t);return}if(typeof e=="object"){let t={};if(e.text3d?.hoverColor&&(t.text3dHoverColor=e.text3d.hoverColor),e.geometry?.hoverColor&&(t.hoverColor=e.geometry.hoverColor),e.backgroundColor||e.backgroundAlpha!==void 0){let r=e.backgroundColor??this.#t.core.backgroundColor,n=e.backgroundAlpha??this.#t.core.backgroundAlpha;this.#t.core.setBackgroundColor(r,n)}e.environment!=null&&this.#t.core.setEnvironment(e.environment),e.multiFloorView!=null&&this.#t.currentMap.updateMultiFloorViewEffects(e.multiFloorView),this.#t.core.setState(t),this.#e.publish("global-state-change")}}get options(){return Ua(this.#t.currentMap.options)}getGlobalState(){let e=this.#t.core.getState();return{backgroundColor:this.#t.core.backgroundColor,backgroundAlpha:this.#t.core.backgroundAlpha,environment:this.#t.core.getEnvironment(),geometry:{hoverColor:e.hoverColor},text3d:{hoverColor:e.text3dHoverColor},multiFloorView:this.#t.currentMap.getMultiFloorViewEffects()}}update=()=>{this.#t.core.render()};getMapData(){if(this.#t.mapData==null)throw new W("MapData not found.");return this.#t.mapData}getDimensions(){return{width:this.#r.canvasWidth,height:this.#r.canvasHeight}}addMap(e,t){return this.#t.addMap(e,t)}setFloor(e,t){return this.#t.setFloor(e,t?.context)}setFloorStack(e,t){return this.#t.setFloorStack(e,t?.context)}preloadFloors(e){this.#t.preloadFloors(e)}tween(e){return this.#t.tween(e)}removeTween(e){this.#t.removeTween(e)}get tweenGroup(){return this.#t.tweenGroup()}get currentFloorStack(){return this.#t.currentFloorStack}get currentFloor(){return this.#t.currentFloor}updateWatermark(e){this.#t.updateWatermark(e)}getState(e){return this.#t.getState(e)}getFloorStackAltitudeData(e){let t=typeof e=="string"?e:e.id;return this.#t.getFloorStackAltitudeData(t)}__EXPERIMENTAL__getRenderedState(e){return this.#t.__EXPERIMENTAL__getRenderedState(e)}setHoverColor(e){this.#t.setHoverColor(e)}getHoverColor(){return this.#t.getHoverColor()}convertAltitudeToMercatorZoomLevel(e){return this.#t.core.getSystems().cameraSystem.convertAltitudeToZoomLevel(e)}convertMercatorZoomLevelToAltitude(e){return this.#t.core.getSystems().cameraSystem.convertZoomLevelToAltitude(e)}isInView(e){return this.#t.isInView(e)}getInView(e,t){return this.#t.getInView(e,t)}getMetersPerPixel(){return this.#t.core.getMetersPerPixel()}__LEGACY_GET_DIRECTIONS_SYNC=(e,t,r)=>this.#t.getMapData()?.__LEGACY_GET_DIRECTIONS_SYNC(e,t,r)??void 0;getDirections=(e,t,r)=>this.#t.getMapData()?.getDirections(e,t,r)??Promise.resolve(void 0);__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC=(e,t,r)=>this.#t.getMapData()?.__LEGACY_GET_DIRECTIONS_MULTI_DESTINATION_SYNC(e,t,r)??void 0;getDirectionsMultiDestination=(e,t,r)=>this.#t.getMapData()?.getDirectionsMultiDestination(e,t,r)??Promise.resolve(void 0);getDistance(e,t){return this.#t.getMapData()?.getDistance(e,t)}createCoordinate(e,t,r){return typeof e=="object"?new B(e):new B(e,t,r?.id)}createCoordinateFromScreenCoordinate(e,t,r){return this.#t.createCoordinateFromScreenCoordinate(e,t,r)}getScreenCoordinateFromCoordinate(e){return this.#t.getScreenCoordinateFromCoordinate(e)}auto(e){return this.#t.auto(e)}__EXPERIMENTAL__auto(e){return C.warn("__EXPERIMENTAL__auto() is deprecated \u2014 use auto() instead."),this.#t.__EXPERIMENTAL__auto(e)}on=(e,t)=>{this.#e.on(e,t)};off=(e,t)=>{this.#e.off(e,t)};get __core(){if(E.env.INTERNAL==="true")return this.#t.core;throw new Error("__core is not available.")}get container(){return this.#r.container}publishAllState(){this.#t.publishAllState()}clear(){this.#t.clear()}destroy(){this.#e.publish("destroy"),this.#e.destroy(),this.#t.destroy()}async enableDebug(e={}){let{Inspector:t}=await import("./inspector-ZUQ77RHW.js");await new t(this,this.#t).enable(e)}Debug;async takeScreenshot(e){let t={withOutdoorContext:e?.withOutdoorContext??!1,withLabels:e?.withLabels??!1,captureMarkers:e?.captureMarkers},r=this.#r.rendererDomElement,n=this.#r.map,i=!1,a=!1,s=[];if(this.Outdoor.enabled&&this.Outdoor.visible&&!t.withOutdoorContext&&(this.Outdoor.hide(),i=!0,n)){let l=null;n.triggerRepaint(),await Promise.race([new Promise(p=>{l=()=>p(),n.once("render",l)}),new Promise(p=>setTimeout(p,1e3))])===void 0&&l&&n.off("render",l)}if(this.Outdoor.enabled&&t.withOutdoorContext&&!this.Outdoor.visible){if(n){let l=n.getStyle()?.layers;l&&(s=l.filter(d=>n.getLayoutProperty(d.id,"visibility")!=="none").map(d=>d.id))}if(this.Outdoor.show(),a=!0,n){let l=null;n.triggerRepaint(),await Promise.race([new Promise(p=>{l=()=>p(),n.once("render",l)}),new Promise(p=>setTimeout(p,1e3))])===void 0&&l&&n.off("render",l)}}try{let l=document.createElement("canvas"),d=l.getContext("2d",{willReadFrequently:!0});if(l.width=r.width,l.height=r.height,!d)throw new Error("Failed to get 2D context");if(t.withOutdoorContext&&n){if(!n.loaded()){let m=null;await Promise.race([new Promise(b=>{m=()=>b(),n.once("idle",m)}),new Promise(b=>setTimeout(b,5e3))])===void 0&&m&&n.off("idle",m)}let u=await dd(n);u&&d.drawImage(u,0,0,l.width,l.height)}await this.#r.renderSync();let p=Vi(r);if(p&&d.drawImage(p,0,0,l.width,l.height),t.withLabels){let u=this.#r.labelsCanvas;if(u){let m=Bi(u);m&&d.drawImage(m,0,0,l.width,l.height)}}if(t.withLabels&&t.captureMarkers){let u=this.#r.container;if(u)for(let m=0;m<u.children.length;m++){let y=u.children[m],b=y.classList.contains("mappedin-2d-entities");if(!(y.tagName==="CANVAS"||y.offsetWidth===0||y.offsetHeight===0||!b))try{let I=await t.captureMarkers(y),T=Bi(I,"overlay");T&&T.width>0&&T.height>0&&d.drawImage(T,0,0,l.width,l.height)}catch(I){C.warn(`Overlay layer capture failed: ${I instanceof Error?I.message:String(I)}. Continuing with other layers.`)}}}try{return l.toDataURL("image/png")}catch(u){if((u instanceof Error?u.name:u?.name)==="SecurityError"||u?.message?.includes("tainted")||u?.message?.includes("security")){let I=u instanceof Error?`Screenshot failed due to security restrictions: ${u.message}`:"Screenshot failed due to security restrictions. Ensure all images have proper CORS headers.";throw new W(I)}let b=u instanceof Error?`Screenshot failed: ${u.message}`:"Screenshot failed due to an unknown error.";throw new W(b)}}finally{i&&this.Outdoor.show(),a&&this.Outdoor.hide(s)}}get manualFloorVisibility(){return this.#t.manualFloorVisibility}set manualFloorVisibility(e){this.#t.manualFloorVisibility=e}__EXPERIMENTAL__overrideSetFloorHandler(e){this.#t.__EXPERIMENTAL__overrideSetFloorHandler(e)}getOptimalVisualDistanceBetweenFloors(e){return this.#t.getOptimalVisualDistanceBetweenFloors(e)}get __INTERNAL__hidePathsNotOnCurrentFloor(){return this.#t.hidePathsNotOnCurrentFloor}set __INTERNAL__hidePathsNotOnCurrentFloor(e){this.#t.hidePathsNotOnCurrentFloor=!!e}registerPlugin(e){C.warn("registerPlugin is super experimental and may change or be removed without notice."),this.#r.registerPlugin(e)}unregisterPlugin(e){this.#r.unregisterPlugin(e)}};h();var og=1e3*60*60*2,jt=class{#e=new ge;#t;#r;#o;#n;#i;#s;#p;#a;constructor(e,t){this.#t=e,this.#r=t}#l=()=>{"key"in this.#r&&"secret"in this.#r&&this.#u(),this.#f()};#d(e){let t=e.token!==this.#i?.token;this.#i=e,t&&this.#e.publish("access-token-refreshed",{accessToken:e})}#h(e){let t=JSON.stringify(e.tokens)!==JSON.stringify(this.#s?.tokens);this.#s=e,t&&this.#e.publish("sas-tokens-refreshed",{sasTokens:e.tokens})}async#u(e=!1){if("accessToken"in this.#r&&typeof this.#r.accessToken=="string"){let t={token:this.#r.accessToken,expires:Date.now()+72e5};return this.#i=t,t}if(!("key"in this.#r)||!("secret"in this.#r)||typeof this.#r.key!="string"||typeof this.#r.secret!="string")throw new Error("No API keys or access token provided!");return this.#o!=null?this.#o:this.#i!=null&&this.#i.expires!=null&&this.#i.expires>Date.now()&&!e?this.#i:(this.#o=Xt({...this.#r,key:this.#r.key,secret:this.#r.secret},this.#r.enterprise??!1,e).then(t=>{let r={token:t.accessToken,expires:t.expiresTimestamp*1e3};return this.#d(r),r}).catch(t=>{throw t}).finally(()=>{this.#o=void 0}),this.#o)}async#f(e=!1){return this.isEnterpriseMode()?{tokens:{},expires:1/0}:this.#n!=null?this.#n:this.#s!=null&&this.#s.expires>Date.now()&&!e?this.#s:(this.#n=new Promise((t,r)=>{this.#u().then(n=>{let i={},a=this.#t.map(s=>yn({...this.#r,mapId:s},n.token).then(l=>{i[s]={token:l.token,expires:l.expires}}).catch(l=>{C.error(`Error getting SAS token for map ${s}:`,l)}));Promise.all(a).then(()=>{let s={tokens:i,expires:Math.min(...Object.values(i).map(l=>l.expires??1/0))};this.#h(s),t(s)})}).catch(n=>{r(n)})}),this.#n.catch(t=>{throw t}).finally(()=>{this.#n=void 0}),this.#n)}#c(e){if(!("key"in this.#r)||!("secret"in this.#r))return;let t=e.expires!=null?e.expires-Date.now():og;isFinite(t)&&(this.#p=setTimeout(()=>{this.#u(!0).then(r=>{this.#c(r)})},t-va))}#m(e){let t=e.expires-Date.now();isFinite(t)&&(this.#a=setTimeout(()=>{this.#f(!0).then(r=>{this.#m(r)})},t-Ma))}#y(){this.#p!=null&&clearTimeout(this.#p),this.#a!=null&&clearTimeout(this.#a)}setMapIds(e){this.#t=e}setEnterprise(e){this.#r.enterprise=e}async readySync(){if((!("key"in this.#r)||!("secret"in this.#r))&&!("accessToken"in this.#r)){C.error("No API keys or access token provided! Cannot preload tokens.");return}let e=[this.#u(),null];this.#r.enterprise||(e[1]=this.getSasTokensAsync());let[t,r]=await Promise.all(e);this.#y(),this.#c(t),r!=null&&this.#m(r),Mn()&&globalThis.addEventListener?.("focus",this.#l)}async refreshing(){let e=[];return this.#o!=null&&e.push(this.#o),this.#n!=null&&e.push(this.#n),Promise.all(e)}getAccessTokenAsync(e=!1){return this.#u(e)}getSasTokensAsync(){return this.#f()}getAccessToken(){return this.#i==null?(C.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):this.#i}getSasToken(e){return this.isEnterpriseMode()?(C.error("SAS tokens are not available in the enterprise mode!"),{token:""}):this.#s==null?(C.error("Tokens must be loaded before reading synchronously! Try awaiting readySync() first."),{token:""}):e in this.#s.tokens?this.#s.tokens[e]:(C.error(`SAS token for map ${e} not found!`),{token:""})}isEnterpriseMode(){return this.#r.enterprise??!1}on=(e,t)=>this.#e.on(e,t);off=(e,t)=>this.#e.off(e,t);destroy(){this.#y(),this.#e.destroy(),Mn()&&globalThis.removeEventListener("focus",this.#l)}};h();function Gi(o,e){if(typeof o=="function"){if(e==null){C.warn("onMVFParsed is not called for mvfVersion '3.0.0-native': a native MVFv3 load produces no MVFv2. Use mvfVersion '3.0.0' if you need it.");return}o(e)}}var pd=o=>o.options!=null&&"enterprise"in o.options?o.options.enterprise:void 0;function Hi(o,e,t){if(o!=null)return o;if(e==null)throw new W("No MVF data to build the map from.");if(t||Jt(e))throw new W("mvfVersion '3.0.0-native' supports Maker venues only; load Enterprise venues with mvfVersion '3.0.0'.");return{kind:"v3-native",mvf3:e}}var ng=async(o,e)=>{let t=("mvfVersion"in(e??{})?e?.mvfVersion:void 0)??("options"in o&&"version"in(o.options??{})?o.options?.version:void 0),r={prefetchTokens:!0,...e||{},mvfVersion:t},n,i,a=St();a.updateByUserOption(r);let s={};if("type"in o&&typeof o.type=="string"){if(o.type==="binary"&&o.main instanceof Uint8Array){let O=await to(o.main,r.mvfVersion);O.kind==="v3-native"||(n=O.mvf2),i=O.mvf3,s.languagePacks=[];for(let D of o.languagePacks??[])D.localePack instanceof Uint8Array&&s.languagePacks.push({language:D.language,localePack:await bn(D.localePack)})}else if(o.type==="json"){i=o.options?.mvf3;let O=r.mvfVersion==="3.0.0-native";if(!O&&o.main==null)throw new W("This JSON bundle has no MVFv2; hydrate it with mvfVersion '3.0.0-native'.");n=O?void 0:o.main,s.languagePacks=o.languagePacks??[]}else throw new Error("Invalid backup type");o.type==="binary"&&o.main instanceof Uint8Array&&(s.binaryBundle=o.main);let M=i!=null?Jt(i):n?.enterprise!=null;pd(o)!==void 0&&(M?C.warn('The "enterprise" option in hydrateMapData is deprecated and ignored. Enterprise mode is now automatically detected from the MVF data.'):C.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.')),s.enterprise=M||(pd(o)??!1),s.updatedAt=o.updatedAt}else n=o,s.enterprise=n.enterprise!=null;s.mvf3=i,Gi(e?.onMVFParsed,n);let l="key"in r&&"secret"in r,d="accessToken"in r&&r.accessToken;l&&Ca(r.key)&&(s.enterprise=!1),a.setEnterprise(s.enterprise??!1);let p=n!=null?Qr(n):i!=null?eo(i):[],u=p.length>0?p:[r.mapId];r.baseAuthUri=a.getBaseAuthUri(),r.baseUri=a.getBaseUri();let m=new jt(u,{...r,enterprise:s.enterprise}),y;if(d)y=r.accessToken;else if(l){let M;try{M=await m.getAccessTokenAsync()}catch(O){C.error("Failed getting token during hydrateMapData",O)}y=M?.token||""}if(s.outdoorViewToken=y,s.env=a,s.getMapDataOptions=r,s.tokenManager=m,r.prefetchTokens&&(l||d))try{await m.readySync()}catch(M){C.error("Failed to ready token manager!",M)}ar()&&(s.enterprise&&C.warn("forceEnterpriseLocations is enabled, but the map is already an enterprise map!"),r.mvfVersion!=="3.0.0"&&C.warn("mvfVersion must be '3.0.0' when forceEnterpriseLocations is enabled!"));let b=new sr(Hi(n,i,s.enterprise),s);y&&b.Analytics.init({accessToken:y,mapId:r.mapId,key:"key"in r?r.key:void 0,secret:"secret"in r?r.secret:void 0,enterprise:s.enterprise??!1,...r.analytics,baseUri:a.getAnalyticsBaseUri(),context:r.analytics?.context});let I=new cr(b,{search:{enabled:!1,joinedWords:r.search?.joinedWords}}),T=b.findPreferredLanguage({languageCode:r.language,fallbackToNavigatorLanguage:!1});if(T)try{await I.changeLanguage(T.code)}catch{}return I};var ud=`:root {
297
297
  --pin-shadow-hover-scale: 0.9;
298
298
  --pin-shadow-width: 12px;
299
299
  --pin-shadow-height: 5px;
@@ -1,4 +1,4 @@
1
- import{D as ee,z as N}from"./chunk-EXOCWBOF.js";import{la as O,va as $,wa as P}from"./chunk-TWRTSPVQ.js";import"./chunk-J5TYCDYA.js";import"./chunk-ZJEQSG7Y.js";import{a as v,l as S}from"./chunk-7B7J4IXM.js";import"./chunk-PWEV3AFA.js";v();v();v();v();var M=class n{constructor(e,i,t,o,r="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Y=class extends M{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function V(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}var be={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:V,toHexString:V},D={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},ye={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=D.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},ve={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=D.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},xe=[be,D,ye,ve];function Ce(n){return xe.find(e=>e.match(n))}var J=class extends M{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Ce(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=V(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},I=class extends M{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},W=class extends M{constructor(e,i,t,o,r,l){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(r);let s=l!==void 0;this.step(s?l:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},t=b=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+b),this.$input.value=this.getValue())},o=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),t(this._step*this._normalizeMouseWheel(b)))},l=!1,s,c,f,d,a,p=5,h=b=>{s=b.clientX,c=f=b.clientY,l=!0,d=this.getValue(),a=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",m)},g=b=>{if(l){let C=b.clientX-s,L=b.clientY-c;Math.abs(L)>p?(b.preventDefault(),this.$input.blur(),l=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>p&&m()}if(!l){let C=b.clientY-f;a-=C*this._step*this._arrowKeyMultiplier(b),d+a>this._max?a=this._max-d:d+a<this._min&&(a=this._min-d),this._snapClampSetValue(d+a)}f=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m)},y=()=>{this._inputFocused=!0},u=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",h),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",u)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=(u,b,C,L,_)=>(u-b)/(C-b)*(_-L)+L,i=u=>{let b=this.$slider.getBoundingClientRect(),C=e(u,b.left,b.right,this._min,this._max);this._snapClampSetValue(C)},t=u=>{this._setDraggingStyle(!0),i(u.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",r)},o=u=>{i(u.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",r)},l=!1,s,c,f=u=>{u.preventDefault(),this._setDraggingStyle(!0),i(u.touches[0].clientX),l=!1},d=u=>{u.touches.length>1||(this._hasScrollBar?(s=u.touches[0].clientX,c=u.touches[0].clientY,l=!0):f(u),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",p))},a=u=>{if(l){let b=u.touches[0].clientX-s,C=u.touches[0].clientY-c;Math.abs(b)>Math.abs(C)?f(u):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p))}else u.preventDefault(),i(u.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p)},h=this._callOnFinishChange.bind(this),g=400,m,y=u=>{if(Math.abs(u.deltaX)<Math.abs(u.deltaY)&&this._hasScrollBar)return;u.preventDefault();let C=this._normalizeMouseWheel(u)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(h,g)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",d,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${i}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},X=class extends M{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}},K=class extends M{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ae=`.lil-gui {
1
+ import{D as ee,z as N}from"./chunk-O74CKEFP.js";import{la as O,va as $,wa as P}from"./chunk-N3AVUTI4.js";import"./chunk-IMDMEZEU.js";import"./chunk-TFGILZUF.js";import{a as v,l as S}from"./chunk-XBKEAHSJ.js";import"./chunk-PWEV3AFA.js";v();v();v();v();var M=class n{constructor(e,i,t,o,r="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",l=>l.stopPropagation()),this.domElement.addEventListener("keyup",l=>l.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Y=class extends M{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function V(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}var be={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:V,toHexString:V},D={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},ye={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=D.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},ve={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=D.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(o)}},xe=[be,D,ye,ve];function Ce(n){return xe.find(e=>e.match(n))}var J=class extends M{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Ce(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=V(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},I=class extends M{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},W=class extends M{constructor(e,i,t,o,r,l){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(r);let s=l!==void 0;this.step(s?l:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},t=b=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+b),this.$input.value=this.getValue())},o=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),t(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),t(this._step*this._normalizeMouseWheel(b)))},l=!1,s,c,f,d,a,p=5,h=b=>{s=b.clientX,c=f=b.clientY,l=!0,d=this.getValue(),a=0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",m)},g=b=>{if(l){let C=b.clientX-s,L=b.clientY-c;Math.abs(L)>p?(b.preventDefault(),this.$input.blur(),l=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>p&&m()}if(!l){let C=b.clientY-f;a-=C*this._step*this._arrowKeyMultiplier(b),d+a>this._max?a=this._max-d:d+a<this._min&&(a=this._min-d),this._snapClampSetValue(d+a)}f=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",m)},y=()=>{this._inputFocused=!0},u=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",h),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",u)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=(u,b,C,L,_)=>(u-b)/(C-b)*(_-L)+L,i=u=>{let b=this.$slider.getBoundingClientRect(),C=e(u,b.left,b.right,this._min,this._max);this._snapClampSetValue(C)},t=u=>{this._setDraggingStyle(!0),i(u.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",r)},o=u=>{i(u.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",r)},l=!1,s,c,f=u=>{u.preventDefault(),this._setDraggingStyle(!0),i(u.touches[0].clientX),l=!1},d=u=>{u.touches.length>1||(this._hasScrollBar?(s=u.touches[0].clientX,c=u.touches[0].clientY,l=!0):f(u),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",p))},a=u=>{if(l){let b=u.touches[0].clientX-s,C=u.touches[0].clientY-c;Math.abs(b)>Math.abs(C)?f(u):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p))}else u.preventDefault(),i(u.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",p)},h=this._callOnFinishChange.bind(this),g=400,m,y=u=>{if(Math.abs(u.deltaX)<Math.abs(u.deltaY)&&this._hasScrollBar)return;u.preventDefault();let C=this._normalizeMouseWheel(u)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(h,g)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",d,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${i}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},X=class extends M{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}},K=class extends M{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ae=`.lil-gui {
2
2
  font-family: var(--font-family);
3
3
  font-size: var(--font-size);
4
4
  line-height: 1;
@@ -479,4 +479,4 @@ import{D as ee,z as N}from"./chunk-EXOCWBOF.js";import{la as O,va as $,wa as P}f
479
479
  <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">${d.name}</span>
480
480
  <br>
481
481
  <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>
482
- </div>`,{rank:"always-visible"});f.add(p),n.push(h)}})})}return()=>{n.forEach(c=>o.Markers.remove(c))}}}}var F={duration:300,easing:"ease-in-out"},H=Ee();v();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function ke(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}function ne(n,e,i){let t=new S,o=i.addFolder("Search");o.open();let r=o.add(w,"search").onChange(async d=>{let a=await e.Search.query(d,w.options);a&&(w.results=a,s(a,t))}),l=document.createElement("div");l.style.marginLeft="10px",r.domElement.parentElement?.appendChild(l);let{renderSearch:s,close:c}=Me(n,e,l,r.$input),f=o.addFolder("Advanced");return f.close(),ke(f),document.addEventListener("keydown",d=>{(d.metaKey||d.ctrlKey)&&d.key==="k"?(d.preventDefault(),o._closed&&o.open(),r.$input.focus()):d.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}function Me(n,e,i,t){let o,r;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{let c=await e.Search.suggest(t.value);c&&c.length>0&&l(c[0]?.suggestion)},100))});function l(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return{renderSearch(s,c){if(s.places.length===0&&s.enterpriseCategories?.length===0&&s.enterpriseLocations?.length===0){i.textContent="No results found.";return}r=Le(i,s,n,c)},close(){r.destroy()}}}function Le(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,G.dropdownContainer);let r=document.createElement("ul");r.className="options-list",Object.assign(r.style,G.optionsList),r.style.display="block";let l=[],s=(p,h)=>{if(h&&h.length>0){let g=document.createElement("li");g.textContent=p,Object.assign(g.style,G.sectionHeader),r.appendChild(g),h.forEach((m,y)=>{let u=document.createElement("li");u.textContent=`${"name"in m.item?m.item.name:""} (${m.type})`,Object.assign(u.style,G.option),u.tabIndex=0,u.addEventListener("focus",()=>{f(l.indexOf(u))}),u.addEventListener("mouseover",()=>{u.style.backgroundColor="#f0f0f0"}),u.addEventListener("mouseout",()=>{u.style.backgroundColor=""}),u.addEventListener("click",()=>{}),u.setAttribute("data-type",p),u.setAttribute("data-index",y.toString()),r.appendChild(u),l.push(u)})}};s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(r),n.appendChild(o);let c=[],f=p=>{c.forEach(u=>u()),c=[],l.forEach((u,b)=>{b===p?u.style.backgroundColor="#e0e0e0":u.style.backgroundColor=""});let h=l[p],g=h.getAttribute("data-type"),m=parseInt(h.getAttribute("data-index")||"0",10);if(!g)return;let{item:y}=e[g.toLowerCase()][m];t.publish("highlight",y)},d=p=>{!o.contains(p.target)&&p.target!==n&&a()};document.addEventListener("click",d);let a=()=>{n.innerHTML="",document.removeEventListener("click",d)};return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}var G={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function oe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=ne(n,e,i);o.on("highlight",d=>{if(d){t.forEach(p=>p()),t=[];let a=d instanceof $?d.spaces[0]:d;if(n.Camera.focusOn(d),a&&!O.is(a))return;t.push(H.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let r=i.addFolder("Click \u{1F447}").close(),{sub:l}=$e(n,r);l.on("click",d=>{t.forEach(a=>a()),t=[],d.spaces?.[0]&&(t=[H.highlightCard(n,d.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Se(n,s),f;c.on("hover",d=>{d.spaces?.[0]?(f?.(),t.length===0&&(f=H.highlightCard(n,d.spaces[0]))):(f?.(),f=void 0)})}function $e(n,e){let i=new S,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),r=[];function l(){r.forEach(c=>c()),r.length=0}let s=0;return n.on("click",c=>{let{labels:f,coordinate:d}=c;l(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([d.longitude,d.latitude]));let a=f?.[0];if(a!=null){let h=T(n,a,e);if(!h)return;r.push(h.destroy),h.labelItemFolder.openAnimated()}let p=c.spaces?.[0]??c.objects?.[0];if(p){let h={...p,...n.getState(p),isInView:!1,isInViewCheck:U(n,p.id)},{cleanup:g}=B(n,h,e);s=setInterval(()=>{h.isInView=n.isInView(a||p)},500),r.push(g)}}),{sub:i}}function Se(n,e){let i=new S;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let r=[];function l(){r.forEach(s=>s()),r.length=0}return n.on("hover",s=>{let{coordinate:c,spaces:f,objects:d,markers:a,labels:p}=s;l(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let h=f?.[0]??d?.[0]??a?.[0]??p?.[0];if(!h)return;let g=n.getState(h);g&&(t.type=g.type,t.id=h.id)}),{sub:i}}function U(n,e){return function(){console.log("isInView",n.isInView(e))}}function re(n,e,i){let t={labels:{},all(){i.Labels.__EXPERIMENTAL__all().forEach(h=>{this.labels[h.id]=h}),c()},removeAllLabels(){i.Labels.removeAll().forEach(h=>{delete this.labels[h.id]}),c()}},{addLabel:o,destroy:r}=Fe(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let l=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.labels[m.id],s.get(m.id)?.destroy()}function h(m){let y=T(i,m,l,{onRemove:b=>{p(b)}});if(!y)return;let{labelItemFolder:u}=y;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("Label");for(let m in t.labels){let y=t.labels[m];h(y)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({labels:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.labels[h.id]=h;c()}return{populatelabels:a,destroy(){r()}}}function Ie(n,e,i,t,o){let{interactive:r,enabled:l,rank:s,anchor:c,dynamicResize:f,zIndex:d,contentHTML:a,lowPriorityPin:p}=t;if(r==null||l==null)throw new Error("incomplete marker state");let h={interactive:r,enabled:l,rank:s||"medium",anchor:Array.isArray(c)?c.join(", "):c||"center",dynamicResize:f||!1,zIndex:d||0,contentHTML:a||"",lowPriorityPin:{enabled:p?.enabled??!0,size:p?.size??8,color:E(p?.color??"#666")},remove(){n.Markers.remove(e),o?.(e),i.destroy()},isInView:U(n,e.id)};i.onChange(m=>{let y={interactive:h.interactive,enabled:h.enabled,rank:h.rank,dynamicResize:h.dynamicResize,contentHTML:h.contentHTML,lowPriorityPin:{enabled:h.lowPriorityPin.enabled,size:h.lowPriorityPin.size,color:h.lowPriorityPin.color}};h.rank==="always-visible"&&(y.zIndex=h.zIndex),n.updateState(e,y)}),i.add(h,"interactive"),i.add(h,"enabled"),i.add(h,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(h,"anchor").name("anchor (read-only)").disable(),i.add(h,"dynamicResize").name("dynamic resize"),h.rank==="always-visible"&&i.add(h,"zIndex",0,1e3,1).name("z-index"),i.add(h,"contentHTML").name("content HTML");let g=i.addFolder("Low Priority Pin");g.add(h.lowPriorityPin,"enabled"),g.add(h.lowPriorityPin,"size",1,20,1),g.addColor(h.lowPriorityPin,"color"),g.close(),i.add(h,"isInView"),i.add(h,"remove")}function De(n,e,i,t,o){let{appearance:r,interactive:l}=t;if(!r||r.margin==null||l==null)throw new Error("incomplte label state");let s={text:e.text,interactive:l,appearance:{...r,margin:r.margin||0,pinColor:r.pinColor?E(r.pinColor):"black",textColor:r.textColor?E(r.textColor):"black"},remove(){n.Labels.remove(e),o?.(e),i.destroy()},isInView:U(n,e.id)};i.onChange(c=>{n.updateState(e,{appearance:s.appearance,interactive:s.interactive})}),i.add(s.appearance,"margin",0,20).name("margin"),i.add(s,"text"),i.add(s,"interactive"),i.addColor(s.appearance,"pinColor").name("pin color"),i.addColor(s.appearance,"pinOutlineColor").name("pin outline color"),i.addColor(s.appearance,"textColor").name("text color"),i.addColor(s.appearance,"textOutlineColor").name("text outline color"),i.add(s,"isInView"),i.add(s,"remove")}function T(n,e,i,{onRemove:t}={}){let o=n.getState(e);if(!o)throw new Error(`error getting state for entity: ${e.id}`);let r=o.type===N?e.text?.substring(0,12)||"Label":`Marker ${e.id.toString().substring(0,8)}`,l=i.addFolder(r);if(l.close(),o.type===N)De(n,e,l,o,t);else if(o.type===ee)Ie(n,e,l,o,t);else throw new Error(`unsupported entity type: ${o.type}`);return{labelItemFolder:l,destroy(){l.destroy()}}}function Fe(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:6,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,pinColor:t.marginForegroundColor,pinOutlineColor:t.marginBackgroundColor,textColor:t.textForegroundColor,textOutlineColor:t.textBackgroundColor},interactive:t.interactive})}}}var se={};v();function ae(n,e,i){let t=n.addFolder("Camera \u{1F4F7}"),o=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.container.appendChild(r);let l=()=>e.getDimensions(),[s,c,f,d]=i?.padding??[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],a={center_lat:o.latitude,center_lon:o.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:i?.padding?"pixel":e.Camera.screenOffsets.type,inset_top:s,inset_left:d,inset_right:c,inset_bottom:f,animateOnLoad:!0,visualizeInset:!!(s||c||f||d),"Focus on click":i?.focusOnClick??!1,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function p(){a.inset_type=e.Camera.screenOffsets.type,a.inset_left=e.Camera.screenOffsets.left,a.inset_top=e.Camera.screenOffsets.top,a.inset_right=e.Camera.screenOffsets.right,a.inset_bottom=e.Camera.screenOffsets.bottom;let{width:x,height:k}=l();a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*x+"px",top:a.inset_top*k+"px",bottom:a.inset_bottom*k+"px",right:a.inset_right*x+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange(q),q(a.visualizeInset);let h,g,m,y;function u(){let{width:x,height:k}=l(),R=e.Camera.screenOffsets.type,j=a.inset_type;R!==j&&(j==="portion"&&R==="pixel"?(a.inset_top=x>0?Math.min(a.inset_top/k,1):0,a.inset_bottom=x>0?Math.min(a.inset_bottom/k,1):0,a.inset_left=k>0?Math.min(a.inset_left/x,1):0,a.inset_right=k>0?Math.min(a.inset_right/x,1):0):j==="pixel"&&R==="portion"&&(a.inset_top=Math.round(a.inset_top*k),a.inset_bottom=Math.round(a.inset_bottom*k),a.inset_left=Math.round(a.inset_left*x),a.inset_right=Math.round(a.inset_right*x))),h&&h.destroy(),g&&g.destroy(),m&&m.destroy(),y&&y.destroy(),a.inset_type==="portion"?(h=t.add(a,"inset_top",0,1,.01).onChange(_),g=t.add(a,"inset_bottom",0,1,.01).onChange(_),m=t.add(a,"inset_left",0,1,.01).onChange(_),y=t.add(a,"inset_right",0,1,.01).onChange(_)):(h=t.add(a,"inset_top",0,k,1).onChange(_),g=t.add(a,"inset_bottom",0,k,1).onChange(_),m=t.add(a,"inset_left",0,x,1).onChange(_),y=t.add(a,"inset_right",0,x,1).onChange(_))}t.add(a,"inset_type",["pixel","portion"]).onChange(()=>{u(),_()}),u();let b=Oe(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"Focus on current floor");let C=x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)};e.on("camera-change",C);let L=[()=>{e.off("camera-change",C)}];function _(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),p()}(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&_();function q(x){p(),x?r.style.display="block":r.style.display="none"}return()=>({destroy(){t.destroy(),ie(L)}})}function Oe(n){return function(i){let{spaces:t,objects:o}=i,r=t?.[0]??o?.[0];r&&n.Camera.focusOn(r)}}v();function le(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(h=>{delete this.markers[h.id]}),c()}},{addMarker:o,destroy:r}=Pe(n,i);n.add(t,"removeAllMarkers");let l=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.markers[m.id],s.get(m.id)?.destroy()}function h(m){let y=T(i,m,l,{onRemove:b=>{p(b)}});if(!y)return;let{labelItemFolder:u}=y;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("marker");for(let m in t.markers){let y=t.markers[m];h(y)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({markers:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.markers[h.id]=h;c()}return{populateMarkers:a,destroy(){r()}}}function Pe(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0,rank:"medium",anchor:"center",dynamicResize:!1,enabled:!0,zIndex:0,lowPriorityPin:{enabled:!0,size:8,color:"#666"},contentHTML:'<div style="padding: 8px; background: white; border: 2px solid #333; border-radius: 4px;">New Marker</div>'};i.add(t,"onClick"),i.add(t,"interactive"),i.add(t,"enabled"),i.add(t,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(t,"anchor",["center","top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]).name("anchor"),i.add(t,"dynamicResize").name("dynamic resize"),i.add(t,"zIndex",0,1e3,1).name("z-index (always-visible only)"),i.add(t,"contentHTML").name("content HTML");let o=i.addFolder("Low Priority Pin");return o.add(t.lowPriorityPin,"enabled"),o.add(t.lowPriorityPin,"size",1,20,1),o.addColor(t.lowPriorityPin,"color"),o.close(),{destroy(){i.destroy()},addMarker(r){if(i._closed||!t.onClick)return;let l={interactive:t.interactive,enabled:t.enabled,rank:t.rank,anchor:t.anchor,dynamicResize:t.dynamicResize,lowPriorityPin:{enabled:t.lowPriorityPin.enabled,size:t.lowPriorityPin.size,color:t.lowPriorityPin.color}};return t.rank==="always-visible"&&(l.zIndex=t.zIndex),e.Markers.add(r,t.contentHTML,l)}}}v();function de(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(l=>{e.updateState("exterior-walls",{visible:l})}),i.addColor(t,"topColor").onChange(l=>{e.updateState("exterior-walls",{topColor:l})}),i.addColor(t,"color").onChange(l=>{e.updateState("exterior-walls",{color:l})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{texture:{url:l}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{topTexture:{url:l}})}),e.updateState("exterior-walls",{topColor:t.topColor}),e.updateState("exterior-walls",{color:t.color})}v();function ce(n,e,i){n.close();let t={language:i.currentLanguage?.code??"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o?.languages.map(r=>r.code)).onChange(r=>{i.changeLanguage(r)})}v();function he(n,e,i){let t=n.addFolder("Debug");t.close();let o=e.Debug.state,r={showPolygonLabelTextAreaMesh:o.showPolygonLabelTextAreaMesh,showCollisionBoxes:o.showCollisionBoxes,showEnvMap:o.showEnvMap};t.add(r,"showPolygonLabelTextAreaMesh").onChange(l=>{e.Debug.update({showPolygonLabelTextAreaMesh:l})}).name("Show Flat Label Text Area Mesh"),t.add(r,"showCollisionBoxes").onChange(l=>{e.Debug.update({showCollisionBoxes:l})}).name("Show Collision Boxes"),t.add(r,"showEnvMap").onChange(l=>{e.Debug.update({showEnvMap:l})}).name("Show Environment Map"),e.Debug.update(r)}v();function ue(n,e,i){let t=n.addFolder("Text3D").close(),o={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(o,"all").name("Show All"),t.add(o,"removeAll").name("Remove All")}v();function pe(n,e,i){let t=n.addFolder("Directions \u{1F5FA}\uFE0F");t.close();let o=localStorage.getItem("directionsMethod"),r=localStorage.getItem("directionsRadius"),l=localStorage.getItem("directionsIncludeDoorBufferNodes")==="true",s={enabled:!1,method:o||"dp-optimal",radius:r?parseFloat(r):.75,includeDoorBufferNodes:l,startCoordinate:"",endCoordinate:"",pathInfo:""},c,f,d;t.add(s,"enabled").name("Enable Click-to-Route").onChange(m=>{m||(c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0))}),t.add(s,"startCoordinate").name("Start").disable().listen(),t.add(s,"endCoordinate").name("End").disable().listen(),t.add(s,"method",{"Greedy LOS":"greedy-los",RDP:"rdp","DP Optimal":"dp-optimal"}).name("Smoothing Method").onChange(m=>{localStorage.setItem("directionsMethod",m),c&&f&&s.enabled&&h(c,f)}),t.add(s,"radius",.1,5,.1).name("Smoothing Radius").onChange(m=>{localStorage.setItem("directionsRadius",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"includeDoorBufferNodes").name("Door Buffers").onChange(m=>{localStorage.setItem("directionsIncludeDoorBufferNodes",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"pathInfo").name("Path Info").disable().listen();let a={clear:()=>p()};t.add(a,"clear").name("Clear Path");function p(){c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0)}async function h(m,y){d&&(e.Paths.remove(d),d=void 0);try{let u=await e.getDirections(m,y,{smoothing:{enabled:!0,method:s.method,radius:s.radius,includeDoorBufferNodes:s.includeDoorBufferNodes}});if(u){d=e.Paths.add(u.coordinates,{interactive:!0,color:"green",width:1});let C=u.distance?.toFixed(2)||"N/A";s.pathInfo=`${u.coordinates.length} pts, ${C}m`}else s.pathInfo="No path found"}catch(u){s.pathInfo=`Error: ${u instanceof Error?u.message:"Unknown"}`}}let g=async m=>{if(s.enabled)if(c){let y=m.coordinate;f=y,s.endCoordinate=`${y.latitude.toFixed(6)}, ${y.longitude.toFixed(6)}`,s.pathInfo="Calculating...",await h(c,f),c=void 0,f=void 0}else{let y=m.coordinate;c=y,s.startCoordinate=`${y.latitude.toFixed(6)}, ${y.longitude.toFixed(6)}`,s.pathInfo="Click to set end..."}};return e.on("click",g),{destroy(){e.off("click",g),t.destroy()}}}v();function fe(n,e){let i=n.addFolder("Spaces Open To Below Visual Effect").close(),t=e.getGlobalState().multiFloorView,o={enabled:t.spacesOpenToBelowVisualEffectEnabled,darkenAmount:t.spacesOpenToBelowVisualEffectDarkenAmount,darkenUseDepth:t.spacesOpenToBelowVisualEffectDarkenUseDepth,desaturateAmount:t.spacesOpenToBelowVisualEffectDesaturateAmount,desaturateUseDepth:t.spacesOpenToBelowVisualEffectDesaturateUseDepth,washOutAmount:t.spacesOpenToBelowVisualEffectWashOutAmount,washOutUseDepth:t.spacesOpenToBelowVisualEffectWashOutUseDepth};function r(){e.updateGlobalState({multiFloorView:{spacesOpenToBelowVisualEffectEnabled:o.enabled,spacesOpenToBelowVisualEffectDarkenAmount:o.darkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:o.darkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:o.desaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:o.desaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:o.washOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:o.washOutUseDepth}})}i.add(o,"enabled").name("Enabled").onChange(()=>r());let l=i.addFolder("Darken");l.add(o,"darkenAmount",0,1,.01).name("Amount").onChange(()=>r()),l.add(o,"darkenUseDepth").name("Use Depth").onChange(()=>r());let s=i.addFolder("Desaturate");s.add(o,"desaturateAmount",0,1,.01).name("Amount").onChange(()=>r()),s.add(o,"desaturateUseDepth").name("Use Depth").onChange(()=>r());let c=i.addFolder("Wash Out");c.add(o,"washOutAmount",0,1,.01).name("Amount").onChange(()=>r()),c.add(o,"washOutUseDepth").name("Use Depth").onChange(()=>r())}function me(n,e,i){ze();let t=new z({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),oe(e,n,t),ae(t,e,i?.camera);let o=t.addFolder("Levels").close(),r=t.addFolder("Scene Controls");r.close();let l=t.addFolder("Labels");ue(t,e,n);let s=t.addFolder("Markers");de(t,e);let c=t.addFolder("misc");he(t,e,n),fe(t,e),pe(t,e,n),ce(c,e,n);let f={level:e.currentFloor.id},{populatelabels:d}=re(l,n,e),{populateMarkers:a}=le(s,n,e),p=n.getByType("floor").reduce((g,m)=>(g[m.name]=m.id,g),{}),h=o.add(f,"level",p).onChange(g=>{e.setFloor(g),f.level=e.currentFloor.id,h.updateDisplay()});return e.on("floor-change-start",g=>{o.controllers[0].setValue(g.floor.id)}),n.getByType("space").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:d,sceneFolder:r,populateMarkers:a}}var ge="mappedin-sdk-debug-css";function ze(){if(document.getElementById(ge))return;let n=document.createElement("style");n.id=ge,n.textContent=se,document.head.appendChild(n)}var Q=class{_enabled=!1;mv;api;mapData;storeStateToLocalStorageEnabled=!1;constructor(e,i){this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=me(this.mapData,this.mv,e),t=!1;i.onOpenClose(async o=>{if(!(o!==i||o._closed||t)){t=!0,[...i.children].forEach(r=>r.destroy());try{let{mountSceneGraphVisualizer:r}=await import("./src-Q2KNMHOD.js");r(this.api.core,i)}catch{}finally{i.open(),t=!1}}}),this.api.getMapDataInternal()?.spaces.forEach(o=>{this.mv.updateState(o,{interactive:!0})})}get enabled(){return this._enabled}};export{Q as Inspector};
482
+ </div>`,{rank:"always-visible"});f.add(p),n.push(h)}})})}return()=>{n.forEach(c=>o.Markers.remove(c))}}}}var F={duration:300,easing:"ease-in-out"},H=Ee();v();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function ke(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}function ne(n,e,i){let t=new S,o=i.addFolder("Search");o.open();let r=o.add(w,"search").onChange(async d=>{let a=await e.Search.query(d,w.options);a&&(w.results=a,s(a,t))}),l=document.createElement("div");l.style.marginLeft="10px",r.domElement.parentElement?.appendChild(l);let{renderSearch:s,close:c}=Me(n,e,l,r.$input),f=o.addFolder("Advanced");return f.close(),ke(f),document.addEventListener("keydown",d=>{(d.metaKey||d.ctrlKey)&&d.key==="k"?(d.preventDefault(),o._closed&&o.open(),r.$input.focus()):d.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}function Me(n,e,i,t){let o,r;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{let c=await e.Search.suggest(t.value);c&&c.length>0&&l(c[0]?.suggestion)},100))});function l(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return{renderSearch(s,c){if(s.places.length===0&&s.enterpriseCategories?.length===0&&s.enterpriseLocations?.length===0){i.textContent="No results found.";return}r=Le(i,s,n,c)},close(){r.destroy()}}}function Le(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,G.dropdownContainer);let r=document.createElement("ul");r.className="options-list",Object.assign(r.style,G.optionsList),r.style.display="block";let l=[],s=(p,h)=>{if(h&&h.length>0){let g=document.createElement("li");g.textContent=p,Object.assign(g.style,G.sectionHeader),r.appendChild(g),h.forEach((m,y)=>{let u=document.createElement("li");u.textContent=`${"name"in m.item?m.item.name:""} (${m.type})`,Object.assign(u.style,G.option),u.tabIndex=0,u.addEventListener("focus",()=>{f(l.indexOf(u))}),u.addEventListener("mouseover",()=>{u.style.backgroundColor="#f0f0f0"}),u.addEventListener("mouseout",()=>{u.style.backgroundColor=""}),u.addEventListener("click",()=>{}),u.setAttribute("data-type",p),u.setAttribute("data-index",y.toString()),r.appendChild(u),l.push(u)})}};s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(r),n.appendChild(o);let c=[],f=p=>{c.forEach(u=>u()),c=[],l.forEach((u,b)=>{b===p?u.style.backgroundColor="#e0e0e0":u.style.backgroundColor=""});let h=l[p],g=h.getAttribute("data-type"),m=parseInt(h.getAttribute("data-index")||"0",10);if(!g)return;let{item:y}=e[g.toLowerCase()][m];t.publish("highlight",y)},d=p=>{!o.contains(p.target)&&p.target!==n&&a()};document.addEventListener("click",d);let a=()=>{n.innerHTML="",document.removeEventListener("click",d)};return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}var G={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function oe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=ne(n,e,i);o.on("highlight",d=>{if(d){t.forEach(p=>p()),t=[];let a=d instanceof $?d.spaces[0]:d;if(n.Camera.focusOn(d),a&&!O.is(a))return;t.push(H.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let r=i.addFolder("Click \u{1F447}").close(),{sub:l}=$e(n,r);l.on("click",d=>{t.forEach(a=>a()),t=[],d.spaces?.[0]&&(t=[H.highlightCard(n,d.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Se(n,s),f;c.on("hover",d=>{d.spaces?.[0]?(f?.(),t.length===0&&(f=H.highlightCard(n,d.spaces[0]))):(f?.(),f=void 0)})}function $e(n,e){let i=new S,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),r=[];function l(){r.forEach(c=>c()),r.length=0}let s=0;return n.on("click",c=>{let{labels:f,coordinate:d}=c;l(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([d.longitude,d.latitude]));let a=f?.[0];if(a!=null){let h=T(n,a,e);if(!h)return;r.push(h.destroy),h.labelItemFolder.openAnimated()}let p=c.spaces?.[0]??c.objects?.[0];if(p){let h={...p,...n.getState(p),isInView:!1,isInViewCheck:U(n,p.id)},{cleanup:g}=B(n,h,e);s=setInterval(()=>{h.isInView=n.isInView(a||p)},500),r.push(g)}}),{sub:i}}function Se(n,e){let i=new S;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let r=[];function l(){r.forEach(s=>s()),r.length=0}return n.on("hover",s=>{let{coordinate:c,spaces:f,objects:d,markers:a,labels:p}=s;l(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let h=f?.[0]??d?.[0]??a?.[0]??p?.[0];if(!h)return;let g=n.getState(h);g&&(t.type=g.type,t.id=h.id)}),{sub:i}}function U(n,e){return function(){console.log("isInView",n.isInView(e))}}function re(n,e,i){let t={labels:{},all(){i.Labels.__EXPERIMENTAL__all().forEach(h=>{this.labels[h.id]=h}),c()},removeAllLabels(){i.Labels.removeAll().forEach(h=>{delete this.labels[h.id]}),c()}},{addLabel:o,destroy:r}=Fe(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let l=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.labels[m.id],s.get(m.id)?.destroy()}function h(m){let y=T(i,m,l,{onRemove:b=>{p(b)}});if(!y)return;let{labelItemFolder:u}=y;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("Label");for(let m in t.labels){let y=t.labels[m];h(y)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({labels:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.labels[h.id]=h;c()}return{populatelabels:a,destroy(){r()}}}function Ie(n,e,i,t,o){let{interactive:r,enabled:l,rank:s,anchor:c,dynamicResize:f,zIndex:d,contentHTML:a,lowPriorityPin:p}=t;if(r==null||l==null)throw new Error("incomplete marker state");let h={interactive:r,enabled:l,rank:s||"medium",anchor:Array.isArray(c)?c.join(", "):c||"center",dynamicResize:f||!1,zIndex:d||0,contentHTML:a||"",lowPriorityPin:{enabled:p?.enabled??!0,size:p?.size??8,color:E(p?.color??"#666")},remove(){n.Markers.remove(e),o?.(e),i.destroy()},isInView:U(n,e.id)};i.onChange(m=>{let y={interactive:h.interactive,enabled:h.enabled,rank:h.rank,dynamicResize:h.dynamicResize,contentHTML:h.contentHTML,lowPriorityPin:{enabled:h.lowPriorityPin.enabled,size:h.lowPriorityPin.size,color:h.lowPriorityPin.color}};h.rank==="always-visible"&&(y.zIndex=h.zIndex),n.updateState(e,y)}),i.add(h,"interactive"),i.add(h,"enabled"),i.add(h,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(h,"anchor").name("anchor (read-only)").disable(),i.add(h,"dynamicResize").name("dynamic resize"),h.rank==="always-visible"&&i.add(h,"zIndex",0,1e3,1).name("z-index"),i.add(h,"contentHTML").name("content HTML");let g=i.addFolder("Low Priority Pin");g.add(h.lowPriorityPin,"enabled"),g.add(h.lowPriorityPin,"size",1,20,1),g.addColor(h.lowPriorityPin,"color"),g.close(),i.add(h,"isInView"),i.add(h,"remove")}function De(n,e,i,t,o){let{appearance:r,interactive:l}=t;if(!r||r.margin==null||l==null)throw new Error("incomplte label state");let s={text:e.text,interactive:l,appearance:{...r,margin:r.margin||0,pinColor:r.pinColor?E(r.pinColor):"black",textColor:r.textColor?E(r.textColor):"black"},remove(){n.Labels.remove(e),o?.(e),i.destroy()},isInView:U(n,e.id)};i.onChange(c=>{n.updateState(e,{appearance:s.appearance,interactive:s.interactive})}),i.add(s.appearance,"margin",0,20).name("margin"),i.add(s,"text"),i.add(s,"interactive"),i.addColor(s.appearance,"pinColor").name("pin color"),i.addColor(s.appearance,"pinOutlineColor").name("pin outline color"),i.addColor(s.appearance,"textColor").name("text color"),i.addColor(s.appearance,"textOutlineColor").name("text outline color"),i.add(s,"isInView"),i.add(s,"remove")}function T(n,e,i,{onRemove:t}={}){let o=n.getState(e);if(!o)throw new Error(`error getting state for entity: ${e.id}`);let r=o.type===N?e.text?.substring(0,12)||"Label":`Marker ${e.id.toString().substring(0,8)}`,l=i.addFolder(r);if(l.close(),o.type===N)De(n,e,l,o,t);else if(o.type===ee)Ie(n,e,l,o,t);else throw new Error(`unsupported entity type: ${o.type}`);return{labelItemFolder:l,destroy(){l.destroy()}}}function Fe(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:6,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,pinColor:t.marginForegroundColor,pinOutlineColor:t.marginBackgroundColor,textColor:t.textForegroundColor,textOutlineColor:t.textBackgroundColor},interactive:t.interactive})}}}var se={};v();function ae(n,e,i){let t=n.addFolder("Camera \u{1F4F7}"),o=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.container.appendChild(r);let l=()=>e.getDimensions(),[s,c,f,d]=i?.padding??[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],a={center_lat:o.latitude,center_lon:o.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:i?.padding?"pixel":e.Camera.screenOffsets.type,inset_top:s,inset_left:d,inset_right:c,inset_bottom:f,animateOnLoad:!0,visualizeInset:!!(s||c||f||d),"Focus on click":i?.focusOnClick??!1,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function p(){a.inset_type=e.Camera.screenOffsets.type,a.inset_left=e.Camera.screenOffsets.left,a.inset_top=e.Camera.screenOffsets.top,a.inset_right=e.Camera.screenOffsets.right,a.inset_bottom=e.Camera.screenOffsets.bottom;let{width:x,height:k}=l();a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*x+"px",top:a.inset_top*k+"px",bottom:a.inset_bottom*k+"px",right:a.inset_right*x+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange(q),q(a.visualizeInset);let h,g,m,y;function u(){let{width:x,height:k}=l(),R=e.Camera.screenOffsets.type,j=a.inset_type;R!==j&&(j==="portion"&&R==="pixel"?(a.inset_top=x>0?Math.min(a.inset_top/k,1):0,a.inset_bottom=x>0?Math.min(a.inset_bottom/k,1):0,a.inset_left=k>0?Math.min(a.inset_left/x,1):0,a.inset_right=k>0?Math.min(a.inset_right/x,1):0):j==="pixel"&&R==="portion"&&(a.inset_top=Math.round(a.inset_top*k),a.inset_bottom=Math.round(a.inset_bottom*k),a.inset_left=Math.round(a.inset_left*x),a.inset_right=Math.round(a.inset_right*x))),h&&h.destroy(),g&&g.destroy(),m&&m.destroy(),y&&y.destroy(),a.inset_type==="portion"?(h=t.add(a,"inset_top",0,1,.01).onChange(_),g=t.add(a,"inset_bottom",0,1,.01).onChange(_),m=t.add(a,"inset_left",0,1,.01).onChange(_),y=t.add(a,"inset_right",0,1,.01).onChange(_)):(h=t.add(a,"inset_top",0,k,1).onChange(_),g=t.add(a,"inset_bottom",0,k,1).onChange(_),m=t.add(a,"inset_left",0,x,1).onChange(_),y=t.add(a,"inset_right",0,x,1).onChange(_))}t.add(a,"inset_type",["pixel","portion"]).onChange(()=>{u(),_()}),u();let b=Oe(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"Focus on current floor");let C=x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)};e.on("camera-change",C);let L=[()=>{e.off("camera-change",C)}];function _(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),p()}(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&_();function q(x){p(),x?r.style.display="block":r.style.display="none"}return()=>({destroy(){t.destroy(),ie(L)}})}function Oe(n){return function(i){let{spaces:t,objects:o}=i,r=t?.[0]??o?.[0];r&&n.Camera.focusOn(r)}}v();function le(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(h=>{delete this.markers[h.id]}),c()}},{addMarker:o,destroy:r}=Pe(n,i);n.add(t,"removeAllMarkers");let l=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=f();function f(){function p(m){delete t.markers[m.id],s.get(m.id)?.destroy()}function h(m){let y=T(i,m,l,{onRemove:b=>{p(b)}});if(!y)return;let{labelItemFolder:u}=y;s.set(m.id,u)}function g(){l.destroy(),l=n.addFolder("marker");for(let m in t.markers){let y=t.markers[m];h(y)}}return{rerender:g,add:h,remove:p}}n.domElement.classList.add("list-items");let d;i.on("click",({markers:p,coordinate:h})=>{if(!n._closed)if(p?.[0]){d?.close();let g=s.get(p[0].id);if(n.open(),!g)return;g?.open(),g?.domElement.scrollIntoView({block:"start"}),g?.domElement.focus(),d=g}else o(h)});function a(p){for(let h of p)t.markers[h.id]=h;c()}return{populateMarkers:a,destroy(){r()}}}function Pe(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0,rank:"medium",anchor:"center",dynamicResize:!1,enabled:!0,zIndex:0,lowPriorityPin:{enabled:!0,size:8,color:"#666"},contentHTML:'<div style="padding: 8px; background: white; border: 2px solid #333; border-radius: 4px;">New Marker</div>'};i.add(t,"onClick"),i.add(t,"interactive"),i.add(t,"enabled"),i.add(t,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(t,"anchor",["center","top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]).name("anchor"),i.add(t,"dynamicResize").name("dynamic resize"),i.add(t,"zIndex",0,1e3,1).name("z-index (always-visible only)"),i.add(t,"contentHTML").name("content HTML");let o=i.addFolder("Low Priority Pin");return o.add(t.lowPriorityPin,"enabled"),o.add(t.lowPriorityPin,"size",1,20,1),o.addColor(t.lowPriorityPin,"color"),o.close(),{destroy(){i.destroy()},addMarker(r){if(i._closed||!t.onClick)return;let l={interactive:t.interactive,enabled:t.enabled,rank:t.rank,anchor:t.anchor,dynamicResize:t.dynamicResize,lowPriorityPin:{enabled:t.lowPriorityPin.enabled,size:t.lowPriorityPin.size,color:t.lowPriorityPin.color}};return t.rank==="always-visible"&&(l.zIndex=t.zIndex),e.Markers.add(r,t.contentHTML,l)}}}v();function de(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(l=>{e.updateState("exterior-walls",{visible:l})}),i.addColor(t,"topColor").onChange(l=>{e.updateState("exterior-walls",{topColor:l})}),i.addColor(t,"color").onChange(l=>{e.updateState("exterior-walls",{color:l})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{texture:{url:l}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(l=>{e.updateState("exterior-walls",{topTexture:{url:l}})}),e.updateState("exterior-walls",{topColor:t.topColor}),e.updateState("exterior-walls",{color:t.color})}v();function ce(n,e,i){n.close();let t={language:i.currentLanguage?.code??"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o?.languages.map(r=>r.code)).onChange(r=>{i.changeLanguage(r)})}v();function he(n,e,i){let t=n.addFolder("Debug");t.close();let o=e.Debug.state,r={showPolygonLabelTextAreaMesh:o.showPolygonLabelTextAreaMesh,showCollisionBoxes:o.showCollisionBoxes,showEnvMap:o.showEnvMap};t.add(r,"showPolygonLabelTextAreaMesh").onChange(l=>{e.Debug.update({showPolygonLabelTextAreaMesh:l})}).name("Show Flat Label Text Area Mesh"),t.add(r,"showCollisionBoxes").onChange(l=>{e.Debug.update({showCollisionBoxes:l})}).name("Show Collision Boxes"),t.add(r,"showEnvMap").onChange(l=>{e.Debug.update({showEnvMap:l})}).name("Show Environment Map"),e.Debug.update(r)}v();function ue(n,e,i){let t=n.addFolder("Text3D").close(),o={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(o,"all").name("Show All"),t.add(o,"removeAll").name("Remove All")}v();function pe(n,e,i){let t=n.addFolder("Directions \u{1F5FA}\uFE0F");t.close();let o=localStorage.getItem("directionsMethod"),r=localStorage.getItem("directionsRadius"),l=localStorage.getItem("directionsIncludeDoorBufferNodes")==="true",s={enabled:!1,method:o||"dp-optimal",radius:r?parseFloat(r):.75,includeDoorBufferNodes:l,startCoordinate:"",endCoordinate:"",pathInfo:""},c,f,d;t.add(s,"enabled").name("Enable Click-to-Route").onChange(m=>{m||(c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0))}),t.add(s,"startCoordinate").name("Start").disable().listen(),t.add(s,"endCoordinate").name("End").disable().listen(),t.add(s,"method",{"Greedy LOS":"greedy-los",RDP:"rdp","DP Optimal":"dp-optimal"}).name("Smoothing Method").onChange(m=>{localStorage.setItem("directionsMethod",m),c&&f&&s.enabled&&h(c,f)}),t.add(s,"radius",.1,5,.1).name("Smoothing Radius").onChange(m=>{localStorage.setItem("directionsRadius",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"includeDoorBufferNodes").name("Door Buffers").onChange(m=>{localStorage.setItem("directionsIncludeDoorBufferNodes",String(m)),c&&f&&s.enabled&&h(c,f)}),t.add(s,"pathInfo").name("Path Info").disable().listen();let a={clear:()=>p()};t.add(a,"clear").name("Clear Path");function p(){c=void 0,f=void 0,s.startCoordinate="",s.endCoordinate="",s.pathInfo="",d&&(e.Paths.remove(d),d=void 0)}async function h(m,y){d&&(e.Paths.remove(d),d=void 0);try{let u=await e.getDirections(m,y,{smoothing:{enabled:!0,method:s.method,radius:s.radius,includeDoorBufferNodes:s.includeDoorBufferNodes}});if(u){d=e.Paths.add(u.coordinates,{interactive:!0,color:"green",width:1});let C=u.distance?.toFixed(2)||"N/A";s.pathInfo=`${u.coordinates.length} pts, ${C}m`}else s.pathInfo="No path found"}catch(u){s.pathInfo=`Error: ${u instanceof Error?u.message:"Unknown"}`}}let g=async m=>{if(s.enabled)if(c){let y=m.coordinate;f=y,s.endCoordinate=`${y.latitude.toFixed(6)}, ${y.longitude.toFixed(6)}`,s.pathInfo="Calculating...",await h(c,f),c=void 0,f=void 0}else{let y=m.coordinate;c=y,s.startCoordinate=`${y.latitude.toFixed(6)}, ${y.longitude.toFixed(6)}`,s.pathInfo="Click to set end..."}};return e.on("click",g),{destroy(){e.off("click",g),t.destroy()}}}v();function fe(n,e){let i=n.addFolder("Spaces Open To Below Visual Effect").close(),t=e.getGlobalState().multiFloorView,o={enabled:t.spacesOpenToBelowVisualEffectEnabled,darkenAmount:t.spacesOpenToBelowVisualEffectDarkenAmount,darkenUseDepth:t.spacesOpenToBelowVisualEffectDarkenUseDepth,desaturateAmount:t.spacesOpenToBelowVisualEffectDesaturateAmount,desaturateUseDepth:t.spacesOpenToBelowVisualEffectDesaturateUseDepth,washOutAmount:t.spacesOpenToBelowVisualEffectWashOutAmount,washOutUseDepth:t.spacesOpenToBelowVisualEffectWashOutUseDepth};function r(){e.updateGlobalState({multiFloorView:{spacesOpenToBelowVisualEffectEnabled:o.enabled,spacesOpenToBelowVisualEffectDarkenAmount:o.darkenAmount,spacesOpenToBelowVisualEffectDarkenUseDepth:o.darkenUseDepth,spacesOpenToBelowVisualEffectDesaturateAmount:o.desaturateAmount,spacesOpenToBelowVisualEffectDesaturateUseDepth:o.desaturateUseDepth,spacesOpenToBelowVisualEffectWashOutAmount:o.washOutAmount,spacesOpenToBelowVisualEffectWashOutUseDepth:o.washOutUseDepth}})}i.add(o,"enabled").name("Enabled").onChange(()=>r());let l=i.addFolder("Darken");l.add(o,"darkenAmount",0,1,.01).name("Amount").onChange(()=>r()),l.add(o,"darkenUseDepth").name("Use Depth").onChange(()=>r());let s=i.addFolder("Desaturate");s.add(o,"desaturateAmount",0,1,.01).name("Amount").onChange(()=>r()),s.add(o,"desaturateUseDepth").name("Use Depth").onChange(()=>r());let c=i.addFolder("Wash Out");c.add(o,"washOutAmount",0,1,.01).name("Amount").onChange(()=>r()),c.add(o,"washOutUseDepth").name("Use Depth").onChange(()=>r())}function me(n,e,i){ze();let t=new z({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),oe(e,n,t),ae(t,e,i?.camera);let o=t.addFolder("Levels").close(),r=t.addFolder("Scene Controls");r.close();let l=t.addFolder("Labels");ue(t,e,n);let s=t.addFolder("Markers");de(t,e);let c=t.addFolder("misc");he(t,e,n),fe(t,e),pe(t,e,n),ce(c,e,n);let f={level:e.currentFloor.id},{populatelabels:d}=re(l,n,e),{populateMarkers:a}=le(s,n,e),p=n.getByType("floor").reduce((g,m)=>(g[m.name]=m.id,g),{}),h=o.add(f,"level",p).onChange(g=>{e.setFloor(g),f.level=e.currentFloor.id,h.updateDisplay()});return e.on("floor-change-start",g=>{o.controllers[0].setValue(g.floor.id)}),n.getByType("space").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),n.getByType("object").forEach(g=>{e.updateState(g,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:d,sceneFolder:r,populateMarkers:a}}var ge="mappedin-sdk-debug-css";function ze(){if(document.getElementById(ge))return;let n=document.createElement("style");n.id=ge,n.textContent=se,document.head.appendChild(n)}var Q=class{_enabled=!1;mv;api;mapData;storeStateToLocalStorageEnabled=!1;constructor(e,i){this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=me(this.mapData,this.mv,e),t=!1;i.onOpenClose(async o=>{if(!(o!==i||o._closed||t)){t=!0,[...i.children].forEach(r=>r.destroy());try{let{mountSceneGraphVisualizer:r}=await import("./src-LANFAOHL.js");r(this.api.core,i)}catch{}finally{i.open(),t=!1}}}),this.api.getMapDataInternal()?.spaces.forEach(o=>{this.mv.updateState(o,{interactive:!0})})}get enabled(){return this._enabled}};export{Q as Inspector};