@mapxus/mapxus-map-jp 8.0.0 → 8.2.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/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("axios")):"function"==typeof define&&define.amd?define(["axios"],e):"object"==typeof exports?exports.MapxusMap=e(require("axios")):t.MapxusMap=e(t.axios)}(self,(t=>(()=>{"use strict";var e={742:e=>{e.exports=t}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r,o,s,a,l,u,c={};function d(t){return t.layers.filter(h)}function h(t){return t.source===_}function p(t){return t.source!==_}n.r(c),n.d(c,{BuildingFilterControl:()=>Bs,BuildingSelectorHandler:()=>Gs,BuildingsService:()=>Io,DistanceSearchType:()=>a,FloorSelectorHandler:()=>Ys,FloorSwitchMode:()=>r,FloorsControl:()=>Es,Indoor:()=>vs,Map:()=>Xs,Marker:()=>Us,OFFSET:()=>Cr,PAGE:()=>Mr,Poi:()=>bs,PoisOrderBy:()=>l,PoisService:()=>ko,PresetLanguage:()=>o,RoutePainter:()=>ca,RouteService:()=>Mo,SwitchBuildingHandler:()=>Zs,SwitchOutdoorHandler:()=>zs,ThemeType:()=>s,VERSION:()=>Pr.rE,VehicleType:()=>u,VenuesService:()=>Lo,convertBrowserLangToPresetLang:()=>Fr,getIdentifier:()=>Er}),function(t){t[t.SWITCHED_BY_BUILDING=0]="SWITCHED_BY_BUILDING",t[t.SWITCHED_BY_VENUE=1]="SWITCHED_BY_VENUE"}(r||(r={})),function(t){t.ENGLISH="en",t.CHINESE_SIMPLIFIED="zh-Hans",t.CHINESE_TRADITIONAL="zh-Hant",t.JAPANESE="ja",t.KOREAN="ko",t.FILIPINO="fil",t.INDONESIAN="id",t.PORTUGUESE="pt",t.THAI="th",t.VIETNAMESE="vi",t.ARABIC="ar"}(o||(o={})),function(t){t.CHRISTMAS="christmas",t.HALLOWEEN="halloween",t.MAPPY_BEE="mappyBee",t.MAPXUS="mapxus",t.LANDS_D="landsD",t.COMMON="common",t.MAPXUS_V2="mapxus_v2"}(s||(s={})),function(t){t.POINT="Point",t.POLYGON="Polygon",t.GATE="Gate"}(a||(a={})),function(t){t.DEFAULT_NAME="DefaultName"}(l||(l={})),function(t){t.FOOT="foot",t.WHEELCHAIR="wheelchair",t.ESCALATOR="escalator",t.EMERGENCY="emergency"}(u||(u={}));const _="indoor-planet";const f="object"==typeof global&&global&&global.Object===Object&&global;var g="object"==typeof self&&self&&self.Object===Object&&self;const m=f||g||Function("return this")();const y=m.Symbol;var v=Object.prototype,b=v.hasOwnProperty,w=v.toString,S=y?y.toStringTag:void 0;const L=function(t){var e=b.call(t,S),i=t[S];try{t[S]=void 0;var n=!0}catch(t){}var r=w.call(t);return n&&(e?t[S]=i:delete t[S]),r};var B=Object.prototype.toString;const I=function(t){return B.call(t)};var x=y?y.toStringTag:void 0;const k=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?L(t):I(t)};const C=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const M=function(t){if(!C(t))return!1;var e=k(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const P=m["__core-js_shared__"];var F,E=(F=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"";const j=function(t){return!!E&&E in t};var O=Function.prototype.toString;const $=function(t){if(null!=t){try{return O.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var V=/^\[object .+?Constructor\]$/,A=Function.prototype,R=Object.prototype,T=A.toString,N=R.hasOwnProperty,H=RegExp("^"+T.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const D=function(t){return!(!C(t)||j(t))&&(M(t)?H:V).test($(t))};const W=function(t,e){return null==t?void 0:t[e]};const z=function(t,e){var i=W(t,e);return D(i)?i:void 0};const Z=function(){try{var t=z(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const G=function(t,e,i){"__proto__"==e&&Z?Z(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i};const Y=function(t){return function(e,i,n){for(var r=-1,o=Object(e),s=n(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===i(o[l],l,o))break}return e}};const X=Y();const J=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n};const U=function(t){return null!=t&&"object"==typeof t};const q=function(t){return U(t)&&"[object Arguments]"==k(t)};var Q=Object.prototype,K=Q.hasOwnProperty,tt=Q.propertyIsEnumerable;const et=q(function(){return arguments}())?q:function(t){return U(t)&&K.call(t,"callee")&&!tt.call(t,"callee")};const it=Array.isArray;const nt=function(){return!1};var rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,ot=rt&&"object"==typeof module&&module&&!module.nodeType&&module,st=ot&&ot.exports===rt?m.Buffer:void 0;const at=(st?st.isBuffer:void 0)||nt;var lt=/^(?:0|[1-9]\d*)$/;const ut=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&lt.test(t))&&t>-1&&t%1==0&&t<e};const ct=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var dt={};dt["[object Float32Array]"]=dt["[object Float64Array]"]=dt["[object Int8Array]"]=dt["[object Int16Array]"]=dt["[object Int32Array]"]=dt["[object Uint8Array]"]=dt["[object Uint8ClampedArray]"]=dt["[object Uint16Array]"]=dt["[object Uint32Array]"]=!0,dt["[object Arguments]"]=dt["[object Array]"]=dt["[object ArrayBuffer]"]=dt["[object Boolean]"]=dt["[object DataView]"]=dt["[object Date]"]=dt["[object Error]"]=dt["[object Function]"]=dt["[object Map]"]=dt["[object Number]"]=dt["[object Object]"]=dt["[object RegExp]"]=dt["[object Set]"]=dt["[object String]"]=dt["[object WeakMap]"]=!1;const ht=function(t){return U(t)&&ct(t.length)&&!!dt[k(t)]};const pt=function(t){return function(e){return t(e)}};var _t="object"==typeof exports&&exports&&!exports.nodeType&&exports,ft=_t&&"object"==typeof module&&module&&!module.nodeType&&module,gt=ft&&ft.exports===_t&&f.process,mt=function(){try{var t=ft&&ft.require&&ft.require("util").types;return t||gt&&gt.binding&&gt.binding("util")}catch(t){}}();var yt=mt&&mt.isTypedArray;const vt=yt?pt(yt):ht;var bt=Object.prototype.hasOwnProperty;const wt=function(t,e){var i=it(t),n=!i&&et(t),r=!i&&!n&&at(t),o=!i&&!n&&!r&&vt(t),s=i||n||r||o,a=s?J(t.length,String):[],l=a.length;for(var u in t)!e&&!bt.call(t,u)||s&&("length"==u||r&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ut(u,l))||a.push(u);return a};var St=Object.prototype;const Lt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||St)};const Bt=function(t,e){return function(i){return t(e(i))}};const It=Bt(Object.keys,Object);var xt=Object.prototype.hasOwnProperty;const kt=function(t){if(!Lt(t))return It(t);var e=[];for(var i in Object(t))xt.call(t,i)&&"constructor"!=i&&e.push(i);return e};const Ct=function(t){return null!=t&&ct(t.length)&&!M(t)};const Mt=function(t){return Ct(t)?wt(t):kt(t)};const Pt=function(t,e){return t&&X(t,e,Mt)};const Ft=function(){this.__data__=[],this.size=0};const Et=function(t,e){return t===e||t!=t&&e!=e};const jt=function(t,e){for(var i=t.length;i--;)if(Et(t[i][0],e))return i;return-1};var Ot=Array.prototype.splice;const $t=function(t){var e=this.__data__,i=jt(e,t);return!(i<0)&&(i==e.length-1?e.pop():Ot.call(e,i,1),--this.size,!0)};const Vt=function(t){var e=this.__data__,i=jt(e,t);return i<0?void 0:e[i][1]};const At=function(t){return jt(this.__data__,t)>-1};const Rt=function(t,e){var i=this.__data__,n=jt(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this};function Tt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}Tt.prototype.clear=Ft,Tt.prototype.delete=$t,Tt.prototype.get=Vt,Tt.prototype.has=At,Tt.prototype.set=Rt;const Nt=Tt;const Ht=function(){this.__data__=new Nt,this.size=0};const Dt=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i};const Wt=function(t){return this.__data__.get(t)};const zt=function(t){return this.__data__.has(t)};const Zt=z(m,"Map");const Gt=z(Object,"create");const Yt=function(){this.__data__=Gt?Gt(null):{},this.size=0};const Xt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var Jt=Object.prototype.hasOwnProperty;const Ut=function(t){var e=this.__data__;if(Gt){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return Jt.call(e,t)?e[t]:void 0};var qt=Object.prototype.hasOwnProperty;const Qt=function(t){var e=this.__data__;return Gt?void 0!==e[t]:qt.call(e,t)};const Kt=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Gt&&void 0===e?"__lodash_hash_undefined__":e,this};function te(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}te.prototype.clear=Yt,te.prototype.delete=Xt,te.prototype.get=Ut,te.prototype.has=Qt,te.prototype.set=Kt;const ee=te;const ie=function(){this.size=0,this.__data__={hash:new ee,map:new(Zt||Nt),string:new ee}};const ne=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const re=function(t,e){var i=t.__data__;return ne(e)?i["string"==typeof e?"string":"hash"]:i.map};const oe=function(t){var e=re(this,t).delete(t);return this.size-=e?1:0,e};const se=function(t){return re(this,t).get(t)};const ae=function(t){return re(this,t).has(t)};const le=function(t,e){var i=re(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this};function ue(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}ue.prototype.clear=ie,ue.prototype.delete=oe,ue.prototype.get=se,ue.prototype.has=ae,ue.prototype.set=le;const ce=ue;const de=function(t,e){var i=this.__data__;if(i instanceof Nt){var n=i.__data__;if(!Zt||n.length<199)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new ce(n)}return i.set(t,e),this.size=i.size,this};function he(t){var e=this.__data__=new Nt(t);this.size=e.size}he.prototype.clear=Ht,he.prototype.delete=Dt,he.prototype.get=Wt,he.prototype.has=zt,he.prototype.set=de;const pe=he;const _e=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const fe=function(t){return this.__data__.has(t)};function ge(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new ce;++e<i;)this.add(t[e])}ge.prototype.add=ge.prototype.push=_e,ge.prototype.has=fe;const me=ge;const ye=function(t,e){for(var i=-1,n=null==t?0:t.length;++i<n;)if(e(t[i],i,t))return!0;return!1};const ve=function(t,e){return t.has(e)};const be=function(t,e,i,n,r,o){var s=1&i,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,p=2&i?new me:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var _=t[d],f=e[d];if(n)var g=s?n(f,_,d,e,t,o):n(_,f,d,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!ye(e,(function(t,e){if(!ve(p,e)&&(_===t||r(_,t,i,n,o)))return p.push(e)}))){h=!1;break}}else if(_!==f&&!r(_,f,i,n,o)){h=!1;break}}return o.delete(t),o.delete(e),h};const we=m.Uint8Array;const Se=function(t){var e=-1,i=Array(t.size);return t.forEach((function(t,n){i[++e]=[n,t]})),i};const Le=function(t){var e=-1,i=Array(t.size);return t.forEach((function(t){i[++e]=t})),i};var Be=y?y.prototype:void 0,Ie=Be?Be.valueOf:void 0;const xe=function(t,e,i,n,r,o,s){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Et(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Se;case"[object Set]":var l=1&n;if(a||(a=Le),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;n|=2,s.set(t,e);var c=be(a(t),a(e),n,r,o,s);return s.delete(t),c;case"[object Symbol]":if(Ie)return Ie.call(t)==Ie.call(e)}return!1};const ke=function(t,e){for(var i=-1,n=e.length,r=t.length;++i<n;)t[r+i]=e[i];return t};const Ce=function(t,e,i){var n=e(t);return it(t)?n:ke(n,i(t))};const Me=function(t,e){for(var i=-1,n=null==t?0:t.length,r=0,o=[];++i<n;){var s=t[i];e(s,i,t)&&(o[r++]=s)}return o};const Pe=function(){return[]};var Fe=Object.prototype.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols;const je=Ee?function(t){return null==t?[]:(t=Object(t),Me(Ee(t),(function(e){return Fe.call(t,e)})))}:Pe;const Oe=function(t){return Ce(t,Mt,je)};var $e=Object.prototype.hasOwnProperty;const Ve=function(t,e,i,n,r,o){var s=1&i,a=Oe(t),l=a.length;if(l!=Oe(e).length&&!s)return!1;for(var u=l;u--;){var c=a[u];if(!(s?c in e:$e.call(e,c)))return!1}var d=o.get(t),h=o.get(e);if(d&&h)return d==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var _=s;++u<l;){var f=t[c=a[u]],g=e[c];if(n)var m=s?n(g,f,c,e,t,o):n(f,g,c,t,e,o);if(!(void 0===m?f===g||r(f,g,i,n,o):m)){p=!1;break}_||(_="constructor"==c)}if(p&&!_){var y=t.constructor,v=e.constructor;y==v||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(t),o.delete(e),p};const Ae=z(m,"DataView");const Re=z(m,"Promise");const Te=z(m,"Set");const Ne=z(m,"WeakMap");var He="[object Map]",De="[object Promise]",We="[object Set]",ze="[object WeakMap]",Ze="[object DataView]",Ge=$(Ae),Ye=$(Zt),Xe=$(Re),Je=$(Te),Ue=$(Ne),qe=k;(Ae&&qe(new Ae(new ArrayBuffer(1)))!=Ze||Zt&&qe(new Zt)!=He||Re&&qe(Re.resolve())!=De||Te&&qe(new Te)!=We||Ne&&qe(new Ne)!=ze)&&(qe=function(t){var e=k(t),i="[object Object]"==e?t.constructor:void 0,n=i?$(i):"";if(n)switch(n){case Ge:return Ze;case Ye:return He;case Xe:return De;case Je:return We;case Ue:return ze}return e});const Qe=qe;var Ke="[object Arguments]",ti="[object Array]",ei="[object Object]",ii=Object.prototype.hasOwnProperty;const ni=function(t,e,i,n,r,o){var s=it(t),a=it(e),l=s?ti:Qe(t),u=a?ti:Qe(e),c=(l=l==Ke?ei:l)==ei,d=(u=u==Ke?ei:u)==ei,h=l==u;if(h&&at(t)){if(!at(e))return!1;s=!0,c=!1}if(h&&!c)return o||(o=new pe),s||vt(t)?be(t,e,i,n,r,o):xe(t,e,l,i,n,r,o);if(!(1&i)){var p=c&&ii.call(t,"__wrapped__"),_=d&&ii.call(e,"__wrapped__");if(p||_){var f=p?t.value():t,g=_?e.value():e;return o||(o=new pe),r(f,g,i,n,o)}}return!!h&&(o||(o=new pe),Ve(t,e,i,n,r,o))};const ri=function t(e,i,n,r,o){return e===i||(null==e||null==i||!U(e)&&!U(i)?e!=e&&i!=i:ni(e,i,n,r,t,o))};const oi=function(t,e,i,n){var r=i.length,o=r,s=!n;if(null==t)return!o;for(t=Object(t);r--;){var a=i[r];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<o;){var l=(a=i[r])[0],u=t[l],c=a[1];if(s&&a[2]){if(void 0===u&&!(l in t))return!1}else{var d=new pe;if(n)var h=n(u,c,l,t,e,d);if(!(void 0===h?ri(c,u,3,n,d):h))return!1}}return!0};const si=function(t){return t==t&&!C(t)};const ai=function(t){for(var e=Mt(t),i=e.length;i--;){var n=e[i],r=t[n];e[i]=[n,r,si(r)]}return e};const li=function(t,e){return function(i){return null!=i&&(i[t]===e&&(void 0!==e||t in Object(i)))}};const ui=function(t){var e=ai(t);return 1==e.length&&e[0][2]?li(e[0][0],e[0][1]):function(i){return i===t||oi(i,t,e)}};const ci=function(t){return"symbol"==typeof t||U(t)&&"[object Symbol]"==k(t)};var di=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hi=/^\w*$/;const pi=function(t,e){if(it(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!ci(t))||(hi.test(t)||!di.test(t)||null!=e&&t in Object(e))};function _i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=e?e.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var s=t.apply(this,n);return i.cache=o.set(r,s)||o,s};return i.cache=new(_i.Cache||ce),i}_i.Cache=ce;const fi=_i;var gi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mi=/\\(\\)?/g;const yi=function(t){var e=fi(t,(function(t){return 500===i.size&&i.clear(),t})),i=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(gi,(function(t,i,n,r){e.push(n?r.replace(mi,"$1"):i||t)})),e}));const vi=function(t,e){for(var i=-1,n=null==t?0:t.length,r=Array(n);++i<n;)r[i]=e(t[i],i,t);return r};var bi=y?y.prototype:void 0,wi=bi?bi.toString:void 0;const Si=function t(e){if("string"==typeof e)return e;if(it(e))return vi(e,t)+"";if(ci(e))return wi?wi.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i};const Li=function(t){return null==t?"":Si(t)};const Bi=function(t,e){return it(t)?t:pi(t,e)?[t]:yi(Li(t))};const Ii=function(t){if("string"==typeof t||ci(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};const xi=function(t,e){for(var i=0,n=(e=Bi(e,t)).length;null!=t&&i<n;)t=t[Ii(e[i++])];return i&&i==n?t:void 0};const ki=function(t,e,i){var n=null==t?void 0:xi(t,e);return void 0===n?i:n};const Ci=function(t,e){return null!=t&&e in Object(t)};const Mi=function(t,e,i){for(var n=-1,r=(e=Bi(e,t)).length,o=!1;++n<r;){var s=Ii(e[n]);if(!(o=null!=t&&i(t,s)))break;t=t[s]}return o||++n!=r?o:!!(r=null==t?0:t.length)&&ct(r)&&ut(s,r)&&(it(t)||et(t))};const Pi=function(t,e){return null!=t&&Mi(t,e,Ci)};const Fi=function(t,e){return pi(t)&&si(e)?li(Ii(t),e):function(i){var n=ki(i,t);return void 0===n&&n===e?Pi(i,t):ri(e,n,3)}};const Ei=function(t){return t};const ji=function(t){return function(e){return null==e?void 0:e[t]}};const Oi=function(t){return function(e){return xi(e,t)}};const $i=function(t){return pi(t)?ji(Ii(t)):Oi(t)};const Vi=function(t){return"function"==typeof t?t:null==t?Ei:"object"==typeof t?it(t)?Fi(t[0],t[1]):ui(t):$i(t)};const Ai=function(t,e){var i={};return e=Vi(e,3),Pt(t,(function(t,n,r){G(i,e(t,n,r),t)})),i};const Ri=function(t,e,i,n){var r=-1,o=null==t?0:t.length;for(n&&o&&(i=t[++r]);++r<o;)i=e(i,t[r],r,t);return i};const Ti=function(t,e){return function(i,n){if(null==i)return i;if(!Ct(i))return t(i,n);for(var r=i.length,o=e?r:-1,s=Object(i);(e?o--:++o<r)&&!1!==n(s[o],o,s););return i}};const Ni=Ti(Pt);const Hi=function(t,e,i,n,r){return r(t,(function(t,r,o){i=n?(n=!1,t):e(i,t,r,o)})),i};const Di=function(t,e,i){var n=it(t)?Ri:Hi,r=arguments.length<3;return n(t,Vi(e,4),i,r,Ni)};function Wi(t){const{buildingId:e,labelCenter:{lat:i,lon:n},floors:r,name:o,venueId:s,defaultFloor:a}=t,l=Ai(o,((t,e)=>"default"===e?"name":`name:${e}`)),{codes:u,ids:c,ordinals:d}=r.reduce(((t,e)=>{const{id:i,code:n,ordinal:r}=e;return{codes:t.codes?`${t.codes},${n}`:n,ids:t.ids?`${t.ids},${i}`:i,ordinals:`${t.ordinals}`?`${t.ordinals},${r}`:`${r}`}}),{codes:"",ids:"",ordinals:""});return{layer:{id:"mapxus-building-line"},properties:{building:"yes",id:e,label_center:`${n},${i}`,level_ids:c,level_names:u,ordinals:d,"ref:venue":s,...l,...a?{default_displayed_floor:a}:{}},source:"indoor-planet",sourceLayer:"mapxus_building"}}function zi(t,e,i){i[t]&&-1!==i[t].indexOf(e)||(i[t]=i[t]||[],i[t].push(e))}function Zi(t,e,i){if(i&&i[t]){const n=i[t].indexOf(e);-1!==n&&i[t].splice(n,1)}}function Gi(t,...e){for(const i of e)for(const e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}class Yi{_type;_target;constructor(t,e={}){Gi(this,e),this.type=t}get type(){return this._type}set type(t){this._type=t}get target(){return this._target}set target(t){this._target=t}}class Xi extends Yi{error;constructor(t,e={}){super("error",Gi({error:t},e))}}class Ji{_listeners;_oneTimeListeners;_eventedParent;_eventedParentData;on(t,e){return this._listeners=this._listeners||{},zi(t,e,this._listeners),this}off(t,e){return Zi(t,e,this._listeners),Zi(t,e,this._oneTimeListeners),this}once(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},zi(t,e,this._oneTimeListeners),this}fire(t){"string"==typeof t&&(t=new Yi(t,arguments[1]||{}));const e=t.type;if(this.listens(e)){t.target=this;const i=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];for(const e of i)e.call(this,t);const n=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];for(const i of n)Zi(e,i,this._oneTimeListeners),i.call(this,t);const r=this._eventedParent;r&&(Gi(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),r.fire(t))}else t instanceof Xi&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}}var Ui=function(){return Ui=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},Ui.apply(this,arguments)};function qi(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))}function Qi(t,e){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function Ki(t,e,i){if(i||2===arguments.length)for(var n,r=0,o=e.length;r<o;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var tn="4.5.1";function en(t,e){return new Promise((function(i){return setTimeout(i,t,e)}))}function nn(t){return!!t&&"function"==typeof t.then}function rn(t,e){try{var i=t();nn(i)?i.then((function(t){return e(!0,t)}),(function(t){return e(!1,t)})):e(!0,i)}catch(t){e(!1,t)}}function on(t,e,i){return void 0===i&&(i=16),qi(this,void 0,void 0,(function(){var n,r,o,s;return Qi(this,(function(a){switch(a.label){case 0:n=Array(t.length),r=Date.now(),o=0,a.label=1;case 1:return o<t.length?(n[o]=e(t[o],o),(s=Date.now())>=r+i?(r=s,[4,new Promise((function(t){var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(null)}))]):[3,3]):[3,4];case 2:a.sent(),a.label=3;case 3:return++o,[3,1];case 4:return[2,n]}}))}))}function sn(t){return t.then(void 0,(function(){})),t}function an(t){return parseInt(t)}function ln(t){return parseFloat(t)}function un(t,e){return"number"==typeof t&&isNaN(t)?e:t}function cn(t){return t.reduce((function(t,e){return t+(e?1:0)}),0)}function dn(t,e){if(void 0===e&&(e=1),Math.abs(e)>=1)return Math.round(t/e)*e;var i=1/e;return Math.round(t*i)/i}function hn(t,e){var i=t[0]>>>16,n=65535&t[0],r=t[1]>>>16,o=65535&t[1],s=e[0]>>>16,a=65535&e[0],l=e[1]>>>16,u=0,c=0,d=0,h=0;d+=(h+=o+(65535&e[1]))>>>16,h&=65535,c+=(d+=r+l)>>>16,d&=65535,u+=(c+=n+a)>>>16,c&=65535,u+=i+s,u&=65535,t[0]=u<<16|c,t[1]=d<<16|h}function pn(t,e){var i=t[0]>>>16,n=65535&t[0],r=t[1]>>>16,o=65535&t[1],s=e[0]>>>16,a=65535&e[0],l=e[1]>>>16,u=65535&e[1],c=0,d=0,h=0,p=0;h+=(p+=o*u)>>>16,p&=65535,d+=(h+=r*u)>>>16,h&=65535,d+=(h+=o*l)>>>16,h&=65535,c+=(d+=n*u)>>>16,d&=65535,c+=(d+=r*l)>>>16,d&=65535,c+=(d+=o*a)>>>16,d&=65535,c+=i*u+n*l+r*a+o*s,c&=65535,t[0]=c<<16|d,t[1]=h<<16|p}function _n(t,e){var i=t[0];32===(e%=64)?(t[0]=t[1],t[1]=i):e<32?(t[0]=i<<e|t[1]>>>32-e,t[1]=t[1]<<e|i>>>32-e):(e-=32,t[0]=t[1]<<e|i>>>32-e,t[1]=i<<e|t[1]>>>32-e)}function fn(t,e){0!==(e%=64)&&(e<32?(t[0]=t[1]>>>32-e,t[1]=t[1]<<e):(t[0]=t[1]<<e-32,t[1]=0))}function gn(t,e){t[0]^=e[0],t[1]^=e[1]}var mn=[4283543511,3981806797],yn=[3301882366,444984403];function vn(t){var e=[0,t[0]>>>1];gn(t,e),pn(t,mn),e[1]=t[0]>>>1,gn(t,e),pn(t,yn),e[1]=t[0]>>>1,gn(t,e)}var bn=[2277735313,289559509],wn=[1291169091,658871167],Sn=[0,5],Ln=[0,1390208809],Bn=[0,944331445];function In(t,e){var i=function(t){for(var e=new Uint8Array(t.length),i=0;i<t.length;i++){var n=t.charCodeAt(i);if(n>127)return(new TextEncoder).encode(t);e[i]=n}return e}(t);e=e||0;var n,r=[0,i.length],o=r[1]%16,s=r[1]-o,a=[0,e],l=[0,e],u=[0,0],c=[0,0];for(n=0;n<s;n+=16)u[0]=i[n+4]|i[n+5]<<8|i[n+6]<<16|i[n+7]<<24,u[1]=i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24,c[0]=i[n+12]|i[n+13]<<8|i[n+14]<<16|i[n+15]<<24,c[1]=i[n+8]|i[n+9]<<8|i[n+10]<<16|i[n+11]<<24,pn(u,bn),_n(u,31),pn(u,wn),gn(a,u),_n(a,27),hn(a,l),pn(a,Sn),hn(a,Ln),pn(c,wn),_n(c,33),pn(c,bn),gn(l,c),_n(l,31),hn(l,a),pn(l,Sn),hn(l,Bn);u[0]=0,u[1]=0,c[0]=0,c[1]=0;var d=[0,0];switch(o){case 15:d[1]=i[n+14],fn(d,48),gn(c,d);case 14:d[1]=i[n+13],fn(d,40),gn(c,d);case 13:d[1]=i[n+12],fn(d,32),gn(c,d);case 12:d[1]=i[n+11],fn(d,24),gn(c,d);case 11:d[1]=i[n+10],fn(d,16),gn(c,d);case 10:d[1]=i[n+9],fn(d,8),gn(c,d);case 9:d[1]=i[n+8],gn(c,d),pn(c,wn),_n(c,33),pn(c,bn),gn(l,c);case 8:d[1]=i[n+7],fn(d,56),gn(u,d);case 7:d[1]=i[n+6],fn(d,48),gn(u,d);case 6:d[1]=i[n+5],fn(d,40),gn(u,d);case 5:d[1]=i[n+4],fn(d,32),gn(u,d);case 4:d[1]=i[n+3],fn(d,24),gn(u,d);case 3:d[1]=i[n+2],fn(d,16),gn(u,d);case 2:d[1]=i[n+1],fn(d,8),gn(u,d);case 1:d[1]=i[n],gn(u,d),pn(u,bn),_n(u,31),pn(u,wn),gn(a,u)}return gn(a,r),gn(l,r),hn(a,l),hn(l,a),vn(a),vn(l),hn(a,l),hn(l,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)}function xn(t){return"function"!=typeof t}function kn(t,e,i,n){var r=Object.keys(t).filter((function(t){return!function(t,e){for(var i=0,n=t.length;i<n;++i)if(t[i]===e)return!0;return!1}(i,t)})),o=sn(on(r,(function(i){return function(t,e){var i=sn(new Promise((function(i){var n=Date.now();rn(t.bind(null,e),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Date.now()-n;if(!t[0])return i((function(){return{error:t[1],duration:r}}));var o=t[1];if(xn(o))return i((function(){return{value:o,duration:r}}));i((function(){return new Promise((function(t){var e=Date.now();rn(o,(function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=r+Date.now()-e;if(!i[0])return t({error:i[1],duration:o});t({value:i[1],duration:o})}))}))}))}))})));return function(){return i.then((function(t){return t()}))}}(t[i],e)}),n));return function(){return qi(this,void 0,void 0,(function(){var t,e,i,s;return Qi(this,(function(a){switch(a.label){case 0:return[4,o];case 1:return[4,on(a.sent(),(function(t){return sn(t())}),n)];case 2:return t=a.sent(),[4,Promise.all(t)];case 3:for(e=a.sent(),i={},s=0;s<r.length;++s)i[r[s]]=e[s];return[2,i]}}))}))}}function Cn(){var t=window,e=navigator;return cn(["MSCSSMatrix"in t,"msSetImmediate"in t,"msIndexedDB"in t,"msMaxTouchPoints"in e,"msPointerEnabled"in e])>=4}function Mn(){var t=window,e=navigator;return cn(["webkitPersistentStorage"in e,"webkitTemporaryStorage"in e,0===e.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in t,"BatteryManager"in t,"webkitMediaStream"in t,"webkitSpeechGrammar"in t])>=5}function Pn(){var t=window;return cn(["ApplePayError"in t,"CSSPrimitiveValue"in t,"Counter"in t,0===navigator.vendor.indexOf("Apple"),"RGBColor"in t,"WebKitMediaKeys"in t])>=4}function Fn(){var t=window,e=t.HTMLElement,i=t.Document;return cn(["safari"in t,!("ongestureend"in t),!("TouchEvent"in t),!("orientation"in t),e&&!("autocapitalize"in e.prototype),i&&"pointerLockElement"in i.prototype])>=4}function En(){var t,e=window;return t=e.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(t))&&"[object WebPageNamespace]"===String(e.browser)}function jn(){var t,e,i=window;return cn(["buildID"in navigator,"MozAppearance"in(null!==(e=null===(t=document.documentElement)||void 0===t?void 0:t.style)&&void 0!==e?e:{}),"onmozfullscreenchange"in i,"mozInnerScreenX"in i,"CSSMozDocumentRule"in i,"CanvasCaptureMediaStream"in i])>=4}function On(){var t=window,e=navigator,i=t.CSS,n=t.HTMLButtonElement;return cn([!("getStorageUpdates"in e),n&&"popover"in n.prototype,"CSSCounterStyleRule"in t,i.supports("font-size-adjust: ex-height 0.5"),i.supports("text-transform: full-width")])>=4}function $n(){var t=document;return(t.exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t)}function Vn(){var t=Mn(),e=jn(),i=window,n=navigator,r="connection";return t?cn([!("SharedWorker"in i),n[r]&&"ontypechange"in n[r],!("sinkId"in new Audio)])>=2:!!e&&cn(["onorientationchange"in i,"orientation"in i,/android/i.test(n.appVersion)])>=2}function An(t){var e=new Error(t);return e.name=t,e}function Rn(t,e,i){var n,r,o;return void 0===i&&(i=50),qi(this,void 0,void 0,(function(){var s,a;return Qi(this,(function(l){switch(l.label){case 0:s=document,l.label=1;case 1:return s.body?[3,3]:[4,en(i)];case 2:return l.sent(),[3,1];case 3:a=s.createElement("iframe"),l.label=4;case 4:return l.trys.push([4,,10,11]),[4,new Promise((function(t,i){var n=!1,r=function(){n=!0,t()};a.onload=r,a.onerror=function(t){n=!0,i(t)};var o=a.style;o.setProperty("display","block","important"),o.position="absolute",o.top="0",o.left="0",o.visibility="hidden",e&&"srcdoc"in a?a.srcdoc=e:a.src="about:blank",s.body.appendChild(a);var l=function(){var t,e;n||("complete"===(null===(e=null===(t=a.contentWindow)||void 0===t?void 0:t.document)||void 0===e?void 0:e.readyState)?r():setTimeout(l,10))};l()}))];case 5:l.sent(),l.label=6;case 6:return(null===(r=null===(n=a.contentWindow)||void 0===n?void 0:n.document)||void 0===r?void 0:r.body)?[3,8]:[4,en(i)];case 7:return l.sent(),[3,6];case 8:return[4,t(a,a.contentWindow)];case 9:return[2,l.sent()];case 10:return null===(o=a.parentNode)||void 0===o||o.removeChild(a),[7];case 11:return[2]}}))}))}function Tn(t){for(var e=function(t){for(var e,i,n="Unexpected syntax '".concat(t,"'"),r=/^\s*([a-z-]*)(.*)$/i.exec(t),o=r[1]||void 0,s={},a=/([.:#][\w-]+|\[.+?\])/gi,l=function(t,e){s[t]=s[t]||[],s[t].push(e)};;){var u=a.exec(r[2]);if(!u)break;var c=u[0];switch(c[0]){case".":l("class",c.slice(1));break;case"#":l("id",c.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(c);if(!d)throw new Error(n);l(d[1],null!==(i=null!==(e=d[4])&&void 0!==e?e:d[5])&&void 0!==i?i:"");break;default:throw new Error(n)}}return[o,s]}(t),i=e[0],n=e[1],r=document.createElement(null!=i?i:"div"),o=0,s=Object.keys(n);o<s.length;o++){var a=s[o],l=n[a].join(" ");"style"===a?Nn(r.style,l):r.setAttribute(a,l)}return r}function Nn(t,e){for(var i=0,n=e.split(";");i<n.length;i++){var r=n[i],o=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(r);if(o){var s=o[1],a=o[2],l=o[4];t.setProperty(s,a,l||"")}}}var Hn=["monospace","sans-serif","serif"],Dn=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Wn(t){return t.toDataURL()}var zn,Zn;function Gn(){var t=this;return function(){if(void 0===Zn){var t=function(){var e=Yn();Xn(e)?Zn=setTimeout(t,2500):(zn=e,Zn=void 0)};t()}}(),function(){return qi(t,void 0,void 0,(function(){var t;return Qi(this,(function(e){switch(e.label){case 0:return Xn(t=Yn())?zn?[2,Ki([],zn,!0)]:(i=document).fullscreenElement||i.msFullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement?[4,$n()]:[3,2]:[3,2];case 1:e.sent(),t=Yn(),e.label=2;case 2:return Xn(t)||(zn=t),[2,t]}var i}))}))}}function Yn(){var t=screen;return[un(ln(t.availTop),null),un(ln(t.width)-ln(t.availWidth)-un(ln(t.availLeft),0),null),un(ln(t.height)-ln(t.availHeight)-un(ln(t.availTop),0),null),un(ln(t.availLeft),null)]}function Xn(t){for(var e=0;e<4;++e)if(t[e])return!1;return!0}function Jn(t){var e;return qi(this,void 0,void 0,(function(){var i,n,r,o,s,a,l;return Qi(this,(function(u){switch(u.label){case 0:for(i=document,n=i.createElement("div"),r=new Array(t.length),o={},Un(n),l=0;l<t.length;++l)"DIALOG"===(s=Tn(t[l])).tagName&&s.show(),Un(a=i.createElement("div")),a.appendChild(s),n.appendChild(a),r[l]=s;u.label=1;case 1:return i.body?[3,3]:[4,en(50)];case 2:return u.sent(),[3,1];case 3:i.body.appendChild(n);try{for(l=0;l<t.length;++l)r[l].offsetParent||(o[t[l]]=!0)}finally{null===(e=n.parentNode)||void 0===e||e.removeChild(n)}return[2,o]}}))}))}function Un(t){t.style.setProperty("visibility","hidden","important"),t.style.setProperty("display","block","important")}function qn(t){return matchMedia("(inverted-colors: ".concat(t,")")).matches}function Qn(t){return matchMedia("(forced-colors: ".concat(t,")")).matches}function Kn(t){return matchMedia("(prefers-contrast: ".concat(t,")")).matches}function tr(t){return matchMedia("(prefers-reduced-motion: ".concat(t,")")).matches}function er(t){return matchMedia("(prefers-reduced-transparency: ".concat(t,")")).matches}function ir(t){return matchMedia("(dynamic-range: ".concat(t,")")).matches}var nr=Math,rr=function(){return 0};var or={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var sr=function(){for(var t=window;;){var e=t.parent;if(!e||e===t)return!1;try{if(e.location.origin!==t.location.origin)return!0}catch(t){if(t instanceof Error&&"SecurityError"===t.name)return!0;throw t}t=e}};var ar=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),lr=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),ur=["FRAGMENT_SHADER","VERTEX_SHADER"],cr=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],dr="WEBGL_debug_renderer_info";function hr(t){if(t.webgl)return t.webgl.context;var e,i=document.createElement("canvas");i.addEventListener("webglCreateContextError",(function(){return e=void 0}));for(var n=0,r=["webgl","experimental-webgl"];n<r.length;n++){var o=r[n];try{e=i.getContext(o)}catch(t){}if(e)break}return t.webgl={context:e},e}function pr(t,e,i){var n=t.getShaderPrecisionFormat(t[e],t[i]);return n?[n.rangeMin,n.rangeMax,n.precision]:[]}function _r(t){return Object.keys(t.__proto__).filter(fr)}function fr(t){return"string"==typeof t&&!t.match(/[^A-Z0-9_x]/)}function gr(){return jn()}function mr(t){return"function"==typeof t.getParameter}var yr={fonts:function(){var t=this;return Rn((function(e,i){var n=i.document;return qi(t,void 0,void 0,(function(){var t,e,i,r,o,s,a,l,u,c,d;return Qi(this,(function(h){for((t=n.body).style.fontSize="48px",(e=n.createElement("div")).style.setProperty("visibility","hidden","important"),i={},r={},o=function(t){var i=n.createElement("span"),r=i.style;return r.position="absolute",r.top="0",r.left="0",r.fontFamily=t,i.textContent="mmMwWLliI0O&1",e.appendChild(i),i},s=function(t,e){return o("'".concat(t,"',").concat(e))},a=function(){for(var t={},e=function(e){t[e]=Hn.map((function(t){return s(e,t)}))},i=0,n=Dn;i<n.length;i++){e(n[i])}return t},l=function(t){return Hn.some((function(e,n){return t[n].offsetWidth!==i[e]||t[n].offsetHeight!==r[e]}))},u=function(){return Hn.map(o)}(),c=a(),t.appendChild(e),d=0;d<Hn.length;d++)i[Hn[d]]=u[d].offsetWidth,r[Hn[d]]=u[d].offsetHeight;return[2,Dn.filter((function(t){return l(c[t])}))]}))}))}))},domBlockers:function(t){var e=(void 0===t?{}:t).debug;return qi(this,void 0,void 0,(function(){var t,i,n,r,o;return Qi(this,(function(s){switch(s.label){case 0:return Pn()||Vn()?(a=atob,t={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',a("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",a("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",a("LnNwb25zb3JpdA=="),".ylamainos",a("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",a("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",a("LmhlYWRlci1ibG9ja2VkLWFk"),a("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",a("I2FkXzMwMFgyNTA="),a("I2Jhbm5lcmZsb2F0MjI="),a("I2NhbXBhaWduLWJhbm5lcg=="),a("I0FkLUNvbnRlbnQ=")],adGuardChinese:[a("LlppX2FkX2FfSA=="),a("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",a("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),a("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",a("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",a("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",a("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),a("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),a("LmFkZ29vZ2xl"),a("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[a("YW1wLWF1dG8tYWRz"),a("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",a("I2FkX2ludmlld19hcmVh")],adGuardRussian:[a("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),a("LnJlY2xhbWE="),'div[id^="smi2adblock"]',a("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[a("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),a("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",a("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),a("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),a("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",a("I3Jla2xhbWk="),a("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),a("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),a("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[a("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",a("LndpZGdldF9wb19hZHNfd2lkZ2V0"),a("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",a("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[a("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),a("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",a("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",a("I3Jla2xhbW5pLWJveA=="),a("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",a("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[a("I2FkdmVydGVudGll"),a("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",a("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",a("LnNwb25zb3JsaW5rZ3J1ZW4="),a("I3dlcmJ1bmdza3k="),a("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),a("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[a("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",a("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[a("LnJla2xhbW9zX3RhcnBhcw=="),a("LnJla2xhbW9zX251b3JvZG9z"),a("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),a("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),a("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[a("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[a("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),a("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",a("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[a("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),a("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),a("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",a("LmFkX19tYWlu"),a("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[a("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[a("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),a("I2xpdmVyZUFkV3JhcHBlcg=="),a("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),a("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[a("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",a("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),a("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),a("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[a("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),a("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),a("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",a("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),a("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),a("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),a("ZGl2I3NrYXBpZWNfYWQ=")],ro:[a("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),a("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[a("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),a("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),a("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",a("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),a("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",a("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},i=Object.keys(t),[4,Jn((o=[]).concat.apply(o,i.map((function(e){return t[e]}))))]):[2,void 0];case 1:return n=s.sent(),e&&function(t,e){for(var i="DOM blockers debug:\n```",n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];i+="\n".concat(o,":");for(var s=0,a=t[o];s<a.length;s++){var l=a[s];i+="\n ".concat(e[l]?"🚫":"➡️"," ").concat(l)}}console.log("".concat(i,"\n```"))}(t,n),(r=i.filter((function(e){var i=t[e];return cn(i.map((function(t){return n[t]})))>.6*i.length}))).sort(),[2,r]}var a}))}))},fontPreferences:function(){return function(t,e){void 0===e&&(e=4e3);return Rn((function(i,n){var r=n.document,o=r.body,s=o.style;s.width="".concat(e,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",Mn()?o.style.zoom="".concat(1/n.devicePixelRatio):Pn()&&(o.style.zoom="reset");var a=r.createElement("div");return a.textContent=Ki([],Array(e/20|0),!0).map((function(){return"word"})).join(" "),o.appendChild(a),t(r,o)}),'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((function(t,e){for(var i={},n={},r=0,o=Object.keys(or);r<o.length;r++){var s=o[r],a=or[s],l=a[0],u=void 0===l?{}:l,c=a[1],d=void 0===c?"mmMwWLliI0fiflO&1":c,h=t.createElement("span");h.textContent=d,h.style.whiteSpace="nowrap";for(var p=0,_=Object.keys(u);p<_.length;p++){var f=_[p],g=u[f];void 0!==g&&(h.style[f]=g)}i[s]=h,e.append(t.createElement("br"),h)}for(var m=0,y=Object.keys(or);m<y.length;m++){n[s=y[m]]=i[s].getBoundingClientRect().width}return n}))},audio:function(){return Pn()&&On()&&En()||Mn()&&(t=navigator,e=window,i=Audio.prototype,n=e.visualViewport,cn(["srLatency"in i,"srChannelCount"in i,"devicePosture"in t,n&&"segments"in n,"getTextInformation"in Image.prototype])>=3)&&function(){var t=window,e=t.URLPattern;return cn(["union"in Set.prototype,"Iterator"in t,e&&"hasRegExpGroups"in e.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}()?-4:function(){var t=window,e=t.OfflineAudioContext||t.webkitOfflineAudioContext;if(!e)return-2;if(Pn()&&!Fn()&&!function(){var t=window;return cn(["DOMRectList"in t,"RTCPeerConnectionIceEvent"in t,"SVGGeometryElement"in t,"ontransitioncancel"in t])>=3}())return-1;var i=4500,n=new e(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;var o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);var s=function(t){var e=3,i=500,n=500,r=5e3,o=function(){},s=new Promise((function(s,a){var l=!1,u=0,c=0;t.oncomplete=function(t){return s(t.renderedBuffer)};var d=function(){setTimeout((function(){return a(An("timeout"))}),Math.min(n,c+r-Date.now()))},h=function(){try{var n=t.startRendering();switch(nn(n)&&sn(n),t.state){case"running":c=Date.now(),l&&d();break;case"suspended":document.hidden||u++,l&&u>=e?a(An("suspended")):setTimeout(h,i)}}catch(t){a(t)}};h(),o=function(){l||(l=!0,c>0&&d())}}));return[s,o]}(n),a=s[0],l=s[1],u=sn(a.then((function(t){return function(t){for(var e=0,i=0;i<t.length;++i)e+=Math.abs(t[i]);return e}(t.getChannelData(0).subarray(i))}),(function(t){if("timeout"===t.name||"suspended"===t.name)return-3;throw t})));return function(){return l(),u}}();var t,e,i,n},screenFrame:function(){var t=this;if(Pn()&&On()&&En())return function(){return Promise.resolve(void 0)};var e=Gn();return function(){return qi(t,void 0,void 0,(function(){var t,i;return Qi(this,(function(n){switch(n.label){case 0:return[4,e()];case 1:return t=n.sent(),[2,[(i=function(t){return null===t?null:dn(t,10)})(t[0]),i(t[1]),i(t[2]),i(t[3])]]}}))}))}},canvas:function(){return function(t){var e,i,n,r=!1,o=function(){var t=document.createElement("canvas");return t.width=1,t.height=1,[t,t.getContext("2d")]}(),s=o[0],a=o[1];!function(t,e){return!(!e||!t.toDataURL)}(s,a)?i=n="unsupported":(r=function(t){return t.rect(0,0,10,10),t.rect(2,2,6,6),!t.isPointInPath(5,5,"evenodd")}(a),t?i=n="skipped":(e=function(t,e){!function(t,e){t.width=240,t.height=60,e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(100,1,62,20),e.fillStyle="#069",e.font='11pt "Times New Roman"';var i="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));e.fillText(i,2,15),e.fillStyle="rgba(102, 204, 0, 0.2)",e.font="18pt Arial",e.fillText(i,4,45)}(t,e);var i=Wn(t),n=Wn(t);if(i!==n)return["unstable","unstable"];!function(t,e){t.width=122,t.height=110,e.globalCompositeOperation="multiply";for(var i=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];i<n.length;i++){var r=n[i],o=r[0],s=r[1],a=r[2];e.fillStyle=o,e.beginPath(),e.arc(s,a,40,0,2*Math.PI,!0),e.closePath(),e.fill()}e.fillStyle="#f9c",e.arc(60,60,60,0,2*Math.PI,!0),e.arc(60,60,20,0,2*Math.PI,!0),e.fill("evenodd")}(t,e);var r=Wn(t);return[r,i]}(s,a),i=e[0],n=e[1]));return{winding:r,geometry:i,text:n}}(Pn()&&On()&&En())},osCpu:function(){return navigator.oscpu},languages:function(){var t,e=navigator,i=[],n=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(void 0!==n&&i.push([n]),Array.isArray(e.languages))Mn()&&cn([!("MediaSettingsRange"in(t=window)),"RTCEncodedAudioFrame"in t,""+t.Intl=="[object Intl]",""+t.Reflect=="[object Reflect]"])>=3||i.push(e.languages);else if("string"==typeof e.languages){var r=e.languages;r&&i.push(r.split(","))}return i},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return un(ln(navigator.deviceMemory),void 0)},screenResolution:function(){var t,e,i;if(!(Pn()&&On()&&En()))return t=screen,(i=[(e=function(t){return un(an(t),null)})(t.width),e(t.height)]).sort().reverse(),i},hardwareConcurrency:function(){return un(an(navigator.hardwareConcurrency),void 0)},timezone:function(){var t,e=null===(t=window.Intl)||void 0===t?void 0:t.DateTimeFormat;if(e){var i=(new e).resolvedOptions().timeZone;if(i)return i}var n,r=(n=(new Date).getFullYear(),-Math.max(ln(new Date(n,0,1).getTimezoneOffset()),ln(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(r>=0?"+":"").concat(r)},sessionStorage:function(){try{return!!window.sessionStorage}catch(t){return!0}},localStorage:function(){try{return!!window.localStorage}catch(t){return!0}},indexedDB:function(){var t,e;if(!(Cn()||(t=window,e=navigator,cn(["msWriteProfilerMark"in t,"MSStream"in t,"msLaunchUri"in e,"msSaveBlob"in e])>=3&&!Cn())))try{return!!window.indexedDB}catch(t){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var t=navigator.platform;return"MacIntel"===t&&Pn()&&!Fn()?function(){if("iPad"===navigator.platform)return!0;var t=screen,e=t.width/t.height;return cn(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,e>.65&&e<1.53])>=2}()?"iPad":"iPhone":t},plugins:function(){var t=navigator.plugins;if(t){for(var e=[],i=0;i<t.length;++i){var n=t[i];if(n){for(var r=[],o=0;o<n.length;++o){var s=n[o];r.push({type:s.type,suffixes:s.suffixes})}e.push({name:n.name,description:n.description,mimeTypes:r})}}return e}},touchSupport:function(){var t,e=navigator,i=0;void 0!==e.maxTouchPoints?i=an(e.maxTouchPoints):void 0!==e.msMaxTouchPoints&&(i=e.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(e){t=!1}return{maxTouchPoints:i,touchEvent:t,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var t=[],e=0,i=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];e<i.length;e++){var n=i[e],r=window[n];r&&"object"==typeof r&&t.push(n)}return t.sort()},cookiesEnabled:function(){var t=document;try{t.cookie="cookietest=1; SameSite=Strict;";var e=-1!==t.cookie.indexOf("cookietest=");return t.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(t){return!1}},colorGamut:function(){for(var t=0,e=["rec2020","p3","srgb"];t<e.length;t++){var i=e[t];if(matchMedia("(color-gamut: ".concat(i,")")).matches)return i}},invertedColors:function(){return!!qn("inverted")||!qn("none")&&void 0},forcedColors:function(){return!!Qn("active")||!Qn("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var t=0;t<=100;++t)if(matchMedia("(max-monochrome: ".concat(t,")")).matches)return t;throw new Error("Too high value")}},contrast:function(){return Kn("no-preference")?0:Kn("high")||Kn("more")?1:Kn("low")||Kn("less")?-1:Kn("forced")?10:void 0},reducedMotion:function(){return!!tr("reduce")||!tr("no-preference")&&void 0},reducedTransparency:function(){return!!er("reduce")||!er("no-preference")&&void 0},hdr:function(){return!!ir("high")||!ir("standard")&&void 0},math:function(){var t,e=nr.acos||rr,i=nr.acosh||rr,n=nr.asin||rr,r=nr.asinh||rr,o=nr.atanh||rr,s=nr.atan||rr,a=nr.sin||rr,l=nr.sinh||rr,u=nr.cos||rr,c=nr.cosh||rr,d=nr.tan||rr,h=nr.tanh||rr,p=nr.exp||rr,_=nr.expm1||rr,f=nr.log1p||rr;return{acos:e(.12312423423423424),acosh:i(1e308),acoshPf:(t=1e154,nr.log(t+nr.sqrt(t*t-1))),asin:n(.12312423423423424),asinh:r(1),asinhPf:function(t){return nr.log(t+nr.sqrt(t*t+1))}(1),atanh:o(.5),atanhPf:function(t){return nr.log((1+t)/(1-t))/2}(.5),atan:s(.5),sin:a(-1e300),sinh:l(1),sinhPf:function(t){return nr.exp(t)-1/nr.exp(t)/2}(1),cos:u(10.000000000123),cosh:c(1),coshPf:function(t){return(nr.exp(t)+1/nr.exp(t))/2}(1),tan:d(-1e300),tanh:h(1),tanhPf:function(t){return(nr.exp(2*t)-1)/(nr.exp(2*t)+1)}(1),exp:p(1),expm1:_(1),expm1Pf:function(t){return nr.exp(t)-1}(1),log1p:f(10),log1pPf:function(t){return nr.log(1+t)}(10),powPI:function(t){return nr.pow(nr.PI,t)}(-100)}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=1/0,t[0]=t[0]-t[0],e[3]},applePay:function(){var t=window.ApplePaySession;if("function"!=typeof(null==t?void 0:t.canMakePayments))return-1;if(sr())return-3;try{return t.canMakePayments()?1:0}catch(t){return function(t){if(t instanceof Error&&"InvalidAccessError"===t.name&&/\bfrom\b.*\binsecure\b/i.test(t.message))return-2;throw t}(t)}},privateClickMeasurement:function(){var t,e=document.createElement("a"),i=null!==(t=e.attributionSourceId)&&void 0!==t?t:e.attributionsourceid;return void 0===i?void 0:String(i)},audioBaseLatency:function(){var t;return Vn()||Pn()?window.AudioContext&&null!==(t=(new AudioContext).baseLatency)&&void 0!==t?t:-1:-2},webGlBasics:function(t){var e,i,n,r,o,s,a=hr(t.cache);if(!a)return-1;if(!mr(a))return-2;var l=gr()?null:a.getExtension(dr);return{version:(null===(e=a.getParameter(a.VERSION))||void 0===e?void 0:e.toString())||"",vendor:(null===(i=a.getParameter(a.VENDOR))||void 0===i?void 0:i.toString())||"",vendorUnmasked:l?null===(n=a.getParameter(l.UNMASKED_VENDOR_WEBGL))||void 0===n?void 0:n.toString():"",renderer:(null===(r=a.getParameter(a.RENDERER))||void 0===r?void 0:r.toString())||"",rendererUnmasked:l?null===(o=a.getParameter(l.UNMASKED_RENDERER_WEBGL))||void 0===o?void 0:o.toString():"",shadingLanguageVersion:(null===(s=a.getParameter(a.SHADING_LANGUAGE_VERSION))||void 0===s?void 0:s.toString())||""}},webGlExtensions:function(t){var e=hr(t.cache);if(!e)return-1;if(!mr(e))return-2;var i=e.getSupportedExtensions(),n=e.getContextAttributes(),r=[],o=[],s=[],a=[],l=[];if(n)for(var u=0,c=Object.keys(n);u<c.length;u++){var d=c[u];o.push("".concat(d,"=").concat(n[d]))}for(var h=0,p=_r(e);h<p.length;h++){var _=e[w=p[h]];s.push("".concat(w,"=").concat(_).concat(ar.has(_)?"=".concat(e.getParameter(_)):""))}if(i)for(var f=0,g=i;f<g.length;f++){var m=g[f];if(!(m===dr&&gr()||"WEBGL_polygon_mode"===m&&(Mn()||Pn()))){var y=e.getExtension(m);if(y)for(var v=0,b=_r(y);v<b.length;v++){var w;_=y[w=b[v]];a.push("".concat(w,"=").concat(_).concat(lr.has(_)?"=".concat(e.getParameter(_)):""))}else r.push(m)}}for(var S=0,L=ur;S<L.length;S++)for(var B=L[S],I=0,x=cr;I<x.length;I++){var k=x[I],C=pr(e,B,k);l.push("".concat(B,".").concat(k,"=").concat(C.join(",")))}return a.sort(),s.sort(),{contextAttributes:o,parameters:s,shaderPrecisions:l,extensions:i,extensionParameters:a,unsupportedExtensions:r}}};function vr(t){var e=function(t){if(Vn())return.4;if(Pn())return!Fn()||On()&&En()?.3:.5;var e="value"in t.platform?t.platform.value:"";if(/^Win/.test(e))return.6;if(/^Mac/.test(e))return.5;return.7}(t),i=function(t){return dn(.99+.01*t,1e-4)}(e);return{score:e,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(i))}}function br(t){return JSON.stringify(t,(function(t,e){return e instanceof Error?Ui({name:(i=e).name,message:i.message,stack:null===(n=i.stack)||void 0===n?void 0:n.split("\n")},i):e;var i,n}),2)}function wr(t){return In(function(t){for(var e="",i=0,n=Object.keys(t).sort();i<n.length;i++){var r=n[i],o=t[r],s="error"in o?"error":JSON.stringify(o.value);e+="".concat(e?"|":"").concat(r.replace(/([:|\\])/g,"\\$1"),":").concat(s)}return e}(t))}function Sr(t){return void 0===t&&(t=50),function(t,e){void 0===e&&(e=1/0);var i=window.requestIdleCallback;return i?new Promise((function(t){return i.call(window,(function(){return t()}),{timeout:e})})):en(Math.min(t,e))}(t,2*t)}function Lr(t,e){var i=Date.now();return{get:function(n){return qi(this,void 0,void 0,(function(){var r,o,s;return Qi(this,(function(a){switch(a.label){case 0:return r=Date.now(),[4,t()];case 1:return o=a.sent(),s=function(t){var e,i=vr(t);return{get visitorId(){return void 0===e&&(e=wr(this.components)),e},set visitorId(t){e=t},confidence:i,components:t,version:tn}}(o),(e||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(s.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(r-i,"\nvisitorId: ").concat(s.visitorId,"\ncomponents: ").concat(br(o),"\n```")),[2,s]}}))}))}}}var Br={load:function(t){var e;return void 0===t&&(t={}),qi(this,void 0,void 0,(function(){var i,n,r;return Qi(this,(function(o){switch(o.label){case 0:return(null===(e=t.monitoring)||void 0===e||e)&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var t=new XMLHttpRequest;t.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(tn,"/npm-monitoring"),!0),t.send()}catch(t){console.error(t)}}(),i=t.delayFallback,n=t.debug,[4,Sr(i)];case 1:return o.sent(),r=function(t){return kn(yr,t,[])}({cache:{},debug:n}),[2,Lr(r,n)]}}))}))},hashComponents:wr,componentsToDebugString:br},Ir=n(742),xr=n.n(Ir);const kr="https://map-api.mapxus.co.jp/bms",Cr=10,Mr=1,Pr={rE:"8.0.0"};function Fr(t){return function(t){return/^en(-(US|GB|AU))?$/.test(t)}(t)?o.ENGLISH:function(t){return/^zh(-(Hans|CN))?$/.test(t)}(t)?o.CHINESE_SIMPLIFIED:function(t){return/^zh-(Hant|HK|TW)$/.test(t)}(t)?o.CHINESE_TRADITIONAL:function(t){return/^ja(-JP)?$/.test(t)}(t)?o.JAPANESE:function(t){return/^ko(-KR)?$/.test(t)}(t)?o.KOREAN:function(t){return/^(fil|tl)(-PH)?$/.test(t)}(t)?o.FILIPINO:function(t){return/^id(-ID)?$/.test(t)}(t)?o.INDONESIAN:function(t){return/^pt(-(BR|PT))?$/.test(t)}(t)?o.PORTUGUESE:function(t){return/^th(-TH)?$/.test(t)}(t)?o.THAI:function(t){return/^vi(-VN)?$/.test(t)}(t)?o.VIETNAMESE:function(t){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(t)}(t)?o.ARABIC:null}async function Er(){return await Vr.getDeviceIdentifier()}let jr,Or;const $r=new Map;xr().interceptors.response.use(null,(async t=>{const{config:e,response:i}=t;if(401===i.status&&e){const i=e.url,n=($r.get(i)||1)+1;if(n>2)throw $r.delete(i),t;return $r.set(i,n),await Vr.verifyPermission(jr,Or),e.headers=Object.assign(e.headers,xr().defaults.headers.common),xr()(e)}throw t}));class Vr{static identifier;static async verifyPermission(t,e){jr=t,Or=e;const i=await Vr.getDeviceIdentifier();xr().defaults.headers.common={identifier:i,sdkVersion:Pr.rE,"Content-Type":"application/json"};const n=async()=>(await xr().post("https://map-api.mapxus.co.jp/sc/api/v1/apikeys/auth",{appId:t,secret:e,origin:window.location.hostname||"restriction.test.example.com",keyPlatform:"WEB"})).data.result.idToken,r=t=>{setTimeout((async()=>{delete xr().defaults.headers.common.token,xr().defaults.headers.common.token=await n(),r(t)}),t)},o=await n();xr().defaults.headers.common.token=o;const s=JSON.parse(decodeURIComponent(window.atob(o.split(".")[1]))),a=1e3*(s.exp-s.iat-60);r(a)}static async getDeviceIdentifier(){if(Vr.identifier)return Vr.identifier;const t=await Br.load(),e=await t.get();return Vr.identifier=e.visitorId,Vr.identifier}static transformRequest(t){return/.mapxus./.test(t)?{url:t,headers:xr().defaults.headers.common}:{url:t}}constructor(t){xr().defaults.baseURL=t??kr}get(t){return xr().get(t)}post(t,e){return xr().post(t,e)}}function Ar(t){const e=it(t),i=e&&!t.length||!e&&!t.trim().length;if(i)throw new Error("Parameter cannot be empty.");return i?null:e?t.filter((t=>!!t.trim())).map((t=>t.trim())).join(","):t.trim()}const Rr=function(t,e){var i=-1,n=Ct(t)?Array(t.length):[];return Ni(t,(function(t,r,o){n[++i]=e(t,r,o)})),n};const Tr=function(t,e){return(it(t)?vi:Rr)(t,Vi(e,3))};const Nr=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}};var Hr=Object.prototype.hasOwnProperty;const Dr=function(t,e,i){var n=t[e];Hr.call(t,e)&&Et(n,i)&&(void 0!==i||e in t)||G(t,e,i)};const Wr=function(t,e,i,n){if(!C(t))return t;for(var r=-1,o=(e=Bi(e,t)).length,s=o-1,a=t;null!=a&&++r<o;){var l=Ii(e[r]),u=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(r!=s){var c=a[l];void 0===(u=n?n(c,l,a):void 0)&&(u=C(c)?c:ut(e[r+1])?[]:{})}Dr(a,l,u),a=a[l]}return t};const zr=function(t,e,i){for(var n=-1,r=e.length,o={};++n<r;){var s=e[n],a=xi(t,s);i(a,s)&&Wr(o,Bi(s,t),a)}return o};const Zr=Bt(Object.getPrototypeOf,Object);const Gr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ke(e,je(t)),t=Zr(t);return e}:Pe;const Yr=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e};var Xr=Object.prototype.hasOwnProperty;const Jr=function(t){if(!C(t))return Yr(t);var e=Lt(t),i=[];for(var n in t)("constructor"!=n||!e&&Xr.call(t,n))&&i.push(n);return i};const Ur=function(t){return Ct(t)?wt(t,!0):Jr(t)};const qr=function(t){return Ce(t,Ur,Gr)};const Qr=function(t,e){if(null==t)return{};var i=vi(qr(t),(function(t){return[t]}));return e=Vi(e),zr(t,i,(function(t,i){return e(t,i[0])}))};const Kr=function(t,e){return Qr(t,Nr(Vi(e)))};const to=function(t,e,i,n){for(var r=t.length,o=i+(n?1:-1);n?o--:++o<r;)if(e(t[o],o,t))return o;return-1};const eo=function(t){return t!=t};const io=function(t,e,i){for(var n=i-1,r=t.length;++n<r;)if(t[n]===e)return n;return-1};const no=function(t,e,i){return e==e?io(t,e,i):to(t,eo,i)};const ro=function(t){return"string"==typeof t||!it(t)&&U(t)&&"[object String]"==k(t)};var oo=/\s/;const so=function(t){for(var e=t.length;e--&&oo.test(t.charAt(e)););return e};var ao=/^\s+/;const lo=function(t){return t?t.slice(0,so(t)+1).replace(ao,""):t};var uo=/^[-+]0x[0-9a-f]+$/i,co=/^0b[01]+$/i,ho=/^0o[0-7]+$/i,po=parseInt;const _o=function(t){if("number"==typeof t)return t;if(ci(t))return NaN;if(C(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=C(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=lo(t);var i=co.test(t);return i||ho.test(t)?po(t.slice(2),i?2:8):uo.test(t)?NaN:+t};var fo=1/0;const go=function(t){return t?(t=_o(t))===fo||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};const mo=function(t){var e=go(t),i=e%1;return e==e?i?e-i:e:0};const yo=function(t,e){return vi(e,(function(e){return t[e]}))};const vo=function(t){return null==t?[]:yo(t,Mt(t))};var bo=Math.max;const wo=function(t,e,i,n){t=Ct(t)?t:vo(t),i=i&&!n?mo(i):0;var r=t.length;return i<0&&(i=bo(r+i,0)),ro(t)?i<=r&&t.indexOf(e,i)>-1:!!r&&no(t,e,i)>-1},So=["opening_hours","description","phone","website","email","appURL","icon"];class Lo{_api="/api/v4/venues";_request;constructor(){this._request=new Vr}searchByIds(t){const e=Ar(t);if(!e)throw new Error("Please input venue id at least one.");const i=`${this._api}/${e}`;return this._changedRes(i)}searchByDistance(t,e,i,n=Cr,r=Mr){if(!t||!e||!i)throw new Error("Missing required parameter.");const o=new URLSearchParams({keywords:t,center:e.join(","),distance:String(i),offset:String(n),page:String(r)}),s=`${this._api}?${o.toString()}`;return this._changedRes(s)}searchByBbox(t,e,i=Cr,n=Mr){if(!t||!e)throw new Error("Missing required parameter.");const r=new URLSearchParams({keywords:t,bbox:e.join(","),offset:String(i),page:String(n)}),o=`${this._api}?${r.toString()}`;return this._changedRes(o)}searchByGlobal(t,e=Cr,i=Mr){if(!t)throw new Error("Missing required parameter.");const n=new URLSearchParams({keywords:t,offset:String(e),page:String(i)}),r=`${this._api}?${n.toString()}`;return this._changedRes(r)}_changedRes(t){return new Promise(((e,i)=>{this._request.get(t).then((t=>{t.data.result.venues=Tr(t.data.result.venues,(t=>Kr(t,((t,e)=>wo(So,e))))),e(t)})).catch(i)}))}}const Bo=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","description"];class Io{_api="/api/v4/buildings";_request;constructor(){this._request=new Vr}searchByIds(t){const e=Ar(t);if(!e)throw new Error("Please input building id at least one.");const i=`${this._api}/${e}`;return this._changedRes(i)}searchByDistance(t,e,i,n=Cr,r=Mr){if(arguments.length<3)throw new Error("Parameter cannot be empty.");if(2!==e.length)throw new Error("Center lon lat cannot be less than 2.");const o=[`center=${e.join(",")}`,`distance=${i}`,`offset=${n}`,`page=${r}`];t&&o.unshift(`keywords=${t}`);const s=`${this._api}?${o.join("&")}`;return this._changedRes(s)}searchByBbox(t,e,i=Cr,n=Mr){if(arguments.length<2)throw new Error("Parameter cannot be empty.");if(4!==e.length)throw new Error("Bbox parameters cannot be less than 2.");const r=[`bbox=${e.join(",")}`,`offset=${i}`,`page=${n}`];t&&r.unshift(`keywords=${t}`);const o=`${this._api}?${r.join("&")}`;return this._changedRes(o)}searchByGlobal(t,e=Cr,i=Mr){if(!arguments.length)throw new Error("Parameter cannot be empty.");const n=["searchGlobal=true",`offset=${e}`,`page=${i}`];t&&n.unshift(`keywords=${t}`);const r=`${this._api}?${n.join("&")}`;return this._changedRes(r)}searchByFloorId(t){if(!t)throw new Error("Parameter cannot be empty.");return this._changedRes(`${this._api}/floors/${t}`)}_changedRes(t){return new Promise(((e,i)=>{this._request.get(t).then((t=>{t.data.result.buildings=Tr(t.data.result.buildings,(t=>Kr(t,((t,e)=>wo(Bo,e))))),e(t)})).catch(i)}))}}const xo=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","icon"];class ko{_api="/api/v3/pois";_apiV4="/api/v4/pois";_categoriesApi="/api/v2/categories/pois";_categoriesGroupApi="/api/v5/categories/group";_request;constructor(){this._request=new Vr}searchByIds(t){const e=Ar(t);if(!e)throw new Error("Please input poi id at least one.");const i=`${this._apiV4}/${e}`;return this._changedRes(i,(t=>t.descriptions?.default?{description:t.descriptions.default}:null))}searchByDistance(t){const{center:e,distance:i,keywords:n="",offset:r=Cr,page:o=Mr}=t;if(!e||!i)throw new Error("Parameter missing.");const s=[`keywords=${n}`,`center=${e.join(",")}`,`distance=${Math.round(i)}`,`offset=${r}`,`page=${o}`],a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByBounds(t){const{bounds:e,offset:i=Cr,page:n=Mr,keywords:r,orderBy:o}=t,s=[`bbox=${e.flat().join()}`,`offset=${i}`,`page=${n}`];Co(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByBuilding(t){const{buildingId:e,offset:i=Cr,page:n=Mr,keywords:r,orderBy:o}=t,s=[`buildingId=${e}`,`offset=${i}`,`page=${n}`];Co(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByVenue(t){const{venueId:e,offset:i=Cr,page:n=Mr,keywords:r,orderBy:o}=t,s=[`venueId=${e}`,`offset=${i}`,`page=${n}`];Co(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByFloor(t){const{floorId:e,offset:i=Cr,page:n=Mr,keywords:r,orderBy:o}=t,s=[`floorId=${e}`,`offset=${i}`,`page=${n}`];r&&s.push(`keywords=${r}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchCategories(t){let e,i;var n;"bounds"in t?(e=`bbox=${t.bounds.flat().join()}`,"string"==typeof(n=t.keywords)&&Boolean(n.trim())&&(e+=`&keywords=${t.keywords.trim()}`),i=`${this._categoriesGroupApi}?${e}`):("floorId"in t?e=`floorId=${t.floorId}`:"buildingId"in t?e=`buildingId=${t.buildingId}`:"venueId"in t&&(e=`venueId=${t.venueId}`),i=`${this._categoriesApi}?${e}`);try{return this._request.get(i)}catch(t){throw t}}searchByOrientation(t){const{center:e,angle:i,distance:n,distanceSearchType:r=a.POINT}=t,o=[`center=${e.join()}`,`angle=${Math.round(i)}`,`distance=${n}`,`distanceSearchType=${r}`];"ordinal"in t?o.push(`ordinal=${t.ordinal}`):"floorId"in t?o.push(`floorId=${t.floorId}`):"buildingId"in t&&o.push(`buildingId=${t.buildingId}`);const s=`${this._api}/orientation?${o.join("&")}`;return this._request.get(s)}searchByCategory(t){const{center:e,distance:i,page:n=Mr,offset:r=Cr}=t,o=[`center=${e.join(",")}`,`distance=${i}`,`offset=${r}`,`page=${n}`];let s="";if("category"in t)s=`${this._api}?category=${t.category}&${o.join("&")}`;else if("excludedCategories"in t){const{excludedCategories:e}=t;s=it(e)?`${this._api}?excludeCategories=${e.join(",")}&${o.join("&")}`:`${this._api}?excludeCategories=${e}&${o.join("&")}`}if(s.length)return this._changedRes(s);throw new Error("Parameter missing.")}_changedRes(t,e){return new Promise(((i,n)=>{this._request.get(t).then((t=>{t.data.result.pois=Tr(t.data.result.pois,(t=>{let i=Kr(t,((t,e)=>wo(xo,e)));return e&&e(i)&&(i=Object.assign({},i,e(i))),i})),i(t)})).catch(n)}))}}function Co(t){return"string"==typeof t&&Boolean(t.trim())}class Mo{_api="/api/v3/route/query";_request;constructor(){this._request=new Vr}search(t){const{points:e,vehicle:i=u.FOOT,locale:n="en"}=t;if(!(e&&e.length>1&&e.length<6))throw new Error("Parameter error. It must be 1 < {points.length} < 6");const r={points:e,vehicle:i,locale:n};try{return this._request.post(this._api,JSON.stringify(r))}catch(t){throw new Error(t)}}}const Po={lineWidth:3,lineColor:"#A5E3FF",lineOpacity:1},Fo={fontColor:"#8c8c8c",activeFontColor:"#fff",backgroundColor:"#fff",activeBackgroundColor:"#074769",itemSize:50,itemCount:4,defaultFolded:!1},Eo=Fr(window.navigator.language)??o.ENGLISH,jo=new Io,Oo=new Lo,$o=new ko;async function Vo(t){try{return(await jo.searchByIds(t)).data.result.buildings[0]}catch(t){throw new Error(t)}}async function Ao(t){try{const e=(await jo.searchByFloorId(t)).data.result.buildings[0].buildingId;return await Vo(e)}catch(t){throw new Error(t)}}var Ro={value:()=>{}};function To(){for(var t,e=0,i=arguments.length,n={};e<i;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new No(n)}function No(t){this._=t}function Ho(t,e){for(var i,n=0,r=t.length;n<r;++n)if((i=t[n]).name===e)return i.value}function Do(t,e,i){for(var n=0,r=t.length;n<r;++n)if(t[n].name===e){t[n]=Ro,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=i&&t.push({name:e,value:i}),t}No.prototype=To.prototype={constructor:No,on:function(t,e){var i,n,r=this._,o=(n=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<a;)if(i=(t=o[s]).type)r[i]=Do(r[i],t.name,e);else if(null==e)for(i in r)r[i]=Do(r[i],t.name,null);return this}for(;++s<a;)if((i=(t=o[s]).type)&&(i=Ho(r[i],t.name)))return i},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new No(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var i,n,r=new Array(i),o=0;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,i=(n=this._[t]).length;o<i;++o)n[o].value.apply(e,r)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],r=0,o=n.length;r<o;++r)n[r].value.apply(e,i)}};const Wo=To;class zo{_historyBuilding;_historyOrdinal;_selectedBuildings;static instance;constructor(){this._historyBuilding=new Map,this._historyOrdinal=new Map,this._selectedBuildings=new Set}static getInstance(){return zo.instance||(zo.instance=new zo),zo.instance}getHistoryBuilding(t){return this._historyBuilding.get(t)}setHistoryBuilding(t,e){this._historyBuilding.set(t,e)}getHistoryOrdinal(t){return this._historyOrdinal.get(t)}setHistoryOrdinal(t,e){this._historyOrdinal.set(t,e)}getHistoryBuildings(){return this._selectedBuildings}addHistoryBuilding(t){this._selectedBuildings.delete(t),this._selectedBuildings.add(t),this._selectedBuildings.size>100&&(this._selectedBuildings=new Set(Array.from(this._selectedBuildings).slice(this._selectedBuildings.size-100)))}}class Zo{static instance;_upperBuildings;_lowerBuildings;_hiddenBuildings;constructor(){this._upperBuildings=new Set,this._lowerBuildings=new Set,this._hiddenBuildings=new Set}static getInstance(){return Zo.instance||(Zo.instance=new Zo),Zo.instance}getUpperBuildings(){return this._upperBuildings}getLowerBuildings(){return this._lowerBuildings}getHiddenBuildings(){return this._hiddenBuildings}}const Go=function(t){return function(e,i,n){var r=Object(e);if(!Ct(e)){var o=Vi(i,3);e=Mt(e),i=function(t){return o(r[t],t,r)}}var s=t(e,i,n);return s>-1?r[o?e[s]:s]:void 0}};var Yo=Math.max;const Xo=function(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var r=null==i?0:mo(i);return r<0&&(r=Yo(n+r,0)),to(t,Vi(e,3),r)};const Jo=Go(Xo);const Uo=function(t,e,i){for(var n=-1,r=t.length;++n<r;){var o=t[n],s=e(o);if(null!=s&&(void 0===a?s==s&&!ci(s):i(s,a)))var a=s,l=o}return l};const qo=function(t,e){return t<e};const Qo=function(t,e){return t&&t.length?Uo(t,Vi(e,2),qo):void 0};const Ko=function(){return m.Date.now()};var ts=Math.max,es=Math.min;const is=function(t,e,i){var n,r,o,s,a,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var i=n,o=r;return n=r=void 0,u=e,s=t.apply(o,i)}function _(t){var i=t-l;return void 0===l||i>=e||i<0||d&&t-u>=o}function f(){var t=Ko();if(_(t))return g(t);a=setTimeout(f,function(t){var i=e-(t-l);return d?es(i,o-(t-u)):i}(t))}function g(t){return a=void 0,h&&n?p(t):(n=r=void 0,s)}function m(){var t=Ko(),i=_(t);if(n=arguments,r=this,l=t,i){if(void 0===a)return function(t){return u=t,a=setTimeout(f,e),c?p(t):s}(l);if(d)return clearTimeout(a),a=setTimeout(f,e),p(l)}return void 0===a&&(a=setTimeout(f,e)),s}return e=_o(e)||0,C(i)&&(c=!!i.leading,o=(d="maxWait"in i)?ts(_o(i.maxWait)||0,e):o,h="trailing"in i?!!i.trailing:h),m.cancel=function(){void 0!==a&&clearTimeout(a),u=0,n=l=r=a=void 0},m.flush=function(){return void 0===a?s:g(Ko())},m};const ns=function(t,e){return!!(null==t?0:t.length)&&no(t,e,0)>-1};const rs=function(t,e,i){for(var n=-1,r=null==t?0:t.length;++n<r;)if(i(e,t[n]))return!0;return!1};const os=function(){};var ss=Te&&1/Le(new Te([,-0]))[1]==1/0?function(t){return new Te(t)}:os;const as=ss;const ls=function(t,e,i){var n=-1,r=ns,o=t.length,s=!0,a=[],l=a;if(i)s=!1,r=rs;else if(o>=200){var u=e?null:as(t);if(u)return Le(u);s=!1,r=ve,l=new me}else l=e?[]:a;t:for(;++n<o;){var c=t[n],d=e?e(c):c;if(c=i||0!==c?c:0,s&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue t;e&&l.push(d),a.push(c)}else r(l,d,i)||(l!==a&&l.push(d),a.push(c))}return a};const us=function(t,e){return t&&t.length?ls(t,Vi(e,2)):[]};const cs=function(t,e){var i=[];return Ni(t,(function(t,n,r){e(t,n,r)&&i.push(t)})),i};const ds=function(t,e){return(it(t)?Me:cs)(t,Vi(e,3))};var hs=0;const ps=function(t){var e=++hs;return Li(t)+e};const _s=function(t,e){var i;return Ni(t,(function(t,n,r){return!(i=e(t,n,r))})),!!i};const fs=function(t,e,i){if(!C(i))return!1;var n=typeof e;return!!("number"==n?Ct(i)&&ut(e,i.length):"string"==n&&e in i)&&Et(i[e],t)};const gs=function(t,e,i){var n=it(t)?ye:_s;return i&&fs(t,e,i)&&(e=void 0),n(t,Vi(e,3))},ms="assistant-mapxus-level-outline",ys=new Lo;class vs extends Ji{_map;_features;_allBuildings;_curBuildingId=null;_curBuildingFeature=null;_ordinal=null;_floorId=null;_floorName=null;_allowOutdoorSwitch;_allowBuildingSwitch;_outdoorMapShown;_originIndoorLayers;_curVenueId=null;_curVenueFeature=null;_buildingHighlightStyle;_lowerLayers;_upperLayers;_commonLayers;_dispatch;_fitBuildingBounds;_boundsPadding;_startWithIndoorView;_maplibreMapLoaded=!1;_indoorMapLoaded=!1;_isVenueMode;_isMaskMode;_upperLevels=new Set;_lowerLevels=new Set;_featureIncomplete=!1;_dragPan;_isNewBuilding=!1;_buildingBounds;_history=zo.getInstance();_layerBuildings=Zo.getInstance();_upperBuildings=this._layerBuildings.getUpperBuildings();_lowerBuildings=this._layerBuildings.getLowerBuildings();_hiddenBuildings=this._layerBuildings.getHiddenBuildings();constructor(t){super();const{map:e,startWithIndoorView:i=!0,outdoorMapShown:n=!0,selectedBuildingBorderStyle:o,floorSwitchMode:s=r.SWITCHED_BY_VENUE,fitBuildingBounds:a,boundsPadding:l,maskNonSelectedAreas:u=!1}=t;this._map=e,this._allowOutdoorSwitch=!0,this._allowBuildingSwitch=!0,this._startWithIndoorView=i,this._outdoorMapShown=n,this._isVenueMode=s===r.SWITCHED_BY_VENUE,this._isMaskMode=u,this._fitBuildingBounds=a,this._boundsPadding=l,this._buildingHighlightStyle=o?Object.assign({},Po,o):Po,this._hiddenBuildings=new Set,this._dispatch=Wo("indoorMapChange"),this._loadData()}setAllowOutdoorSwitch(t){return this._allowOutdoorSwitch=t,this}setAllowBuildingSwitch(t){return this._allowBuildingSwitch=t,this}get floor(){return{code:this._floorName,id:this._floorId,ordinal:this._ordinal}}get building(){return this._curBuildingFeature}get venue(){return this._curVenueFeature}get features(){return this._features}getFeaturesById(t,e){const{layerIds:i,filter:n}=e||{};let r=this.features;if(i?.length){const t=this._map.getCanvas().getBoundingClientRect();r=this._map.queryRenderedFeatures([[0,0],[t.width,t.height]],{layers:i})}return ds(r,n?e=>e.properties.id===t&&n(e):e=>e.properties.id===t)}async switchFloorByOrdinal(t){this._updateFloorState(t),this._dispatch.call("indoorMapChange",null,{venue:this.venue,building:this.building,floor:this.floor}),t&&this._floorId&&(this._resetSelectedBuildingLevel(),!0===this._dragPan&&(this._fitBuildingBounds?(this._isNewBuilding&&this._featureIncomplete&&await this.panToBuildingCenter(),this.fitBuildingBbox()):await this.panToBuildingCenter()),"restrict"===this._dragPan&&this._checkAndPanToBuilding()),this.updateRendering()}setOutdoorMapShown(t){this._outdoorMapShown=t,this._setOutdoorVisibility(t)}updateCustomLayers(){this._originIndoorLayers=d(this._map.getStyle()),this._copyOverlapLayers(),this._addBuildingHighlightLayer(),this._addCustomLevelFillLayer(),this._outdoorMapShown||this._setOutdoorVisibility(!1),!this._isMaskMode&&this._map.getLayer("mapxus-building-line")&&this._map.setPaintProperty("mapxus-building-line","fill-opacity",0)}setSelectedBuildingBorderStyle(t){t?(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,t),this._map.getLayer(ms)&&(this._map.setPaintProperty(ms,"line-color",this._buildingHighlightStyle.lineColor),this._map.setPaintProperty(ms,"line-opacity",this._buildingHighlightStyle.lineOpacity),this._map.setPaintProperty(ms,"line-width",this._buildingHighlightStyle.lineWidth),this._map.setPaintProperty(ms,"line-offset",this._buildingHighlightStyle.lineWidth))):(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,{"line-opacity":0}),this._map.getLayer(ms)&&this._map.setPaintProperty(ms,"line-opacity",0))}onMapChange(t){const e=ps("indoorMapChange.");return this._dispatch?.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}async selectBuilding(t,e){var i;(this._allowOutdoorSwitch||t)&&this._allowBuildingSwitch&&(this._allowBuildingSwitch&&this._isNotCurrentFeature(t)&&(this._featureIncomplete=e?.featureIncomplete??this._featureIncomplete,this._isNewBuilding=!0,this._isMaskMode&&this._invisibleSelectedBuilding(),await this._updateIndoorState(t,e?.floorId),await this.switchFloorByOrdinal(this._ordinal),this.fire((i={buildingId:this._curBuildingId,ordinal:this._ordinal,dragPan:this._dragPan},new Yi("selectedBuildingChanged",i))),this._indoorMapLoaded||(this._indoorMapLoaded=!0,this.fire(new Yi("indoorMapLoaded"))),this._isNewBuilding=!1))}updateRendering(){this._updateFeatures(),this._layerDisplayedBuildings(),this._setDisplayedLevels(),this._filterTiles(),this._setBuildingLineOpacity(),this._filterBuildingHighlight()}async panToBuildingCenter(){const t=this._curBuildingFeature.properties?.label_center?.split(",");if(t&&(this._map.panTo(t),this._featureIncomplete))return new Promise((t=>{setTimeout((()=>{let e=!1;const i=()=>{this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(this._curBuildingId,{layerIds:["mapxus-building-line"]})[0]&&(e=!0,t(!0))},n=setInterval((()=>{e||(i(),e&&clearInterval(n))}),50);i(),this._map.getZoom()<14&&(clearInterval(n),t(!1))}))}))}fitBuildingBbox(){this._buildingBounds&&this._map.fitBounds(this._buildingBounds,{padding:this._boundsPadding,bearing:this._map.getBearing()})}setDragPan(t){this._dragPan=t}setBuildingBounds(t){this._buildingBounds=t}async selectBuildingByClickMap(t){let e=null;const i=this._map.queryRenderedFeatures(t,{layers:["mapxus-level-fill","mapxus-level-fill-overlap-copy","mapxus-building-line"]});if(i.length){const t=Jo(i,(t=>t.layer.id.startsWith("mapxus-level-fill")));e=t?Jo(i,(e=>e.properties.id===t.properties["ref:building"])):Jo(i,(t=>{const{id:e,level_ids:i}=t.properties;return!this._hiddenBuildings.has(e)&&!gs(i.split(","),(t=>this._upperLevels.has(t)||this._lowerLevels.has(t)))}))??null}this.setDragPan("restrict"),await this.selectBuilding(e),setTimeout((async()=>{if(this._fitBuildingBounds)if(e){const t=await Vo(e.properties.id),{minLon:i,minLat:n,maxLon:r,maxLat:o}=t.bbox;this.setBuildingBounds([[i,n],[r,o]])}else this.setBuildingBounds(null)}))}_loadData(){this._map.on("load",(()=>this._init()))}_init(){this.updateCustomLayers(),this._map.on("data",is((()=>{this._maplibreMapLoaded||(this._maplibreMapLoaded=!0,this.fire(new Yi("maplibreMapLoaded")),(!this._startWithIndoorView||this._map.getZoom()<14)&&(this._indoorMapLoaded=!0,this.fire(new Yi("indoorMapLoaded")))),this.updateRendering()}),300))}_clear(){this._curBuildingFeature=null,this._curBuildingId=null,this._ordinal=null,this._floorName=null,this._floorId=null,this._curVenueId=null,this._curVenueFeature=null,this._buildingBounds=null}_getIndoorFeatures(){const t=this._map.getCanvas().getBoundingClientRect(),e=this._map.queryRenderedFeatures([[0,0],[t.width,t.height]]),i=ds(e,(t=>"indoor-planet"===t.source));return us(i,(t=>t.layer.id+":"+t.properties.id))}_getBuildingFloorByOrdinal(t,e){let i=null,n=null;if(t?.properties){const{ordinals:r,level_names:o,level_ids:s}=t.properties,a=Xo(r?.split(",")||[],(t=>t===e));i=(o?.split(",")||[])[a]??null,n=(s?.split(",")||[])[a]??null}return{code:i,id:n,ordinal:e}}_isNotCurrentFeature(t){return t?.properties?.id!==this._curBuildingId}_setOutdoorVisibility(t){const e=this._map.getStyle().layers.filter(p);if(e.length){const i=t?"visible":"none";e.forEach((({id:t})=>{this._map.getLayer(t)&&this._map.setLayoutProperty(t,"visibility",i)}))}}_addCustomLevelFillLayer(){this._map.getLayer("custom-level-fill")||this._map.addLayer({id:"custom-level-fill",source:"indoor-planet","source-layer":"mapxus_level",type:"fill",paint:{"fill-opacity":0}})}_setBuildingLineOpacity(){this._isMaskMode&&this._map.getLayer("mapxus-building-line")&&this._map.setPaintProperty("mapxus-building-line","fill-opacity",["case",["in",["get","id"],["literal",[...this._upperBuildings]]],0,["in",["get","id"],["literal",[...this._hiddenBuildings]]],0,1])}_addBuildingHighlightLayer(){if(!this._map.getLayer(ms)){const{lineWidth:t,lineOpacity:e,lineColor:i}=this._buildingHighlightStyle;this._map.addLayer({id:ms,source:"indoor-planet","source-layer":"mapxus_level",type:"line",filter:["==","id",""],paint:{"line-offset":t,"line-width":t,"line-color":i,"line-opacity":e}});const n=this._originIndoorLayers.findIndex((({id:t})=>t===this._upperLayers[this._upperLayers.length-1].id)),r=this._originIndoorLayers[n+1];this._map.moveLayer(ms,r.id)}}_filterBuildingHighlight(){this._map.getLayer(ms)&&this._map.setFilter(ms,["==","id",this._floorId??""])}_handleBuildings(t,e){if(e.clear(),t.size)for(const i of t){const n=this._allBuildings.get(i);if(!n?.properties)continue;const{"ref:venue":r,ordinals:o,level_ids:s}=n.properties;let a=this._history.getHistoryOrdinal(this._isVenueMode?this._history.getHistoryBuilding(r):i);if(!a){if(this._isVenueMode){const t=this._features.find((t=>"mapxus-venue-fill"===t.layer.id&&t.properties.id===r));a=this._getVenueDefaultOrdinal(t)}else a=this._getBuildingDefaultOrdinal(n);if(!a)continue;this._history.setHistoryOrdinal(i,a),this._isVenueMode&&this._history.setHistoryBuilding(r,i)}const l=Xo(o.split(","),(t=>t===a));if(l>-1){const n=s.split(",")[l];if(this._isMaskMode){(this._isVenueMode?this._curVenueFeature?.properties?.building_ids?.split(",")||[]:this._curBuildingId?[this._curBuildingId]:[]).includes(i)?(e.add(n),this._hiddenBuildings.delete(i)):t.delete(i)}else e.add(n),this._hiddenBuildings.delete(i)}else this._hiddenBuildings.add(i),t.delete(i)}}_getVenueDefaultOrdinal(t){let e=null;if(t?.properties){const{default_displayed_ordinal:i,building_ids:n}=t.properties;if(i&&(e=i),!e&&n){const t=Jo(this._getBuildingsOfBbox(),(t=>n.includes(t.properties.id)));e=t?this._getBuildingDefaultOrdinal(t):null}}return e}_getBuildingDefaultOrdinal(t){let e=null;if(t?.properties){const{level_ids:i,ordinals:n,default_displayed_floor:r}=t.properties,o=n?.split(",")||[];if(o.length){if(r){e=o[Xo(i?.split(",")||[],(t=>t===r))]??null}e||(e=Qo(o,(t=>Math.abs(Number(t)-.1))))}}return e}_getBuildingsOfBbox(t){let e=this._map.queryRenderedFeatures({layers:["mapxus-building-line"]});return e=us(e,(t=>t.properties.id)),t&&(e=e.filter(t)),e}_copyOverlapLayers(){const t=this._originIndoorLayers.findIndex((({id:t})=>"mapxus-level-fill"===t)),e=this._originIndoorLayers.findIndex((({id:t})=>t.startsWith("mapxus-poi")));this._commonLayers=this._originIndoorLayers.slice(0,t).concat(this._originIndoorLayers.slice(e)),this._upperLayers=this._originIndoorLayers.slice(t,e).filter((t=>"mapxus_building"!==t["source-layer"])),this._lowerLayers=this._upperLayers.map((t=>{const e=Object.assign({},t,{id:`${t.id}-overlap-copy`});return this._map.getLayer(e.id)||(this._map.addLayer(e),this._map.moveLayer(e.id,"mapxus-level-fill")),e}))}_updateFeatures(){this._features=this._getIndoorFeatures();const t=us(ds(this._features,(t=>"mapxus-building-line"===t.layer.id)),(t=>t.properties.id));this._allBuildings=new Map(t.map((t=>[t.properties.id,t]))),this._featureIncomplete&&this._allBuildings.get(this._curBuildingId)&&(this._curBuildingFeature=this._allBuildings.get(this._curBuildingId),this._featureIncomplete=!1)}_layerDisplayedBuildings(){if(this._allBuildings.size)for(const t of this._allBuildings.values()){if(!t.properties)continue;const{id:e,overlap:i}=t.properties;let n=!1;if(e===this._curBuildingId)this._hiddenBuildings.delete(e),this._lowerBuildings.delete(e),this._upperBuildings.add(e),i&&(n=!0);else{!this._upperBuildings.has(e)&&!this._lowerBuildings.has(e)&&!this._hiddenBuildings.has(e)&&(this._upperBuildings.add(e),i&&(n=!0))}n&&i.split(",").forEach((t=>{this._hiddenBuildings.has(t)||(this._upperBuildings.delete(t),this._lowerBuildings.add(t))}))}}_setDisplayedLevels(){this._handleBuildings(this._upperBuildings,this._upperLevels),this._handleBuildings(this._lowerBuildings,this._lowerLevels)}_filterTiles(){this._filterIndoorLayers([...this._upperLevels],this._upperLayers??[]),this._filterIndoorLayers([...this._lowerLevels],this._lowerLayers??[]),this._filterIndoorLayers([...this._upperLevels,...this._lowerLevels],this._commonLayers??[])}_filterIndoorLayers(t,e){if(e.length){let i;for(const n of e){const e=n,r=e["source-layer"];if("mapxus_venue"===r||"mapxus_building"===r)continue;const o=e.layout?.visibility,{id:s,filter:a}=e;"none"===o&&this._map.setLayoutProperty(s,"visibility","visible"),a&&(i=["all","mapxus_level"===r?["in","id",...t]:["in","ref:level",...t],a],"mapxus_place"===r&&i.splice(2,0,["any",["all",["has","overlap"],["in","ref:building",...this._upperBuildings]],["!has","overlap"]]),this._map.setFilter(s,i))}}}async _updateIndoorState(t,e){if(t){if(!t.properties)return void console.warn("Building feature properties is empty.",t);const{id:i,"ref:venue":n,level_ids:r,ordinals:o}=t.properties;if(this._curVenueId!==n){this._curVenueId=n;let t=this.getFeaturesById(n,{layerIds:["mapxus-venue-fill"]})[0]??null;if(!t)try{const e=await ys.searchByIds(n);t=function(t){const{address:e,buildings:i,id:n,name:r,type:o}=t;return{layer:{id:"mapxus-venue-fill"},properties:{...Di(e,((t,e,i)=>Object.assign(t,"default"===i?{"addr:street":e.street,"addr:housenumber":e.housenumber}:{[`addr:street:${i}`]:e.street})),{}),...Ai(r,((t,e)=>"default"===e?"name":`name:${e}`)),id:n,venue:o,building_ids:i.map((({id:t})=>t)).join()},source:"indoor-planet",sourceLayer:"mapxus_venue"}}(e.data.result.venues[0])}catch(t){throw new Error("Venue not found.")}this._curVenueFeature=t}this._curBuildingFeature=t,this._curBuildingId=i,this._history.addHistoryBuilding(i);const s=o.split(",");if(e){const i=s[Xo(r.split(","),(t=>t===e))];i||console.warn("Building has no corresponding ordinal.",t),this._ordinal=i??null}else{let e=this._history.getHistoryOrdinal(this._isVenueMode?this._history.getHistoryBuilding(n):i);(!e||e&&!s.includes(e))&&(e=this._getBuildingDefaultOrdinal(t)),this._ordinal=e}}else this._clear()}_updateFloorState(t){if(this._ordinal=t,this._floorName=null,this._floorId=null,t){const{code:t,id:e}=this._getBuildingFloorByOrdinal(this._curBuildingFeature,this._ordinal);if(this._floorName=t,this._floorId=e,!e)return;this._history.setHistoryOrdinal(this._curBuildingId,this._ordinal),this._isVenueMode&&this._history.setHistoryBuilding(this._curVenueId,this._curBuildingId)}}_resetSelectedBuildingLevel(){(this._isVenueMode?this._curVenueFeature?this._curVenueFeature.properties.building_ids.split(","):[]:[this._curBuildingId]).forEach((t=>{this._upperBuildings.delete(t),this._lowerBuildings.delete(t),this._hiddenBuildings.delete(t)})),this._upperBuildings.add(this._curBuildingId);const t=this._curBuildingFeature.properties.overlap;t&&t.split(",").forEach((t=>{this._upperBuildings.has(t)&&(this._upperBuildings.delete(t),this._lowerBuildings.add(t))}))}_checkAndPanToBuilding(){this.getFeaturesById(this._curBuildingId,{layerIds:["mapxus-building-line"]})[0]||(this._fitBuildingBounds?this.fitBuildingBbox():this.panToBuildingCenter())}_invisibleSelectedBuilding(){if(this._isVenueMode){if(!this._curVenueFeature)return;const{building_ids:t}=this._curVenueFeature.properties;t&&t.split(",").forEach((t=>{this._upperBuildings.delete(t),this._lowerBuildings.delete(t)}))}else this._curBuildingId&&(this._upperBuildings.delete(this._curBuildingId),this._lowerBuildings.delete(this._curBuildingId))}}class bs{_map;_layerIds=[];_dispatch;constructor(t){this._map=t,this._dispatch=Wo("poiClick"),this._bindEvents()}onPoiClick(t){const e=ps("poiClick.");return this._dispatch.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}_bindEvents(){this._map.on("styledata",is((()=>this._init()),300)),this._initPoiClick()}_init(){this._layerIds=Tr(ds(d(this._map.getStyle()),(t=>"mapxus_place"===t["source-layer"])),(({id:t})=>t))}_initPoiClick(){this._map.on("click",(t=>{const e=this._map.queryRenderedFeatures(t.point,{layers:[...this._layerIds,"mapxus-building-line","mapxus-venue-fill"]});if(e.length){const i=Jo(e,(t=>t.layer.id.indexOf("mapxus-poi")>-1));if(i?.properties){const{"ref:level":n=null,"ref:building":r}=i.properties,o=Jo(e,(t=>t.properties.id===r))??null,s=Jo(e,(t=>t.properties.id===o?.properties?.["ref:venue"]))??null,{floorName:a,ordinal:l}=this._getFloorDataByFloorId(n,o);this._dispatch.call("poiClick",null,{coordinate:t.lngLat,poi:i,building:o,venue:s,floor:{code:a,id:n,ordinal:l}})}}}))}_getFloorDataByFloorId(t,e){let i=null,n=null;if(t&&e?.properties){const{level_ids:r,level_names:o,ordinals:s}=e.properties,a=r?.split(",")||[],l=Xo(a,(e=>e===t));l>-1&&(i=(o?.split(",")||[])[l]??null,n=(s?.split(",")||[])[l]??null)}return{floorName:i,ordinal:n}}}function ws(t){t.parentNode&&t.parentNode.removeChild(t)}function Ss(t,e,i){const n=window.document.createElement(t);return e&&(n.className=e),i&&i.appendChild(n),n}const Ls=function(t){return"number"==typeof t||U(t)&&"[object Number]"==k(t)};class Bs{_map;_maplibre;_buildingId;_features;_$container;_$listContainer;_$buildingList;_listHeight;_visible;_position;constructor(t,e,i){this._map=t,this._position=e??"top-right",this._visible=i??!0}onAdd(t){return this._maplibre=t,this._$container=Ss("div","maplibregl-ctrl maplibregl-ctrl-building-filter "+(this._visible?"":"hide"),this._maplibre.getContainer()),this._$container.appendChild(this._buildingFilterIconCreate("div")),this._$container.appendChild(this._buildingNameListCreate("div")),this._loadData(),this._$container}onRemove(){ws(this._$container)}get position(){return this._position}get enabled(){return this._visible}getDefaultPosition(){return"top-right"}setLayoutHidden(t){this._visible=!t,t?this._$hideLayout():this._$showLayout()}setVisibility(t){this._visible=t,t?this._$showLayout():this._$hideLayout()}moveBuildingFilter(t,e){const i=document.querySelector(`.maplibregl-ctrl-${t}`),n=i.querySelector(".maplibregl-ctrl-building-filter"),r=document.querySelector(`.maplibregl-ctrl-${e}`);n&&(i.removeChild(n),r.prepend(n),this._updateBuildingListLayout(e),this._position=e)}changePosition(t,e,i){const n=document.querySelector(`.maplibregl-ctrl-${t}`),r=n.querySelector(".maplibregl-ctrl-building-filter");if(t!==e){this._position=e;const t=document.querySelector(`.maplibregl-ctrl-${e}`);r&&(n.removeChild(r),Ls(i)?t.insertBefore(r,t.children[i]):t.append(r),this._updateBuildingListLayout(e))}else Ls(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]))}_loadData(){this._maplibre.on("moveend",(()=>this._refresh())),this._map.onMapChangeListener((({building:t})=>{const e=t?.properties?.id??"";this._buildingId!==e&&(this._buildingId=e,this._refresh())})),this._map.renderComplete((()=>{this._init()}))}_init(){this._load()}_refresh(){this._load()}_load(){this._buildingNameListClean(),this._buildingNameListUpdate()}_buildingFilterIconCreate(t){const e=window.document.createElement(t);return e.className="mapxus-building-filter-icon",this._buildingToggleListEvent(e,!0),e}_buildingNameListCreate(t){return this._$listContainer=window.document.createElement(t),this._$listContainer.className="mapxus-building-name-layout",this._$listContainer.style.display="none",this._$listContainer.style.top="20px",this._$buildingList=window.document.createElement(t),this._$buildingList.className="mapxus-building-name-list",this._$listContainer.appendChild(this._$buildingList),this._buildingToggleListEvent(this._$listContainer,!1),this._$listContainer}_buildingNameListUpdate(){this._features=[];const t=this._map.getMaplibre().queryRenderedFeatures({layers:["mapxus-building-line"]});for(const e of t){const{properties:t}=e,{id:i,name:n}=t,r=t?.[`name:${this._map.getLanguage()}`]??n;Jo(this._features,(t=>t.properties.id===i))||(this._features.push(e),this._$buildingList.appendChild(this._buildingNameCreate("p",r,i,i===this._map.building?.properties?.id)))}this._setBuildingListHeight(this._features),this._updateBuildingListLayout(this._position)}_buildingNameListClean(){this._$buildingList.innerHTML=""}_setBuildingListHeight(t){const e=t.map((t=>{const e=t?.properties?.name;return e?Math.ceil(8*e.length/107):0})).reduce(((t,e)=>t+e),0);this._listHeight=26*e+8*t.length,this._$buildingList.style.height=this._$listContainer.style.height=`${this._listHeight>=208?208:this._listHeight}px`}_buildingNameCreate(t,e,i,n){const r=window.document.createElement(t);return r.dataset.id=i,r.className="mapxus-building-name",r.innerHTML=e,n&&r.classList.add("active"),this._buildingNameClickEvent(r),r}_toggleList(t){this._$listContainer.style.display=t?"block":"none"}_buildingNameClickEvent(t){t.onclick||(t.onclick=t=>{const e=t.target;this._map.selectBuildingById(e.dataset.id)})}_buildingToggleListEvent(t,e){t.onmouseenter||(t.onmouseenter=t=>{this._toggleList(!0)}),t.onmouseleave||e||(t.onmouseleave=t=>{this._toggleList(!1)})}_$showLayout(){this._$container.classList.remove("hide")}_$hideLayout(){this._$container.classList.add("hide")}_updateBuildingListLayout(t){t.indexOf("left")>-1?(this._$listContainer.style.right=null,this._$listContainer.style.left="55px"):(this._$listContainer.style.left=null,this._$listContainer.style.right="55px");const e=this._$container.offsetParent?this._$container.offsetParent.clientHeight-(this._$container.offsetTop+this._$container.clientHeight)-25:0;t.includes("bottom")&&this._listHeight-20>e?(this._$listContainer.style.top=null,this._$listContainer.style.bottom="15px"):(this._$listContainer.style.bottom=null,this._$listContainer.style.top="20px")}}const Is=function(t,e){for(var i=-1,n=null==t?0:t.length;++i<n&&!1!==e(t[i],i,t););return t};const xs=function(t){return"function"==typeof t?t:Ei};const ks=function(t,e){return(it(t)?Is:Ni)(t,xs(e))};var Cs=Math.max,Ms=Math.min;const Ps=function(t,e,i){return t>=Ms(e,i)&&t<Cs(e,i)};const Fs=function(t,e,i){return e=go(e),void 0===i?(i=e,e=0):i=go(i),t=_o(t),Ps(t,e,i)};class Es{_container;_indoor;_maplibre;_position="top-right";_buildingId=null;_floorNames;_ordinals;_ordinal=null;_style;_$innerFloors;_$activeFloor;_centerSelectorIdx;_lastNormalScrollableIdx;_$arrowBtnUp;_$arrowBtnDown;_maxScrollTop;_$selectorExpanded;_$selectorFolded;_componentDidMount=!1;_isEnabled;_visible=!1;_dragPan;constructor(t,e){const{style:i,enabled:n=!0}=e;this._indoor=t,this._style=i?Object.assign({},Fo,i):Fo,this._isEnabled=n,this._bindEvents()}onAdd(t){return this._maplibre=t,this._addMapMoveEventListener(),this._container=document.createElement("div"),this._container.className="maplibregl-ctrl mapxus-ctrl-floors hidden",this._container}onRemove(){this._container.parentNode.removeChild(this._container)}get position(){return this._position}get enabled(){return this._isEnabled}setEnabled(t){this._isEnabled=t,t&&!this._visible&&this._setVisibility(!0),!t&&this._visible&&this._setVisibility(!1)}getDefaultPosition(){return"top-right"}switchByOrdinal(t,e){this._ordinal=t,this._dragPan=e??!0,this._indoor.switchFloorByOrdinal(t),this._updateSelectorStatus(t),this._scrollCenterActiveFloor()}changePosition(t,e,i){const n=document.querySelector(`.maplibregl-ctrl-${t}`),r=n.querySelector(".mapxus-ctrl-floors");if(t!==e){this._position=e;const t=document.querySelector(`.maplibregl-ctrl-${e}`);r&&(n.removeChild(r),Ls(i)?t.insertBefore(r,t.children[i]):t.append(r),this._show(),this._scrollCenterActiveFloor())}else Ls(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]),this._show(),this._scrollCenterActiveFloor())}setStyle(t){this._style=Object.assign({},this._style,t),this._componentDidMount&&(this._clearFloors(),this._render(),this._scrollCenterActiveFloor(),this._componentDidMount=!0)}_setVisibility(t){this._componentDidMount?t?(this._show(),this._scrollCenterActiveFloor()):this._hide():(this._visible=t,this._indoor.building&&t&&(this._mountFloors(this._indoor.building),this._show(),this._scrollCenterActiveFloor()))}_bindEvents(){this._indoor.on("selectedBuildingChanged",(({buildingId:t,ordinal:e,dragPan:i})=>{if(this._buildingId=t,this._ordinal=e,this._dragPan=i,this._visible&&this._hide(),this._componentDidMount&&this._clearFloors(),this._indoor.building){this._mountFloors(this._indoor.building);const t=this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0];this.enabled&&(!1!==this._dragPan||!1===this._dragPan&&t)&&(this._show(),this._scrollCenterActiveFloor())}else this._clearState()}))}_addMapMoveEventListener(){this._maplibre.on("moveend",(()=>{if(this.enabled&&!1===this._dragPan&&this._buildingId){const t=this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0];t?this._componentDidMount?this._visible||(this._show(),this._scrollCenterActiveFloor()):(this._mountFloors(t),this._show(),this._scrollCenterActiveFloor()):this._componentDidMount&&this._visible&&this._hide()}}))}_mountFloors(t){this._updateFloorSelector(t),this._componentDidMount=!0}_updateFloorSelector(t){const{level_names:e,ordinals:i}=t.properties;this._floorNames=e.split(",").reverse(),this._ordinals=i.split(",").reverse(),this._render()}_clearState(){this._floorNames=[],this._ordinals=[],this._ordinal=null}_render(){const{itemCount:t,itemSize:e}=this._style;this._centerSelectorIdx=Math.ceil(t/2)-1,this._maxScrollTop=(this._floorNames.length-t)*e,this._lastNormalScrollableIdx=this._floorNames.length-(t-this._centerSelectorIdx-1)-1,this._createFloors()}_hide(){this._container.classList.add("hidden"),this._visible=!1}_show(){this._container.classList.remove("hidden"),this._visible=!0}_createFloors(){this._$selectorFolded=this._$foldedSelector(this._container,(()=>{this._expandSelector(!0),this._scrollCenterActiveFloor()})),this._$selectorExpanded=this._$expandedSelector(this._container,(()=>this._expandSelector(!1)))}_$expandedSelector(t,e){const{itemSize:i,itemCount:n,defaultFolded:r,backgroundColor:o}=this._style,s=Ss("div","mapxus-ctrl-floors-expanded "+(r?"hidden":""),t);if(this._floorNames.length>1){Ss("div","mapxus-ctrl-floors-close",s).onclick=e}const a=Ss("div","mapxus-ctrl-floors-wrapper",s);return a.style.backgroundColor=o,this._floorNames.length>n&&(this._$arrowBtnUp=this._$createScrollButton(a,"up"),this._$arrowBtnUp.onclick=()=>this._handleScroll("up")),this._$innerFloors=Ss("div","mapxus-ctrl-floors-inner",a),Object.assign(this._$innerFloors.style,{maxHeight:i*n+"px",width:`${i}px`}),this._$createFloors(this._$innerFloors),this._floorNames.length>n&&(this._$arrowBtnDown=this._$createScrollButton(a,"down"),this._$arrowBtnDown.onclick=()=>this._handleScroll("down"),this._$innerFloors.addEventListener("scroll",is((t=>{t.stopPropagation(),this._resetArrowBtnStatus(this._$innerFloors.scrollTop)}),100))),s}_$foldedSelector(t,e){const{itemSize:i,activeFontColor:n,activeBackgroundColor:r,defaultFolded:o}=this._style,s=Ss("div","mapxus-ctrl-floors-folded mapxus-ctrl-floors-floor "+(o?"":"hidden"),t);return s.onclick=e,Object.assign(s.style,{width:`${i}px`,height:`${i}px`,lineHeight:`${i}px`,color:n,backgroundColor:r}),s}_clearFloors(){this._container.innerHTML="",this._componentDidMount=!1}_$createScrollButton(t,e){return Ss("div",`mapxus-ctrl-floors-arrow mapxus-ctrl-floors-floor ${e}`,t)}_$createFloors(t){const{fontColor:e,itemSize:i}=this._style;let n;ks(this._floorNames,((r,o)=>{n=Ss("div","mapxus-ctrl-floors-floor",t),n.dataset.floor=r,n.dataset.ordinal=this._ordinals[o],n.innerText=r,Object.assign(n.style,{color:e,height:`${i}px`,lineHeight:`${i}px`}),n.dataset.ordinal===this._ordinal&&(this._$activeFloor=n,this._resetActiveFloor(!0),this._$selectorFolded.innerText=r),n.onclick=t=>{this._indoor.setDragPan("restrict"),this.switchByOrdinal(t.target.dataset.ordinal)}}))}_updateSelectorStatus(t){const e=this._floorNames[this._ordinals.indexOf(t)];this._$activeFloor&&this._resetActiveFloor(!1),ks(this._$innerFloors.children,(e=>{e.dataset.ordinal===t&&(this._$activeFloor=e,this._resetActiveFloor(!0))})),this._$selectorFolded.innerText=e}_resetArrowBtnStatus(t){0===t?this._$arrowBtnUp?.classList?.add("hidden"):this._$arrowBtnUp?.classList?.remove("hidden"),t===this._maxScrollTop?this._$arrowBtnDown?.classList?.add("hidden"):this._$arrowBtnDown?.classList?.remove("hidden")}_resetActiveFloor(t){const{activeBackgroundColor:e,backgroundColor:i,activeFontColor:n,fontColor:r}=this._style;Object.assign(this._$activeFloor.style,{color:t?n:r,backgroundColor:t?e:i,fontWeight:t?"bold":"normal",cursor:t?"auto":"pointer"}),this._$activeFloor.disabled=t}_scrollCenterActiveFloor(){if(this._ordinal){const t=this._ordinals.indexOf(this._ordinal);t>-1&&(this._$innerFloors.scrollTop=this._getScrollTop(t),this._$innerFloors.scrollTop||this._resetArrowBtnStatus(0))}}_getScrollTop(t){return Fs(this._centerSelectorIdx,this._lastNormalScrollableIdx+1)?(t-this._centerSelectorIdx)*this._style.itemSize:t>this._lastNormalScrollableIdx?this._maxScrollTop:0}_handleScroll(t){const e=this._$innerFloors.scrollTop,{itemSize:i}=this._style;if("up"===t){const t=e-2*i;this._$innerFloors.scrollTop=t<0?0:t}else if("down"===t){const t=e+2*i;this._$innerFloors.scrollTop=t>this._maxScrollTop?this._maxScrollTop:t}}_expandSelector(t){t?(this._$selectorExpanded.classList.remove("hidden"),this._$selectorFolded.classList.add("hidden")):(this._$selectorExpanded.classList.add("hidden"),this._$selectorFolded.classList.remove("hidden"))}}class js{_container;onAdd(t){this._container=Ss("div","maplibregl-ctrl mapxus-ctrl-logo",t.getContainer());const e=Ss("a","mapxus-logo",this._container);return e.target="_blank",e.href="https://www.khi.co.jp/groupvision2030/mapxus.html",e.setAttribute("aria-label","Mapxus logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container}onRemove(){ws(this._container)}getDefaultPosition(){return"bottom-left"}}class Os{_container;_anchor;_theme;constructor(t){this._theme=t.theme?t.theme:"default"}onAdd(t){return this._container=Ss("div","maplibregl-ctrl mapxus-ctrl-attribution",t.getContainer()),this._anchor=Ss("a","mapxus-attribution",this._container),this._anchor.target="_blank",this._setCopyrightInfo(this._theme),this._anchor.setAttribute("aria-label","Mapxus attribution"),this._anchor.setAttribute("rel","noopener"),this._container.appendChild(this._anchor),this._container}onRemove(){ws(this._container)}getDefaultPosition(){return"bottom-right"}changeTheme(t){this._setCopyrightInfo(t)}_setCopyrightInfo(t){this._anchor.innerText="landsD"===t?"© The Government of the Hong Kong SAR":"© OpenStreetMap contributors",this._anchor.href="landsD"===t?"https://www.map.gov.hk/gm/":"https://www.openstreetmap.org/copyright/"}}class $s{_container;onAdd(t){return this._container=Ss("div","maplibregl-ctrl mapxus-ctrl-collapsed-copyright",t.getContainer()),this._container.innerHTML='\n <div class="mapxus-collapsed-copyright-content">\n <div class="mapxus-collapsed-copyright-menu hidden">\n <div class="mapxus-collapsed-copyright-logo" onclick="window.open(\'https://www.khi.co.jp/groupvision2030/mapxus.html\')"></div>\n <div class="mapxus-collapsed-horizontal-divider"></div>\n <div class="mapxus-collapsed-copyright-text" onclick="window.open(\'https://www.openstreetmap.org/copyright/\')"></div>\n </div>\n <div class="mapxus-collapsed-copyright-btn"></div>\n </div>\n ',this._bindEvents(),this._container}onRemove(t){ws(this._container)}getDefaultPosition(){return"bottom-right"}_bindEvents(){const t=this._container.querySelector(".mapxus-collapsed-copyright-menu"),e=this._container.querySelector(".mapxus-collapsed-copyright-btn");let i=!1;e.addEventListener("click",(()=>(i=!i,void(i?t.classList.remove("hidden"):t.classList.add("hidden")))))}}function Vs(t){return`${kr}/api/v3/tiles/styles/${t}`}const As=Vs("christmas_mims2_v1"),Rs=Vs("common_mims2_v1"),Ts=Vs("halloween_mims2_v1"),Ns=Vs("mappybee_mims2_v1"),Hs=Vs("mapxus_mims2_v1"),Ds=Vs("lands_d_mims2_v1"),Ws=Vs("mapxus_mims2_v5");class zs{_indoor;_isEnabled=!0;constructor(t){this._indoor=t}enable(){this._isEnabled=!0,this._indoor.setAllowOutdoorSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowOutdoorSwitch(!1)}get isEnabled(){return this._isEnabled}}class Zs{_indoor;_isEnabled=!0;constructor(t){this._indoor=t}enable(){this._isEnabled=!0,this._indoor.setAllowBuildingSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowBuildingSwitch(!1)}get isEnabled(){return this._isEnabled}}class Gs{_buildingSelector;_isEnabled=!0;_position;constructor(t){this._buildingSelector=t}enable(){this._isEnabled=!0,this._buildingSelector.enabled||this._buildingSelector.setVisibility(!0)}disable(){this._isEnabled=!1,this._buildingSelector.enabled&&this._buildingSelector.setVisibility(!1)}setPosition(t,e){this._position=t,this._buildingSelector.changePosition(this._buildingSelector.position,t,e)}get isEnabled(){return this._isEnabled}get position(){return this._position}}class Ys{_floorSelector;_isEnabled;_position;constructor(t){this._floorSelector=t,this._position=t.position,this._isEnabled=this._floorSelector.enabled}enable(){this._isEnabled=!0,this._floorSelector.setEnabled(!0)}disable(){this._isEnabled=!1,this._floorSelector.setEnabled(!1)}setPosition(t,e){this._position=t,this._floorSelector.changePosition(this._floorSelector.position,t,e)}setStyle(t){this._floorSelector.setStyle(t)}get isEnabled(){return this._isEnabled}get position(){return this._position}}class Xs extends Ji{_map;_indoor;_poi;_floorsControl;_buildingFilterControl;_attributionControl;_initialHiddenLayers;_language;_dispatch;_fitBuildingBounds;_history=zo.getInstance();_hiddenBuildings=Zo.getInstance().getHiddenBuildings();switchOutdoor;switchBuilding;buildingSelector;floorSelector;constructor(t){super();const{map:e,appId:i,secret:n,poiId:r,floorId:o,buildingId:a,venueId:l,theme:u=s.MAPXUS_V2,floorSelectorEnabled:c,buildingSelectorEnabled:d,outdoorMapShown:h,collapseCopyright:p=!1,floorSwitchMode:_,maskNonSelectedAreas:f,fitBuildingBounds:g=!1,boundsPadding:m=30,selectedBuildingBorderStyle:y,floorSelectorStyle:v,language:b=Eo,autoSelectBuilding:w=!1}=t;if(!e)throw new Error("Outdoor Map parameter missing.");if(!i||!n)throw new Error("Permission parameter missing.");Vr.verifyPermission(i,n).then((()=>{this._map=e,this._language=b,this._indoor=new vs({map:this._map,startWithIndoorView:Boolean(l||a||o||r),outdoorMapShown:h,floorSwitchMode:_,fitBuildingBounds:g,boundsPadding:m,maskNonSelectedAreas:f,selectedBuildingBorderStyle:y}),this._poi=new bs(this._map),this._fitBuildingBounds=g,this._resourceRequestTransform(),this._setStyle(this._getStyleUrl(u)),this._checkMapZoom(),this._dispatch=Wo("mapClick","pointClick"),p?this._attributionControl=new $s:(this._attributionControl=new Os({theme:u}),this._addControl(new js)),this._addControl(this._attributionControl),this._addControl(this._buildingFilterControl=new Bs(this,"top-right",d)),this._addControl(this._floorsControl=new Es(this._indoor,{style:v,enabled:c})),r?this._selectPoiById(r):o?this.selectFloorById(o):a?this.selectBuildingById(a):l&&this.selectVenueById(l),this.switchOutdoor=new zs(this._indoor),this.switchBuilding=new Zs(this._indoor),this.buildingSelector=new Gs(this._buildingFilterControl),this.floorSelector=new Ys(this._floorsControl),this._map.once("styledata",(()=>this._hideIndoorLayers())),this._map.on("click",(async t=>{const{point:e,lngLat:i}=t;await this._indoor.selectBuildingByClickMap(e),this._dispatch.call("pointClick",null,{point:e,coordinate:i}),this._dispatch.call("mapClick",null,{coordinate:i,venue:this.venue,building:this.building,floor:this.floor})})),this._map.on("error",is((t=>this._updatePermission(t,i,n)),350)),this._indoor.once("maplibreMapLoaded",(()=>{this._showIndoorLayers(),this.setLanguage(this._language)})),this._indoor.once("indoorMapLoaded",(t=>{w&&this._map.on("moveend",(()=>this._selectCenterBuilding())),this.fire(new Yi("isRenderComplete",t))}))})).catch((t=>{throw t}))}renderComplete(t){this.on("isRenderComplete",t)}getIndoor(){return this._indoor}getMaplibre(){return this._map}get floor(){return this.getIndoor()?.floor??null}get building(){return this.getIndoor()?.building??null}get venue(){return this.getIndoor()?.venue??null}setLanguage(t){this._language!==t&&(this._language=t);const e=this._map?.getStyle(),i=e?.layers;if(i&&i.length){const e=i.filter((({type:t})=>"symbol"===t));e.length&&e.forEach((({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"text-field",["coalesce",["get",`name:${t}`],["get","name"]])}))}}getLanguage(){return this._language}setOutdoorMapShown(t){this.getIndoor()?.setOutdoorMapShown(t)}getIndoorFeaturesByCoordinates(t,e){const i=this._map.project(t),n=this._map.queryRenderedFeatures(i,{layers:["mapxus-venue-fill","mapxus-building-line","mapxus-level-fill","mapxus-level-fill-overlap-copy"]});let r=null,o=null,s=null;if(n.length){const t=n.filter((t=>t.layer.id.includes("mapxus-level-fill")));s=Jo(t,(t=>Ls(e)?t.properties.ordinal===e+"":t.layer.id.startsWith("mapxus-level-fill"))),s&&(o=Jo(n,(t=>t.properties.id===s.properties["ref:building"])),r=Jo(n,(t=>t.properties.id===o.properties["ref:venue"])))}return{venue:r,building:o,level:s}}getFeaturesById(t,e){return this.getIndoor()?.getFeaturesById(t,e)||[]}async selectFloorById(t,e){const{dragPan:i=!0}=e||{};if(this._indoor.setDragPan(i),t===this.floor?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let e,n,r;if(this._fitBuildingBounds){e=await Ao(t),n=Wi(e),r=!0;const{maxLat:i,maxLon:o,minLat:s,minLon:a}=e.bbox;this._indoor.setBuildingBounds([[a,s],[o,i]])}else n=Jo(this._indoor?.features||[],(e=>e.properties?.level_ids?.includes(t)&&"mapxus-building-line"===e.layer.id))??null,n?r=!1:(e=await Ao(t),n=Wi(e),r=!0);if(n&&n?.properties?.id===this.building?.properties?.id){const{level_ids:e,ordinals:r}=n.properties,o=e.split(",").indexOf(t),s=r.split(",")[o]??null;this._floorsControl.switchByOrdinal(s,i)}else await(this._indoor?.selectBuilding(n,{floorId:t,featureIncomplete:r}))}}async selectBuildingById(t,e){const{dragPan:i=!0}=e||{};if(this._indoor.setDragPan(i),t===this.building?.properties?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let e,i,n=!1;if(this._fitBuildingBounds){e=await Vo(t),i=Wi(e),n=!0;const{maxLat:r,maxLon:o,minLat:s,minLon:a}=e.bbox;this._indoor.setBuildingBounds([[a,s],[o,r]])}else i=this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(t,{layerIds:["mapxus-building-line"]})[0]||null,i||(e=await Vo(t),i=Wi(e),n=!0);await(this._indoor?.selectBuilding(i,{featureIncomplete:n}))}}async selectVenueById(t,e){const{dragPan:i=!0}=e||{};if(this._indoor.setDragPan(i),t)if(t===this.venue?.properties?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let e=this._history.getHistoryBuilding(t);if(!e){const i=this._map.getLayer("mapxus-venue-fill")&&this.getFeaturesById(t,{layerIds:["mapxus-venue-fill"]})[0];if(i){const{default_displayed_building:t,building_ids:n}=i.properties;e=t||(n?.split(",")||[])[0]}else{const i=await async function(t){try{return(await Oo.searchByIds(t)).data.result.venues[0]}catch(t){throw new Error(t)}}(t);e=i.defaultBuilding||i.buildings[0]?.id}}await this.selectBuildingById(e,{dragPan:i})}else await(this._indoor?.selectBuilding(null))}onMapClickListener(t){const e=ps("mapClick.");return this._dispatch?.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}onPoiClickListener(t){return this._poi?.onPoiClick(t)}onPointClickListener(t){const e=ps("pointClick.");return this._dispatch?.on(e,t),{unsubscribe:()=>this._dispatch.on(e,null)}}onMapChangeListener(t){return this._indoor?.onMapChange(t)}switchTheme(t){this._setStyle(this._getStyleUrl(t)),"changeTheme"in this._attributionControl&&this._attributionControl.changeTheme(t),this._map?.once("styledata",is((()=>this._setIndoorFilter()),250))}setSelectedBuildingBorderStyle(t){return this._indoor?.setSelectedBuildingBorderStyle(t),this}_getStyleUrl(t){let e;if(vo(s).indexOf(t)>-1)switch(t){case s.CHRISTMAS:e=As;break;case s.HALLOWEEN:e=Ts;break;case s.MAPPY_BEE:e=Ns;break;case s.MAPXUS:e=Hs;break;case s.MAPXUS_V2:e=Ws;break;case s.COMMON:e=Rs;break;case s.LANDS_D:e=Ds}else e=function(t){return Vs(t)}(t);return e}_setIndoorFilter(){this._indoor.updateCustomLayers(),this._indoor.updateRendering()}_setStyle(t){this._map?.setStyle(t,{localIdeographFontFamily:!1})}_addControl(t,e){this._map.addControl(t,e)}async _selectPoiById(t){try{const e=await async function(t){try{return(await $o.searchByIds([t])).data.result.pois[0]}catch(t){throw new Error(t)}}(t),{floorId:i,location:{lon:n,lat:r}}=e;await this.selectFloorById(i),this._map.panTo([n,r])}catch(t){throw new Error(t)}}_resourceRequestTransform(){this._map.setTransformRequest(Vr.transformRequest)}_checkMapZoom(){const t=this._map.getZoom();(t<8||t>22)&&t>1&&console.warn("Indoor maps perform better at zoom levels [8, 22].")}_hideIndoorLayers(){this._map.getLayer("mapxus-venue-fill")&&this._map.setPaintProperty("mapxus-venue-fill","fill-opacity",0),this._map.getLayer("mapxus-building-line-color")&&this._map.setPaintProperty("mapxus-building-line-color","line-opacity",0),this._initialHiddenLayers=d(this._map.getStyle()).filter((({id:t})=>!t.includes("mapxus-building")||"mapxus-venue-fill"!==t)),this._initialHiddenLayers.forEach((({id:t})=>{this._map.getLayer(t)&&this._map.setLayoutProperty(t,"visibility","none")}))}_showIndoorLayers(){ks(this._initialHiddenLayers,(({id:t})=>{this._map.getLayer(t)&&this._map.setLayoutProperty(t,"visibility","visible")}))}_updatePermission(t,e,i){401===t.error?.status&&Vr.verifyPermission(e,i).then((()=>{this._resourceRequestTransform()}))}_selectCenterBuilding(){const t=this._getCenterBuildingsMap();if(t.size){let e=t.entries().next().value[0];const i=this._history.getHistoryBuildings();if(i.size){const n=Array.from(i).reverse();for(const i of n)if(t.get(i)){e=i;break}}this.selectBuildingById(e,{dragPan:!1})}}_getCenterBuildingsMap(){const t=this._map.getCanvas().getBoundingClientRect(),e=t.width/4,i=t.height/4,n=[e,i],r=[t.width-e,t.height-i];let o=this._map.queryRenderedFeatures([n,r],{layers:["mapxus-building-line"]});return o=us(o,"properties.id"),o=ds(o,(t=>!this._hiddenBuildings.has(t.properties.id))),new globalThis.Map(o.map((t=>[`${t.properties.id}`,t])))}}async function Js(t,e){if(!t.hasImage(e))try{const i=await t.loadImage(e);t.addImage(e,i.data)}catch(t){throw new Error(t)}}class Us{_maplibreMap;_layerId;_sourceId;_imageName="poi-01";_imageSize=.75;_iconAnchor="bottom";constructor(t){this._maplibreMap=t;const e=ps();this._layerId=`MXMap_preset_marker_layer_${e}`,this._sourceId=`MXMap_preset_marker_source_${e}`}async setIcon(t){t&&await Js(this._maplibreMap,t),this._imageName=t}setIconSize(t){this._imageSize=t}setIconAnchor(t){this._iconAnchor=t}get layerId(){return this._layerId}get sourceId(){return this._sourceId}create(t){if(t.length){const e=Tr(t,(t=>this._createIconFeature(t)));this._addIconSource(e),this._addIconLayer()}}updateData(t){const e=this._maplibreMap.getSource(this._sourceId);if(!e)return;const i=!(!t.remove||!t.remove.length),n=!(!t.add||!t.add.length),r=!(!t.update||!t.update.length);if(i||n||r){const o={};i&&(o.remove=t.remove.map((t=>String(t)))),n&&(o.add=t.add.map((t=>this._createIconFeature(t)))),r&&(o.update=t.update.map((t=>{const e="properties"in t,i=this._createIconFeature(t),{id:n,geometry:r,properties:o}=i;return{id:n,newGeometry:r,removeAllProperties:e,...o?{addOrUpdateProperties:Tr(o,((t,e)=>({key:e,value:t})))}:{}}}))),e.updateData(o)}}remove(){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.removeLayer(this._layerId),this._maplibreMap.getSource(this._sourceId)&&this._maplibreMap.removeSource(this._sourceId)}on(t,e){const i=t=>this._handleEventListener(t,e);return this._maplibreMap.on(t,this._layerId,i),{off:()=>this._maplibreMap.off(t,this._layerId,i)}}setFilter(t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,t)}setFilterByVenue(t,e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","venueId"],t??""],["==",["get","ordinal"],e??""]],["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]]])}setFilterByBuilding(t,e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","buildingId"],t??""],["==",["get","ordinal"],e??""]],["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]]])}setOpacity(t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",t)}setOpacityByVenue(t,e,i){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","venueId"],t??""],["==",["get","ordinal"],e??""]],1,["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]],1,i??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}setOpacityByBuilding(t,e,i){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","buildingId"],t??""],["==",["get","ordinal"],e??""]],1,["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]],1,i??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}_createIconFeature(t){const{lngLat:e,properties:i}=t;return{id:"featureId"in t&&Ls(t.featureId)?String(t.featureId):void 0,type:"Feature",geometry:{type:"Point",coordinates:e},properties:i||null}}_addIconSource(t){const e={type:"geojson",data:{type:"FeatureCollection",features:t}};this._maplibreMap.addSource(this._sourceId,e)}_addIconLayer(){this._maplibreMap.addLayer({id:this._layerId,type:"symbol",source:this._sourceId,layout:{"icon-image":this._imageName,"icon-size":this._imageSize,"icon-anchor":this._iconAnchor,"icon-allow-overlap":!0}})}_handleEventListener(t,e){const{point:i}=t;e(this._maplibreMap.queryRenderedFeatures(i,{layers:[this._layerId]})[0])}}const qs=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},Qs={indoorLineColor:"#45b1cc",outdoorLineColor:"#8183ba",dashedLineColor:"#969696",shuttleBusLineColor:"#fb923c",lineWidth:4,dashedLineWidth:4,disableDashedLine:!1,inactiveRouteOpacity:.5,markerIconSize:.75,markers:{from:"poi-02",to:"poi-01",stops:["waypoint-01"]},lineSymbol:{image:"east-blue-arrow-01",size:.25,spacing:1}},Ks="mmws-source-line-solid",ta="mmws-layer-line-solid",ea="mmws-layer-icon-triangle",ia="mmws-source-line-dashed",na="mmws-layer-line-dashed",ra="mmws-source-icon-connector",oa="mmws-layer-icon-connector",sa="mmws-source-icon-marker",aa="mmws-layer-icon-marker",la=[ta,ea,na,oa,aa],ua=[Ks,ia,ra,sa];class ca{_maplibreMap;_routeStyle=Qs;_styleDiffs={};_filterBy="venue";_curVenue="";_curBuilding="";_curOrdinal="";constructor(t,e){this._maplibreMap=t,e&&(this._updateStyleProperties(e),t.on("load",(()=>this._loadMarkerIcons())))}async setStyle(t){this._updateStyleProperties(t),await this._loadMarkerIcons(),await this._updateLayers()}async setMarkerIcons(t){if(it(t)&&t.length){const e=t.slice(1,t.length-1);this._routeStyle.markers={from:t[0],to:qs(t),stops:e.length?e:[t[0]]},this._styleDiffs={markers:this._routeStyle.markers}}else"from"in t&&(this._routeStyle.markers.from=t.from,this._styleDiffs.markers.from=t.from),"to"in t&&(this._routeStyle.markers.to=t.to,this._styleDiffs.markers.to=t.to),"stops"in t&&(this._routeStyle.markers.stops=t.stops??[null],this._styleDiffs.markers.stops=t.stops??[null]);await this._loadMarkerIcons()}setMarkerIconSize(t){return this._routeStyle.markerIconSize=t,this}setIndoorLineColor(t){return this._routeStyle.indoorLineColor=t,this}setOutdoorLineColor(t){return this._routeStyle.outdoorLineColor=t,this}setDashedLineColor(t){return this._routeStyle.dashedLineColor=t,this}setBusLineColor(t){return this._routeStyle.shuttleBusLineColor=t,this}render(t,e){const{instructions:i,points:{coordinates:n}}=t,{lineFeatures:r,connectorFeatures:o,dashedLineFeatures:s,markerFeatures:a}=this._classifyFeatures(i,n,e);this._renderSolidLines(r),!0!==this._routeStyle.disableDashedLine&&this._renderDashedLines(s),this._renderConnectors(o),this._renderMarkers(a)}remove(){la.forEach((t=>{this._maplibreMap.getLayer(t)&&this._maplibreMap.removeLayer(t)})),ua.forEach((t=>{this._maplibreMap.getSource(t)&&this._maplibreMap.removeSource(t)}))}setFilterByVenue(t,e){this._filterBy="venue",this._curVenue=t??"",this._curOrdinal=e??"",this._filterRouteOpacity()}setFilterByBuilding(t,e){this._filterBy="building",this._curBuilding=t??"",this._curOrdinal=e??"",this._filterRouteOpacity()}_classifyFeatures(t,e,i){const n=[],r=[],o=[],s=[],a=[];ks(t,((i,o)=>{const{venue_id:s,building_id:l,floor_id:u,ordinal:c,sign:d,type:h,interval:[p,_]}=i;if(function(t){return 5===t}(d))a.push(i);else if(function(t){return 100===t||-100===t}(d)){0!==o&&o!==t.length-1&&r.push(this._createIconFeature(e[p],{...da({venue_id:s,building_id:l,floor_id:u,ordinal:c}),icon:h}));const i=t[o+1];if(i){const{venue_id:t,building_id:n,floor_id:o,ordinal:s}=i;r.push(this._createIconFeature(e[_],{...da({venue_id:t,building_id:n,floor_id:o,ordinal:s}),icon:h}))}}else n.push(this._createLineFeature(e.slice(p,_+1),da({venue_id:s,building_id:l,floor_id:u,ordinal:c,isShuttleBus:ha(d)?1:0})))}));const l=t[0],{venue_id:u,building_id:c,floor_id:d,ordinal:h}=l,p=t[t.length-1],{venue_id:_,building_id:f,floor_id:g,ordinal:m}=p,y=e[0],v=e[e.length-1],b=i[0],w=i[i.length-1],S=i.slice(1,i.length-1);return b&&o.push(this._createLineFeature([b,y],da({venue_id:u,building_id:c,floor_id:d,ordinal:h}))),w&&o.push(this._createLineFeature([v,w],da({venue_id:_,building_id:f,floor_id:g,ordinal:m}))),a.length&&S.length&&a.forEach((({venue_id:t,building_id:i,floor_id:n,ordinal:r,interval:[a]},l)=>{o.push(this._createLineFeature([e[a],S[l]],da({venue_id:t,building_id:i,floor_id:n,ordinal:r}))),s.push(this._createIconFeature(S[l],{...da({venue_id:t,building_id:i,floor_id:n,ordinal:r,markerType:`stops_${l}`}),icon:this._routeStyle.markers.stops[l]??qs(this._routeStyle.markers.stops),iconSize:this._routeStyle.markerIconSize}))})),s.push(this._createIconFeature(b??y,{...da({venue_id:u,building_id:c,floor_id:d,ordinal:h,markerType:"from"}),icon:this._routeStyle.markers.from,iconSize:this._routeStyle.markerIconSize})),s.push(this._createIconFeature(w??v,{...da({venue_id:_,building_id:f,floor_id:g,ordinal:m,markerType:"to"}),icon:this._routeStyle.markers.to,iconSize:this._routeStyle.markerIconSize})),{lineFeatures:n,connectorFeatures:r,dashedLineFeatures:o,markerFeatures:s}}_createLineFeature(t,e){return{type:"Feature",geometry:{type:"LineString",coordinates:t},properties:e}}_createIconFeature(t,e){return{type:"Feature",geometry:{type:"Point",coordinates:t},properties:e}}_renderSolidLines(t){this._addCollectionSource(Ks,t),this._addLineLayer(Ks,ta,{"line-color":["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],""],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor],"line-width":this._routeStyle.lineWidth}),this._addTriangleLayer(Ks,ea)}_renderDashedLines(t){this._addCollectionSource(ia,t),this._addLineLayer(ia,na,{"line-color":this._routeStyle.dashedLineColor,"line-width":this._routeStyle.dashedLineWidth,"line-dasharray":[.1,1.8]})}_renderConnectors(t){this._addCollectionSource(ra,t),this._addIconLayer(ra,oa)}_renderMarkers(t){this._addCollectionSource(sa,t),this._addIconLayer(sa,aa,{"icon-anchor":"bottom"})}_addCollectionSource(t,e){this._maplibreMap.addSource(t,{type:"geojson",data:{type:"FeatureCollection",features:e}})}_addLineLayer(t,e,i){this._maplibreMap.addLayer({id:e,type:"line",source:t,layout:{"line-join":"round","line-cap":"round"},paint:{"line-width":4,...i||{}}})}_addTriangleLayer(t,e){this._maplibreMap.addLayer({id:e,type:"symbol",source:t,layout:{"symbol-placement":"line","symbol-spacing":this._routeStyle.lineSymbol.spacing,"icon-size":this._routeStyle.lineSymbol.size,"icon-image":this._routeStyle.lineSymbol.image}})}_addIconLayer(t,e,i){this._maplibreMap.addLayer({id:e,type:"symbol",source:t,layout:{"icon-image":["get","icon"],"icon-size":["case",["has","iconSize"],["get","iconSize"],1],...i||{}}})}_updateStyleProperties(t){if(this._styleDiffs=pa(this._routeStyle,t??Qs),t){if(Object.keys(this._styleDiffs).length){const t={...this._routeStyle.lineSymbol,...this._styleDiffs.lineSymbol??{}},e=this._styleDiffs.markers;let i=this._routeStyle.markers;e&&Object.keys(e).length&&(i={...i,...e}),this._routeStyle={...this._routeStyle,...this._styleDiffs,markers:i,lineSymbol:t}}}else this._routeStyle=Qs}async _loadMarkerIcons(){const{markers:t,lineSymbol:e}=this._styleDiffs;if(e?.image&&await Js(this._maplibreMap,e.image),t&&Object.keys(t).length){const{from:e,to:i,stops:n}=t;if(e&&await Js(this._maplibreMap,e),i&&await Js(this._maplibreMap,i),n&&n.length){const t=n.filter((t=>!!t));t.length&&await Promise.all(t.map((t=>Js(this._maplibreMap,t))))}}}async _updateLayers(){if(!this._maplibreMap.getLayer(ta))return;const{indoorLineColor:t,outdoorLineColor:e,dashedLineColor:i,shuttleBusLineColor:n,lineWidth:r,dashedLineWidth:o,disableDashedLine:s,inactiveRouteOpacity:a,markerIconSize:l,markers:u,lineSymbol:c}=this._styleDiffs;if((t||e||n)&&this._maplibreMap.setPaintProperty(ta,"line-color",["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],""],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor]),void 0!==r&&r+""&&this._maplibreMap.setPaintProperty(ta,"line-width",r),"boolean"==typeof s?s?this._maplibreMap.setPaintProperty(na,"line-color","transparent"):(this._maplibreMap.setPaintProperty(na,"line-color",this._routeStyle.dashedLineColor),this._maplibreMap.setPaintProperty(na,"line-width",this._routeStyle.dashedLineWidth)):!0!==this._routeStyle.disableDashedLine&&(i&&this._maplibreMap.setPaintProperty(na,"line-color",i),void 0!==o&&o+""&&this._maplibreMap.setPaintProperty(na,"line-width",o)),void 0!==a&&a+""&&this._filterRouteOpacity(),void 0!==l&&l+""&&this._maplibreMap.setLayoutProperty(aa,"icon-size",l),u&&Object.keys(u).length){const{from:t,to:e,stops:i}=u,n=this._maplibreMap.getSource(sa),r=await n.getData();r.features=r.features.map((n=>{const{markerType:r}=n.properties;if(void 0!==t&&"from"===r&&(n.properties.icon=t),void 0!==e&&"to"===r&&(n.properties.icon=e),i&&r.includes("stops")){const t=parseInt(r.split("_")[1]);n.properties.icon=i[t]??qs(i)}return n})),n.setData(r)}if(c){const{image:t,size:e,spacing:i}=c;void 0!==t&&this._maplibreMap.setLayoutProperty(ea,"icon-image",t),void 0!==e&&e+""&&this._maplibreMap.setLayoutProperty(ea,"icon-size",e),void 0!==i&&i+""&&this._maplibreMap.setLayoutProperty(ea,"symbol-spacing",i)}}_filterRouteOpacity(){const t="venue"===this._filterBy?["case",["any",["all",["==",["get","ordinal"],this._curOrdinal],["==",["get","venue_id"],this._curVenue]],["all",["==",["get","ordinal"],""],["==",["get","venue_id"],""]]],1,this._routeStyle.inactiveRouteOpacity]:["case",["any",["all",["==",["get","ordinal"],this._curOrdinal],["==",["get","building_id"],this._curBuilding]],["all",["==",["get","ordinal"],""],["==",["get","building_id"],""]]],1,this._routeStyle.inactiveRouteOpacity];la.forEach((e=>{this._maplibreMap.getLayer(e)&&this._maplibreMap.setPaintProperty(e,e.includes("line")?"line-opacity":"icon-opacity",t)}))}}function da(t){return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,String(e??"")])))}function ha(t){return Fs(t,104,108)}function pa(t,e){const i={};for(const n in e){const r=t[n],o=e[n];if("markers"===n||"lineSymbol"===n)if(it(o)){const t=o.slice(1,o.length-1);i[n]={from:o[0],to:qs(o),stops:t.length?t:[o[0]]}}else{const t=pa(r,o);Object.keys(t).length&&(i[n]=t)}else o+""!=r+""&&(i[n]="stops"===n?o??[null]:o)}return i}return c})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios")):"function"==typeof define&&define.amd?define(["axios"],t):"object"==typeof exports?exports.MapxusMap=t(require("axios")):e.MapxusMap=t(e.axios)}(self,(e=>(()=>{"use strict";var t={7:e=>{var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&_(e,"error",t,i)}(e,r,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,i,n){var r,o,s,c;if(a(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),s=o[t]),void 0===s)s=o[t]=i,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=l(e))>0&&s.length>r&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=u.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):f(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function _(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var c=l.length,u=f(l,c);for(i=0;i<c;++i)n(u[i],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},742:t=>{t.exports=e}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var o=i[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{AccessControl:()=>Ar,AccessControlOrigin:()=>l,BuildingFilterControl:()=>Ts,BuildingSelectorHandler:()=>ra,BuildingsService:()=>Fo,DistanceSearchType:()=>h,FloorSelectorHandler:()=>oa,FloorSwitchMode:()=>o,FloorsControl:()=>zs,Indoor:()=>Es,Map:()=>ua,Marker:()=>ha,OFFSET:()=>Qi,OrientationDistanceSearchType:()=>p,PAGE:()=>Ki,Poi:()=>Fs,PoisOrderBy:()=>c,PoisService:()=>jo,PoisSortBy:()=>u,PresetLanguage:()=>s,RoutePainter:()=>Ba,RouteService:()=>To,SwitchBuildingHandler:()=>na,SwitchOutdoorHandler:()=>ia,ThemeType:()=>a,VERSION:()=>en.rE,VehicleType:()=>d,VenuesService:()=>Eo,convertBrowserLangToPresetLang:()=>tn,getIdentifier:()=>nn});var o,s,a,l,c,u,d,h,p,f,_=n(7);function g(e){return e.layers.filter(m)}function m(e){return e.source===v}function y(e){return e.source!==v}!function(e){e[e.SWITCHED_BY_BUILDING=0]="SWITCHED_BY_BUILDING",e[e.SWITCHED_BY_VENUE=1]="SWITCHED_BY_VENUE"}(o||(o={})),function(e){e.ENGLISH="en",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_TRADITIONAL="zh-Hant",e.JAPANESE="ja",e.KOREAN="ko",e.FILIPINO="fil",e.INDONESIAN="id",e.PORTUGUESE="pt",e.THAI="th",e.VIETNAMESE="vi",e.ARABIC="ar"}(s||(s={})),function(e){e.CHRISTMAS="christmas",e.HALLOWEEN="halloween",e.MAPPY_BEE="mappyBee",e.MAPXUS="mapxus",e.LANDS_D="landsD",e.COMMON="common",e.MAPXUS_V2="mapxus_v2"}(a||(a={})),function(e){e.Self="self",e.Map="map"}(l||(l={})),function(e){e.DEFAULT_NAME="DefaultName"}(c||(c={})),function(e){e.ABSOLUTE_DISTANCE="AbsoluteDistance",e.ACTUAL_DISTANCE="ActualDistance"}(u||(u={})),function(e){e.FOOT="foot",e.WHEELCHAIR="wheelchair",e.ESCALATOR="escalator",e.EMERGENCY="emergency"}(d||(d={})),function(e){e.POINT="Point",e.POLYGON="Polygon"}(h||(h={})),function(e){e.POINT="Point",e.POLYGON="Polygon",e.GATE="Gate"}(p||(p={})),function(e){e.DEFAULT_NAME="DefaultName"}(f||(f={}));const v="indoor-planet";const b="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const L=b||w||Function("return this")();const S=L.Symbol;var I=Object.prototype,B=I.hasOwnProperty,k=I.toString,x=S?S.toStringTag:void 0;const M=function(e){var t=B.call(e,x),i=e[x];try{e[x]=void 0;var n=!0}catch(e){}var r=k.call(e);return n&&(t?e[x]=i:delete e[x]),r};var C=Object.prototype.toString;const E=function(e){return C.call(e)};var P=S?S.toStringTag:void 0;const F=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":P&&P in Object(e)?M(e):E(e)};const O=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const j=function(e){if(!O(e))return!1;var t=F(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const $=L["__core-js_shared__"];var T,A=(T=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"";const V=function(e){return!!A&&A in e};var R=Function.prototype.toString;const N=function(e){if(null!=e){try{return R.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var D=/^\[object .+?Constructor\]$/,H=Function.prototype,W=Object.prototype,z=H.toString,G=W.hasOwnProperty,Z=RegExp("^"+z.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Y=function(e){return!(!O(e)||V(e))&&(j(e)?Z:D).test(N(e))};const X=function(e,t){return null==e?void 0:e[t]};const U=function(e,t){var i=X(e,t);return Y(i)?i:void 0};const J=function(){try{var e=U(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const q=function(e,t,i){"__proto__"==t&&J?J(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};const Q=function(e){return function(t,i,n){for(var r=-1,o=Object(t),s=n(t),a=s.length;a--;){var l=s[e?a:++r];if(!1===i(o[l],l,o))break}return t}};const K=Q();const ee=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n};const te=function(e){return null!=e&&"object"==typeof e};const ie=function(e){return te(e)&&"[object Arguments]"==F(e)};var ne=Object.prototype,re=ne.hasOwnProperty,oe=ne.propertyIsEnumerable;const se=ie(function(){return arguments}())?ie:function(e){return te(e)&&re.call(e,"callee")&&!oe.call(e,"callee")};const ae=Array.isArray;const le=function(){return!1};var ce="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ce&&"object"==typeof module&&module&&!module.nodeType&&module,de=ue&&ue.exports===ce?L.Buffer:void 0;const he=(de?de.isBuffer:void 0)||le;var pe=/^(?:0|[1-9]\d*)$/;const fe=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&pe.test(e))&&e>-1&&e%1==0&&e<t};const _e=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ge={};ge["[object Float32Array]"]=ge["[object Float64Array]"]=ge["[object Int8Array]"]=ge["[object Int16Array]"]=ge["[object Int32Array]"]=ge["[object Uint8Array]"]=ge["[object Uint8ClampedArray]"]=ge["[object Uint16Array]"]=ge["[object Uint32Array]"]=!0,ge["[object Arguments]"]=ge["[object Array]"]=ge["[object ArrayBuffer]"]=ge["[object Boolean]"]=ge["[object DataView]"]=ge["[object Date]"]=ge["[object Error]"]=ge["[object Function]"]=ge["[object Map]"]=ge["[object Number]"]=ge["[object Object]"]=ge["[object RegExp]"]=ge["[object Set]"]=ge["[object String]"]=ge["[object WeakMap]"]=!1;const me=function(e){return te(e)&&_e(e.length)&&!!ge[F(e)]};const ye=function(e){return function(t){return e(t)}};var ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,be=ve&&"object"==typeof module&&module&&!module.nodeType&&module,we=be&&be.exports===ve&&b.process,Le=function(){try{var e=be&&be.require&&be.require("util").types;return e||we&&we.binding&&we.binding("util")}catch(e){}}();var Se=Le&&Le.isTypedArray;const Ie=Se?ye(Se):me;var Be=Object.prototype.hasOwnProperty;const ke=function(e,t){var i=ae(e),n=!i&&se(e),r=!i&&!n&&he(e),o=!i&&!n&&!r&&Ie(e),s=i||n||r||o,a=s?ee(e.length,String):[],l=a.length;for(var c in e)!t&&!Be.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||fe(c,l))||a.push(c);return a};var xe=Object.prototype;const Me=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xe)};const Ce=function(e,t){return function(i){return e(t(i))}};const Ee=Ce(Object.keys,Object);var Pe=Object.prototype.hasOwnProperty;const Fe=function(e){if(!Me(e))return Ee(e);var t=[];for(var i in Object(e))Pe.call(e,i)&&"constructor"!=i&&t.push(i);return t};const Oe=function(e){return null!=e&&_e(e.length)&&!j(e)};const je=function(e){return Oe(e)?ke(e):Fe(e)};const $e=function(e,t){return e&&K(e,t,je)};const Te=function(){this.__data__=[],this.size=0};const Ae=function(e,t){return e===t||e!=e&&t!=t};const Ve=function(e,t){for(var i=e.length;i--;)if(Ae(e[i][0],t))return i;return-1};var Re=Array.prototype.splice;const Ne=function(e){var t=this.__data__,i=Ve(t,e);return!(i<0)&&(i==t.length-1?t.pop():Re.call(t,i,1),--this.size,!0)};const De=function(e){var t=this.__data__,i=Ve(t,e);return i<0?void 0:t[i][1]};const He=function(e){return Ve(this.__data__,e)>-1};const We=function(e,t){var i=this.__data__,n=Ve(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function ze(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ze.prototype.clear=Te,ze.prototype.delete=Ne,ze.prototype.get=De,ze.prototype.has=He,ze.prototype.set=We;const Ge=ze;const Ze=function(){this.__data__=new Ge,this.size=0};const Ye=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const Xe=function(e){return this.__data__.get(e)};const Ue=function(e){return this.__data__.has(e)};const Je=U(L,"Map");const qe=U(Object,"create");const Qe=function(){this.__data__=qe?qe(null):{},this.size=0};const Ke=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var et=Object.prototype.hasOwnProperty;const tt=function(e){var t=this.__data__;if(qe){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return et.call(t,e)?t[e]:void 0};var it=Object.prototype.hasOwnProperty;const nt=function(e){var t=this.__data__;return qe?void 0!==t[e]:it.call(t,e)};const rt=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=qe&&void 0===t?"__lodash_hash_undefined__":t,this};function ot(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Qe,ot.prototype.delete=Ke,ot.prototype.get=tt,ot.prototype.has=nt,ot.prototype.set=rt;const st=ot;const at=function(){this.size=0,this.__data__={hash:new st,map:new(Je||Ge),string:new st}};const lt=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const ct=function(e,t){var i=e.__data__;return lt(t)?i["string"==typeof t?"string":"hash"]:i.map};const ut=function(e){var t=ct(this,e).delete(e);return this.size-=t?1:0,t};const dt=function(e){return ct(this,e).get(e)};const ht=function(e){return ct(this,e).has(e)};const pt=function(e,t){var i=ct(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function ft(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=at,ft.prototype.delete=ut,ft.prototype.get=dt,ft.prototype.has=ht,ft.prototype.set=pt;const _t=ft;const gt=function(e,t){var i=this.__data__;if(i instanceof Ge){var n=i.__data__;if(!Je||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new _t(n)}return i.set(e,t),this.size=i.size,this};function mt(e){var t=this.__data__=new Ge(e);this.size=t.size}mt.prototype.clear=Ze,mt.prototype.delete=Ye,mt.prototype.get=Xe,mt.prototype.has=Ue,mt.prototype.set=gt;const yt=mt;const vt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const bt=function(e){return this.__data__.has(e)};function wt(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new _t;++t<i;)this.add(e[t])}wt.prototype.add=wt.prototype.push=vt,wt.prototype.has=bt;const Lt=wt;const St=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1};const It=function(e,t){return e.has(t)};const Bt=function(e,t,i,n,r,o){var s=1&i,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&i?new Lt:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var f=e[d],_=t[d];if(n)var g=s?n(_,f,d,t,e,o):n(f,_,d,e,t,o);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!St(t,(function(e,t){if(!It(p,t)&&(f===e||r(f,e,i,n,o)))return p.push(t)}))){h=!1;break}}else if(f!==_&&!r(f,_,i,n,o)){h=!1;break}}return o.delete(e),o.delete(t),h};const kt=L.Uint8Array;const xt=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i};const Mt=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i};var Ct=S?S.prototype:void 0,Et=Ct?Ct.valueOf:void 0;const Pt=function(e,t,i,n,r,o,s){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new kt(e),new kt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ae(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=xt;case"[object Set]":var l=1&n;if(a||(a=Mt),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=Bt(a(e),a(t),n,r,o,s);return s.delete(e),u;case"[object Symbol]":if(Et)return Et.call(e)==Et.call(t)}return!1};const Ft=function(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e};const Ot=function(e,t,i){var n=t(e);return ae(e)?n:Ft(n,i(e))};const jt=function(e,t){for(var i=-1,n=null==e?0:e.length,r=0,o=[];++i<n;){var s=e[i];t(s,i,e)&&(o[r++]=s)}return o};const $t=function(){return[]};var Tt=Object.prototype.propertyIsEnumerable,At=Object.getOwnPropertySymbols;const Vt=At?function(e){return null==e?[]:(e=Object(e),jt(At(e),(function(t){return Tt.call(e,t)})))}:$t;const Rt=function(e){return Ot(e,je,Vt)};var Nt=Object.prototype.hasOwnProperty;const Dt=function(e,t,i,n,r,o){var s=1&i,a=Rt(e),l=a.length;if(l!=Rt(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:Nt.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=s;++c<l;){var _=e[u=a[c]],g=t[u];if(n)var m=s?n(g,_,u,t,e,o):n(_,g,u,e,t,o);if(!(void 0===m?_===g||r(_,g,i,n,o):m)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(e),o.delete(t),p};const Ht=U(L,"DataView");const Wt=U(L,"Promise");const zt=U(L,"Set");const Gt=U(L,"WeakMap");var Zt="[object Map]",Yt="[object Promise]",Xt="[object Set]",Ut="[object WeakMap]",Jt="[object DataView]",qt=N(Ht),Qt=N(Je),Kt=N(Wt),ei=N(zt),ti=N(Gt),ii=F;(Ht&&ii(new Ht(new ArrayBuffer(1)))!=Jt||Je&&ii(new Je)!=Zt||Wt&&ii(Wt.resolve())!=Yt||zt&&ii(new zt)!=Xt||Gt&&ii(new Gt)!=Ut)&&(ii=function(e){var t=F(e),i="[object Object]"==t?e.constructor:void 0,n=i?N(i):"";if(n)switch(n){case qt:return Jt;case Qt:return Zt;case Kt:return Yt;case ei:return Xt;case ti:return Ut}return t});const ni=ii;var ri="[object Arguments]",oi="[object Array]",si="[object Object]",ai=Object.prototype.hasOwnProperty;const li=function(e,t,i,n,r,o){var s=ae(e),a=ae(t),l=s?oi:ni(e),c=a?oi:ni(t),u=(l=l==ri?si:l)==si,d=(c=c==ri?si:c)==si,h=l==c;if(h&&he(e)){if(!he(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new yt),s||Ie(e)?Bt(e,t,i,n,r,o):Pt(e,t,l,i,n,r,o);if(!(1&i)){var p=u&&ai.call(e,"__wrapped__"),f=d&&ai.call(t,"__wrapped__");if(p||f){var _=p?e.value():e,g=f?t.value():t;return o||(o=new yt),r(_,g,i,n,o)}}return!!h&&(o||(o=new yt),Dt(e,t,i,n,r,o))};const ci=function e(t,i,n,r,o){return t===i||(null==t||null==i||!te(t)&&!te(i)?t!=t&&i!=i:li(t,i,n,r,e,o))};const ui=function(e,t,i,n){var r=i.length,o=r,s=!n;if(null==e)return!o;for(e=Object(e);r--;){var a=i[r];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++r<o;){var l=(a=i[r])[0],c=e[l],u=a[1];if(s&&a[2]){if(void 0===c&&!(l in e))return!1}else{var d=new yt;if(n)var h=n(c,u,l,e,t,d);if(!(void 0===h?ci(u,c,3,n,d):h))return!1}}return!0};const di=function(e){return e==e&&!O(e)};const hi=function(e){for(var t=je(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,di(r)]}return t};const pi=function(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}};const fi=function(e){var t=hi(e);return 1==t.length&&t[0][2]?pi(t[0][0],t[0][1]):function(i){return i===e||ui(i,e,t)}};const _i=function(e){return"symbol"==typeof e||te(e)&&"[object Symbol]"==F(e)};var gi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mi=/^\w*$/;const yi=function(e,t){if(ae(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!_i(e))||(mi.test(e)||!gi.test(e)||null!=t&&e in Object(t))};function vi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var s=e.apply(this,n);return i.cache=o.set(r,s)||o,s};return i.cache=new(vi.Cache||_t),i}vi.Cache=_t;const bi=vi;var wi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Li=/\\(\\)?/g;const Si=function(e){var t=bi(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(wi,(function(e,i,n,r){t.push(n?r.replace(Li,"$1"):i||e)})),t}));const Ii=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r};var Bi=S?S.prototype:void 0,ki=Bi?Bi.toString:void 0;const xi=function e(t){if("string"==typeof t)return t;if(ae(t))return Ii(t,e)+"";if(_i(t))return ki?ki.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i};const Mi=function(e){return null==e?"":xi(e)};const Ci=function(e,t){return ae(e)?e:yi(e,t)?[e]:Si(Mi(e))};const Ei=function(e){if("string"==typeof e||_i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};const Pi=function(e,t){for(var i=0,n=(t=Ci(t,e)).length;null!=e&&i<n;)e=e[Ei(t[i++])];return i&&i==n?e:void 0};const Fi=function(e,t,i){var n=null==e?void 0:Pi(e,t);return void 0===n?i:n};const Oi=function(e,t){return null!=e&&t in Object(e)};const ji=function(e,t,i){for(var n=-1,r=(t=Ci(t,e)).length,o=!1;++n<r;){var s=Ei(t[n]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&_e(r)&&fe(s,r)&&(ae(e)||se(e))};const $i=function(e,t){return null!=e&&ji(e,t,Oi)};const Ti=function(e,t){return yi(e)&&di(t)?pi(Ei(e),t):function(i){var n=Fi(i,e);return void 0===n&&n===t?$i(i,e):ci(t,n,3)}};const Ai=function(e){return e};const Vi=function(e){return function(t){return null==t?void 0:t[e]}};const Ri=function(e){return function(t){return Pi(t,e)}};const Ni=function(e){return yi(e)?Vi(Ei(e)):Ri(e)};const Di=function(e){return"function"==typeof e?e:null==e?Ai:"object"==typeof e?ae(e)?Ti(e[0],e[1]):fi(e):Ni(e)};const Hi=function(e,t){var i={};return t=Di(t,3),$e(e,(function(e,n,r){q(i,t(e,n,r),e)})),i};const Wi=function(e,t,i,n){var r=-1,o=null==e?0:e.length;for(n&&o&&(i=e[++r]);++r<o;)i=t(i,e[r],r,e);return i};const zi=function(e,t){return function(i,n){if(null==i)return i;if(!Oe(i))return e(i,n);for(var r=i.length,o=t?r:-1,s=Object(i);(t?o--:++o<r)&&!1!==n(s[o],o,s););return i}};const Gi=zi($e);const Zi=function(e,t,i,n,r){return r(e,(function(e,r,o){i=n?(n=!1,e):t(i,e,r,o)})),i};const Yi=function(e,t,i){var n=ae(e)?Wi:Zi,r=arguments.length<3;return n(e,Di(t,4),i,r,Gi)};function Xi(e){const{buildingId:t,labelCenter:{lat:i,lon:n},floors:r,name:o,venueId:s,defaultFloor:a}=e,l=Hi(o,((e,t)=>"default"===t?"name":`name:${t}`)),{codes:c,ids:u,ordinals:d}=r.reduce(((e,t)=>{const{id:i,code:n,ordinal:r}=t;return{codes:e.codes?`${e.codes},${n}`:n,ids:e.ids?`${e.ids},${i}`:i,ordinals:`${e.ordinals}`?`${e.ordinals},${r}`:`${r}`}}),{codes:"",ids:"",ordinals:""});return{layer:{id:"mapxus-building-line"},properties:{building:"yes",id:t,label_center:`${n},${i}`,level_ids:u,level_names:c,ordinals:d,"ref:venue":s,...l,...a?{default_displayed_floor:a}:{}},source:"indoor-planet",sourceLayer:"mapxus_building"}}var Ui=n(742),Ji=n.n(Ui);const qi="https://map-api.mapxus.co.jp/bms",Qi=10,Ki=1,en={rE:"8.2.0"};function tn(e){return function(e){return/^en(-(US|GB|AU))?$/.test(e)}(e)?s.ENGLISH:function(e){return/^zh(-(Hans|CN))?$/.test(e)}(e)?s.CHINESE_SIMPLIFIED:function(e){return/^zh-(Hant|HK|TW)$/.test(e)}(e)?s.CHINESE_TRADITIONAL:function(e){return/^ja(-JP)?$/.test(e)}(e)?s.JAPANESE:function(e){return/^ko(-KR)?$/.test(e)}(e)?s.KOREAN:function(e){return/^(fil|tl)(-PH)?$/.test(e)}(e)?s.FILIPINO:function(e){return/^id(-ID)?$/.test(e)}(e)?s.INDONESIAN:function(e){return/^pt(-(BR|PT))?$/.test(e)}(e)?s.PORTUGUESE:function(e){return/^th(-TH)?$/.test(e)}(e)?s.THAI:function(e){return/^vi(-VN)?$/.test(e)}(e)?s.VIETNAMESE:function(e){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(e)}(e)?s.ARABIC:null}async function nn(){return Vr.getInstance().getIdentifier()}class rn extends Error{}function on(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,((e,t)=>{let i=t.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i})))}(t)}catch(e){return atob(t)}}rn.prototype.name="InvalidTokenError";var sn=function(){return sn=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},sn.apply(this,arguments)};function an(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function ln(e,t){var i,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function cn(e,t,i){if(i||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var un="4.5.1";function dn(e,t){return new Promise((function(i){return setTimeout(i,e,t)}))}function hn(e){return!!e&&"function"==typeof e.then}function pn(e,t){try{var i=e();hn(i)?i.then((function(e){return t(!0,e)}),(function(e){return t(!1,e)})):t(!0,i)}catch(e){t(!1,e)}}function fn(e,t,i){return void 0===i&&(i=16),an(this,void 0,void 0,(function(){var n,r,o,s;return ln(this,(function(a){switch(a.label){case 0:n=Array(e.length),r=Date.now(),o=0,a.label=1;case 1:return o<e.length?(n[o]=t(e[o],o),(s=Date.now())>=r+i?(r=s,[4,new Promise((function(e){var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(null)}))]):[3,3]):[3,4];case 2:a.sent(),a.label=3;case 3:return++o,[3,1];case 4:return[2,n]}}))}))}function _n(e){return e.then(void 0,(function(){})),e}function gn(e){return parseInt(e)}function mn(e){return parseFloat(e)}function yn(e,t){return"number"==typeof e&&isNaN(e)?t:e}function vn(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function bn(e,t){if(void 0===t&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var i=1/t;return Math.round(e*i)/i}function wn(e,t){var i=e[0]>>>16,n=65535&e[0],r=e[1]>>>16,o=65535&e[1],s=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,c=0,u=0,d=0,h=0;d+=(h+=o+(65535&t[1]))>>>16,h&=65535,u+=(d+=r+l)>>>16,d&=65535,c+=(u+=n+a)>>>16,u&=65535,c+=i+s,c&=65535,e[0]=c<<16|u,e[1]=d<<16|h}function Ln(e,t){var i=e[0]>>>16,n=65535&e[0],r=e[1]>>>16,o=65535&e[1],s=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,c=65535&t[1],u=0,d=0,h=0,p=0;h+=(p+=o*c)>>>16,p&=65535,d+=(h+=r*c)>>>16,h&=65535,d+=(h+=o*l)>>>16,h&=65535,u+=(d+=n*c)>>>16,d&=65535,u+=(d+=r*l)>>>16,d&=65535,u+=(d+=o*a)>>>16,d&=65535,u+=i*c+n*l+r*a+o*s,u&=65535,e[0]=u<<16|d,e[1]=h<<16|p}function Sn(e,t){var i=e[0];32===(t%=64)?(e[0]=e[1],e[1]=i):t<32?(e[0]=i<<t|e[1]>>>32-t,e[1]=e[1]<<t|i>>>32-t):(t-=32,e[0]=e[1]<<t|i>>>32-t,e[1]=i<<t|e[1]>>>32-t)}function In(e,t){0!==(t%=64)&&(t<32?(e[0]=e[1]>>>32-t,e[1]=e[1]<<t):(e[0]=e[1]<<t-32,e[1]=0))}function Bn(e,t){e[0]^=t[0],e[1]^=t[1]}var kn=[4283543511,3981806797],xn=[3301882366,444984403];function Mn(e){var t=[0,e[0]>>>1];Bn(e,t),Ln(e,kn),t[1]=e[0]>>>1,Bn(e,t),Ln(e,xn),t[1]=e[0]>>>1,Bn(e,t)}var Cn=[2277735313,289559509],En=[1291169091,658871167],Pn=[0,5],Fn=[0,1390208809],On=[0,944331445];function jn(e,t){var i=function(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;i++){var n=e.charCodeAt(i);if(n>127)return(new TextEncoder).encode(e);t[i]=n}return t}(e);t=t||0;var n,r=[0,i.length],o=r[1]%16,s=r[1]-o,a=[0,t],l=[0,t],c=[0,0],u=[0,0];for(n=0;n<s;n+=16)c[0]=i[n+4]|i[n+5]<<8|i[n+6]<<16|i[n+7]<<24,c[1]=i[n]|i[n+1]<<8|i[n+2]<<16|i[n+3]<<24,u[0]=i[n+12]|i[n+13]<<8|i[n+14]<<16|i[n+15]<<24,u[1]=i[n+8]|i[n+9]<<8|i[n+10]<<16|i[n+11]<<24,Ln(c,Cn),Sn(c,31),Ln(c,En),Bn(a,c),Sn(a,27),wn(a,l),Ln(a,Pn),wn(a,Fn),Ln(u,En),Sn(u,33),Ln(u,Cn),Bn(l,u),Sn(l,31),wn(l,a),Ln(l,Pn),wn(l,On);c[0]=0,c[1]=0,u[0]=0,u[1]=0;var d=[0,0];switch(o){case 15:d[1]=i[n+14],In(d,48),Bn(u,d);case 14:d[1]=i[n+13],In(d,40),Bn(u,d);case 13:d[1]=i[n+12],In(d,32),Bn(u,d);case 12:d[1]=i[n+11],In(d,24),Bn(u,d);case 11:d[1]=i[n+10],In(d,16),Bn(u,d);case 10:d[1]=i[n+9],In(d,8),Bn(u,d);case 9:d[1]=i[n+8],Bn(u,d),Ln(u,En),Sn(u,33),Ln(u,Cn),Bn(l,u);case 8:d[1]=i[n+7],In(d,56),Bn(c,d);case 7:d[1]=i[n+6],In(d,48),Bn(c,d);case 6:d[1]=i[n+5],In(d,40),Bn(c,d);case 5:d[1]=i[n+4],In(d,32),Bn(c,d);case 4:d[1]=i[n+3],In(d,24),Bn(c,d);case 3:d[1]=i[n+2],In(d,16),Bn(c,d);case 2:d[1]=i[n+1],In(d,8),Bn(c,d);case 1:d[1]=i[n],Bn(c,d),Ln(c,Cn),Sn(c,31),Ln(c,En),Bn(a,c)}return Bn(a,r),Bn(l,r),wn(a,l),wn(l,a),Mn(a),Mn(l),wn(a,l),wn(l,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)}function $n(e){return"function"!=typeof e}function Tn(e,t,i,n){var r=Object.keys(e).filter((function(e){return!function(e,t){for(var i=0,n=e.length;i<n;++i)if(e[i]===t)return!0;return!1}(i,e)})),o=_n(fn(r,(function(i){return function(e,t){var i=_n(new Promise((function(i){var n=Date.now();pn(e.bind(null,t),(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Date.now()-n;if(!e[0])return i((function(){return{error:e[1],duration:r}}));var o=e[1];if($n(o))return i((function(){return{value:o,duration:r}}));i((function(){return new Promise((function(e){var t=Date.now();pn(o,(function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=r+Date.now()-t;if(!i[0])return e({error:i[1],duration:o});e({value:i[1],duration:o})}))}))}))}))})));return function(){return i.then((function(e){return e()}))}}(e[i],t)}),n));return function(){return an(this,void 0,void 0,(function(){var e,t,i,s;return ln(this,(function(a){switch(a.label){case 0:return[4,o];case 1:return[4,fn(a.sent(),(function(e){return _n(e())}),n)];case 2:return e=a.sent(),[4,Promise.all(e)];case 3:for(t=a.sent(),i={},s=0;s<r.length;++s)i[r[s]]=t[s];return[2,i]}}))}))}}function An(){var e=window,t=navigator;return vn(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function Vn(){var e=window,t=navigator;return vn(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function Rn(){var e=window;return vn(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function Nn(){var e=window,t=e.HTMLElement,i=e.Document;return vn(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),i&&"pointerLockElement"in i.prototype])>=4}function Dn(){var e,t=window;return e=t.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))&&"[object WebPageNamespace]"===String(t.browser)}function Hn(){var e,t,i=window;return vn(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in i,"mozInnerScreenX"in i,"CSSMozDocumentRule"in i,"CanvasCaptureMediaStream"in i])>=4}function Wn(){var e=window,t=navigator,i=e.CSS,n=e.HTMLButtonElement;return vn([!("getStorageUpdates"in t),n&&"popover"in n.prototype,"CSSCounterStyleRule"in e,i.supports("font-size-adjust: ex-height 0.5"),i.supports("text-transform: full-width")])>=4}function zn(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function Gn(){var e=Vn(),t=Hn(),i=window,n=navigator,r="connection";return e?vn([!("SharedWorker"in i),n[r]&&"ontypechange"in n[r],!("sinkId"in new Audio)])>=2:!!t&&vn(["onorientationchange"in i,"orientation"in i,/android/i.test(n.appVersion)])>=2}function Zn(e){var t=new Error(e);return t.name=e,t}function Yn(e,t,i){var n,r,o;return void 0===i&&(i=50),an(this,void 0,void 0,(function(){var s,a;return ln(this,(function(l){switch(l.label){case 0:s=document,l.label=1;case 1:return s.body?[3,3]:[4,dn(i)];case 2:return l.sent(),[3,1];case 3:a=s.createElement("iframe"),l.label=4;case 4:return l.trys.push([4,,10,11]),[4,new Promise((function(e,i){var n=!1,r=function(){n=!0,e()};a.onload=r,a.onerror=function(e){n=!0,i(e)};var o=a.style;o.setProperty("display","block","important"),o.position="absolute",o.top="0",o.left="0",o.visibility="hidden",t&&"srcdoc"in a?a.srcdoc=t:a.src="about:blank",s.body.appendChild(a);var l=function(){var e,t;n||("complete"===(null===(t=null===(e=a.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?r():setTimeout(l,10))};l()}))];case 5:l.sent(),l.label=6;case 6:return(null===(r=null===(n=a.contentWindow)||void 0===n?void 0:n.document)||void 0===r?void 0:r.body)?[3,8]:[4,dn(i)];case 7:return l.sent(),[3,6];case 8:return[4,e(a,a.contentWindow)];case 9:return[2,l.sent()];case 10:return null===(o=a.parentNode)||void 0===o||o.removeChild(a),[7];case 11:return[2]}}))}))}function Xn(e){for(var t=function(e){for(var t,i,n="Unexpected syntax '".concat(e,"'"),r=/^\s*([a-z-]*)(.*)$/i.exec(e),o=r[1]||void 0,s={},a=/([.:#][\w-]+|\[.+?\])/gi,l=function(e,t){s[e]=s[e]||[],s[e].push(t)};;){var c=a.exec(r[2]);if(!c)break;var u=c[0];switch(u[0]){case".":l("class",u.slice(1));break;case"#":l("id",u.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(u);if(!d)throw new Error(n);l(d[1],null!==(i=null!==(t=d[4])&&void 0!==t?t:d[5])&&void 0!==i?i:"");break;default:throw new Error(n)}}return[o,s]}(e),i=t[0],n=t[1],r=document.createElement(null!=i?i:"div"),o=0,s=Object.keys(n);o<s.length;o++){var a=s[o],l=n[a].join(" ");"style"===a?Un(r.style,l):r.setAttribute(a,l)}return r}function Un(e,t){for(var i=0,n=t.split(";");i<n.length;i++){var r=n[i],o=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(r);if(o){var s=o[1],a=o[2],l=o[4];e.setProperty(s,a,l||"")}}}var Jn=["monospace","sans-serif","serif"],qn=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Qn(e){return e.toDataURL()}var Kn,er;function tr(){var e=this;return function(){if(void 0===er){var e=function(){var t=ir();nr(t)?er=setTimeout(e,2500):(Kn=t,er=void 0)};e()}}(),function(){return an(e,void 0,void 0,(function(){var e;return ln(this,(function(t){switch(t.label){case 0:return nr(e=ir())?Kn?[2,cn([],Kn,!0)]:(i=document).fullscreenElement||i.msFullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement?[4,zn()]:[3,2]:[3,2];case 1:t.sent(),e=ir(),t.label=2;case 2:return nr(e)||(Kn=e),[2,e]}var i}))}))}}function ir(){var e=screen;return[yn(mn(e.availTop),null),yn(mn(e.width)-mn(e.availWidth)-yn(mn(e.availLeft),0),null),yn(mn(e.height)-mn(e.availHeight)-yn(mn(e.availTop),0),null),yn(mn(e.availLeft),null)]}function nr(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}function rr(e){var t;return an(this,void 0,void 0,(function(){var i,n,r,o,s,a,l;return ln(this,(function(c){switch(c.label){case 0:for(i=document,n=i.createElement("div"),r=new Array(e.length),o={},or(n),l=0;l<e.length;++l)"DIALOG"===(s=Xn(e[l])).tagName&&s.show(),or(a=i.createElement("div")),a.appendChild(s),n.appendChild(a),r[l]=s;c.label=1;case 1:return i.body?[3,3]:[4,dn(50)];case 2:return c.sent(),[3,1];case 3:i.body.appendChild(n);try{for(l=0;l<e.length;++l)r[l].offsetParent||(o[e[l]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,o]}}))}))}function or(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function sr(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function ar(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function lr(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function cr(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function ur(e){return matchMedia("(prefers-reduced-transparency: ".concat(e,")")).matches}function dr(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var hr=Math,pr=function(){return 0};var fr={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var _r=function(){for(var e=window;;){var t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return!0;throw e}e=t}};var gr=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),mr=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),yr=["FRAGMENT_SHADER","VERTEX_SHADER"],vr=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],br="WEBGL_debug_renderer_info";function wr(e){if(e.webgl)return e.webgl.context;var t,i=document.createElement("canvas");i.addEventListener("webglCreateContextError",(function(){return t=void 0}));for(var n=0,r=["webgl","experimental-webgl"];n<r.length;n++){var o=r[n];try{t=i.getContext(o)}catch(e){}if(t)break}return e.webgl={context:t},t}function Lr(e,t,i){var n=e.getShaderPrecisionFormat(e[t],e[i]);return n?[n.rangeMin,n.rangeMax,n.precision]:[]}function Sr(e){return Object.keys(e.__proto__).filter(Ir)}function Ir(e){return"string"==typeof e&&!e.match(/[^A-Z0-9_x]/)}function Br(){return Hn()}function kr(e){return"function"==typeof e.getParameter}var xr={fonts:function(){var e=this;return Yn((function(t,i){var n=i.document;return an(e,void 0,void 0,(function(){var e,t,i,r,o,s,a,l,c,u,d;return ln(this,(function(h){for((e=n.body).style.fontSize="48px",(t=n.createElement("div")).style.setProperty("visibility","hidden","important"),i={},r={},o=function(e){var i=n.createElement("span"),r=i.style;return r.position="absolute",r.top="0",r.left="0",r.fontFamily=e,i.textContent="mmMwWLliI0O&1",t.appendChild(i),i},s=function(e,t){return o("'".concat(e,"',").concat(t))},a=function(){for(var e={},t=function(t){e[t]=Jn.map((function(e){return s(t,e)}))},i=0,n=qn;i<n.length;i++){t(n[i])}return e},l=function(e){return Jn.some((function(t,n){return e[n].offsetWidth!==i[t]||e[n].offsetHeight!==r[t]}))},c=function(){return Jn.map(o)}(),u=a(),e.appendChild(t),d=0;d<Jn.length;d++)i[Jn[d]]=c[d].offsetWidth,r[Jn[d]]=c[d].offsetHeight;return[2,qn.filter((function(e){return l(u[e])}))]}))}))}))},domBlockers:function(e){var t=(void 0===e?{}:e).debug;return an(this,void 0,void 0,(function(){var e,i,n,r,o;return ln(this,(function(s){switch(s.label){case 0:return Rn()||Gn()?(a=atob,e={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',a("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",a("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",a("LnNwb25zb3JpdA=="),".ylamainos",a("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",a("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",a("LmhlYWRlci1ibG9ja2VkLWFk"),a("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",a("I2FkXzMwMFgyNTA="),a("I2Jhbm5lcmZsb2F0MjI="),a("I2NhbXBhaWduLWJhbm5lcg=="),a("I0FkLUNvbnRlbnQ=")],adGuardChinese:[a("LlppX2FkX2FfSA=="),a("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",a("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),a("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",a("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",a("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",a("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),a("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),a("LmFkZ29vZ2xl"),a("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[a("YW1wLWF1dG8tYWRz"),a("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",a("I2FkX2ludmlld19hcmVh")],adGuardRussian:[a("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),a("LnJlY2xhbWE="),'div[id^="smi2adblock"]',a("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[a("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),a("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",a("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),a("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),a("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",a("I3Jla2xhbWk="),a("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),a("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),a("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[a("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",a("LndpZGdldF9wb19hZHNfd2lkZ2V0"),a("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",a("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[a("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),a("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",a("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",a("I3Jla2xhbW5pLWJveA=="),a("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",a("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[a("I2FkdmVydGVudGll"),a("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",a("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",a("LnNwb25zb3JsaW5rZ3J1ZW4="),a("I3dlcmJ1bmdza3k="),a("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),a("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[a("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",a("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[a("LnJla2xhbW9zX3RhcnBhcw=="),a("LnJla2xhbW9zX251b3JvZG9z"),a("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),a("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),a("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[a("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[a("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),a("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",a("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[a("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),a("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),a("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",a("LmFkX19tYWlu"),a("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[a("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),a("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[a("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),a("I2xpdmVyZUFkV3JhcHBlcg=="),a("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),a("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[a("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",a("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),a("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),a("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[a("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),a("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),a("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",a("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),a("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),a("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),a("ZGl2I3NrYXBpZWNfYWQ=")],ro:[a("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),a("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),a("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[a("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),a("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),a("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",a("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),a("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",a("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},i=Object.keys(e),[4,rr((o=[]).concat.apply(o,i.map((function(t){return e[t]}))))]):[2,void 0];case 1:return n=s.sent(),t&&function(e,t){for(var i="DOM blockers debug:\n```",n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];i+="\n".concat(o,":");for(var s=0,a=e[o];s<a.length;s++){var l=a[s];i+="\n ".concat(t[l]?"🚫":"➡️"," ").concat(l)}}console.log("".concat(i,"\n```"))}(e,n),(r=i.filter((function(t){var i=e[t];return vn(i.map((function(e){return n[e]})))>.6*i.length}))).sort(),[2,r]}var a}))}))},fontPreferences:function(){return function(e,t){void 0===t&&(t=4e3);return Yn((function(i,n){var r=n.document,o=r.body,s=o.style;s.width="".concat(t,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",Vn()?o.style.zoom="".concat(1/n.devicePixelRatio):Rn()&&(o.style.zoom="reset");var a=r.createElement("div");return a.textContent=cn([],Array(t/20|0),!0).map((function(){return"word"})).join(" "),o.appendChild(a),e(r,o)}),'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((function(e,t){for(var i={},n={},r=0,o=Object.keys(fr);r<o.length;r++){var s=o[r],a=fr[s],l=a[0],c=void 0===l?{}:l,u=a[1],d=void 0===u?"mmMwWLliI0fiflO&1":u,h=e.createElement("span");h.textContent=d,h.style.whiteSpace="nowrap";for(var p=0,f=Object.keys(c);p<f.length;p++){var _=f[p],g=c[_];void 0!==g&&(h.style[_]=g)}i[s]=h,t.append(e.createElement("br"),h)}for(var m=0,y=Object.keys(fr);m<y.length;m++){n[s=y[m]]=i[s].getBoundingClientRect().width}return n}))},audio:function(){return Rn()&&Wn()&&Dn()||Vn()&&(e=navigator,t=window,i=Audio.prototype,n=t.visualViewport,vn(["srLatency"in i,"srChannelCount"in i,"devicePosture"in e,n&&"segments"in n,"getTextInformation"in Image.prototype])>=3)&&function(){var e=window,t=e.URLPattern;return vn(["union"in Set.prototype,"Iterator"in e,t&&"hasRegExpGroups"in t.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}()?-4:function(){var e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(Rn()&&!Nn()&&!function(){var e=window;return vn(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return-1;var i=4500,n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;var o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);var s=function(e){var t=3,i=500,n=500,r=5e3,o=function(){},s=new Promise((function(s,a){var l=!1,c=0,u=0;e.oncomplete=function(e){return s(e.renderedBuffer)};var d=function(){setTimeout((function(){return a(Zn("timeout"))}),Math.min(n,u+r-Date.now()))},h=function(){try{var n=e.startRendering();switch(hn(n)&&_n(n),e.state){case"running":u=Date.now(),l&&d();break;case"suspended":document.hidden||c++,l&&c>=t?a(Zn("suspended")):setTimeout(h,i)}}catch(e){a(e)}};h(),o=function(){l||(l=!0,u>0&&d())}}));return[s,o]}(n),a=s[0],l=s[1],c=_n(a.then((function(e){return function(e){for(var t=0,i=0;i<e.length;++i)t+=Math.abs(e[i]);return t}(e.getChannelData(0).subarray(i))}),(function(e){if("timeout"===e.name||"suspended"===e.name)return-3;throw e})));return function(){return l(),c}}();var e,t,i,n},screenFrame:function(){var e=this;if(Rn()&&Wn()&&Dn())return function(){return Promise.resolve(void 0)};var t=tr();return function(){return an(e,void 0,void 0,(function(){var e,i;return ln(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return e=n.sent(),[2,[(i=function(e){return null===e?null:bn(e,10)})(e[0]),i(e[1]),i(e[2]),i(e[3])]]}}))}))}},canvas:function(){return function(e){var t,i,n,r=!1,o=function(){var e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}(),s=o[0],a=o[1];!function(e,t){return!(!t||!e.toDataURL)}(s,a)?i=n="unsupported":(r=function(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(a),e?i=n="skipped":(t=function(e,t){!function(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';var i="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));t.fillText(i,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(i,4,45)}(e,t);var i=Qn(e),n=Qn(e);if(i!==n)return["unstable","unstable"];!function(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(var i=0,n=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];i<n.length;i++){var r=n[i],o=r[0],s=r[1],a=r[2];t.fillStyle=o,t.beginPath(),t.arc(s,a,40,0,2*Math.PI,!0),t.closePath(),t.fill()}t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd")}(e,t);var r=Qn(e);return[r,i]}(s,a),i=t[0],n=t[1]));return{winding:r,geometry:i,text:n}}(Rn()&&Wn()&&Dn())},osCpu:function(){return navigator.oscpu},languages:function(){var e,t=navigator,i=[],n=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==n&&i.push([n]),Array.isArray(t.languages))Vn()&&vn([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||i.push(t.languages);else if("string"==typeof t.languages){var r=t.languages;r&&i.push(r.split(","))}return i},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return yn(mn(navigator.deviceMemory),void 0)},screenResolution:function(){var e,t,i;if(!(Rn()&&Wn()&&Dn()))return e=screen,(i=[(t=function(e){return yn(gn(e),null)})(e.width),t(e.height)]).sort().reverse(),i},hardwareConcurrency:function(){return yn(gn(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var i=(new t).resolvedOptions().timeZone;if(i)return i}var n,r=(n=(new Date).getFullYear(),-Math.max(mn(new Date(n,0,1).getTimezoneOffset()),mn(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(r>=0?"+":"").concat(r)},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){var e,t;if(!(An()||(e=window,t=navigator,vn(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!An())))try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&Rn()&&!Nn()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return vn(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],i=0;i<e.length;++i){var n=e[i];if(n){for(var r=[],o=0;o<n.length;++o){var s=n[o];r.push({type:s.type,suffixes:s.suffixes})}t.push({name:n.name,description:n.description,mimeTypes:r})}}return t}},touchSupport:function(){var e,t=navigator,i=0;void 0!==t.maxTouchPoints?i=gn(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(i=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return{maxTouchPoints:i,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],t=0,i=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];t<i.length;t++){var n=i[t],r=window[n];r&&"object"==typeof r&&e.push(n)}return e.sort()},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(e){return!1}},colorGamut:function(){for(var e=0,t=["rec2020","p3","srgb"];e<t.length;e++){var i=t[e];if(matchMedia("(color-gamut: ".concat(i,")")).matches)return i}},invertedColors:function(){return!!sr("inverted")||!sr("none")&&void 0},forcedColors:function(){return!!ar("active")||!ar("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var e=0;e<=100;++e)if(matchMedia("(max-monochrome: ".concat(e,")")).matches)return e;throw new Error("Too high value")}},contrast:function(){return lr("no-preference")?0:lr("high")||lr("more")?1:lr("low")||lr("less")?-1:lr("forced")?10:void 0},reducedMotion:function(){return!!cr("reduce")||!cr("no-preference")&&void 0},reducedTransparency:function(){return!!ur("reduce")||!ur("no-preference")&&void 0},hdr:function(){return!!dr("high")||!dr("standard")&&void 0},math:function(){var e,t=hr.acos||pr,i=hr.acosh||pr,n=hr.asin||pr,r=hr.asinh||pr,o=hr.atanh||pr,s=hr.atan||pr,a=hr.sin||pr,l=hr.sinh||pr,c=hr.cos||pr,u=hr.cosh||pr,d=hr.tan||pr,h=hr.tanh||pr,p=hr.exp||pr,f=hr.expm1||pr,_=hr.log1p||pr;return{acos:t(.12312423423423424),acosh:i(1e308),acoshPf:(e=1e154,hr.log(e+hr.sqrt(e*e-1))),asin:n(.12312423423423424),asinh:r(1),asinhPf:function(e){return hr.log(e+hr.sqrt(e*e+1))}(1),atanh:o(.5),atanhPf:function(e){return hr.log((1+e)/(1-e))/2}(.5),atan:s(.5),sin:a(-1e300),sinh:l(1),sinhPf:function(e){return hr.exp(e)-1/hr.exp(e)/2}(1),cos:c(10.000000000123),cosh:u(1),coshPf:function(e){return(hr.exp(e)+1/hr.exp(e))/2}(1),tan:d(-1e300),tanh:h(1),tanhPf:function(e){return(hr.exp(2*e)-1)/(hr.exp(2*e)+1)}(1),exp:p(1),expm1:f(1),expm1Pf:function(e){return hr.exp(e)-1}(1),log1p:_(10),log1pPf:function(e){return hr.log(1+e)}(10),powPI:function(e){return hr.pow(hr.PI,e)}(-100)}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]},applePay:function(){var e=window.ApplePaySession;if("function"!=typeof(null==e?void 0:e.canMakePayments))return-1;if(_r())return-3;try{return e.canMakePayments()?1:0}catch(e){return function(e){if(e instanceof Error&&"InvalidAccessError"===e.name&&/\bfrom\b.*\binsecure\b/i.test(e.message))return-2;throw e}(e)}},privateClickMeasurement:function(){var e,t=document.createElement("a"),i=null!==(e=t.attributionSourceId)&&void 0!==e?e:t.attributionsourceid;return void 0===i?void 0:String(i)},audioBaseLatency:function(){var e;return Gn()||Rn()?window.AudioContext&&null!==(e=(new AudioContext).baseLatency)&&void 0!==e?e:-1:-2},webGlBasics:function(e){var t,i,n,r,o,s,a=wr(e.cache);if(!a)return-1;if(!kr(a))return-2;var l=Br()?null:a.getExtension(br);return{version:(null===(t=a.getParameter(a.VERSION))||void 0===t?void 0:t.toString())||"",vendor:(null===(i=a.getParameter(a.VENDOR))||void 0===i?void 0:i.toString())||"",vendorUnmasked:l?null===(n=a.getParameter(l.UNMASKED_VENDOR_WEBGL))||void 0===n?void 0:n.toString():"",renderer:(null===(r=a.getParameter(a.RENDERER))||void 0===r?void 0:r.toString())||"",rendererUnmasked:l?null===(o=a.getParameter(l.UNMASKED_RENDERER_WEBGL))||void 0===o?void 0:o.toString():"",shadingLanguageVersion:(null===(s=a.getParameter(a.SHADING_LANGUAGE_VERSION))||void 0===s?void 0:s.toString())||""}},webGlExtensions:function(e){var t=wr(e.cache);if(!t)return-1;if(!kr(t))return-2;var i=t.getSupportedExtensions(),n=t.getContextAttributes(),r=[],o=[],s=[],a=[],l=[];if(n)for(var c=0,u=Object.keys(n);c<u.length;c++){var d=u[c];o.push("".concat(d,"=").concat(n[d]))}for(var h=0,p=Sr(t);h<p.length;h++){var f=t[w=p[h]];s.push("".concat(w,"=").concat(f).concat(gr.has(f)?"=".concat(t.getParameter(f)):""))}if(i)for(var _=0,g=i;_<g.length;_++){var m=g[_];if(!(m===br&&Br()||"WEBGL_polygon_mode"===m&&(Vn()||Rn()))){var y=t.getExtension(m);if(y)for(var v=0,b=Sr(y);v<b.length;v++){var w;f=y[w=b[v]];a.push("".concat(w,"=").concat(f).concat(mr.has(f)?"=".concat(t.getParameter(f)):""))}else r.push(m)}}for(var L=0,S=yr;L<S.length;L++)for(var I=S[L],B=0,k=vr;B<k.length;B++){var x=k[B],M=Lr(t,I,x);l.push("".concat(I,".").concat(x,"=").concat(M.join(",")))}return a.sort(),s.sort(),{contextAttributes:o,parameters:s,shaderPrecisions:l,extensions:i,extensionParameters:a,unsupportedExtensions:r}}};function Mr(e){var t=function(e){if(Gn())return.4;if(Rn())return!Nn()||Wn()&&Dn()?.3:.5;var t="value"in e.platform?e.platform.value:"";if(/^Win/.test(t))return.6;if(/^Mac/.test(t))return.5;return.7}(e),i=function(e){return bn(.99+.01*e,1e-4)}(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(i))}}function Cr(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?sn({name:(i=t).name,message:i.message,stack:null===(n=i.stack)||void 0===n?void 0:n.split("\n")},i):t;var i,n}),2)}function Er(e){return jn(function(e){for(var t="",i=0,n=Object.keys(e).sort();i<n.length;i++){var r=n[i],o=e[r],s="error"in o?"error":JSON.stringify(o.value);t+="".concat(t?"|":"").concat(r.replace(/([:|\\])/g,"\\$1"),":").concat(s)}return t}(e))}function Pr(e){return void 0===e&&(e=50),function(e,t){void 0===t&&(t=1/0);var i=window.requestIdleCallback;return i?new Promise((function(e){return i.call(window,(function(){return e()}),{timeout:t})})):dn(Math.min(e,t))}(e,2*e)}function Fr(e,t){var i=Date.now();return{get:function(n){return an(this,void 0,void 0,(function(){var r,o,s;return ln(this,(function(a){switch(a.label){case 0:return r=Date.now(),[4,e()];case 1:return o=a.sent(),s=function(e){var t,i=Mr(e);return{get visitorId(){return void 0===t&&(t=Er(this.components)),t},set visitorId(e){t=e},confidence:i,components:e,version:un}}(o),(t||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(s.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(r-i,"\nvisitorId: ").concat(s.visitorId,"\ncomponents: ").concat(Cr(o),"\n```")),[2,s]}}))}))}}}var Or={load:function(e){var t;return void 0===e&&(e={}),an(this,void 0,void 0,(function(){var i,n,r;return ln(this,(function(o){switch(o.label){case 0:return(null===(t=e.monitoring)||void 0===t||t)&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/fingerprintjs/v".concat(un,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),i=e.delayFallback,n=e.debug,[4,Pr(i)];case 1:return o.sent(),r=function(e){return Tn(xr,e,[])}({cache:{},debug:n}),[2,Fr(r,n)]}}))}))},hashComponents:Er,componentsToDebugString:Cr};const jr=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},$r="permission-disconnected";class Tr extends _.EventEmitter{static instance;_tokenStorage={};_appIds=new Map([[l.Self,new Set],[l.Map,new Set]]);_identifier;static getInstance(){return Tr.instance||(Tr.instance=new Tr),Tr.instance}setToken(e,t,i){if(!t)return delete this._tokenStorage[e],this._appIds.get(i).delete(e),void this.emit($r,{appId:e,from:i});this._tokenStorage[e]=t,this._appIds.get(i).add(e)}getToken(e){return this._tokenStorage[e]}async getIdentifier(){if(!this._identifier){const e=await Or.load(),t=await e.get();this._identifier=t.visitorId}return this._identifier}getAppId(e){return jr([...this._appIds.get(e)])}async fetchToken(e,t,i=0){try{const i=await fetch("https://map-api.mapxus.co.jp/sc/api/v1/apikeys/auth",{method:"POST",body:JSON.stringify({appId:e,secret:t,origin:window.location.hostname||"restriction.test.example.com",keyPlatform:"WEB"}),headers:{identifier:await this.getIdentifier(),sdkVersion:en.rE,"Content-Type":"application/json"}});return(await i.json()).result.idToken}catch(n){if(i<3){const n=500*Math.pow(2,i);return console.warn(`Retrying to fetch token in ${n} ms...`,++i),await new Promise((e=>setTimeout(e,n))),this.fetchToken(e,t,i)}throw n}}}class Ar extends _.EventEmitter{_appId=null;_secret=null;isClosed=!1;_timeoutId;_isInitialized=!1;_initializationPromise;_tokenManager=Tr.getInstance();_from;constructor(e,t,i=l.Self){super(),this._from=i,this._appId=e,this._secret=t,this._initializationPromise=this._initToken()}async ready(){await this._initializationPromise}get appId(){return this._appId}get token(){if(!this._isInitialized)throw new Error("Token is not initialized yet. Use the 'ready' method to wait for initialization.");return this._tokenManager.getToken(this._appId)}close(){this.isClosed||(this._timeoutId&&clearTimeout(this._timeoutId),this._tokenManager.setToken(this._appId,null,this._from),this.emit("updated",{appId:this._appId,token:null}),Object.keys(this).forEach((e=>{"isClosed"!==e&&"_events"!==e&&delete this[e]})),this.isClosed=!0,this.emit("closed"),delete this._events,Object.freeze(this))}async _initToken(){try{const e=await this._tokenManager.fetchToken(this._appId,this._secret);this._isInitialized=!0,this._tokenManager.setToken(this._appId,e,this._from);const t=function(e,t){if("string"!=typeof e)throw new rn("Invalid token specified: must be a string");t||(t={});const i=!0===t.header?0:1,n=e.split(".")[i];if("string"!=typeof n)throw new rn(`Invalid token specified: missing part #${i+1}`);let r;try{r=on(n)}catch(e){throw new rn(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new rn(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}(e),i=1e3*(t.exp-t.iat-60);this._loopUpdateToken(i)}catch(e){throw this.emit("error",new Error("Failed to initialize token.",{cause:e})),e}}_loopUpdateToken(e){this.isClosed||(this._timeoutId=setTimeout((async()=>{try{const t=await this._tokenManager.fetchToken(this._appId,this._secret);this._tokenManager.setToken(this._appId,t,this._from),this.emit("updated",{appId:this._appId,token:t}),this._loopUpdateToken(e)}catch(e){this.emit("error",new Error("Failed to update token.",{cause:e}))}}),e))}}class Vr{static _instance;_tokenManager=Tr.getInstance();static getInstance(){return Vr._instance||(Vr._instance=new Vr),Vr._instance}get version(){return en.rE}async getIdentifier(){return await this._tokenManager.getIdentifier()}async getToken(e,t){let i=this._tokenManager.getToken(e);if(!i&&t){const n=new Ar(e,t,l.Map);await n.ready(),i=n.token}return i}getAppId(e){return this._tokenManager.getAppId(e)}disconnect(e){this._tokenManager.on($r,e)}}let Rr="",Nr="";const Dr=new Map,Hr=Vr.getInstance();Hr.disconnect((async({appId:e,from:t})=>{if(t===l.Map){const e=Hr.getAppId(l.Self);e!==Rr&&(delete Ji().defaults.headers.common.token,e&&await Wr.setHeaders(e,"")),Rr="",Nr=""}else e!==Rr&&(delete Ji().defaults.headers.common.token,Rr&&Nr&&await Wr.setHeaders(Rr,Nr))})),Ji().interceptors.response.use(null,(async e=>{const{config:t,response:i}=e;if(401===i.status&&t){const i=t.url,n=(Dr.get(i)||1)+1;if(n>2)throw Dr.delete(i),e;if(Dr.set(i,n),Rr)t.headers.token=await Hr.getToken(Rr,Nr);else{const e=Hr.getAppId(l.Self);await Wr.setHeaders(e,"")}return Ji()(t)}throw e}));class Wr{static async setHeaders(e,t){e&&t&&(Rr=e,Nr=t);const i=await Hr.getIdentifier(),n=await Hr.getToken(e,t);i&&n&&(Ji().defaults.headers.common={identifier:i,token:n,sdkVersion:Hr.version,"Content-Type":"application/json"})}static transformRequest(e){return/.mapxus./.test(e)?{url:e,headers:Ji().defaults.headers.common}:{url:e}}constructor(e){Ji().defaults.baseURL=e??qi}get(e){return Ji().get(e)}post(e,t){return Ji().post(e,t)}}function zr(e){const t=ae(e),i=t&&!e.length||!t&&!e.trim().length;if(i)throw new Error("Parameter cannot be empty.");return i?null:t?e.filter((e=>!!e.trim())).map((e=>e.trim())).join(","):e.trim()}const Gr=function(e,t){var i=-1,n=Oe(e)?Array(e.length):[];return Gi(e,(function(e,r,o){n[++i]=t(e,r,o)})),n};const Zr=function(e,t){return(ae(e)?Ii:Gr)(e,Di(t,3))};const Yr=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};var Xr=Object.prototype.hasOwnProperty;const Ur=function(e,t,i){var n=e[t];Xr.call(e,t)&&Ae(n,i)&&(void 0!==i||t in e)||q(e,t,i)};const Jr=function(e,t,i,n){if(!O(e))return e;for(var r=-1,o=(t=Ci(t,e)).length,s=o-1,a=e;null!=a&&++r<o;){var l=Ei(t[r]),c=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(r!=s){var u=a[l];void 0===(c=n?n(u,l,a):void 0)&&(c=O(u)?u:fe(t[r+1])?[]:{})}Ur(a,l,c),a=a[l]}return e};const qr=function(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var s=t[n],a=Pi(e,s);i(a,s)&&Jr(o,Ci(s,e),a)}return o};const Qr=Ce(Object.getPrototypeOf,Object);const Kr=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ft(t,Vt(e)),e=Qr(e);return t}:$t;const eo=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t};var to=Object.prototype.hasOwnProperty;const io=function(e){if(!O(e))return eo(e);var t=Me(e),i=[];for(var n in e)("constructor"!=n||!t&&to.call(e,n))&&i.push(n);return i};const no=function(e){return Oe(e)?ke(e,!0):io(e)};const ro=function(e){return Ot(e,no,Kr)};const oo=function(e,t){if(null==e)return{};var i=Ii(ro(e),(function(e){return[e]}));return t=Di(t),qr(e,i,(function(e,i){return t(e,i[0])}))};const so=function(e,t){return oo(e,Yr(Di(t)))};const ao=function(e,t,i,n){for(var r=e.length,o=i+(n?1:-1);n?o--:++o<r;)if(t(e[o],o,e))return o;return-1};const lo=function(e){return e!=e};const co=function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1};const uo=function(e,t,i){return t==t?co(e,t,i):ao(e,lo,i)};const ho=function(e){return"string"==typeof e||!ae(e)&&te(e)&&"[object String]"==F(e)};var po=/\s/;const fo=function(e){for(var t=e.length;t--&&po.test(e.charAt(t)););return t};var _o=/^\s+/;const go=function(e){return e?e.slice(0,fo(e)+1).replace(_o,""):e};var mo=/^[-+]0x[0-9a-f]+$/i,yo=/^0b[01]+$/i,vo=/^0o[0-7]+$/i,bo=parseInt;const wo=function(e){if("number"==typeof e)return e;if(_i(e))return NaN;if(O(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=O(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=go(e);var i=yo.test(e);return i||vo.test(e)?bo(e.slice(2),i?2:8):mo.test(e)?NaN:+e};var Lo=1/0;const So=function(e){return e?(e=wo(e))===Lo||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const Io=function(e){var t=So(e),i=t%1;return t==t?i?t-i:t:0};const Bo=function(e,t){return Ii(t,(function(t){return e[t]}))};const ko=function(e){return null==e?[]:Bo(e,je(e))};var xo=Math.max;const Mo=function(e,t,i,n){e=Oe(e)?e:ko(e),i=i&&!n?Io(i):0;var r=e.length;return i<0&&(i=xo(r+i,0)),ho(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&uo(e,t,i)>-1},Co=["opening_hours","description","phone","website","email","appURL","icon"];class Eo{_api="/api/v4/venues";_request;constructor(){this._request=new Wr}searchByIds(e){const t=zr(e);if(!t)throw new Error("Please input venue id at least one.");const i=`${this._api}/${t}`;return this._changedRes(i)}searchByDistance(e,t,i,n=Qi,r=Ki){if(!e||!t||!i)throw new Error("Missing required parameter.");const o=new URLSearchParams({keywords:e,center:t.join(","),distance:String(i),offset:String(n),page:String(r)}),s=`${this._api}?${o.toString()}`;return this._changedRes(s)}searchByBbox(e,t,i=Qi,n=Ki){if(!e||!t)throw new Error("Missing required parameter.");const r=new URLSearchParams({keywords:e,bbox:t.join(","),offset:String(i),page:String(n)}),o=`${this._api}?${r.toString()}`;return this._changedRes(o)}searchByGlobal(e,t=Qi,i=Ki){if(!e)throw new Error("Missing required parameter.");const n=new URLSearchParams({keywords:e,offset:String(t),page:String(i)}),r=`${this._api}?${n.toString()}`;return this._changedRes(r)}search(e){const t=Zr(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:`${t}=${e}`));return this._changedRes(`${this._api}?${t.join("&")}`)}_changedRes(e){return new Promise(((t,i)=>{this._request.get(e).then((e=>{e.data.result.venues=Zr(e.data.result.venues,(e=>so(e,((e,t)=>Mo(Co,t))))),t(e)})).catch(i)}))}}const Po=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","description"];class Fo{_api="/api/v4/buildings";_request;constructor(){this._request=new Wr}searchByIds(e){const t=zr(e);if(!t)throw new Error("Please input building id at least one.");const i=`${this._api}/${t}`;return this._changedRes(i)}searchByDistance(e,t,i,n=Qi,r=Ki){if(arguments.length<3)throw new Error("Parameter cannot be empty.");if(2!==t.length)throw new Error("Center lon lat cannot be less than 2.");const o=[`center=${t.join(",")}`,`distance=${i}`,`offset=${n}`,`page=${r}`];e&&o.unshift(`keywords=${e}`);const s=`${this._api}?${o.join("&")}`;return this._changedRes(s)}searchByBbox(e,t,i=Qi,n=Ki){if(arguments.length<2)throw new Error("Parameter cannot be empty.");if(4!==t.length)throw new Error("Bbox parameters cannot be less than 2.");const r=[`bbox=${t.join(",")}`,`offset=${i}`,`page=${n}`];e&&r.unshift(`keywords=${e}`);const o=`${this._api}?${r.join("&")}`;return this._changedRes(o)}searchByGlobal(e,t=Qi,i=Ki){if(!arguments.length)throw new Error("Parameter cannot be empty.");const n=["searchGlobal=true",`offset=${t}`,`page=${i}`];e&&n.unshift(`keywords=${e}`);const r=`${this._api}?${n.join("&")}`;return this._changedRes(r)}searchByFloorId(e){if(!e)throw new Error("Parameter cannot be empty.");return this._changedRes(`${this._api}/floors/${e}`)}search(e){const t=Zr(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:`${t}=${e}`));return this._changedRes(`${this._api}?${t.join("&")}`)}_changedRes(e){return new Promise(((t,i)=>{this._request.get(e).then((e=>{e.data.result.buildings=Zr(e.data.result.buildings,(e=>so(e,((e,t)=>Mo(Po,t))))),t(e)})).catch(i)}))}}const Oo=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","icon"];class jo{_api="/api/v3/pois";_apiV4="/api/v4/pois";_categoriesApi="/api/v2/categories/pois";_categoriesGroupApi="/api/v5/categories/group";_request;constructor(){this._request=new Wr}searchByIds(e){const t=zr(e);if(!t)throw new Error("Please input poi id at least one.");const i=`${this._apiV4}/${t}`;return this._changedRes(i,(e=>e.descriptions?.default?{description:e.descriptions.default}:null))}searchByDistance(e){const{center:t,distance:i,keywords:n="",offset:r=Qi,page:o=Ki}=e;if(!t||!i)throw new Error("Parameter missing.");const s=[`keywords=${n}`,`center=${t.join(",")}`,`distance=${Math.round(i)}`,`offset=${r}`,`page=${o}`],a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByBounds(e){const{bounds:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`bbox=${t.flat().join()}`,`offset=${i}`,`page=${n}`];$o(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByBuilding(e){const{buildingId:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`buildingId=${t}`,`offset=${i}`,`page=${n}`];$o(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByVenue(e){const{venueId:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`venueId=${t}`,`offset=${i}`,`page=${n}`];$o(r)&&s.push(`keywords=${r.trim()}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchByFloor(e){const{floorId:t,offset:i=Qi,page:n=Ki,keywords:r,orderBy:o}=e,s=[`floorId=${t}`,`offset=${i}`,`page=${n}`];r&&s.push(`keywords=${r}`),o&&s.push(`orderBy=${o}`);const a=`${this._api}?${s.join("&")}`;return this._changedRes(a)}searchCategories(e){let t,i;var n;"bounds"in e?(t=`bbox=${e.bounds.flat().join()}`,"string"==typeof(n=e.keywords)&&Boolean(n.trim())&&(t+=`&keywords=${e.keywords.trim()}`),i=`${this._categoriesGroupApi}?${t}`):("floorId"in e?t=`floorId=${e.floorId}`:"buildingId"in e?t=`buildingId=${e.buildingId}`:"venueId"in e&&(t=`venueId=${e.venueId}`),i=`${this._categoriesApi}?${t}`);try{return this._request.get(i)}catch(e){throw e}}searchByOrientation(e){const{center:t,angle:i,distance:n,distanceSearchType:r=p.POINT}=e,o=[`center=${t.join()}`,`angle=${Math.round(i)}`,`distance=${n}`,`distanceSearchType=${r}`];"ordinal"in e?o.push(`ordinal=${e.ordinal}`):"floorId"in e?o.push(`floorId=${e.floorId}`):"buildingId"in e&&o.push(`buildingId=${e.buildingId}`);const s=`${this._api}/orientation?${o.join("&")}`;return this._request.get(s)}searchByCategory(e){const{center:t,distance:i,page:n=Ki,offset:r=Qi}=e,o=[`center=${t.join(",")}`,`distance=${i}`,`offset=${r}`,`page=${n}`];let s="";if("category"in e)s=`${this._api}?category=${e.category}&${o.join("&")}`;else if("excludedCategories"in e){const{excludedCategories:t}=e;s=ae(t)?`${this._api}?excludeCategories=${t.join(",")}&${o.join("&")}`:`${this._api}?excludeCategories=${t}&${o.join("&")}`}if(s.length)return this._changedRes(s);throw new Error("Parameter missing.")}search(e){const t=Zr(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:"excludedCategories"===t?`excludeCategories=${ae(e)?e.join(","):e}`:`${t}=${e}`));return this._request.get(`${this._api}?${t.join("&")}`)}_changedRes(e,t){return new Promise(((i,n)=>{this._request.get(e).then((e=>{e.data.result.pois=Zr(e.data.result.pois,(e=>{let i=so(e,((e,t)=>Mo(Oo,t)));return t&&t(i)&&(i=Object.assign({},i,t(i))),i})),i(e)})).catch(n)}))}}function $o(e){return"string"==typeof e&&Boolean(e.trim())}class To{_api="/api/v3/route/query";_request;constructor(){this._request=new Wr}search(e){const{points:t,vehicle:i=d.FOOT,locale:n="en"}=e;if(!(t&&t.length>1&&t.length<6))throw new Error("Parameter error. It must be 1 < {points.length} < 6");const r={points:t,vehicle:i,locale:n};try{return this._request.post(this._api,JSON.stringify(r))}catch(e){throw new Error(e)}}}const Ao={lineWidth:3,lineColor:"#A5E3FF",lineOpacity:1},Vo={fontColor:"#8c8c8c",activeFontColor:"#fff",backgroundColor:"#fff",activeBackgroundColor:"#074769",itemSize:50,itemCount:4,defaultFolded:!1},Ro=tn(window.navigator.language)??s.ENGLISH,No=new Fo,Do=new Eo,Ho=new jo;async function Wo(e){try{return(await No.searchByIds(e)).data.result.buildings[0]}catch(e){throw new Error(e)}}async function zo(e){try{const t=(await No.searchByFloorId(e)).data.result.buildings[0].buildingId;return await Wo(t)}catch(e){throw new Error(e)}}var Go={value:()=>{}};function Zo(){for(var e,t=0,i=arguments.length,n={};t<i;++t){if(!(e=arguments[t]+"")||e in n||/[\s.]/.test(e))throw new Error("illegal type: "+e);n[e]=[]}return new Yo(n)}function Yo(e){this._=e}function Xo(e,t){for(var i,n=0,r=e.length;n<r;++n)if((i=e[n]).name===t)return i.value}function Uo(e,t,i){for(var n=0,r=e.length;n<r;++n)if(e[n].name===t){e[n]=Go,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=i&&e.push({name:t,value:i}),e}Yo.prototype=Zo.prototype={constructor:Yo,on:function(e,t){var i,n,r=this._,o=(n=r,(e+"").trim().split(/^|\s+/).map((function(e){var t="",i=e.indexOf(".");if(i>=0&&(t=e.slice(i+1),e=e.slice(0,i)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=o[s]).type)r[i]=Uo(r[i],e.name,t);else if(null==t)for(i in r)r[i]=Uo(r[i],e.name,null);return this}for(;++s<a;)if((i=(e=o[s]).type)&&(i=Xo(r[i],e.name)))return i},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new Yo(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,n,r=new Array(i),o=0;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,i=(n=this._[e]).length;o<i;++o)n[o].value.apply(t,r)},apply:function(e,t,i){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],r=0,o=n.length;r<o;++r)n[r].value.apply(t,i)}};const Jo=Zo;class qo{_historyBuilding;_historyOrdinal;_selectedBuildings;static instance;constructor(){this._historyBuilding=new Map,this._historyOrdinal=new Map,this._selectedBuildings=new Set}static getInstance(){return qo.instance||(qo.instance=new qo),qo.instance}getHistoryBuilding(e){return this._historyBuilding.get(e)}setHistoryBuilding(e,t){this._historyBuilding.set(e,t)}getHistoryOrdinal(e){return this._historyOrdinal.get(e)}setHistoryOrdinal(e,t){this._historyOrdinal.set(e,t)}getHistoryBuildings(){return this._selectedBuildings}addHistoryBuilding(e){this._selectedBuildings.delete(e),this._selectedBuildings.add(e),this._selectedBuildings.size>100&&(this._selectedBuildings=new Set(Array.from(this._selectedBuildings).slice(this._selectedBuildings.size-100)))}}class Qo{static instance;_upperBuildings;_lowerBuildings;_hiddenBuildings;constructor(){this._upperBuildings=new Set,this._lowerBuildings=new Set,this._hiddenBuildings=new Set}static getInstance(){return Qo.instance||(Qo.instance=new Qo),Qo.instance}getUpperBuildings(){return this._upperBuildings}getLowerBuildings(){return this._lowerBuildings}getHiddenBuildings(){return this._hiddenBuildings}}const Ko=function(e){return function(t,i,n){var r=Object(t);if(!Oe(t)){var o=Di(i,3);t=je(t),i=function(e){return o(r[e],e,r)}}var s=e(t,i,n);return s>-1?r[o?t[s]:s]:void 0}};var es=Math.max;const ts=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:Io(i);return r<0&&(r=es(n+r,0)),ao(e,Di(t,3),r)};const is=Ko(ts);const ns=function(e,t,i){for(var n=-1,r=e.length;++n<r;){var o=e[n],s=t(o);if(null!=s&&(void 0===a?s==s&&!_i(s):i(s,a)))var a=s,l=o}return l};const rs=function(e,t){return e<t};const os=function(e,t){return e&&e.length?ns(e,Di(t,2),rs):void 0};const ss=function(){return L.Date.now()};var as=Math.max,ls=Math.min;const cs=function(e,t,i){var n,r,o,s,a,l,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var i=n,o=r;return n=r=void 0,c=t,s=e.apply(o,i)}function f(e){var i=e-l;return void 0===l||i>=t||i<0||d&&e-c>=o}function _(){var e=ss();if(f(e))return g(e);a=setTimeout(_,function(e){var i=t-(e-l);return d?ls(i,o-(e-c)):i}(e))}function g(e){return a=void 0,h&&n?p(e):(n=r=void 0,s)}function m(){var e=ss(),i=f(e);if(n=arguments,r=this,l=e,i){if(void 0===a)return function(e){return c=e,a=setTimeout(_,t),u?p(e):s}(l);if(d)return clearTimeout(a),a=setTimeout(_,t),p(l)}return void 0===a&&(a=setTimeout(_,t)),s}return t=wo(t)||0,O(i)&&(u=!!i.leading,o=(d="maxWait"in i)?as(wo(i.maxWait)||0,t):o,h="trailing"in i?!!i.trailing:h),m.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=r=a=void 0},m.flush=function(){return void 0===a?s:g(ss())},m};const us=function(e,t){return!!(null==e?0:e.length)&&uo(e,t,0)>-1};const ds=function(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1};const hs=function(){};var ps=zt&&1/Mt(new zt([,-0]))[1]==1/0?function(e){return new zt(e)}:hs;const fs=ps;const _s=function(e,t,i){var n=-1,r=us,o=e.length,s=!0,a=[],l=a;if(i)s=!1,r=ds;else if(o>=200){var c=t?null:fs(e);if(c)return Mt(c);s=!1,r=It,l=new Lt}else l=t?[]:a;e:for(;++n<o;){var u=e[n],d=t?t(u):u;if(u=i||0!==u?u:0,s&&d==d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else r(l,d,i)||(l!==a&&l.push(d),a.push(u))}return a};const gs=function(e,t){return e&&e.length?_s(e,Di(t,2)):[]};const ms=function(e,t){var i=[];return Gi(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i};const ys=function(e,t){return(ae(e)?jt:ms)(e,Di(t,3))};var vs=0;const bs=function(e){var t=++vs;return Mi(e)+t};const ws=function(e,t){var i;return Gi(e,(function(e,n,r){return!(i=t(e,n,r))})),!!i};const Ls=function(e,t,i){if(!O(i))return!1;var n=typeof t;return!!("number"==n?Oe(i)&&fe(t,i.length):"string"==n&&t in i)&&Ae(i[t],e)};const Ss=function(e,t,i){var n=ae(e)?St:ws;return i&&Ls(e,t,i)&&(t=void 0),n(e,Di(t,3))},Is="Indoor_selectedFloorChanged",Bs="Indoor_selectedBuildingChanged",ks="Indoor_mapxusMapLoaded",xs="Indoor_maplibreMapLoaded",Ms="assistant-mapxus-level-outline",Cs=new Eo;class Es extends _.EventEmitter{_map;_features;_allBuildings;_curBuildingId=null;_curBuildingFeature=null;_ordinal=null;_floorId=null;_floorName=null;_allowOutdoorSwitch;_allowBuildingSwitch;_outdoorMapShown;_originIndoorLayers;_curVenueId=null;_curVenueFeature=null;_buildingHighlightStyle;_lowerLayers;_upperLayers;_commonLayers;_dispatch=Jo(Is);_fitBuildingBounds;_boundsPadding;_startWithIndoorView;_maplibreMapLoaded=!1;_indoorMapLoaded=!1;_isVenueMode;_isMaskMode;_upperLevels=new Set;_lowerLevels=new Set;_featureIncomplete=!1;_dragPan;_isNewBuilding=!1;_buildingBounds;_history=qo.getInstance();_layerBuildings=Qo.getInstance();_upperBuildings=this._layerBuildings.getUpperBuildings();_lowerBuildings=this._layerBuildings.getLowerBuildings();_hiddenBuildings=this._layerBuildings.getHiddenBuildings();_isDestroyed=!1;_findBuildingTimeoutId=null;_findBuildingIntervalId=null;_debounceRendering;constructor(e){super();const{map:t,startWithIndoorView:i=!0,outdoorMapShown:n=!0,selectedBuildingBorderStyle:r,floorSwitchMode:s=o.SWITCHED_BY_VENUE,fitBuildingBounds:a,boundsPadding:l,maskNonSelectedAreas:c=!1}=e;this._map=t,this._allowOutdoorSwitch=!0,this._allowBuildingSwitch=!0,this._startWithIndoorView=i,this._outdoorMapShown=n,this._isVenueMode=s===o.SWITCHED_BY_VENUE,this._isMaskMode=c,this._fitBuildingBounds=a,this._boundsPadding=l,this._buildingHighlightStyle=r?Object.assign({},Ao,r):Ao,this._hiddenBuildings=new Set,this._loadData()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._dispatch.on(`.${Is}`,null),this.removeAllListeners(Bs),this.removeAllListeners(xs),this.removeAllListeners(ks),this._debounceRendering?.cancel(),this._findBuildingTimeoutId&&(clearTimeout(this._findBuildingTimeoutId),this._findBuildingTimeoutId=null),this._findBuildingIntervalId&&(clearInterval(this._findBuildingIntervalId),this._findBuildingIntervalId=null))}setAllowOutdoorSwitch(e){return this._allowOutdoorSwitch=e,this}setAllowBuildingSwitch(e){return this._allowBuildingSwitch=e,this}get floor(){return{code:this._floorName,id:this._floorId,ordinal:this._ordinal}}get building(){return this._curBuildingFeature}get venue(){return this._curVenueFeature}get features(){return this._features}getFeaturesById(e,t){const{layerIds:i,filter:n}=t||{};let r=this.features;if(i?.length){const e=this._map.getCanvas().getBoundingClientRect();r=this._map.queryRenderedFeatures([[0,0],[e.width,e.height]],{layers:i})}return ys(r,n?t=>t.properties.id===e&&n(t):t=>t.properties.id===e)}async switchFloorByOrdinal(e){this._updateFloorState(e),this._dispatch.call(Is,null,{venue:this.venue,building:this.building,floor:this.floor}),e&&this._floorId&&(this._resetSelectedBuildingLevel(),!0===this._dragPan&&(this._fitBuildingBounds?(this._isNewBuilding&&this._featureIncomplete&&await this.panToBuildingCenter(),this.fitBuildingBbox()):await this.panToBuildingCenter()),"restrict"===this._dragPan&&await this._checkAndPanToBuilding()),this.updateRendering()}setOutdoorMapShown(e){this._outdoorMapShown=e,this._setOutdoorVisibility(e)}updateCustomLayers(){this._originIndoorLayers=g(this._map.getStyle()),this._copyOverlapLayers(),this._addBuildingHighlightLayer(),this._addCustomLevelFillLayer(),this._outdoorMapShown||this._setOutdoorVisibility(!1),!this._isMaskMode&&this._map.getLayer("mapxus-building-line")&&this._map.setPaintProperty("mapxus-building-line","fill-opacity",0)}setSelectedBuildingBorderStyle(e){e?(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,e),this._map.getLayer(Ms)&&(this._map.setPaintProperty(Ms,"line-color",this._buildingHighlightStyle.lineColor),this._map.setPaintProperty(Ms,"line-opacity",this._buildingHighlightStyle.lineOpacity),this._map.setPaintProperty(Ms,"line-width",this._buildingHighlightStyle.lineWidth),this._map.setPaintProperty(Ms,"line-offset",this._buildingHighlightStyle.lineWidth))):(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,{"line-opacity":0}),this._map.getLayer(Ms)&&this._map.setPaintProperty(Ms,"line-opacity",0))}onMapChange(e){const t=bs(`${Is}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}async selectBuilding(e,t){(this._allowOutdoorSwitch||e)&&this._allowBuildingSwitch&&this._allowBuildingSwitch&&this._isNotCurrentFeature(e)&&(this._featureIncomplete=t?.featureIncomplete??this._featureIncomplete,this._isNewBuilding=!0,this._isMaskMode&&this._invisibleSelectedBuilding(),await this._updateIndoorState(e,t?.floorId),await this.switchFloorByOrdinal(this._ordinal),this.emit(Bs,{buildingId:this._curBuildingId,ordinal:this._ordinal,dragPan:this._dragPan}),this._indoorMapLoaded||(this._indoorMapLoaded=!0,this.emit(ks)),this._isNewBuilding=!1)}updateRendering(){this._updateFeatures(),this._layerDisplayedBuildings(),this._setDisplayedLevels(),this._filterTiles(),this._setBuildingLineOpacity(),this._filterBuildingHighlight()}async panToBuildingCenter(){const e=this._curBuildingFeature.properties?.label_center?.split(",");if(e&&(this._map.panTo(e),this._featureIncomplete))return new Promise((e=>{this._findBuildingTimeoutId=setTimeout((()=>{let t=!1;const i=()=>{if(this._isDestroyed)return void this._clearTimers();this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(this._curBuildingId,{layerIds:["mapxus-building-line"]})[0]&&(t=!0,e(!0))};this._findBuildingIntervalId=setInterval((()=>{t?this._clearTimers():i()}),100),i(),this._map.getZoom()<14&&(this._clearTimers(),e(!1))}))}))}fitBuildingBbox(){this._buildingBounds&&this._map.fitBounds(this._buildingBounds,{padding:this._boundsPadding,bearing:this._map.getBearing()})}setDragPan(e){this._dragPan=e}setBuildingBounds(e){this._buildingBounds=e}async selectBuildingByClickMap(e){let t=null;const i=this._map.queryRenderedFeatures(e,{layers:["mapxus-level-fill","mapxus-level-fill-overlap-copy","mapxus-building-line"]});if(i.length){const e=is(i,(e=>e.layer.id.startsWith("mapxus-level-fill")));t=e?is(i,(t=>t.properties.id===e.properties["ref:building"])):is(i,(e=>{const{id:t,level_ids:i}=e.properties;return!this._hiddenBuildings.has(t)&&!Ss(i.split(","),(e=>this._upperLevels.has(e)||this._lowerLevels.has(e)))}))??null}this.setDragPan("restrict"),await this.selectBuilding(t),setTimeout((async()=>{if(this._fitBuildingBounds)if(t){const e=await Wo(t.properties.id),{minLon:i,minLat:n,maxLon:r,maxLat:o}=e.bbox;this.setBuildingBounds([[i,n],[r,o]])}else this.setBuildingBounds(null)}))}_loadData(){this._map.on("load",(()=>this._init()))}_init(){this.updateCustomLayers(),this._map.on("data",this._debounceRendering=cs((()=>{this._maplibreMapLoaded||(this._maplibreMapLoaded=!0,this.emit(xs),(!this._startWithIndoorView||this._map.getZoom()<14)&&(this._indoorMapLoaded=!0,this.emit(ks))),this.updateRendering()}),300))}_clear(){this._curBuildingFeature=null,this._curBuildingId=null,this._ordinal=null,this._floorName=null,this._floorId=null,this._curVenueId=null,this._curVenueFeature=null,this._buildingBounds=null}_getIndoorFeatures(){const e=this._map.getCanvas().getBoundingClientRect(),t=this._map.queryRenderedFeatures([[0,0],[e.width,e.height]]),i=ys(t,(e=>"indoor-planet"===e.source));return gs(i,(e=>e.layer.id+":"+e.properties.id))}_getBuildingFloorByOrdinal(e,t){let i=null,n=null;if(e?.properties){const{ordinals:r,level_names:o,level_ids:s}=e.properties,a=ts(r?.split(",")||[],(e=>e===t));i=(o?.split(",")||[])[a]??null,n=(s?.split(",")||[])[a]??null}return{code:i,id:n,ordinal:t}}_isNotCurrentFeature(e){return e?.properties?.id!==this._curBuildingId}_setOutdoorVisibility(e){const t=this._map.getStyle().layers.filter(y);if(t.length){const i=e?"visible":"none";t.forEach((({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility",i)}))}}_addCustomLevelFillLayer(){this._map.getLayer("custom-level-fill")||this._map.addLayer({id:"custom-level-fill",source:"indoor-planet","source-layer":"mapxus_level",type:"fill",paint:{"fill-opacity":0}})}_setBuildingLineOpacity(){this._isMaskMode&&this._map.getLayer("mapxus-building-line")&&this._map.setPaintProperty("mapxus-building-line","fill-opacity",["case",["in",["get","id"],["literal",[...this._upperBuildings]]],0,["in",["get","id"],["literal",[...this._hiddenBuildings]]],0,1])}_addBuildingHighlightLayer(){if(!this._map.getLayer(Ms)){const{lineWidth:e,lineOpacity:t,lineColor:i}=this._buildingHighlightStyle;this._map.addLayer({id:Ms,source:"indoor-planet","source-layer":"mapxus_level",type:"line",filter:["==","id",""],paint:{"line-offset":e,"line-width":e,"line-color":i,"line-opacity":t}});const n=this._originIndoorLayers.findIndex((({id:e})=>e===this._upperLayers[this._upperLayers.length-1].id)),r=this._originIndoorLayers[n+1];this._map.moveLayer(Ms,r.id)}}_filterBuildingHighlight(){this._map.getLayer(Ms)&&this._map.setFilter(Ms,["==","id",this._floorId??""])}_handleBuildings(e,t){if(t.clear(),e.size)for(const i of e){const n=this._allBuildings.get(i);if(!n?.properties)continue;const{"ref:venue":r,ordinals:o,level_ids:s}=n.properties;let a=this._history.getHistoryOrdinal(this._isVenueMode?this._history.getHistoryBuilding(r):i);if(!a){if(this._isVenueMode){const e=this._features.find((e=>"mapxus-venue-fill"===e.layer.id&&e.properties.id===r));a=this._getVenueDefaultOrdinal(e)}else a=this._getBuildingDefaultOrdinal(n);if(!a)continue;this._history.setHistoryOrdinal(i,a),this._isVenueMode&&this._history.setHistoryBuilding(r,i)}const l=ts(o.split(","),(e=>e===a));if(l>-1){const n=s.split(",")[l];if(this._isMaskMode){(this._isVenueMode?this._curVenueFeature?.properties?.building_ids?.split(",")||[]:this._curBuildingId?[this._curBuildingId]:[]).includes(i)?(t.add(n),this._hiddenBuildings.delete(i)):e.delete(i)}else t.add(n),this._hiddenBuildings.delete(i)}else this._hiddenBuildings.add(i),e.delete(i)}}_getVenueDefaultOrdinal(e){let t=null;if(e?.properties){const{default_displayed_ordinal:i,building_ids:n}=e.properties;if(i&&(t=i),!t&&n){const e=is(this._getBuildingsOfBbox(),(e=>n.includes(e.properties.id)));t=e?this._getBuildingDefaultOrdinal(e):null}}return t}_getBuildingDefaultOrdinal(e){let t=null;if(e?.properties){const{level_ids:i,ordinals:n,default_displayed_floor:r}=e.properties,o=n?.split(",")||[];if(o.length){if(r){t=o[ts(i?.split(",")||[],(e=>e===r))]??null}t||(t=os(o,(e=>Math.abs(Number(e)-.1))))}}return t}_getBuildingsOfBbox(e){let t=this._map.queryRenderedFeatures({layers:["mapxus-building-line"]});return t=gs(t,(e=>e.properties.id)),e&&(t=t.filter(e)),t}_copyOverlapLayers(){const e=this._originIndoorLayers.findIndex((({id:e})=>"mapxus-level-fill"===e)),t=this._originIndoorLayers.findIndex((({id:e})=>e.startsWith("mapxus-poi")));this._commonLayers=this._originIndoorLayers.slice(0,e).concat(this._originIndoorLayers.slice(t)),this._upperLayers=this._originIndoorLayers.slice(e,t).filter((e=>"mapxus_building"!==e["source-layer"])),this._lowerLayers=this._upperLayers.map((e=>{const t=Object.assign({},e,{id:`${e.id}-overlap-copy`});return this._map.getLayer(t.id)||(this._map.addLayer(t),this._map.moveLayer(t.id,"mapxus-level-fill")),t}))}_updateFeatures(){this._features=this._getIndoorFeatures();const e=gs(ys(this._features,(e=>"mapxus-building-line"===e.layer.id)),(e=>e.properties.id));this._allBuildings=new Map(e.map((e=>[e.properties.id,e]))),this._featureIncomplete&&this._allBuildings.get(this._curBuildingId)&&(this._curBuildingFeature=this._allBuildings.get(this._curBuildingId),this._featureIncomplete=!1)}_layerDisplayedBuildings(){if(this._allBuildings.size)for(const e of this._allBuildings.values()){if(!e.properties)continue;const{id:t,overlap:i}=e.properties;let n=!1;if(t===this._curBuildingId)this._hiddenBuildings.delete(t),this._lowerBuildings.delete(t),this._upperBuildings.add(t),i&&(n=!0);else{!this._upperBuildings.has(t)&&!this._lowerBuildings.has(t)&&!this._hiddenBuildings.has(t)&&(this._upperBuildings.add(t),i&&(n=!0))}n&&i.split(",").forEach((e=>{this._hiddenBuildings.has(e)||(this._upperBuildings.delete(e),this._lowerBuildings.add(e))}))}}_setDisplayedLevels(){this._handleBuildings(this._upperBuildings,this._upperLevels),this._handleBuildings(this._lowerBuildings,this._lowerLevels)}_filterTiles(){this._filterIndoorLayers([...this._upperLevels],this._upperLayers??[]),this._filterIndoorLayers([...this._lowerLevels],this._lowerLayers??[]),this._filterIndoorLayers([...this._upperLevels,...this._lowerLevels],this._commonLayers??[])}_filterIndoorLayers(e,t){if(t.length){let i;for(const n of t){const t=n,r=t["source-layer"];if("mapxus_venue"===r||"mapxus_building"===r)continue;const o=t.layout?.visibility,{id:s,filter:a}=t;"none"===o&&this._map.setLayoutProperty(s,"visibility","visible"),a&&(i=["all","mapxus_level"===r?["in","id",...e]:["in","ref:level",...e],a],"mapxus_place"===r&&i.splice(2,0,["any",["all",["has","overlap"],["in","ref:building",...this._upperBuildings]],["!has","overlap"]]),this._map.setFilter(s,i))}}}async _updateIndoorState(e,t){if(e){if(!e.properties)return void console.warn("Building feature properties is empty.",e);const{id:i,"ref:venue":n,level_ids:r,ordinals:o}=e.properties;if(this._curVenueId!==n){this._curVenueId=n;let e=this.getFeaturesById(n,{layerIds:["mapxus-venue-fill"]})[0]??null;if(!e)try{const t=await Cs.searchByIds(n);e=function(e){const{address:t,buildings:i,id:n,name:r,type:o}=e;return{layer:{id:"mapxus-venue-fill"},properties:{...Yi(t,((e,t,i)=>Object.assign(e,"default"===i?{"addr:street":t.street,"addr:housenumber":t.housenumber}:{[`addr:street:${i}`]:t.street})),{}),...Hi(r,((e,t)=>"default"===t?"name":`name:${t}`)),id:n,venue:o,building_ids:i.map((({id:e})=>e)).join()},source:"indoor-planet",sourceLayer:"mapxus_venue"}}(t.data.result.venues[0])}catch(e){throw new Error("Venue not found.")}this._curVenueFeature=e}this._curBuildingFeature=e,this._curBuildingId=i,this._history.addHistoryBuilding(i);const s=o.split(",");if(t){const i=s[ts(r.split(","),(e=>e===t))];i||console.warn("Building has no corresponding ordinal.",e),this._ordinal=i??null}else{let t=this._history.getHistoryOrdinal(this._isVenueMode?this._history.getHistoryBuilding(n):i);(!t||t&&!s.includes(t))&&(t=this._getBuildingDefaultOrdinal(e)),this._ordinal=t}}else this._clear()}_updateFloorState(e){if(this._ordinal=e,this._floorName=null,this._floorId=null,e){const{code:e,id:t}=this._getBuildingFloorByOrdinal(this._curBuildingFeature,this._ordinal);if(this._floorName=e,this._floorId=t,!t)return;this._history.setHistoryOrdinal(this._curBuildingId,this._ordinal),this._isVenueMode&&this._history.setHistoryBuilding(this._curVenueId,this._curBuildingId)}}_resetSelectedBuildingLevel(){(this._isVenueMode?this._curVenueFeature?this._curVenueFeature.properties.building_ids.split(","):[]:[this._curBuildingId]).forEach((e=>{this._upperBuildings.delete(e),this._lowerBuildings.delete(e),this._hiddenBuildings.delete(e)})),this._upperBuildings.add(this._curBuildingId);const e=this._curBuildingFeature.properties.overlap;e&&e.split(",").forEach((e=>{this._upperBuildings.has(e)&&(this._upperBuildings.delete(e),this._lowerBuildings.add(e))}))}async _checkAndPanToBuilding(){this.getFeaturesById(this._curBuildingId,{layerIds:["mapxus-building-line"]})[0]||(this._fitBuildingBounds?this.fitBuildingBbox():await this.panToBuildingCenter())}_invisibleSelectedBuilding(){if(this._isVenueMode){if(!this._curVenueFeature)return;const{building_ids:e}=this._curVenueFeature.properties;e&&e.split(",").forEach((e=>{this._upperBuildings.delete(e),this._lowerBuildings.delete(e)}))}else this._curBuildingId&&(this._upperBuildings.delete(this._curBuildingId),this._lowerBuildings.delete(this._curBuildingId))}_clearTimers(){clearInterval(this._findBuildingIntervalId),this._findBuildingIntervalId=null,clearTimeout(this._findBuildingTimeoutId),this._findBuildingTimeoutId=null}}const Ps="Poi_poiClick";class Fs{_map;_layerIds=[];_dispatch=Jo(Ps);_debounceQueryFeatures;constructor(e){this._map=e,this._bindEvents()}destroy(){this._dispatch.on(`.${Ps}`,null),this._debounceQueryFeatures?.cancel()}onPoiClick(e){const t=bs(`${Ps}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}_bindEvents(){this._map.on("styledata",this._debounceQueryFeatures=cs((()=>this._queryPoiLayers()),300)),this._initPoiClick()}_queryPoiLayers(){this._layerIds=Zr(ys(g(this._map.getStyle()),(e=>"mapxus_place"===e["source-layer"])),(({id:e})=>e))}_initPoiClick(){this._map.on("click",(e=>{const t=this._map.queryRenderedFeatures(e.point,{layers:[...this._layerIds,"mapxus-building-line","mapxus-venue-fill"]});if(t.length){const i=is(t,(e=>e.layer.id.indexOf("mapxus-poi")>-1));if(i?.properties){const{"ref:level":n=null,"ref:building":r}=i.properties,o=is(t,(e=>e.properties.id===r))??null,s=is(t,(e=>e.properties.id===o?.properties?.["ref:venue"]))??null,{floorName:a,ordinal:l}=this._getFloorDataByFloorId(n,o);this._dispatch.call(Ps,null,{coordinate:e.lngLat,poi:i,building:o,venue:s,floor:{code:a,id:n,ordinal:l}})}}}))}_getFloorDataByFloorId(e,t){let i=null,n=null;if(e&&t?.properties){const{level_ids:r,level_names:o,ordinals:s}=t.properties,a=r?.split(",")||[],l=ts(a,(t=>t===e));l>-1&&(i=(o?.split(",")||[])[l]??null,n=(s?.split(",")||[])[l]??null)}return{floorName:i,ordinal:n}}}function Os(e){e.parentNode&&e.parentNode.removeChild(e)}function js(e,t,i){const n=window.document.createElement(e);return t&&(n.className=t),i&&i.appendChild(n),n}const $s=function(e){return"number"==typeof e||te(e)&&"[object Number]"==F(e)};class Ts{_map;_maplibre;_buildingId;_features;_$container;_$listContainer;_$buildingList;_listHeight;_visible;_position="top-right";constructor(e,t){this._map=e,this._visible=t??!0}onAdd(e){return this._maplibre=e,this._$container=js("div","maplibregl-ctrl maplibregl-ctrl-building-filter "+(this._visible?"":"hide"),this._maplibre.getContainer()),this._$container.appendChild(this._buildingFilterIconCreate("div")),this._$container.appendChild(this._buildingNameListCreate("div")),this._loadData(),this._$container}onRemove(){Os(this._$container)}get position(){return this._position}get enabled(){return this._visible}getDefaultPosition(){return"top-right"}setVisibility(e){this._visible=e,e?this._$showLayout():this._$hideLayout()}changePosition(e,t,i){const n=document.querySelector(`.maplibregl-ctrl-${e}`),r=n.querySelector(".maplibregl-ctrl-building-filter");if(e!==t){this._position=t;const e=document.querySelector(`.maplibregl-ctrl-${t}`);r&&(n.removeChild(r),$s(i)?e.insertBefore(r,e.children[i]):e.append(r),this._updateBuildingListLayout(t))}else $s(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]))}_loadData(){this._maplibre.on("moveend",(()=>this._refresh())),this._map.onMapChangeListener((({building:e})=>{const t=e?.properties?.id??"";this._buildingId!==t&&(this._buildingId=t,this._refresh())})),this._map.renderComplete((()=>{this._init()}))}_init(){this._load()}_refresh(){this._load()}_load(){this._buildingNameListClean(),this._buildingNameListUpdate()}_buildingFilterIconCreate(e){const t=window.document.createElement(e);return t.className="mapxus-building-filter-icon",this._buildingToggleListEvent(t,!0),t}_buildingNameListCreate(e){return this._$listContainer=window.document.createElement(e),this._$listContainer.className="mapxus-building-name-layout",this._$listContainer.style.display="none",this._$listContainer.style.top="20px",this._$buildingList=window.document.createElement(e),this._$buildingList.className="mapxus-building-name-list",this._$listContainer.appendChild(this._$buildingList),this._buildingToggleListEvent(this._$listContainer,!1),this._$listContainer}_buildingNameListUpdate(){this._features=[];const e=this._map.getMaplibre(),t=e?e.queryRenderedFeatures({layers:["mapxus-building-line"]}):[];for(const e of t){const{properties:t}=e,{id:i,name:n}=t,r=t?.[`name:${this._map.getLanguage()}`]??n;is(this._features,(e=>e.properties.id===i))||(this._features.push(e),this._$buildingList.appendChild(this._buildingNameCreate("p",r,i,i===this._map.building?.properties?.id)))}this._setBuildingListHeight(this._features),this._updateBuildingListLayout(this._position)}_buildingNameListClean(){this._$buildingList.innerHTML=""}_setBuildingListHeight(e){const t=e.map((e=>{const t=e?.properties?.name;return t?Math.ceil(8*t.length/107):0})).reduce(((e,t)=>e+t),0);this._listHeight=26*t+8*e.length,this._$buildingList.style.height=this._$listContainer.style.height=`${this._listHeight>=208?208:this._listHeight}px`}_buildingNameCreate(e,t,i,n){const r=window.document.createElement(e);return r.dataset.id=i,r.className="mapxus-building-name",r.innerHTML=t,n&&r.classList.add("active"),this._buildingNameClickEvent(r),r}_toggleList(e){this._$listContainer.style.display=e?"block":"none"}_buildingNameClickEvent(e){e.onclick||(e.onclick=async e=>{const t=e.target;await this._map.selectBuildingById(t.dataset.id)})}_buildingToggleListEvent(e,t){e.onmouseenter||(e.onmouseenter=e=>{this._toggleList(!0)}),e.onmouseleave||t||(e.onmouseleave=e=>{this._toggleList(!1)})}_$showLayout(){this._$container.classList.remove("hide")}_$hideLayout(){this._$container.classList.add("hide")}_updateBuildingListLayout(e){e.indexOf("left")>-1?(this._$listContainer.style.right=null,this._$listContainer.style.left="55px"):(this._$listContainer.style.left=null,this._$listContainer.style.right="55px");const t=this._$container.offsetParent?this._$container.offsetParent.clientHeight-(this._$container.offsetTop+this._$container.clientHeight)-25:0;e.includes("bottom")&&this._listHeight-20>t?(this._$listContainer.style.top=null,this._$listContainer.style.bottom="15px"):(this._$listContainer.style.bottom=null,this._$listContainer.style.top="20px")}}const As=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e};const Vs=function(e){return"function"==typeof e?e:Ai};const Rs=function(e,t){return(ae(e)?As:Gi)(e,Vs(t))};var Ns=Math.max,Ds=Math.min;const Hs=function(e,t,i){return e>=Ds(t,i)&&e<Ns(t,i)};const Ws=function(e,t,i){return t=So(t),void 0===i?(i=t,t=0):i=So(i),e=wo(e),Hs(e,t,i)};class zs{_container;_indoor;_maplibre;_position="top-right";_buildingId=null;_floorNames;_ordinals;_ordinal=null;_style;_$innerFloors;_$activeFloor;_centerSelectorIdx;_lastNormalScrollableIdx;_$arrowBtnUp;_$arrowBtnDown;_maxScrollTop;_$selectorExpanded;_$selectorFolded;_componentDidMount=!1;_isEnabled;_visible=!1;_dragPan;_debounceScroll;_clearScrollEventListener;constructor(e,t){const{style:i,enabled:n=!0}=t;this._indoor=e,this._style=i?Object.assign({},Vo,i):Vo,this._isEnabled=n,this._bindEvents()}onAdd(e){return this._maplibre=e,this._addMapMoveEventListener(),this._container=js("div","maplibregl-ctrl mapxus-ctrl-floors hidden"),this._container}onRemove(){this._debounceScroll&&this._debounceScroll.cancel(),this._clearScrollEventListener&&this._clearScrollEventListener(),Os(this._container)}get position(){return this._position}get enabled(){return this._isEnabled}setEnabled(e){this._isEnabled=e,e&&!this._visible&&this._setVisibility(!0),!e&&this._visible&&this._setVisibility(!1)}getDefaultPosition(){return"top-right"}async switchByOrdinal(e,t){this._ordinal=e,this._dragPan=t??!0,await this._indoor.switchFloorByOrdinal(e),this._updateSelectorStatus(e),this._scrollCenterActiveFloor()}changePosition(e,t,i){const n=document.querySelector(`.maplibregl-ctrl-${e}`),r=n.querySelector(".mapxus-ctrl-floors");if(e!==t){this._position=t;const e=document.querySelector(`.maplibregl-ctrl-${t}`);r&&(n.removeChild(r),$s(i)?e.insertBefore(r,e.children[i]):e.append(r),this._show(),this._scrollCenterActiveFloor())}else $s(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]),this._show(),this._scrollCenterActiveFloor())}setStyle(e){this._style=Object.assign({},this._style,e),this._componentDidMount&&(this._clearFloors(),this._render(),this._scrollCenterActiveFloor(),this._componentDidMount=!0)}_setVisibility(e){this._componentDidMount?e?(this._show(),this._scrollCenterActiveFloor()):this._hide():(this._visible=e,this._indoor.building&&e&&(this._mountFloors(this._indoor.building),this._show(),this._scrollCenterActiveFloor()))}_bindEvents(){this._indoor.on(Bs,(({buildingId:e,ordinal:t,dragPan:i})=>{if(this._buildingId=e,this._ordinal=t,this._dragPan=i,this._visible&&this._hide(),this._componentDidMount&&this._clearFloors(),this._indoor.building){this._mountFloors(this._indoor.building);const e=this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0];this.enabled&&(!1!==this._dragPan||!1===this._dragPan&&e)&&(this._show(),this._scrollCenterActiveFloor())}else this._clearState()}))}_addMapMoveEventListener(){this._maplibre.on("moveend",(()=>{if(this.enabled&&!1===this._dragPan&&this._buildingId){const e=this._indoor.getFeaturesById(this._buildingId,{layerIds:["mapxus-building-line"]})[0];e?this._componentDidMount?this._visible||(this._show(),this._scrollCenterActiveFloor()):(this._mountFloors(e),this._show(),this._scrollCenterActiveFloor()):this._componentDidMount&&this._visible&&this._hide()}}))}_mountFloors(e){this._updateFloorSelector(e),this._componentDidMount=!0}_updateFloorSelector(e){const{level_names:t,ordinals:i}=e.properties;this._floorNames=t.split(",").reverse(),this._ordinals=i.split(",").reverse(),this._render()}_clearState(){this._floorNames=[],this._ordinals=[],this._ordinal=null}_render(){const{itemCount:e,itemSize:t}=this._style;this._centerSelectorIdx=Math.ceil(e/2)-1,this._maxScrollTop=(this._floorNames.length-e)*t,this._lastNormalScrollableIdx=this._floorNames.length-(e-this._centerSelectorIdx-1)-1,this._createFloors()}_hide(){this._container.classList.add("hidden"),this._visible=!1}_show(){this._container.classList.remove("hidden"),this._visible=!0}_createFloors(){this._$selectorFolded=this._$foldedSelector(this._container,(()=>{this._expandSelector(!0),this._scrollCenterActiveFloor()})),this._$selectorExpanded=this._$expandedSelector(this._container,(()=>this._expandSelector(!1)))}_$expandedSelector(e,t){const{itemSize:i,itemCount:n,defaultFolded:r,backgroundColor:o}=this._style,s=js("div","mapxus-ctrl-floors-expanded "+(r?"hidden":""),e);if(this._floorNames.length>1){js("div","mapxus-ctrl-floors-close",s).onclick=t}const a=js("div","mapxus-ctrl-floors-wrapper",s);return a.style.backgroundColor=o,this._floorNames.length>n&&(this._$arrowBtnUp=this._$createScrollButton(a,"up"),this._$arrowBtnUp.onclick=()=>this._handleScroll("up")),this._$innerFloors=js("div","mapxus-ctrl-floors-inner",a),Object.assign(this._$innerFloors.style,{maxHeight:i*n+"px",width:`${i}px`}),this._$createFloors(this._$innerFloors),this._floorNames.length>n&&(this._$arrowBtnDown=this._$createScrollButton(a,"down"),this._$arrowBtnDown.onclick=()=>this._handleScroll("down"),this._$innerFloors.addEventListener("scroll",this._debounceScroll=cs((e=>{e.stopPropagation(),this._resetArrowBtnStatus(this._$innerFloors.scrollTop)}),100)),this._clearScrollEventListener=()=>this._$innerFloors.removeEventListener("scroll",this._debounceScroll)),s}_$foldedSelector(e,t){const{itemSize:i,activeFontColor:n,activeBackgroundColor:r,defaultFolded:o}=this._style,s=js("div","mapxus-ctrl-floors-folded mapxus-ctrl-floors-floor "+(o?"":"hidden"),e);return s.onclick=t,Object.assign(s.style,{width:`${i}px`,height:`${i}px`,lineHeight:`${i}px`,color:n,backgroundColor:r}),s}_clearFloors(){this._container.innerHTML="",this._componentDidMount=!1}_$createScrollButton(e,t){return js("div",`mapxus-ctrl-floors-arrow mapxus-ctrl-floors-floor ${t}`,e)}_$createFloors(e){const{fontColor:t,itemSize:i}=this._style;let n;Rs(this._floorNames,((r,o)=>{n=js("div","mapxus-ctrl-floors-floor",e),n.dataset.floor=r,n.dataset.ordinal=this._ordinals[o],n.innerText=r,Object.assign(n.style,{color:t,height:`${i}px`,lineHeight:`${i}px`}),n.dataset.ordinal===this._ordinal&&(this._$activeFloor=n,this._resetActiveFloor(!0),this._$selectorFolded.innerText=r),n.onclick=async e=>{this._indoor.setDragPan("restrict"),await this.switchByOrdinal(e.target.dataset.ordinal)}}))}_updateSelectorStatus(e){const t=this._floorNames[this._ordinals.indexOf(e)];this._$activeFloor&&this._resetActiveFloor(!1),Rs(this._$innerFloors.children,(t=>{t.dataset.ordinal===e&&(this._$activeFloor=t,this._resetActiveFloor(!0))})),this._$selectorFolded.innerText=t}_resetArrowBtnStatus(e){0===e?this._$arrowBtnUp?.classList?.add("hidden"):this._$arrowBtnUp?.classList?.remove("hidden"),e===this._maxScrollTop?this._$arrowBtnDown?.classList?.add("hidden"):this._$arrowBtnDown?.classList?.remove("hidden")}_resetActiveFloor(e){const{activeBackgroundColor:t,backgroundColor:i,activeFontColor:n,fontColor:r}=this._style;Object.assign(this._$activeFloor.style,{color:e?n:r,backgroundColor:e?t:i,fontWeight:e?"bold":"normal",cursor:e?"auto":"pointer"}),this._$activeFloor.disabled=e}_scrollCenterActiveFloor(){if(this._ordinal){const e=this._ordinals.indexOf(this._ordinal);e>-1&&(this._$innerFloors.scrollTop=this._getScrollTop(e),this._$innerFloors.scrollTop||this._resetArrowBtnStatus(0))}}_getScrollTop(e){return Ws(this._centerSelectorIdx,this._lastNormalScrollableIdx+1)?(e-this._centerSelectorIdx)*this._style.itemSize:e>this._lastNormalScrollableIdx?this._maxScrollTop:0}_handleScroll(e){const t=this._$innerFloors.scrollTop,{itemSize:i}=this._style;if("up"===e){const e=t-2*i;this._$innerFloors.scrollTop=e<0?0:e}else if("down"===e){const e=t+2*i;this._$innerFloors.scrollTop=e>this._maxScrollTop?this._maxScrollTop:e}}_expandSelector(e){e?(this._$selectorExpanded.classList.remove("hidden"),this._$selectorFolded.classList.add("hidden")):(this._$selectorExpanded.classList.add("hidden"),this._$selectorFolded.classList.remove("hidden"))}}class Gs{_container;onAdd(e){this._container=js("div","maplibregl-ctrl mapxus-ctrl-logo",e.getContainer());const t=js("a","mapxus-logo",this._container);return t.target="_blank",t.href="https://www.khi.co.jp/groupvision2030/mapxus.html",t.setAttribute("aria-label","Mapxus logo"),t.setAttribute("rel","noopener"),this._container.appendChild(t),this._container}onRemove(){Os(this._container)}getDefaultPosition(){return"bottom-left"}}class Zs{_container;_anchor;_theme;constructor(e){this._theme=e.theme?e.theme:"default"}onAdd(e){return this._container=js("div","maplibregl-ctrl mapxus-ctrl-attribution",e.getContainer()),this._anchor=js("a","mapxus-attribution",this._container),this._anchor.target="_blank",this._setCopyrightInfo(this._theme),this._anchor.setAttribute("aria-label","Mapxus attribution"),this._anchor.setAttribute("rel","noopener"),this._container.appendChild(this._anchor),this._container}onRemove(){Os(this._container)}getDefaultPosition(){return"bottom-right"}changeTheme(e){this._setCopyrightInfo(e)}_setCopyrightInfo(e){this._anchor.innerText="landsD"===e?"© The Government of the Hong Kong SAR":"© OpenStreetMap contributors",this._anchor.href="landsD"===e?"https://www.map.gov.hk/gm/":"https://www.openstreetmap.org/copyright/"}}class Ys{_container;_$icon;_removeClickEventListener;onAdd(e){return this._container=js("div","maplibregl-ctrl mapxus-ctrl-collapsed-copyright",e.getContainer()),this._container.innerHTML='\n <div class="mapxus-collapsed-copyright-content">\n <div class="mapxus-collapsed-copyright-menu hidden">\n <div class="mapxus-collapsed-copyright-logo" onclick="window.open(\'https://www.khi.co.jp/groupvision2030/mapxus.html\')"></div>\n <div class="mapxus-collapsed-horizontal-divider"></div>\n <div class="mapxus-collapsed-copyright-text" onclick="window.open(\'https://www.openstreetmap.org/copyright/\')"></div>\n </div>\n <div class="mapxus-collapsed-copyright-btn"></div>\n </div>\n ',this._bindEvents(),this._container}onRemove(){this._removeClickEventListener(),Os(this._container)}getDefaultPosition(){return"bottom-right"}_bindEvents(){const e=this._container.querySelector(".mapxus-collapsed-copyright-menu");this._$icon=this._container.querySelector(".mapxus-collapsed-copyright-btn");let t=!1;function i(){t=!t,t?e.classList.remove("hidden"):e.classList.add("hidden")}this._$icon.addEventListener("click",i),this._removeClickEventListener=()=>this._$icon.removeEventListener("click",i)}}function Xs(e){return`${qi}/api/v3/tiles/styles/${e}`}const Us=Xs("christmas_mims2_v1"),Js=Xs("common_mims2_v1"),qs=Xs("halloween_mims2_v1"),Qs=Xs("mappybee_mims2_v1"),Ks=Xs("mapxus_mims2_v1"),ea=Xs("lands_d_mims2_v1"),ta=Xs("mapxus_mims2_v5");class ia{_indoor;_isEnabled=!0;constructor(e){this._indoor=e}enable(){this._isEnabled=!0,this._indoor.setAllowOutdoorSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowOutdoorSwitch(!1)}get isEnabled(){return this._isEnabled}}class na{_indoor;_isEnabled=!0;constructor(e){this._indoor=e}enable(){this._isEnabled=!0,this._indoor.setAllowBuildingSwitch(!0)}disable(){this._isEnabled=!1,this._indoor.setAllowBuildingSwitch(!1)}get isEnabled(){return this._isEnabled}}class ra{_buildingSelector;_isEnabled=!0;_position;constructor(e){this._buildingSelector=e}enable(){this._isEnabled=!0,this._buildingSelector.enabled||this._buildingSelector.setVisibility(!0)}disable(){this._isEnabled=!1,this._buildingSelector.enabled&&this._buildingSelector.setVisibility(!1)}setPosition(e,t){this._position=e,this._buildingSelector.changePosition(this._buildingSelector.position,e,t)}get isEnabled(){return this._isEnabled}get position(){return this._position}}class oa{_floorSelector;_isEnabled;_position;constructor(e){this._floorSelector=e,this._position=e.position,this._isEnabled=this._floorSelector.enabled}enable(){this._isEnabled=!0,this._floorSelector.setEnabled(!0)}disable(){this._isEnabled=!1,this._floorSelector.setEnabled(!1)}setPosition(e,t){this._position=e,this._floorSelector.changePosition(this._floorSelector.position,e,t)}setStyle(e){this._floorSelector.setStyle(e)}get isEnabled(){return this._isEnabled}get position(){return this._position}}const sa="Map_mapClick",aa="Map_pointClick",la="Map_isRenderComplete",ca="Map_isDestroyed";class ua{_appId;_map;_indoor;_poi;_floorsControl;_buildingFilterControl;_attributionControl;_initialHiddenLayers;_language;_dispatch=Jo(sa,aa,la,ca);_fitBuildingBounds;_history=qo.getInstance();_hiddenBuildings=Qo.getInstance().getHiddenBuildings();_debounceHTTPErrorHandler;_debounceTilesFilter;isDestroyed=!1;switchOutdoor;switchBuilding;buildingSelector;floorSelector;constructor(e){const{map:t,appId:i,secret:n,poiId:r,floorId:o,buildingId:s,venueId:l,theme:c=a.MAPXUS_V2,floorSelectorEnabled:u,buildingSelectorEnabled:d,outdoorMapShown:h,collapseCopyright:p=!1,floorSwitchMode:f,maskNonSelectedAreas:_,fitBuildingBounds:g=!1,boundsPadding:m=30,selectedBuildingBorderStyle:y,floorSelectorStyle:v,language:b=Ro,autoSelectBuilding:w=!1}=e;if(!t)throw new Error("Outdoor Map parameter missing.");if(!i||!n)throw new Error("Permission parameter missing.");Wr.setHeaders(i,n).then((()=>{this._appId=i,this._map=t,this._language=b,this._indoor=new Es({map:this._map,startWithIndoorView:Boolean(l||s||o||r),outdoorMapShown:h,floorSwitchMode:f,fitBuildingBounds:g,boundsPadding:m,maskNonSelectedAreas:_,selectedBuildingBorderStyle:y}),this._poi=new Fs(this._map),this._fitBuildingBounds=g,this._resourceRequestTransform(),this._setStyle(this._getStyleUrl(c)),this._checkMapZoom(),p?this._attributionControl=new Ys:(this._attributionControl=new Zs({theme:c}),this._addControl(new Gs)),this._addControl(this._attributionControl),this._addControl(this._buildingFilterControl=new Ts(this,d)),this._addControl(this._floorsControl=new zs(this._indoor,{style:v,enabled:u})),r?this._selectPoiById(r):o?this.selectFloorById(o):s?this.selectBuildingById(s):l&&this.selectVenueById(l),this.switchOutdoor=new ia(this._indoor),this.switchBuilding=new na(this._indoor),this.buildingSelector=new ra(this._buildingFilterControl),this.floorSelector=new oa(this._floorsControl),this._map.on("remove",(()=>this._destroy())),this._map.once("styledata",(()=>this._hideIndoorLayers())),this._map.on("click",(async e=>{const{point:t,lngLat:i}=e;await this._indoor.selectBuildingByClickMap(t),this._dispatch.call(aa,null,{point:t,coordinate:i}),this._dispatch.call(sa,null,{coordinate:i,venue:this.venue,building:this.building,floor:this.floor})})),this._map.on("error",this._debounceHTTPErrorHandler=cs((e=>this._updatePermission(e,i,n)),350)),this._indoor.once(xs,(()=>{this._showIndoorLayers(),this.setLanguage(this._language)})),this._indoor.once(ks,(()=>{w&&this._map.on("moveend",(()=>this._selectCenterBuilding())),this._dispatch.call(la)}))})).catch((e=>{throw e}))}renderComplete(e){const t=bs(`${la}.`);this._dispatch.on(t,e)}destroyed(e){const t=bs(`${ca}.`);this._dispatch.on(t,(()=>{e(),this._dispatch.on(t,null),0===this._dispatch._[ca].length&&(delete this._dispatch,Object.freeze(this))}))}getIndoor(){return this._indoor}getMaplibre(){return this._map}get floor(){return this.getIndoor()?.floor??null}get building(){return this.getIndoor()?.building??null}get venue(){return this.getIndoor()?.venue??null}setLanguage(e){this._language!==e&&(this._language=e);const t=this._map?.getStyle(),i=t?.layers;if(i&&i.length){const t=i.filter((({type:e})=>"symbol"===e));t.length&&t.forEach((({id:t})=>{this._map.getLayer(t)&&this._map.setLayoutProperty(t,"text-field",["coalesce",["get",`name:${e}`],["get","name"]])}))}}getLanguage(){return this._language}setOutdoorMapShown(e){this.getIndoor()?.setOutdoorMapShown(e)}getIndoorFeaturesByCoordinates(e,t){const i=this._map.project(e),n=this._map.queryRenderedFeatures(i,{layers:["mapxus-venue-fill","mapxus-building-line","mapxus-level-fill","mapxus-level-fill-overlap-copy"]});let r=null,o=null,s=null;if(n.length){const e=n.filter((e=>e.layer.id.includes("mapxus-level-fill")));s=is(e,(e=>$s(t)?e.properties.ordinal===t+"":e.layer.id.startsWith("mapxus-level-fill"))),s&&(o=is(n,(e=>e.properties.id===s.properties["ref:building"])),r=is(n,(e=>e.properties.id===o.properties["ref:venue"])))}return{venue:r,building:o,level:s}}getFeaturesById(e,t){return this.getIndoor()?.getFeaturesById(e,t)||[]}async selectFloorById(e,t){const{dragPan:i=!0}=t||{};if(this._indoor.setDragPan(i),e===this.floor?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let t,n,r;if(this._fitBuildingBounds){t=await zo(e),n=Xi(t),r=!0;const{maxLat:i,maxLon:o,minLat:s,minLon:a}=t.bbox;this._indoor.setBuildingBounds([[a,s],[o,i]])}else n=is(this._indoor?.features||[],(t=>t.properties?.level_ids?.includes(e)&&"mapxus-building-line"===t.layer.id))??null,n?r=!1:(t=await zo(e),n=Xi(t),r=!0);if(n&&n?.properties?.id===this.building?.properties?.id){const{level_ids:t,ordinals:r}=n.properties,o=t.split(",").indexOf(e),s=r.split(",")[o]??null;await this._floorsControl.switchByOrdinal(s,i)}else await(this._indoor?.selectBuilding(n,{floorId:e,featureIncomplete:r}))}}async selectBuildingById(e,t){const{dragPan:i=!0}=t||{};if(this._indoor.setDragPan(i),e===this.building?.properties?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let t,i,n=!1;if(this._fitBuildingBounds){t=await Wo(e),i=Xi(t),n=!0;const{maxLat:r,maxLon:o,minLat:s,minLon:a}=t.bbox;this._indoor.setBuildingBounds([[a,s],[o,r]])}else i=this._map.getLayer("mapxus-building-line")&&this.getFeaturesById(e,{layerIds:["mapxus-building-line"]})[0]||null,i||(t=await Wo(e),i=Xi(t),n=!0);await(this._indoor?.selectBuilding(i,{featureIncomplete:n}))}}async selectVenueById(e,t){const{dragPan:i=!0}=t||{};if(this._indoor.setDragPan(i),e)if(e===this.venue?.properties?.id)i&&(this._fitBuildingBounds?this._indoor.fitBuildingBbox():await this._indoor.panToBuildingCenter());else{let t=this._history.getHistoryBuilding(e);if(!t){const i=this._map.getLayer("mapxus-venue-fill")&&this.getFeaturesById(e,{layerIds:["mapxus-venue-fill"]})[0];if(i){const{default_displayed_building:e,building_ids:n}=i.properties;t=e||(n?.split(",")||[])[0]}else{const i=await async function(e){try{return(await Do.searchByIds(e)).data.result.venues[0]}catch(e){throw new Error(e)}}(e);t=i.defaultBuilding||i.buildings[0]?.id}}await this.selectBuildingById(t,{dragPan:i})}else await(this._indoor?.selectBuilding(null))}onMapClickListener(e){const t=bs(`${sa}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}onPoiClickListener(e){return this._poi?.onPoiClick(e)}onPointClickListener(e){const t=bs(`${aa}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}onMapChangeListener(e){return this._indoor?.onMapChange(e)}switchTheme(e){this._setStyle(this._getStyleUrl(e)),"changeTheme"in this._attributionControl&&this._attributionControl.changeTheme(e),this._map?.once("styledata",this._debounceTilesFilter=cs((()=>this._setIndoorFilter()),250))}setSelectedBuildingBorderStyle(e){return this._indoor?.setSelectedBuildingBorderStyle(e),this}_getStyleUrl(e){let t;if(ko(a).indexOf(e)>-1)switch(e){case a.CHRISTMAS:t=Us;break;case a.HALLOWEEN:t=qs;break;case a.MAPPY_BEE:t=Qs;break;case a.MAPXUS:t=Ks;break;case a.MAPXUS_V2:t=ta;break;case a.COMMON:t=Js;break;case a.LANDS_D:t=ea}else t=function(e){return Xs(e)}(e);return t}_setIndoorFilter(){this._indoor.updateCustomLayers(),this._indoor.updateRendering()}_setStyle(e){this._map?.setStyle(e,{localIdeographFontFamily:!1})}_addControl(e,t){this._map.addControl(e,t)}async _selectPoiById(e){try{const t=await async function(e){try{return(await Ho.searchByIds([e])).data.result.pois[0]}catch(e){throw new Error(e)}}(e),{floorId:i,location:{lon:n,lat:r}}=t;await this.selectFloorById(i),this._map.panTo([n,r])}catch(e){throw new Error(e)}}_resourceRequestTransform(){this._map.setTransformRequest(Wr.transformRequest)}_checkMapZoom(){const e=this._map.getZoom();(e<8||e>22)&&e>1&&console.warn("Indoor maps perform better at zoom levels [8, 22].")}_hideIndoorLayers(){this._map.getLayer("mapxus-venue-fill")&&this._map.setPaintProperty("mapxus-venue-fill","fill-opacity",0),this._map.getLayer("mapxus-building-line-color")&&this._map.setPaintProperty("mapxus-building-line-color","line-opacity",0),this._initialHiddenLayers=g(this._map.getStyle()).filter((({id:e})=>!e.includes("mapxus-building")||"mapxus-venue-fill"!==e)),this._initialHiddenLayers.forEach((({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility","none")}))}_showIndoorLayers(){Rs(this._initialHiddenLayers,(({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility","visible")}))}_updatePermission(e,t,i){401===e.error?.status&&Wr.setHeaders(t,i).then((()=>{this._resourceRequestTransform()}))}_selectCenterBuilding(){const e=this._getCenterBuildingsMap();if(e.size){let t=e.entries().next().value[0];const i=this._history.getHistoryBuildings();if(i.size){const n=Array.from(i).reverse();for(const i of n)if(e.get(i)){t=i;break}}this.selectBuildingById(t,{dragPan:!1})}}_getCenterBuildingsMap(){const e=this._map.getCanvas().getBoundingClientRect(),t=e.width/4,i=e.height/4,n=[t,i],r=[e.width-t,e.height-i];let o=this._map.queryRenderedFeatures([n,r],{layers:["mapxus-building-line"]});return o=gs(o,"properties.id"),o=ys(o,(e=>!this._hiddenBuildings.has(e.properties.id))),new globalThis.Map(o.map((e=>[`${e.properties.id}`,e])))}_destroy(){if(this.isDestroyed)return;this.isDestroyed=!0,this._debounceHTTPErrorHandler?.cancel(),this._debounceTilesFilter?.cancel();const e=this._dispatch._;for(const t in e)t!==ca&&e.hasOwnProperty(t)&&e[t].forEach((({name:e})=>{this._dispatch.on(`${t}.${e}`,null)}));Tr.getInstance().setToken(this._appId,null,l.Map),this._indoor.destroy(),this._poi.destroy(),Object.keys(this).forEach((e=>{"isDestroyed"!==e&&"_dispatch"!==e&&delete this[e]})),this._dispatch.call(ca)}}async function da(e,t){if(!e.hasImage(t))try{const i=await e.loadImage(t);e.addImage(t,i.data)}catch(e){throw new Error(e)}}class ha{_maplibreMap;_layerId;_sourceId;_imageName="poi-01";_imageSize=.75;_iconAnchor="bottom";constructor(e){this._maplibreMap=e;const t=bs();this._layerId=`MXMap_preset_marker_layer_${t}`,this._sourceId=`MXMap_preset_marker_source_${t}`}async setIcon(e){e&&await da(this._maplibreMap,e),this._imageName=e}setIconSize(e){this._imageSize=e}setIconAnchor(e){this._iconAnchor=e}get layerId(){return this._layerId}get sourceId(){return this._sourceId}create(e){if(e.length){const t=Zr(e,(e=>this._createIconFeature(e)));this._addIconSource(t),this._addIconLayer()}}updateData(e){const t=this._maplibreMap.getSource(this._sourceId);if(!t)return;const i=!(!e.remove||!e.remove.length),n=!(!e.add||!e.add.length),r=!(!e.update||!e.update.length);if(i||n||r){const o={};i&&(o.remove=e.remove.map((e=>String(e)))),n&&(o.add=e.add.map((e=>this._createIconFeature(e)))),r&&(o.update=e.update.map((e=>{const t="properties"in e,i=this._createIconFeature(e),{id:n,geometry:r,properties:o}=i;return{id:n,newGeometry:r,removeAllProperties:t,...o?{addOrUpdateProperties:Zr(o,((e,t)=>({key:t,value:e})))}:{}}}))),t.updateData(o)}}remove(){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.removeLayer(this._layerId),this._maplibreMap.getSource(this._sourceId)&&this._maplibreMap.removeSource(this._sourceId)}on(e,t){const i=e=>this._handleEventListener(e,t);return this._maplibreMap.on(e,this._layerId,i),{off:()=>this._maplibreMap.off(e,this._layerId,i)}}setFilter(e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,e)}setFilterByVenue(e,t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","venueId"],e??""],["==",["get","ordinal"],t??""]],["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]]])}setFilterByBuilding(e,t){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setFilter(this._layerId,["any",["all",["==",["get","buildingId"],e??""],["==",["get","ordinal"],t??""]],["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]]])}setOpacity(e){this._maplibreMap.getLayer(this._layerId)&&this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",e)}setOpacityByVenue(e,t,i){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","venueId"],e??""],["==",["get","ordinal"],t??""]],1,["all",["==",["get","venueId"],""],["==",["get","ordinal"],""]],1,i??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}setOpacityByBuilding(e,t,i){if(this._maplibreMap.getLayer(this._layerId)){const n=["case",["all",["==",["get","buildingId"],e??""],["==",["get","ordinal"],t??""]],1,["all",["==",["get","buildingId"],""],["==",["get","ordinal"],""]],1,i??.5];this._maplibreMap.setPaintProperty(this._layerId,"icon-opacity",n)}}_createIconFeature(e){const{lngLat:t,properties:i}=e;return{id:"featureId"in e&&$s(e.featureId)?String(e.featureId):void 0,type:"Feature",geometry:{type:"Point",coordinates:t},properties:i||null}}_addIconSource(e){const t={type:"geojson",data:{type:"FeatureCollection",features:e}};this._maplibreMap.addSource(this._sourceId,t)}_addIconLayer(){this._maplibreMap.addLayer({id:this._layerId,type:"symbol",source:this._sourceId,layout:{"icon-image":this._imageName,"icon-size":this._imageSize,"icon-anchor":this._iconAnchor,"icon-allow-overlap":!0,"icon-ignore-placement":!0}})}_handleEventListener(e,t){const{point:i}=e;t(this._maplibreMap.queryRenderedFeatures(i,{layers:[this._layerId]})[0])}}const pa={indoorLineColor:"#45b1cc",outdoorLineColor:"#8183ba",dashedLineColor:"#969696",shuttleBusLineColor:"#fb923c",lineWidth:4,dashedLineWidth:4,disableDashedLine:!1,inactiveRouteOpacity:.5,outdoorLineOpacity:1,markerIconSize:.75,markers:{from:"poi-02",to:"poi-01",stops:["waypoint-01"]},lineSymbol:{image:"east-blue-arrow-01",size:.25,spacing:1}},fa="mmws-source-line-solid",_a="mmws-layer-line-solid",ga="mmws-layer-icon-line-symbol",ma="mmws-source-line-dashed",ya="mmws-layer-line-dashed",va="mmws-source-icon-connector",ba="mmws-layer-icon-connector",wa="mmws-source-icon-marker",La="mmws-layer-icon-marker",Sa=[_a,ga,ya,ba,La],Ia=[fa,ma,va,wa];class Ba{_maplibreMap;_routeStyle=pa;_styleDiffs={};_filterBy="venue";_curVenue=null;_curBuilding=null;_curOrdinal=null;constructor(e,t){this._maplibreMap=e,t&&(this._updateStyleProperties(t),e.on("load",(()=>this._loadMarkerIcons())))}async setStyle(e){this._updateStyleProperties(e),await this._loadMarkerIcons(),await this._updateLayers()}async setMarkerIcons(e){if(ae(e)&&e.length){const t=e.slice(1,e.length-1);this._routeStyle.markers={from:e[0],to:jr(e),stops:t.length?t:[e[0]]},this._styleDiffs={markers:this._routeStyle.markers}}else"from"in e&&(this._routeStyle.markers.from=e.from,this._styleDiffs.markers.from=e.from),"to"in e&&(this._routeStyle.markers.to=e.to,this._styleDiffs.markers.to=e.to),"stops"in e&&(this._routeStyle.markers.stops=e.stops??[null],this._styleDiffs.markers.stops=e.stops??[null]);await this._loadMarkerIcons()}setMarkerIconSize(e){return this._routeStyle.markerIconSize=e,this}setIndoorLineColor(e){return this._routeStyle.indoorLineColor=e,this}setOutdoorLineColor(e){return this._routeStyle.outdoorLineColor=e,this}setDashedLineColor(e){return this._routeStyle.dashedLineColor=e,this}setBusLineColor(e){return this._routeStyle.shuttleBusLineColor=e,this}render(e,t){const{instructions:i,points:{coordinates:n}}=e,{lineFeatures:r,connectorFeatures:o,dashedLineFeatures:s,markerFeatures:a}=this._classifyFeatures(i,n,t);this._renderSolidLines(r),this._renderLineSymbols(fa,ga),!0!==this._routeStyle.disableDashedLine&&this._renderDashedLines(s),this._renderConnectors(o),this._renderMarkers(a)}remove(){Sa.forEach((e=>{this._maplibreMap.getLayer(e)&&this._maplibreMap.removeLayer(e)})),Ia.forEach((e=>{this._maplibreMap.getSource(e)&&this._maplibreMap.removeSource(e)}))}setFilterByVenue(e,t){this._filterBy="venue",this._curVenue=e??null,this._curOrdinal=t??null,this._filterRouteOpacity()}setFilterByBuilding(e,t){this._filterBy="building",this._curBuilding=e??null,this._curOrdinal=t??null,this._filterRouteOpacity()}_classifyFeatures(e,t,i){const n=[],r=[],o=[],s=[],a=[];Rs(e,((i,o)=>{const{venue_id:s,building_id:l,floor_id:c,ordinal:u,sign:d,type:h,interval:[p,f]}=i;if(function(e){return 5===e}(d))a.push(i);else if(function(e){return 100===e||-100===e}(d)){0!==o&&o!==e.length-1&&r.push(this._createIconFeature(`connector-${r.length}`,t[p],{...ka({venue_id:s,building_id:l,floor_id:c,ordinal:u}),icon:h}));const i=e[o+1];if(i){const{venue_id:e,building_id:n,floor_id:o,ordinal:s}=i;r.push(this._createIconFeature(`connector-${r.length}`,t[f],{...ka({venue_id:e,building_id:n,floor_id:o,ordinal:s}),icon:h}))}}else n.push(this._createLineFeature(`solid-line-${n.length}`,t.slice(p,f+1),ka({venue_id:s,building_id:l,floor_id:c,ordinal:u,isShuttleBus:xa(d)?1:0})))}));const l=e[0],{venue_id:c,building_id:u,floor_id:d,ordinal:h}=l,p=e[e.length-1],{venue_id:f,building_id:_,floor_id:g,ordinal:m}=p,y=t[0],v=t[t.length-1],b=i[0],w=i[i.length-1],L=i.slice(1,i.length-1);return b&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[b,y],ka({venue_id:c,building_id:u,floor_id:d,ordinal:h}))),w&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[v,w],ka({venue_id:f,building_id:_,floor_id:g,ordinal:m}))),a.length&&L.length&&a.forEach((({venue_id:e,building_id:i,floor_id:n,ordinal:r,interval:[a]},l)=>{o.push(this._createLineFeature(`dashed-line-${o.length}`,[t[a],L[l]],ka({venue_id:e,building_id:i,floor_id:n,ordinal:r}))),s.push(this._createIconFeature(`marker-${s.length}`,L[l],{...ka({venue_id:e,building_id:i,floor_id:n,ordinal:r,markerType:`stops_${l}`}),icon:this._routeStyle.markers.stops[l]??jr(this._routeStyle.markers.stops),iconSize:this._routeStyle.markerIconSize}))})),s.push(this._createIconFeature(`marker-${s.length}`,b??y,{...ka({venue_id:c,building_id:u,floor_id:d,ordinal:h,markerType:"from"}),icon:this._routeStyle.markers.from,iconSize:this._routeStyle.markerIconSize})),s.push(this._createIconFeature(`marker-${s.length}`,w??v,{...ka({venue_id:f,building_id:_,floor_id:g,ordinal:m,markerType:"to"}),icon:this._routeStyle.markers.to,iconSize:this._routeStyle.markerIconSize})),{lineFeatures:n,connectorFeatures:r,dashedLineFeatures:o,markerFeatures:s}}_createLineFeature(e,t,i){return{id:e,type:"Feature",geometry:{type:"LineString",coordinates:t},properties:i}}_createIconFeature(e,t,i){return{id:e,type:"Feature",geometry:{type:"Point",coordinates:t},properties:i}}_renderSolidLines(e){this._addCollectionSource(fa,e),this._addLineLayer(fa,_a,{"line-color":["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],null],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor],"line-opacity":["case",["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,1],"line-width":this._routeStyle.lineWidth})}_renderDashedLines(e){this._addCollectionSource(ma,e),this._addLineLayer(ma,ya,{"line-color":this._routeStyle.dashedLineColor,"line-width":this._routeStyle.dashedLineWidth,"line-dasharray":[.1,1.8]})}_renderConnectors(e){this._addCollectionSource(va,e),this._addIconLayer(va,ba)}_renderMarkers(e){this._addCollectionSource(wa,e),this._addIconLayer(wa,La,{"icon-anchor":"bottom","icon-allow-overlap":!0,"icon-ignore-placement":!0})}_addCollectionSource(e,t){this._maplibreMap.addSource(e,{type:"geojson",data:{type:"FeatureCollection",features:t}})}_addLineLayer(e,t,i){this._maplibreMap.addLayer({id:t,type:"line",source:e,layout:{"line-join":"round","line-cap":"round"},paint:{"line-width":4,...i||{}}})}_renderLineSymbols(e,t){this._maplibreMap.addLayer({id:t,type:"symbol",source:e,layout:{"symbol-placement":"line","symbol-spacing":this._routeStyle.lineSymbol.spacing,"icon-size":this._routeStyle.lineSymbol.size,"icon-image":this._routeStyle.lineSymbol.image},paint:{"icon-opacity":["case",["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,1]}})}_addIconLayer(e,t,i){this._maplibreMap.addLayer({id:t,type:"symbol",source:e,layout:{"icon-image":["get","icon"],"icon-size":["case",["has","iconSize"],["get","iconSize"],1],...i||{}}})}_updateStyleProperties(e){if(this._styleDiffs=Ma(this._routeStyle,e??pa),e){if(Object.keys(this._styleDiffs).length){const e={...this._routeStyle.lineSymbol,...this._styleDiffs.lineSymbol??{}},t=this._styleDiffs.markers;let i=this._routeStyle.markers,n={outdoorLineOpacity:(this._styleDiffs.outdoorLineOpacity>1?1:this._styleDiffs.outdoorLineOpacity<0?0:this._styleDiffs.outdoorLineOpacity)??this._routeStyle.outdoorLineOpacity},r={inactiveRouteOpacity:(this._styleDiffs.inactiveRouteOpacity>1?1:this._styleDiffs.inactiveRouteOpacity<0?0:this._styleDiffs.inactiveRouteOpacity)??this._routeStyle.inactiveRouteOpacity};t&&Object.keys(t).length&&(i={...i,...t}),this._routeStyle={...this._routeStyle,...this._styleDiffs,...n,...r,markers:i,lineSymbol:e}}}else this._routeStyle=pa}async _loadMarkerIcons(){const{markers:e,lineSymbol:t}=this._styleDiffs;if(t?.image&&await da(this._maplibreMap,t.image),e&&Object.keys(e).length){const{from:t,to:i,stops:n}=e;if(t&&await da(this._maplibreMap,t),i&&await da(this._maplibreMap,i),n&&n.length){const e=n.filter((e=>!!e));e.length&&await Promise.all(e.map((e=>da(this._maplibreMap,e))))}}}async _updateLayers(){if(!this._maplibreMap.getLayer(_a))return;const{indoorLineColor:e,outdoorLineColor:t,dashedLineColor:i,shuttleBusLineColor:n,lineWidth:r,dashedLineWidth:o,disableDashedLine:s,inactiveRouteOpacity:a,outdoorLineOpacity:l,markerIconSize:c,markers:u,lineSymbol:d}=this._styleDiffs;if((e||t||n)&&this._maplibreMap.setPaintProperty(_a,"line-color",["case",["==",["get","isShuttleBus"],"1"],this._routeStyle.shuttleBusLineColor,["==",["get","floor_id"],null],this._routeStyle.outdoorLineColor,this._routeStyle.indoorLineColor]),void 0!==r&&r+""&&this._maplibreMap.setPaintProperty(_a,"line-width",r),"boolean"==typeof s?s?this._maplibreMap.setPaintProperty(ya,"line-color","transparent"):(this._maplibreMap.setPaintProperty(ya,"line-color",this._routeStyle.dashedLineColor),this._maplibreMap.setPaintProperty(ya,"line-width",this._routeStyle.dashedLineWidth)):!0!==this._routeStyle.disableDashedLine&&(i&&this._maplibreMap.setPaintProperty(ya,"line-color",i),void 0!==o&&o+""&&this._maplibreMap.setPaintProperty(ya,"line-width",o)),void 0!==a&&a+""&&this._filterRouteOpacity(),void 0!==c&&c+""&&this._maplibreMap.setLayoutProperty(La,"icon-size",c),u&&Object.keys(u).length){const{from:e,to:t,stops:i}=u,n=this._maplibreMap.getSource(wa),r=await n.getData();r.features=r.features.map((n=>{const{markerType:r}=n.properties;if(void 0!==e&&"from"===r&&(n.properties.icon=e),void 0!==t&&"to"===r&&(n.properties.icon=t),i&&r.includes("stops")){const e=parseInt(r.split("_")[1]);n.properties.icon=i[e]??jr(i)}return n})),n.setData(r)}if(d){const{image:e,size:t,spacing:i}=d;void 0!==e&&this._maplibreMap.setLayoutProperty(ga,"icon-image",e),void 0!==t&&t+""&&this._maplibreMap.setLayoutProperty(ga,"icon-size",t),void 0!==i&&i+""&&this._maplibreMap.setLayoutProperty(ga,"symbol-spacing",i)}void 0!==l&&l+""&&(this._maplibreMap.setPaintProperty(_a,"line-opacity",["case",["==",["get","floor_id"],null],l,1]),this._maplibreMap.setPaintProperty(ga,"icon-opacity",["case",["==",["get","floor_id"],null],l,1]),this._filterRouteOpacity())}_filterRouteOpacity(){let e;switch(this._filterBy){case"venue":e=["case",["all",["==",["get","ordinal"],this._curOrdinal??""],["==",["get","venue_id"],this._curVenue??""]],1,["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,this._routeStyle.inactiveRouteOpacity];break;case"building":e=["case",["all",["==",["get","ordinal"],this._curOrdinal??""],["==",["get","building_id"],this._curBuilding??""]],1,["==",["get","floor_id"],null],this._routeStyle.outdoorLineOpacity,this._routeStyle.inactiveRouteOpacity]}Sa.forEach((t=>{this._maplibreMap.getLayer(t)&&this._maplibreMap.setPaintProperty(t,t.includes("layer-line")?"line-opacity":"icon-opacity",e)}))}}function ka(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,$s(t)?t+"":t])))}function xa(e){return Ws(e,104,108)}function Ma(e,t){const i={};for(const n in t){const r=e[n],o=t[n];if("markers"===n||"lineSymbol"===n)if(ae(o)){const e=o.slice(1,o.length-1);i[n]={from:o[0],to:jr(o),stops:e.length?e:[o[0]]}}else{const e=Ma(r,o);Object.keys(e).length&&(i[n]=e)}else o+""!=r+""&&(i[n]="stops"===n?o??[null]:o)}return i}return r})()));