@mapxus/mapxus-map-jp 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={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):[]}},311:(e,t,i)=>{i.d(t,{o:()=>a});var n=i(792),r=i(531),o=i(916),s=i(463);class a{static _instance;_tokenManager=s.t.getInstance();static getInstance(){return a._instance||(a._instance=new a),a._instance}get version(){return n.VERSION}async getIdentifier(){return await this._tokenManager.getIdentifier()}async getToken(e,t){let i=this._tokenManager.getToken(e);if(!i&&t){const n=new r.k(e,t,o.en.Map);await n.ready(),i=n.token}return i}getAppId(e){return this._tokenManager.getAppId(e)}disconnect(e){this._tokenManager.on(s._,e)}}},463:(e,t,i)=>{i.d(t,{_:()=>Te,t:()=>Ae});var n=function(){return n=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},n.apply(this,arguments)};function r(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 o(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 s(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 a="4.6.0";function l(e,t){return new Promise((function(i){return setTimeout(i,e,t)}))}function c(e){return!!e&&"function"==typeof e.then}function u(e,t){try{var i=e();c(i)?i.then((function(e){return t(!0,e)}),(function(e){return t(!1,e)})):t(!0,i)}catch(e){t(!1,e)}}function d(e,t,i){return void 0===i&&(i=16),r(this,void 0,void 0,(function(){var n,r,s,a;return o(this,(function(o){switch(o.label){case 0:n=Array(e.length),r=Date.now(),s=0,o.label=1;case 1:return s<e.length?(n[s]=t(e[s],s),(a=Date.now())>=r+i?(r=a,[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:o.sent(),o.label=3;case 3:return++s,[3,1];case 4:return[2,n]}}))}))}function h(e){return e.then(void 0,(function(){})),e}function p(e){return parseInt(e)}function f(e){return parseFloat(e)}function _(e,t){return"number"==typeof e&&isNaN(e)?t:e}function g(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function m(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 y(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 v(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 b(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 w(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 L(e,t){e[0]^=t[0],e[1]^=t[1]}var S=[4283543511,3981806797],I=[3301882366,444984403];function B(e){var t=[0,e[0]>>>1];L(e,t),v(e,S),t[1]=e[0]>>>1,L(e,t),v(e,I),t[1]=e[0]>>>1,L(e,t)}var k=[2277735313,289559509],x=[1291169091,658871167],M=[0,5],C=[0,1390208809],E=[0,944331445];function P(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,v(c,k),b(c,31),v(c,x),L(a,c),b(a,27),y(a,l),v(a,M),y(a,C),v(u,x),b(u,33),v(u,k),L(l,u),b(l,31),y(l,a),v(l,M),y(l,E);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],w(d,48),L(u,d);case 14:d[1]=i[n+13],w(d,40),L(u,d);case 13:d[1]=i[n+12],w(d,32),L(u,d);case 12:d[1]=i[n+11],w(d,24),L(u,d);case 11:d[1]=i[n+10],w(d,16),L(u,d);case 10:d[1]=i[n+9],w(d,8),L(u,d);case 9:d[1]=i[n+8],L(u,d),v(u,x),b(u,33),v(u,k),L(l,u);case 8:d[1]=i[n+7],w(d,56),L(c,d);case 7:d[1]=i[n+6],w(d,48),L(c,d);case 6:d[1]=i[n+5],w(d,40),L(c,d);case 5:d[1]=i[n+4],w(d,32),L(c,d);case 4:d[1]=i[n+3],w(d,24),L(c,d);case 3:d[1]=i[n+2],w(d,16),L(c,d);case 2:d[1]=i[n+1],w(d,8),L(c,d);case 1:d[1]=i[n],L(c,d),v(c,k),b(c,31),v(c,x),L(a,c)}return L(a,r),L(l,r),y(a,l),y(l,a),B(a),B(l),y(a,l),y(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 F(e){return"function"!=typeof e}function O(e,t,i,n){var s=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)})),a=h(d(s,(function(i){return function(e,t){var i=h(new Promise((function(i){var n=Date.now();u(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(F(o))return i((function(){return{value:o,duration:r}}));i((function(){return new Promise((function(e){var t=Date.now();u(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 r(this,void 0,void 0,(function(){var e,t,i,r;return o(this,(function(o){switch(o.label){case 0:return[4,a];case 1:return[4,d(o.sent(),(function(e){return h(e())}),n)];case 2:return e=o.sent(),[4,Promise.all(e)];case 3:for(t=o.sent(),i={},r=0;r<s.length;++r)i[s[r]]=t[r];return[2,i]}}))}))}}function $(){var e=window,t=navigator;return g(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function j(){var e=window,t=navigator;return g(["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 T(){var e=window;return g(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function A(){var e=window,t=e.HTMLElement,i=e.Document;return g(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),i&&"pointerLockElement"in i.prototype])>=4}function V(){var e,t=window;return e=t.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))&&"[object WebPageNamespace]"===String(t.browser)}function R(){var e,t,i=window;return g(["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 N(){var e=window,t=navigator,i=e.CSS,n=e.HTMLButtonElement;return g([!("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 H(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function D(){var e=j(),t=R(),i=window,n=navigator,r="connection";return e?g([!("SharedWorker"in i),n[r]&&"ontypechange"in n[r],!("sinkId"in new Audio)])>=2:!!t&&g(["onorientationchange"in i,"orientation"in i,/android/i.test(n.appVersion)])>=2}function W(e){var t=new Error(e);return t.name=e,t}function z(e,t,i){var n,s,a;return void 0===i&&(i=50),r(this,void 0,void 0,(function(){var r,c;return o(this,(function(o){switch(o.label){case 0:r=document,o.label=1;case 1:return r.body?[3,3]:[4,l(i)];case 2:return o.sent(),[3,1];case 3:c=r.createElement("iframe"),o.label=4;case 4:return o.trys.push([4,,10,11]),[4,new Promise((function(e,i){var n=!1,o=function(){n=!0,e()};c.onload=o,c.onerror=function(e){n=!0,i(e)};var s=c.style;s.setProperty("display","block","important"),s.position="absolute",s.top="0",s.left="0",s.visibility="hidden",t&&"srcdoc"in c?c.srcdoc=t:c.src="about:blank",r.body.appendChild(c);var a=function(){var e,t;n||("complete"===(null===(t=null===(e=c.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?o():setTimeout(a,10))};a()}))];case 5:o.sent(),o.label=6;case 6:return(null===(s=null===(n=c.contentWindow)||void 0===n?void 0:n.document)||void 0===s?void 0:s.body)?[3,8]:[4,l(i)];case 7:return o.sent(),[3,6];case 8:return[4,e(c,c.contentWindow)];case 9:return[2,o.sent()];case 10:return null===(a=c.parentNode)||void 0===a||a.removeChild(c),[7];case 11:return[2]}}))}))}function G(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?Z(r.style,l):r.setAttribute(a,l)}return r}function Z(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 Y=["monospace","sans-serif","serif"],X=["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 U(e){return e.toDataURL()}var J,q;function K(){var e=this;return function(){if(void 0===q){var e=function(){var t=Q();ee(t)?q=setTimeout(e,2500):(J=t,q=void 0)};e()}}(),function(){return r(e,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return ee(e=Q())?J?[2,s([],J,!0)]:(i=document).fullscreenElement||i.msFullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement?[4,H()]:[3,2]:[3,2];case 1:t.sent(),e=Q(),t.label=2;case 2:return ee(e)||(J=e),[2,e]}var i}))}))}}function Q(){var e=screen;return[_(f(e.availTop),null),_(f(e.width)-f(e.availWidth)-_(f(e.availLeft),0),null),_(f(e.height)-f(e.availHeight)-_(f(e.availTop),0),null),_(f(e.availLeft),null)]}function ee(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}function te(e){var t;return r(this,void 0,void 0,(function(){var i,n,r,s,a,c,u;return o(this,(function(o){switch(o.label){case 0:for(i=document,n=i.createElement("div"),r=new Array(e.length),s={},ie(n),u=0;u<e.length;++u)"DIALOG"===(a=G(e[u])).tagName&&a.show(),ie(c=i.createElement("div")),c.appendChild(a),n.appendChild(c),r[u]=a;o.label=1;case 1:return i.body?[3,3]:[4,l(50)];case 2:return o.sent(),[3,1];case 3:i.body.appendChild(n);try{for(u=0;u<e.length;++u)r[u].offsetParent||(s[e[u]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,s]}}))}))}function ie(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function ne(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function re(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function oe(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function se(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function ae(e){return matchMedia("(prefers-reduced-transparency: ".concat(e,")")).matches}function le(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var ce=Math,ue=function(){return 0};var de={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var he=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 pe=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]),fe=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),_e=["FRAGMENT_SHADER","VERTEX_SHADER"],ge=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],me="WEBGL_debug_renderer_info";function ye(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 ve(e,t,i){var n=e.getShaderPrecisionFormat(e[t],e[i]);return n?[n.rangeMin,n.rangeMax,n.precision]:[]}function be(e){return Object.keys(e.__proto__).filter(we)}function we(e){return"string"==typeof e&&!e.match(/[^A-Z0-9_x]/)}function Le(){return R()}function Se(e){return"function"==typeof e.getParameter}var Ie={fonts:function(){var e=this;return z((function(t,i){var n=i.document;return r(e,void 0,void 0,(function(){var e,t,i,r,s,a,l,c,u,d,h;return o(this,(function(o){for((e=n.body).style.fontSize="48px",(t=n.createElement("div")).style.setProperty("visibility","hidden","important"),i={},r={},s=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},a=function(e,t){return s("'".concat(e,"',").concat(t))},l=function(){for(var e={},t=function(t){e[t]=Y.map((function(e){return a(t,e)}))},i=0,n=X;i<n.length;i++){t(n[i])}return e},c=function(e){return Y.some((function(t,n){return e[n].offsetWidth!==i[t]||e[n].offsetHeight!==r[t]}))},u=function(){return Y.map(s)}(),d=l(),e.appendChild(t),h=0;h<Y.length;h++)i[Y[h]]=u[h].offsetWidth,r[Y[h]]=u[h].offsetHeight;return[2,X.filter((function(e){return c(d[e])}))]}))}))}))},domBlockers:function(e){var t=(void 0===e?{}:e).debug;return r(this,void 0,void 0,(function(){var e,i,n,r,s;return o(this,(function(o){switch(o.label){case 0:return T()||D()?(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,te((s=[]).concat.apply(s,i.map((function(t){return e[t]}))))]):[2,void 0];case 1:return n=o.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 g(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 z((function(i,n){var r=n.document,o=r.body,a=o.style;a.width="".concat(t,"px"),a.webkitTextSizeAdjust=a.textSizeAdjust="none",j()?o.style.zoom="".concat(1/n.devicePixelRatio):T()&&(o.style.zoom="reset");var l=r.createElement("div");return l.textContent=s([],Array(t/20|0),!0).map((function(){return"word"})).join(" "),o.appendChild(l),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(de);r<o.length;r++){var s=o[r],a=de[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(de);m<y.length;m++){n[s=y[m]]=i[s].getBoundingClientRect().width}return n}))},audio:function(){return T()&&N()&&V()||j()&&(e=navigator,t=window,i=Audio.prototype,n=t.visualViewport,g(["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 g(["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(T()&&!A()&&!function(){var e=window;return g(["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,u=0,d=0;e.oncomplete=function(e){return s(e.renderedBuffer)};var p=function(){setTimeout((function(){return a(W("timeout"))}),Math.min(n,d+r-Date.now()))},f=function(){try{var n=e.startRendering();switch(c(n)&&h(n),e.state){case"running":d=Date.now(),l&&p();break;case"suspended":document.hidden||u++,l&&u>=t?a(W("suspended")):setTimeout(f,i)}}catch(e){a(e)}};f(),o=function(){l||(l=!0,d>0&&p())}}));return[s,o]}(n),a=s[0],l=s[1],u=h(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(),u}}();var e,t,i,n},screenFrame:function(){var e=this;if(T()&&N()&&V())return function(){return Promise.resolve(void 0)};var t=K();return function(){return r(e,void 0,void 0,(function(){var e,i;return o(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:m(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=U(e),n=U(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=U(e);return[r,i]}(s,a),i=t[0],n=t[1]));return{winding:r,geometry:i,text:n}}(T()&&N()&&V())},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))j()&&g([!("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 _(f(navigator.deviceMemory),void 0)},screenResolution:function(){var e,t,i;if(!(T()&&N()&&V()))return e=screen,(i=[(t=function(e){return _(p(e),null)})(e.width),t(e.height)]).sort().reverse(),i},hardwareConcurrency:function(){return _(p(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(f(new Date(n,0,1).getTimezoneOffset()),f(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(!($()||(e=window,t=navigator,g(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!$())))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&&T()&&!A()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return g(["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=p(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!!ne("inverted")||!ne("none")&&void 0},forcedColors:function(){return!!re("active")||!re("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 oe("no-preference")?0:oe("high")||oe("more")?1:oe("low")||oe("less")?-1:oe("forced")?10:void 0},reducedMotion:function(){return!!se("reduce")||!se("no-preference")&&void 0},reducedTransparency:function(){return!!ae("reduce")||!ae("no-preference")&&void 0},hdr:function(){return!!le("high")||!le("standard")&&void 0},math:function(){var e,t=ce.acos||ue,i=ce.acosh||ue,n=ce.asin||ue,r=ce.asinh||ue,o=ce.atanh||ue,s=ce.atan||ue,a=ce.sin||ue,l=ce.sinh||ue,c=ce.cos||ue,u=ce.cosh||ue,d=ce.tan||ue,h=ce.tanh||ue,p=ce.exp||ue,f=ce.expm1||ue,_=ce.log1p||ue;return{acos:t(.12312423423423424),acosh:i(1e308),acoshPf:(e=1e154,ce.log(e+ce.sqrt(e*e-1))),asin:n(.12312423423423424),asinh:r(1),asinhPf:function(e){return ce.log(e+ce.sqrt(e*e+1))}(1),atanh:o(.5),atanhPf:function(e){return ce.log((1+e)/(1-e))/2}(.5),atan:s(.5),sin:a(-1e300),sinh:l(1),sinhPf:function(e){return ce.exp(e)-1/ce.exp(e)/2}(1),cos:c(10.000000000123),cosh:u(1),coshPf:function(e){return(ce.exp(e)+1/ce.exp(e))/2}(1),tan:d(-1e300),tanh:h(1),tanhPf:function(e){return(ce.exp(2*e)-1)/(ce.exp(2*e)+1)}(1),exp:p(1),expm1:f(1),expm1Pf:function(e){return ce.exp(e)-1}(1),log1p:_(10),log1pPf:function(e){return ce.log(1+e)}(10),powPI:function(e){return ce.pow(ce.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(he())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 D()||T()?window.AudioContext&&null!==(e=(new AudioContext).baseLatency)&&void 0!==e?e:-1:-2},dateTimeLocale:function(){if(!window.Intl)return-1;var e=window.Intl.DateTimeFormat;if(!e)return-2;var t=e().resolvedOptions().locale;return t||""===t?t:-3},webGlBasics:function(e){var t,i,n,r,o,s,a=ye(e.cache);if(!a)return-1;if(!Se(a))return-2;var l=Le()?null:a.getExtension(me);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=ye(e.cache);if(!t)return-1;if(!Se(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=be(t);h<p.length;h++){var f=t[w=p[h]];s.push("".concat(w,"=").concat(f).concat(pe.has(f)?"=".concat(t.getParameter(f)):""))}if(i)for(var _=0,g=i;_<g.length;_++){var m=g[_];if(!(m===me&&Le()||"WEBGL_polygon_mode"===m&&(j()||T()))){var y=t.getExtension(m);if(y)for(var v=0,b=be(y);v<b.length;v++){var w;f=y[w=b[v]];a.push("".concat(w,"=").concat(f).concat(fe.has(f)?"=".concat(t.getParameter(f)):""))}else r.push(m)}}for(var L=0,S=_e;L<S.length;L++)for(var I=S[L],B=0,k=ge;B<k.length;B++){var x=k[B],M=ve(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 Be(e){var t=function(e){if(D())return.4;if(T())return!A()||N()&&V()?.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 m(.99+.01*e,1e-4)}(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(i))}}function ke(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?n({name:(i=t).name,message:i.message,stack:null===(r=i.stack)||void 0===r?void 0:r.split("\n")},i):t;var i,r}),2)}function xe(e){return P(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 Me(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})})):l(Math.min(e,t))}(e,2*e)}function Ce(e,t){var i=Date.now();return{get:function(n){return r(this,void 0,void 0,(function(){var r,s,l;return o(this,(function(o){switch(o.label){case 0:return r=Date.now(),[4,e()];case 1:return s=o.sent(),l=function(e){var t,i=Be(e);return{get visitorId(){return void 0===t&&(t=xe(this.components)),t},set visitorId(e){t=e},confidence:i,components:e,version:a}}(s),(t||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(l.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(r-i,"\nvisitorId: ").concat(l.visitorId,"\ncomponents: ").concat(ke(s),"\n```")),[2,l]}}))}))}}}var Ee={load:function(e){var t;return void 0===e&&(e={}),r(this,void 0,void 0,(function(){var i,n,r;return o(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(a,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),i=e.delayFallback,n=e.debug,[4,Me(i)];case 1:return o.sent(),r=function(e){return O(Ie,e,[])}({cache:{},debug:n}),[2,Ce(r,n)]}}))}))},hashComponents:xe,componentsToDebugString:ke},Pe=i(792),Fe=i(588),Oe=i(7),$e=i(916),je=i(666);const Te="permission-disconnected";class Ae extends Oe.EventEmitter{static instance;_tokenStorage={};_appIds=new Map([[$e.en.Self,new Set],[$e.en.Map,new Set]]);_identifier;static getInstance(){return Ae.instance||(Ae.instance=new Ae),Ae.instance}setToken(e,t,i){if(!t)return delete this._tokenStorage[e],this._appIds.get(i).delete(e),void this.emit(Te,{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 Ee.load(),t=await e.get();this._identifier=t.visitorId}return this._identifier}getAppId(e){return(0,je.A)([...this._appIds.get(e)])}async fetchToken(e,t,i=0){try{const i=await fetch(Fe.R0,{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:Pe.VERSION,"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}}}},531:(e,t,i)=>{i.d(t,{k:()=>l});var n=i(7);class r extends Error{}function o(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)}}r.prototype.name="InvalidTokenError";var s=i(916),a=i(463);class l extends n.EventEmitter{_appId=null;_secret=null;isClosed=!1;_timeoutId;_isInitialized=!1;_initializationPromise;_tokenManager=a.t.getInstance();_from;constructor(e,t,i=s.en.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 r("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 r(`Invalid token specified: missing part #${i+1}`);let s;try{s=o(n)}catch(e){throw new r(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(s)}catch(e){throw new r(`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))}}},588:(e,t,i)=>{i.d(t,{KL:()=>s,R0:()=>n,e$:()=>o,hl:()=>r});const n="https://map-api.mapxus.co.jp/sc/api/v1/apikeys/auth",r="https://map-api.mapxus.co.jp/bms",o=10,s=1},666:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},792:(e,t,i)=>{i.d(t,{OFFSET:()=>n.e$,PAGE:()=>n.KL,VERSION:()=>a,convertBrowserLangToPresetLang:()=>r.y,getIdentifier:()=>s});var n=i(588),r=i(969),o=i(311);async function s(){return o.o.getInstance().getIdentifier()}const a="8.3.0"},916:(e,t,i)=>{var n,r,o,s,a,l,c,u,d,h;i.d(t,{en:()=>s,Kp:()=>u,MA:()=>n,_P:()=>d,LJ:()=>a,nH:()=>l,ys:()=>r,SV:()=>o,$O:()=>c}),function(e){e[e.SWITCHED_BY_BUILDING=0]="SWITCHED_BY_BUILDING",e[e.SWITCHED_BY_VENUE=1]="SWITCHED_BY_VENUE"}(n||(n={})),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"}(r||(r={})),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",e.MAPXUS_DEFAULT="mapxus_default"}(o||(o={})),function(e){e.Self="self",e.Map="map"}(s||(s={})),function(e){e.DEFAULT_NAME="DefaultName"}(a||(a={})),function(e){e.ABSOLUTE_DISTANCE="AbsoluteDistance",e.ACTUAL_DISTANCE="ActualDistance"}(l||(l={})),function(e){e.FOOT="foot",e.WHEELCHAIR="wheelchair",e.ESCALATOR="escalator",e.EMERGENCY="emergency"}(c||(c={})),function(e){e.POINT="Point",e.POLYGON="Polygon"}(u||(u={})),function(e){e.POINT="Point",e.POLYGON="Polygon",e.GATE="Gate"}(d||(d={})),function(e){e.DEFAULT_NAME="DefaultName"}(h||(h={}))},969:(e,t,i)=>{i.d(t,{y:()=>r});var n=i(916);function r(e){return function(e){return/^en(-(US|GB|AU))?$/.test(e)}(e)?n.ys.ENGLISH:function(e){return/^zh(-(Hans|CN))?$/.test(e)}(e)?n.ys.CHINESE_SIMPLIFIED:function(e){return/^zh-(Hant|HK|TW)$/.test(e)}(e)?n.ys.CHINESE_TRADITIONAL:function(e){return/^ja(-JP)?$/.test(e)}(e)?n.ys.JAPANESE:function(e){return/^ko(-KR)?$/.test(e)}(e)?n.ys.KOREAN:function(e){return/^(fil|tl)(-PH)?$/.test(e)}(e)?n.ys.FILIPINO:function(e){return/^id(-ID)?$/.test(e)}(e)?n.ys.INDONESIAN:function(e){return/^pt(-(BR|PT))?$/.test(e)}(e)?n.ys.PORTUGUESE:function(e){return/^th(-TH)?$/.test(e)}(e)?n.ys.THAI:function(e){return/^vi(-VN)?$/.test(e)}(e)?n.ys.VIETNAMESE:function(e){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(e)}(e)?n.ys.ARABIC:null}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.r(n),i.d(n,{AccessControl:()=>$o.k,AccessControlOrigin:()=>o.en,BuildingFilterControl:()=>Vr,BuildingSelectorHandler:()=>ao,BuildingsService:()=>$n,DistanceSearchType:()=>o.Kp,FloorSelectorHandler:()=>lo,FloorSwitchMode:()=>o.MA,FloorsControl:()=>Zr,Indoor:()=>Fr,Map:()=>fo,Marker:()=>go,OFFSET:()=>jo.OFFSET,OrientationDistanceSearchType:()=>o._P,PAGE:()=>jo.PAGE,Poi:()=>$r,PoisOrderBy:()=>o.LJ,PoisService:()=>Tn,PoisSortBy:()=>o.nH,PresetLanguage:()=>o.ys,RoutePainter:()=>Eo,RouteService:()=>Vn,SwitchBuildingHandler:()=>so,SwitchOutdoorHandler:()=>oo,ThemeType:()=>o.SV,VERSION:()=>jo.VERSION,VehicleType:()=>o.$O,VenuesService:()=>Fn,convertBrowserLangToPresetLang:()=>jo.convertBrowserLangToPresetLang,getIdentifier:()=>jo.getIdentifier});var r=i(7),o=i(916);function s(e){return e.layers.filter(a)}function a(e){return e.source===c}function l(e){return e.source!==c}const c="indoor-planet";const u="object"==typeof global&&global&&global.Object===Object&&global;var d="object"==typeof self&&self&&self.Object===Object&&self;const h=u||d||Function("return this")();const p=h.Symbol;var f=Object.prototype,_=f.hasOwnProperty,g=f.toString,m=p?p.toStringTag:void 0;const y=function(e){var t=_.call(e,m),i=e[m];try{e[m]=void 0;var n=!0}catch(e){}var r=g.call(e);return n&&(t?e[m]=i:delete e[m]),r};var v=Object.prototype.toString;const b=function(e){return v.call(e)};var w=p?p.toStringTag:void 0;const L=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?y(e):b(e)};const S=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const I=function(e){if(!S(e))return!1;var t=L(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const B=h["__core-js_shared__"];var k,x=(k=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"";const M=function(e){return!!x&&x in e};var C=Function.prototype.toString;const E=function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var P=/^\[object .+?Constructor\]$/,F=Function.prototype,O=Object.prototype,$=F.toString,j=O.hasOwnProperty,T=RegExp("^"+$.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const A=function(e){return!(!S(e)||M(e))&&(I(e)?T:P).test(E(e))};const V=function(e,t){return null==e?void 0:e[t]};const R=function(e,t){var i=V(e,t);return A(i)?i:void 0};const N=function(){try{var e=R(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const H=function(e,t,i){"__proto__"==t&&N?N(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};const D=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 W=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n};const z=function(e){return null!=e&&"object"==typeof e};const G=function(e){return z(e)&&"[object Arguments]"==L(e)};var Z=Object.prototype,Y=Z.hasOwnProperty,X=Z.propertyIsEnumerable;const U=G(function(){return arguments}())?G:function(e){return z(e)&&Y.call(e,"callee")&&!X.call(e,"callee")};const J=Array.isArray;const q=function(){return!1};var K="object"==typeof exports&&exports&&!exports.nodeType&&exports,Q=K&&"object"==typeof module&&module&&!module.nodeType&&module,ee=Q&&Q.exports===K?h.Buffer:void 0;const te=(ee?ee.isBuffer:void 0)||q;var ie=/^(?:0|[1-9]\d*)$/;const ne=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&ie.test(e))&&e>-1&&e%1==0&&e<t};const re=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var oe={};oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe["[object Arguments]"]=oe["[object Array]"]=oe["[object ArrayBuffer]"]=oe["[object Boolean]"]=oe["[object DataView]"]=oe["[object Date]"]=oe["[object Error]"]=oe["[object Function]"]=oe["[object Map]"]=oe["[object Number]"]=oe["[object Object]"]=oe["[object RegExp]"]=oe["[object Set]"]=oe["[object String]"]=oe["[object WeakMap]"]=!1;const se=function(e){return z(e)&&re(e.length)&&!!oe[L(e)]};const ae=function(e){return function(t){return e(t)}};var le="object"==typeof exports&&exports&&!exports.nodeType&&exports,ce=le&&"object"==typeof module&&module&&!module.nodeType&&module,ue=ce&&ce.exports===le&&u.process,de=function(){try{var e=ce&&ce.require&&ce.require("util").types;return e||ue&&ue.binding&&ue.binding("util")}catch(e){}}();var he=de&&de.isTypedArray;const pe=he?ae(he):se;var fe=Object.prototype.hasOwnProperty;const _e=function(e,t){var i=J(e),n=!i&&U(e),r=!i&&!n&&te(e),o=!i&&!n&&!r&&pe(e),s=i||n||r||o,a=s?W(e.length,String):[],l=a.length;for(var c in e)!t&&!fe.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ne(c,l))||a.push(c);return a};var ge=Object.prototype;const me=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ge)};const ye=function(e,t){return function(i){return e(t(i))}};const ve=ye(Object.keys,Object);var be=Object.prototype.hasOwnProperty;const we=function(e){if(!me(e))return ve(e);var t=[];for(var i in Object(e))be.call(e,i)&&"constructor"!=i&&t.push(i);return t};const Le=function(e){return null!=e&&re(e.length)&&!I(e)};const Se=function(e){return Le(e)?_e(e):we(e)};const Ie=function(e,t){return e&&D(e,t,Se)};const Be=function(){this.__data__=[],this.size=0};const ke=function(e,t){return e===t||e!=e&&t!=t};const xe=function(e,t){for(var i=e.length;i--;)if(ke(e[i][0],t))return i;return-1};var Me=Array.prototype.splice;const Ce=function(e){var t=this.__data__,i=xe(t,e);return!(i<0)&&(i==t.length-1?t.pop():Me.call(t,i,1),--this.size,!0)};const Ee=function(e){var t=this.__data__,i=xe(t,e);return i<0?void 0:t[i][1]};const Pe=function(e){return xe(this.__data__,e)>-1};const Fe=function(e,t){var i=this.__data__,n=xe(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function Oe(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])}}Oe.prototype.clear=Be,Oe.prototype.delete=Ce,Oe.prototype.get=Ee,Oe.prototype.has=Pe,Oe.prototype.set=Fe;const $e=Oe;const je=function(){this.__data__=new $e,this.size=0};const Te=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const Ae=function(e){return this.__data__.get(e)};const Ve=function(e){return this.__data__.has(e)};const Re=R(h,"Map");const Ne=R(Object,"create");const He=function(){this.__data__=Ne?Ne(null):{},this.size=0};const De=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var We=Object.prototype.hasOwnProperty;const ze=function(e){var t=this.__data__;if(Ne){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return We.call(t,e)?t[e]:void 0};var Ge=Object.prototype.hasOwnProperty;const Ze=function(e){var t=this.__data__;return Ne?void 0!==t[e]:Ge.call(t,e)};const Ye=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Ne&&void 0===t?"__lodash_hash_undefined__":t,this};function Xe(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])}}Xe.prototype.clear=He,Xe.prototype.delete=De,Xe.prototype.get=ze,Xe.prototype.has=Ze,Xe.prototype.set=Ye;const Ue=Xe;const Je=function(){this.size=0,this.__data__={hash:new Ue,map:new(Re||$e),string:new Ue}};const qe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ke=function(e,t){var i=e.__data__;return qe(t)?i["string"==typeof t?"string":"hash"]:i.map};const Qe=function(e){var t=Ke(this,e).delete(e);return this.size-=t?1:0,t};const et=function(e){return Ke(this,e).get(e)};const tt=function(e){return Ke(this,e).has(e)};const it=function(e,t){var i=Ke(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function nt(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])}}nt.prototype.clear=Je,nt.prototype.delete=Qe,nt.prototype.get=et,nt.prototype.has=tt,nt.prototype.set=it;const rt=nt;const ot=function(e,t){var i=this.__data__;if(i instanceof $e){var n=i.__data__;if(!Re||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new rt(n)}return i.set(e,t),this.size=i.size,this};function st(e){var t=this.__data__=new $e(e);this.size=t.size}st.prototype.clear=je,st.prototype.delete=Te,st.prototype.get=Ae,st.prototype.has=Ve,st.prototype.set=ot;const at=st;const lt=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const ct=function(e){return this.__data__.has(e)};function ut(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new rt;++t<i;)this.add(e[t])}ut.prototype.add=ut.prototype.push=lt,ut.prototype.has=ct;const dt=ut;const ht=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 pt=function(e,t){return e.has(t)};const ft=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 dt: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(!ht(t,(function(e,t){if(!pt(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 _t=h.Uint8Array;const gt=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 yt=p?p.prototype:void 0,vt=yt?yt.valueOf:void 0;const bt=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 _t(e),new _t(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ke(+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=gt;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=ft(a(e),a(t),n,r,o,s);return s.delete(e),u;case"[object Symbol]":if(vt)return vt.call(e)==vt.call(t)}return!1};const wt=function(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e};const Lt=function(e,t,i){var n=t(e);return J(e)?n:wt(n,i(e))};const St=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 It=function(){return[]};var Bt=Object.prototype.propertyIsEnumerable,kt=Object.getOwnPropertySymbols;const xt=kt?function(e){return null==e?[]:(e=Object(e),St(kt(e),(function(t){return Bt.call(e,t)})))}:It;const Mt=function(e){return Lt(e,Se,xt)};var Ct=Object.prototype.hasOwnProperty;const Et=function(e,t,i,n,r,o){var s=1&i,a=Mt(e),l=a.length;if(l!=Mt(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:Ct.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 Pt=R(h,"DataView");const Ft=R(h,"Promise");const Ot=R(h,"Set");const $t=R(h,"WeakMap");var jt="[object Map]",Tt="[object Promise]",At="[object Set]",Vt="[object WeakMap]",Rt="[object DataView]",Nt=E(Pt),Ht=E(Re),Dt=E(Ft),Wt=E(Ot),zt=E($t),Gt=L;(Pt&&Gt(new Pt(new ArrayBuffer(1)))!=Rt||Re&&Gt(new Re)!=jt||Ft&&Gt(Ft.resolve())!=Tt||Ot&&Gt(new Ot)!=At||$t&&Gt(new $t)!=Vt)&&(Gt=function(e){var t=L(e),i="[object Object]"==t?e.constructor:void 0,n=i?E(i):"";if(n)switch(n){case Nt:return Rt;case Ht:return jt;case Dt:return Tt;case Wt:return At;case zt:return Vt}return t});const Zt=Gt;var Yt="[object Arguments]",Xt="[object Array]",Ut="[object Object]",Jt=Object.prototype.hasOwnProperty;const qt=function(e,t,i,n,r,o){var s=J(e),a=J(t),l=s?Xt:Zt(e),c=a?Xt:Zt(t),u=(l=l==Yt?Ut:l)==Ut,d=(c=c==Yt?Ut:c)==Ut,h=l==c;if(h&&te(e)){if(!te(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new at),s||pe(e)?ft(e,t,i,n,r,o):bt(e,t,l,i,n,r,o);if(!(1&i)){var p=u&&Jt.call(e,"__wrapped__"),f=d&&Jt.call(t,"__wrapped__");if(p||f){var _=p?e.value():e,g=f?t.value():t;return o||(o=new at),r(_,g,i,n,o)}}return!!h&&(o||(o=new at),Et(e,t,i,n,r,o))};const Kt=function e(t,i,n,r,o){return t===i||(null==t||null==i||!z(t)&&!z(i)?t!=t&&i!=i:qt(t,i,n,r,e,o))};const Qt=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 at;if(n)var h=n(c,u,l,e,t,d);if(!(void 0===h?Kt(u,c,3,n,d):h))return!1}}return!0};const ei=function(e){return e==e&&!S(e)};const ti=function(e){for(var t=Se(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,ei(r)]}return t};const ii=function(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}};const ni=function(e){var t=ti(e);return 1==t.length&&t[0][2]?ii(t[0][0],t[0][1]):function(i){return i===e||Qt(i,e,t)}};const ri=function(e){return"symbol"==typeof e||z(e)&&"[object Symbol]"==L(e)};var oi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,si=/^\w*$/;const ai=function(e,t){if(J(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ri(e))||(si.test(e)||!oi.test(e)||null!=t&&e in Object(t))};function li(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(li.Cache||rt),i}li.Cache=rt;const ci=li;var ui=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,di=/\\(\\)?/g;const hi=function(e){var t=ci(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(ui,(function(e,i,n,r){t.push(n?r.replace(di,"$1"):i||e)})),t}));const pi=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 fi=p?p.prototype:void 0,_i=fi?fi.toString:void 0;const gi=function e(t){if("string"==typeof t)return t;if(J(t))return pi(t,e)+"";if(ri(t))return _i?_i.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i};const mi=function(e){return null==e?"":gi(e)};const yi=function(e,t){return J(e)?e:ai(e,t)?[e]:hi(mi(e))};const vi=function(e){if("string"==typeof e||ri(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};const bi=function(e,t){for(var i=0,n=(t=yi(t,e)).length;null!=e&&i<n;)e=e[vi(t[i++])];return i&&i==n?e:void 0};const wi=function(e,t,i){var n=null==e?void 0:bi(e,t);return void 0===n?i:n};const Li=function(e,t){return null!=e&&t in Object(e)};const Si=function(e,t,i){for(var n=-1,r=(t=yi(t,e)).length,o=!1;++n<r;){var s=vi(t[n]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&re(r)&&ne(s,r)&&(J(e)||U(e))};const Ii=function(e,t){return null!=e&&Si(e,t,Li)};const Bi=function(e,t){return ai(e)&&ei(t)?ii(vi(e),t):function(i){var n=wi(i,e);return void 0===n&&n===t?Ii(i,e):Kt(t,n,3)}};const ki=function(e){return e};const xi=function(e){return function(t){return null==t?void 0:t[e]}};const Mi=function(e){return function(t){return bi(t,e)}};const Ci=function(e){return ai(e)?xi(vi(e)):Mi(e)};const Ei=function(e){return"function"==typeof e?e:null==e?ki:"object"==typeof e?J(e)?Bi(e[0],e[1]):ni(e):Ci(e)};const Pi=function(e,t){var i={};return t=Ei(t,3),Ie(e,(function(e,n,r){H(i,t(e,n,r),e)})),i};const Fi=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 Oi=function(e,t){return function(i,n){if(null==i)return i;if(!Le(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}}(Ie);const $i=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 ji=function(e,t,i){var n=J(e)?Fi:$i,r=arguments.length<3;return n(e,Ei(t,4),i,r,Oi)};function Ti(e){const{buildingId:t,labelCenter:{lat:i,lon:n},floors:r,name:o,venueId:s,defaultFloor:a}=e,l=Pi(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"}}const Ai=require("axios");var Vi=i.n(Ai),Ri=i(588),Ni=i(311);let Hi="",Di="";const Wi=new Map,zi=Ni.o.getInstance();zi.disconnect((async({appId:e,from:t})=>{if(t===o.en.Map){const e=zi.getAppId(o.en.Self);e!==Hi&&(delete Vi().defaults.headers.common.token,e&&await Gi.setHeaders(e,"")),Hi="",Di=""}else e!==Hi&&(delete Vi().defaults.headers.common.token,Hi&&Di&&await Gi.setHeaders(Hi,Di))})),Vi().interceptors.response.use(null,(async e=>{const{config:t,response:i}=e;if(401===i.status&&t){const i=t.url,n=(Wi.get(i)||1)+1;if(n>2)throw Wi.delete(i),e;if(Wi.set(i,n),Hi)t.headers.token=await zi.getToken(Hi,Di);else{const e=zi.getAppId(o.en.Self);await Gi.setHeaders(e,"")}return Vi()(t)}throw e}));class Gi{static async setHeaders(e,t){e&&t&&(Hi=e,Di=t);const i=await zi.getIdentifier(),n=await zi.getToken(e,t);i&&n&&(Vi().defaults.headers.common={identifier:i,token:n,sdkVersion:zi.version,"Content-Type":"application/json"})}static getDefaultRequestParams(e){return{url:e,headers:Vi().defaults.headers.common}}constructor(e){Vi().defaults.baseURL=e??Ri.hl}get(e){return Vi().get(e)}post(e,t){return Vi().post(e,t)}}function Zi(e){const t=J(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 Yi=function(e,t){var i=-1,n=Le(e)?Array(e.length):[];return Oi(e,(function(e,r,o){n[++i]=t(e,r,o)})),n};const Xi=function(e,t){return(J(e)?pi:Yi)(e,Ei(t,3))};const Ui=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 Ji=Object.prototype.hasOwnProperty;const qi=function(e,t,i){var n=e[t];Ji.call(e,t)&&ke(n,i)&&(void 0!==i||t in e)||H(e,t,i)};const Ki=function(e,t,i,n){if(!S(e))return e;for(var r=-1,o=(t=yi(t,e)).length,s=o-1,a=e;null!=a&&++r<o;){var l=vi(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=S(u)?u:ne(t[r+1])?[]:{})}qi(a,l,c),a=a[l]}return e};const Qi=function(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var s=t[n],a=bi(e,s);i(a,s)&&Ki(o,yi(s,e),a)}return o};const en=ye(Object.getPrototypeOf,Object);const tn=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)wt(t,xt(e)),e=en(e);return t}:It;const nn=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t};var rn=Object.prototype.hasOwnProperty;const on=function(e){if(!S(e))return nn(e);var t=me(e),i=[];for(var n in e)("constructor"!=n||!t&&rn.call(e,n))&&i.push(n);return i};const sn=function(e){return Le(e)?_e(e,!0):on(e)};const an=function(e){return Lt(e,sn,tn)};const ln=function(e,t){if(null==e)return{};var i=pi(an(e),(function(e){return[e]}));return t=Ei(t),Qi(e,i,(function(e,i){return t(e,i[0])}))};const cn=function(e,t){return ln(e,Ui(Ei(t)))};const un=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 dn=function(e){return e!=e};const hn=function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1};const pn=function(e,t,i){return t==t?hn(e,t,i):un(e,dn,i)};const fn=function(e){return"string"==typeof e||!J(e)&&z(e)&&"[object String]"==L(e)};var _n=/\s/;const gn=function(e){for(var t=e.length;t--&&_n.test(e.charAt(t)););return t};var mn=/^\s+/;const yn=function(e){return e?e.slice(0,gn(e)+1).replace(mn,""):e};var vn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,wn=/^0o[0-7]+$/i,Ln=parseInt;const Sn=function(e){if("number"==typeof e)return e;if(ri(e))return NaN;if(S(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=S(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=yn(e);var i=bn.test(e);return i||wn.test(e)?Ln(e.slice(2),i?2:8):vn.test(e)?NaN:+e};var In=1/0;const Bn=function(e){return e?(e=Sn(e))===In||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const kn=function(e){var t=Bn(e),i=t%1;return t==t?i?t-i:t:0};const xn=function(e,t){return pi(t,(function(t){return e[t]}))};const Mn=function(e){return null==e?[]:xn(e,Se(e))};var Cn=Math.max;const En=function(e,t,i,n){e=Le(e)?e:Mn(e),i=i&&!n?kn(i):0;var r=e.length;return i<0&&(i=Cn(r+i,0)),fn(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&pn(e,t,i)>-1},Pn=["opening_hours","description","phone","website","email","appURL","icon"];class Fn{_api="/api/v4/venues";_request;constructor(){this._request=new Gi}searchByIds(e){const t=Zi(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=Ri.e$,r=Ri.KL){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=Ri.e$,n=Ri.KL){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=Ri.e$,i=Ri.KL){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=Xi(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=Xi(e.data.result.venues,(e=>cn(e,((e,t)=>En(Pn,t))))),t(e)})).catch(i)}))}}const On=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","description"];class $n{_api="/api/v4/buildings";_request;constructor(){this._request=new Gi}searchByIds(e){const t=Zi(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=Ri.e$,r=Ri.KL){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=Ri.e$,n=Ri.KL){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=Ri.e$,i=Ri.KL){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=Xi(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=Xi(e.data.result.buildings,(e=>cn(e,((e,t)=>En(On,t))))),t(e)})).catch(i)}))}}const jn=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","icon"];class Tn{_api="/api/v3/pois";_apiV4="/api/v4/pois";_categoriesApi="/api/v2/categories/pois";_categoriesGroupApi="/api/v5/categories/group";_request;constructor(){this._request=new Gi}searchByIds(e){const t=Zi(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=Ri.e$,page:o=Ri.KL}=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=Ri.e$,page:n=Ri.KL,keywords:r,orderBy:o}=e,s=[`bbox=${t.flat().join()}`,`offset=${i}`,`page=${n}`];An(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=Ri.e$,page:n=Ri.KL,keywords:r,orderBy:o}=e,s=[`buildingId=${t}`,`offset=${i}`,`page=${n}`];An(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=Ri.e$,page:n=Ri.KL,keywords:r,orderBy:o}=e,s=[`venueId=${t}`,`offset=${i}`,`page=${n}`];An(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=Ri.e$,page:n=Ri.KL,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=o._P.POINT}=e,s=[`center=${t.join()}`,`angle=${Math.round(i)}`,`distance=${n}`,`distanceSearchType=${r}`];"ordinal"in e?s.push(`ordinal=${e.ordinal}`):"floorId"in e?s.push(`floorId=${e.floorId}`):"buildingId"in e&&s.push(`buildingId=${e.buildingId}`);const a=`${this._api}/orientation?${s.join("&")}`;return this._request.get(a)}searchByCategory(e){const{center:t,distance:i,page:n=Ri.KL,offset:r=Ri.e$}=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=J(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=Xi(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:"excludedCategories"===t?`excludeCategories=${J(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=Xi(e.data.result.pois,(e=>{let i=cn(e,((e,t)=>En(jn,t)));return t&&t(i)&&(i=Object.assign({},i,t(i))),i})),i(e)})).catch(n)}))}}function An(e){return"string"==typeof e&&Boolean(e.trim())}class Vn{_api="/api/v3/route/query";_request;constructor(){this._request=new Gi}search(e){const{points:t,vehicle:i=o.$O.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)}}}var Rn=i(969);const Nn={lineWidth:3,lineColor:"#A5E3FF",lineOpacity:1},Hn={fontColor:"#8c8c8c",activeFontColor:"#fff",backgroundColor:"#fff",activeBackgroundColor:"#074769",itemSize:50,itemCount:4,defaultFolded:!1},Dn=(0,Rn.y)(window.navigator.language)??o.ys.ENGLISH,Wn=new $n,zn=new Fn,Gn=new Tn;async function Zn(e){try{return(await Wn.searchByIds(e)).data.result.buildings[0]}catch(e){throw new Error(e)}}async function Yn(e){try{const t=(await Wn.searchByFloorId(e)).data.result.buildings[0].buildingId;return await Zn(t)}catch(e){throw new Error(e)}}var Xn={value:()=>{}};function Un(){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 Jn(n)}function Jn(e){this._=e}function qn(e,t){for(var i,n=0,r=e.length;n<r;++n)if((i=e[n]).name===t)return i.value}function Kn(e,t,i){for(var n=0,r=e.length;n<r;++n)if(e[n].name===t){e[n]=Xn,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=i&&e.push({name:t,value:i}),e}Jn.prototype=Un.prototype={constructor:Jn,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]=Kn(r[i],e.name,t);else if(null==t)for(i in r)r[i]=Kn(r[i],e.name,null);return this}for(;++s<a;)if((i=(e=o[s]).type)&&(i=qn(r[i],e.name)))return i},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new Jn(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 Qn=Un;class er{_historyBuilding;_historyOrdinal;_selectedBuildings;static instance;constructor(){this._historyBuilding=new Map,this._historyOrdinal=new Map,this._selectedBuildings=new Set}static getInstance(){return er.instance||(er.instance=new er),er.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 tr{static instance;_upperBuildings;_lowerBuildings;_hiddenBuildings;constructor(){this._upperBuildings=new Set,this._lowerBuildings=new Set,this._hiddenBuildings=new Set}static getInstance(){return tr.instance||(tr.instance=new tr),tr.instance}getUpperBuildings(){return this._upperBuildings}getLowerBuildings(){return this._lowerBuildings}getHiddenBuildings(){return this._hiddenBuildings}}const ir=function(e){return function(t,i,n){var r=Object(t);if(!Le(t)){var o=Ei(i,3);t=Se(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 nr=Math.max;const rr=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:kn(i);return r<0&&(r=nr(n+r,0)),un(e,Ei(t,3),r)};const or=ir(rr);const sr=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&&!ri(s):i(s,a)))var a=s,l=o}return l};const ar=function(e,t){return e<t};const lr=function(e,t){return e&&e.length?sr(e,Ei(t,2),ar):void 0};const cr=function(){return h.Date.now()};var ur=Math.max,dr=Math.min;const hr=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=cr();if(f(e))return g(e);a=setTimeout(_,function(e){var i=t-(e-l);return d?dr(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=cr(),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=Sn(t)||0,S(i)&&(u=!!i.leading,o=(d="maxWait"in i)?ur(Sn(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(cr())},m};const pr=function(e,t){return!!(null==e?0:e.length)&&pn(e,t,0)>-1};const fr=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 _r=function(){};const gr=Ot&&1/mt(new Ot([,-0]))[1]==1/0?function(e){return new Ot(e)}:_r;const mr=function(e,t,i){var n=-1,r=pr,o=e.length,s=!0,a=[],l=a;if(i)s=!1,r=fr;else if(o>=200){var c=t?null:gr(e);if(c)return mt(c);s=!1,r=pt,l=new dt}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 yr=function(e,t){return e&&e.length?mr(e,Ei(t,2)):[]};const vr=function(e,t){var i=[];return Oi(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i};const br=function(e,t){return(J(e)?St:vr)(e,Ei(t,3))};var wr=0;const Lr=function(e){var t=++wr;return mi(e)+t};const Sr=function(e,t){var i;return Oi(e,(function(e,n,r){return!(i=t(e,n,r))})),!!i};const Ir=function(e,t,i){if(!S(i))return!1;var n=typeof t;return!!("number"==n?Le(i)&&ne(t,i.length):"string"==n&&t in i)&&ke(i[t],e)};const Br=function(e,t,i){var n=J(e)?ht:Sr;return i&&Ir(e,t,i)&&(t=void 0),n(e,Ei(t,3))},kr="Indoor_selectedFloorChanged",xr="Indoor_selectedBuildingChanged",Mr="Indoor_mapxusMapLoaded",Cr="Indoor_maplibreMapLoaded",Er="assistant-mapxus-level-outline",Pr=new Fn;class Fr extends r.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=Qn(kr);_fitBuildingBounds;_boundsPadding;_startWithIndoorView;_maplibreMapLoaded=!1;_indoorMapLoaded=!1;_isVenueMode;_isMaskMode;_upperLevels=new Set;_lowerLevels=new Set;_featureIncomplete=!1;_dragPan;_isNewBuilding=!1;_buildingBounds;_history=er.getInstance();_layerBuildings=tr.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.MA.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.MA.SWITCHED_BY_VENUE,this._isMaskMode=c,this._fitBuildingBounds=a,this._boundsPadding=l,this._buildingHighlightStyle=r?Object.assign({},Nn,r):Nn,this._hiddenBuildings=new Set,this._loadData()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._dispatch.on(`.${kr}`,null),this.removeAllListeners(xr),this.removeAllListeners(Cr),this.removeAllListeners(Mr),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 br(r,n?t=>t.properties.id===e&&n(t):t=>t.properties.id===e)}async switchFloorByOrdinal(e){this._updateFloorState(e),this._dispatch.call(kr,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=s(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(Er)&&(this._map.setPaintProperty(Er,"line-color",this._buildingHighlightStyle.lineColor),this._map.setPaintProperty(Er,"line-opacity",this._buildingHighlightStyle.lineOpacity),this._map.setPaintProperty(Er,"line-width",this._buildingHighlightStyle.lineWidth),this._map.setPaintProperty(Er,"line-offset",this._buildingHighlightStyle.lineWidth))):(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,{"line-opacity":0}),this._map.getLayer(Er)&&this._map.setPaintProperty(Er,"line-opacity",0))}onMapChange(e){const t=Lr(`${kr}.`);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(xr,{buildingId:this._curBuildingId,ordinal:this._ordinal,dragPan:this._dragPan}),this._indoorMapLoaded||(this._indoorMapLoaded=!0,this.emit(Mr)),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=or(i,(e=>e.layer.id.startsWith("mapxus-level-fill")));t=e?or(i,(t=>t.properties.id===e.properties["ref:building"])):or(i,(e=>{const{id:t,level_ids:i}=e.properties;return!this._hiddenBuildings.has(t)&&!Br(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 Zn(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=hr((()=>{this._maplibreMapLoaded||(this._maplibreMapLoaded=!0,this.emit(Cr),(!this._startWithIndoorView||this._map.getZoom()<14)&&(this._indoorMapLoaded=!0,this.emit(Mr))),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=br(t,(e=>"indoor-planet"===e.source));return yr(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=rr(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(l);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(Er)){const{lineWidth:e,lineOpacity:t,lineColor:i}=this._buildingHighlightStyle;this._map.addLayer({id:Er,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(Er,r.id)}}_filterBuildingHighlight(){this._map.getLayer(Er)&&this._map.setFilter(Er,["==","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=rr(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=or(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[rr(i?.split(",")||[],(e=>e===r))]??null}t||(t=lr(o,(e=>Math.abs(Number(e)-.1))))}}return t}_getBuildingsOfBbox(e){let t=this._map.queryRenderedFeatures({layers:["mapxus-building-line"]});return t=yr(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=yr(br(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 Pr.searchByIds(n);e=function(e){const{address:t,buildings:i,id:n,name:r,type:o}=e;return{layer:{id:"mapxus-venue-fill"},properties:{...ji(t,((e,t,i)=>Object.assign(e,"default"===i?{"addr:street":t.street,"addr:housenumber":t.housenumber}:{[`addr:street:${i}`]:t.street})),{}),...Pi(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.",{cause:e})}this._curVenueFeature=e}this._curBuildingFeature=e,this._curBuildingId=i,this._history.addHistoryBuilding(i);const s=o.split(",");if(t){const i=s[rr(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 Or="Poi_poiClick";class $r{_map;_layerIds=[];_dispatch=Qn(Or);_debounceQueryFeatures;constructor(e){this._map=e,this._bindEvents()}destroy(){this._dispatch.on(`.${Or}`,null),this._debounceQueryFeatures?.cancel()}onPoiClick(e){const t=Lr(`${Or}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}_bindEvents(){this._map.on("styledata",this._debounceQueryFeatures=hr((()=>this._queryPoiLayers()),300)),this._initPoiClick()}_queryPoiLayers(){this._layerIds=Xi(br(s(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=or(t,(e=>e.layer.id.indexOf("mapxus-poi")>-1));if(i?.properties){const{"ref:level":n=null,"ref:building":r}=i.properties,o=or(t,(e=>e.properties.id===r))??null,s=or(t,(e=>e.properties.id===o?.properties?.["ref:venue"]))??null,{floorName:a,ordinal:l}=this._getFloorDataByFloorId(n,o);this._dispatch.call(Or,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=rr(a,(t=>t===e));l>-1&&(i=(o?.split(",")||[])[l]??null,n=(s?.split(",")||[])[l]??null)}return{floorName:i,ordinal:n}}}function jr(e){e.parentNode&&e.parentNode.removeChild(e)}function Tr(e,t,i){const n=window.document.createElement(e);return t&&(n.className=t),i&&i.appendChild(n),n}const Ar=function(e){return"number"==typeof e||z(e)&&"[object Number]"==L(e)};class Vr{_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=Tr("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(){jr(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),Ar(i)?e.insertBefore(r,e.children[i]):e.append(r),this._updateBuildingListLayout(t))}else Ar(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;or(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=()=>{this._toggleList(!0)}),e.onmouseleave||t||(e.onmouseleave=()=>{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 Rr=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e};const Nr=function(e){return"function"==typeof e?e:ki};const Hr=function(e,t){return(J(e)?Rr:Oi)(e,Nr(t))};var Dr=Math.max,Wr=Math.min;const zr=function(e,t,i){return e>=Wr(t,i)&&e<Dr(t,i)};const Gr=function(e,t,i){return t=Bn(t),void 0===i?(i=t,t=0):i=Bn(i),e=Sn(e),zr(e,t,i)};class Zr{_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({},Hn,i):Hn,this._isEnabled=n,this._bindEvents()}onAdd(e){return this._maplibre=e,this._addMapMoveEventListener(),this._container=Tr("div","maplibregl-ctrl mapxus-ctrl-floors hidden"),this._container}onRemove(){this._debounceScroll&&this._debounceScroll.cancel(),this._clearScrollEventListener&&this._clearScrollEventListener(),jr(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),Ar(i)?e.insertBefore(r,e.children[i]):e.append(r),this._show(),this._scrollCenterActiveFloor())}else Ar(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(xr,(({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=Tr("div","mapxus-ctrl-floors-expanded "+(r?"hidden":""),e);if(this._floorNames.length>1){Tr("div","mapxus-ctrl-floors-close",s).onclick=t}const a=Tr("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=Tr("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=hr((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=Tr("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 Tr("div",`mapxus-ctrl-floors-arrow mapxus-ctrl-floors-floor ${t}`,e)}_$createFloors(e){const{fontColor:t,itemSize:i}=this._style;let n;Hr(this._floorNames,((r,o)=>{n=Tr("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),Hr(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 Gr(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 Yr{_container;_isEnabled;constructor(e){this._isEnabled=e?.enabled??!0}onAdd(e){if(this._container=Tr("div","maplibregl-ctrl mapxus-ctrl-logo",e.getContainer()),this._isEnabled){const e=Tr("a","mapxus-logo",this._container);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)}return this._container}onRemove(){jr(this._container)}getDefaultPosition(){return"bottom-left"}}class Xr{_container;_anchor;_theme;constructor(e){this._theme=e.theme?e.theme:"default"}onAdd(e){return this._container=Tr("div","maplibregl-ctrl mapxus-ctrl-attribution",e.getContainer()),this._anchor=Tr("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(){jr(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":"©Mapxus driven by Kawasaki ©OpenStreetMap contributors","landsD"===e&&(this._anchor.href="https://www.map.gov.hk/gm/")}}class Ur{_container;_$icon;_removeClickEventListener;onAdd(e){return this._container=Tr("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(),jr(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)}}var Jr=i(463);function qr(e){return`${Ri.hl}/api/v3/tiles/styles/${e}`}const Kr=qr("christmas_mims2_v1"),Qr=qr("common_mims2_v1"),eo=qr("halloween_mims2_v1"),to=qr("mappybee_mims2_v1"),io=qr("mapxus_mims2_v1"),no=qr("lands_d_mims2_v1"),ro=qr("mapxus_mims2_v5");class oo{_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 so{_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 ao{_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 lo{_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 co="Map_mapClick",uo="Map_pointClick",ho="Map_isRenderComplete",po="Map_isDestroyed";class fo{_appId;_map;_indoor;_poi;_floorsControl;_buildingFilterControl;_attributionControl;_initialHiddenLayers;_language;_dispatch=Qn(co,uo,ho,po);_fitBuildingBounds;_history=er.getInstance();_hiddenBuildings=tr.getInstance().getHiddenBuildings();_debounceHTTPErrorHandler;_debounceTilesFilter;_transformRequestHandler;isDestroyed=!1;switchOutdoor;switchBuilding;buildingSelector;floorSelector;constructor(e){const{map:t,appId:i,secret:n,poiId:r,floorId:s,buildingId:a,venueId:l,theme:c=o.SV.MAPXUS_DEFAULT,floorSelectorEnabled:u,buildingSelectorEnabled:d,outdoorMapShown:h,collapseCopyright:p=!1,floorSwitchMode:f,maskNonSelectedAreas:_,fitBuildingBounds:g=!1,boundsPadding:m=30,selectedBuildingBorderStyle:y,floorSelectorStyle:v,language:b=Dn,autoSelectBuilding:w=!1,transformRequest:L=null,mapxusLogoEnabled:S=!0}=e;if(!t)throw new Error("Outdoor Map parameter missing.");if(!i||!n)throw new Error("Permission parameter missing.");Gi.setHeaders(i,n).then((()=>{this._appId=i,this._map=t,this._language=b,this._indoor=new Fr({map:this._map,startWithIndoorView:Boolean(l||a||s||r),outdoorMapShown:h,floorSwitchMode:f,fitBuildingBounds:g,boundsPadding:m,maskNonSelectedAreas:_,selectedBuildingBorderStyle:y}),this._poi=new $r(this._map),this._fitBuildingBounds=g,this._transformRequestHandler=L,this._resourceRequestTransform(),this._setStyle(this._getStyleUrl(c)),this._checkMapZoom(),p?this._attributionControl=new Ur:(this._attributionControl=new Xr({theme:c}),this._addControl(new Yr({enabled:S}))),this._addControl(this._attributionControl),this._addControl(this._buildingFilterControl=new Vr(this,d)),this._addControl(this._floorsControl=new Zr(this._indoor,{style:v,enabled:u})),r?this._selectPoiById(r):s?this.selectFloorById(s):a?this.selectBuildingById(a):l&&this.selectVenueById(l),this.switchOutdoor=new oo(this._indoor),this.switchBuilding=new so(this._indoor),this.buildingSelector=new ao(this._buildingFilterControl),this.floorSelector=new lo(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(uo,null,{point:t,coordinate:i}),this._dispatch.call(co,null,{coordinate:i,venue:this.venue,building:this.building,floor:this.floor})})),this._map.on("error",this._debounceHTTPErrorHandler=hr((e=>this._updatePermission(e,i,n)),350)),this._indoor.once(Cr,(()=>{this._showIndoorLayers(),this.setLanguage(this._language)})),this._indoor.once(Mr,(()=>{w&&this._map.on("moveend",(()=>this._selectCenterBuilding())),this._dispatch.call(ho)}))})).catch((e=>{throw e}))}renderComplete(e){const t=Lr(`${ho}.`);this._dispatch.on(t,e)}destroyed(e){const t=Lr(`${po}.`);this._dispatch.on(t,(()=>{e(),this._dispatch.on(t,null),0===this._dispatch._[po].length&&(delete this._dispatch,Object.freeze(this))}))}setTransformRequest(e){this._transformRequestHandler=e}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=or(e,(e=>Ar(t)?e.properties.ordinal===t+"":e.layer.id.startsWith("mapxus-level-fill"))),s&&(o=or(n,(e=>e.properties.id===s.properties["ref:building"])),r=or(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 Yn(e),n=Ti(t),r=!0;const{maxLat:i,maxLon:o,minLat:s,minLon:a}=t.bbox;this._indoor.setBuildingBounds([[a,s],[o,i]])}else n=or(this._indoor?.features||[],(t=>t.properties?.level_ids?.includes(e)&&"mapxus-building-line"===t.layer.id))??null,n?r=!1:(t=await Yn(e),n=Ti(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 Zn(e),i=Ti(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 Zn(e),i=Ti(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 zn.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=Lr(`${co}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}onPoiClickListener(e){return this._poi?.onPoiClick(e)}onPointClickListener(e){const t=Lr(`${uo}.`);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=hr((()=>this._setIndoorFilter()),250))}setSelectedBuildingBorderStyle(e){return this._indoor?.setSelectedBuildingBorderStyle(e),this}_getStyleUrl(e){let t;if(Mn(o.SV).indexOf(e)>-1)switch(e){case o.SV.CHRISTMAS:t=Kr;break;case o.SV.HALLOWEEN:t=eo;break;case o.SV.MAPPY_BEE:t=to;break;case o.SV.MAPXUS:t=io;break;case o.SV.COMMON:t=Qr;break;case o.SV.LANDS_D:t=no;break;default:t=ro}else t=function(e){return qr(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 Gn.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(((e,t)=>{const{host:i}=new URL(e);return i.includes("map-api")&&i.includes("mapxus")?Gi.getDefaultRequestParams(e):this._transformRequestHandler?this._transformRequestHandler(e,t):{url:e}}))}_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=s(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(){Hr(this._initialHiddenLayers,(({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility","visible")}))}_updatePermission(e,t,i){401===e.error?.status&&Gi.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=yr(o,"properties.id"),o=br(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!==po&&e.hasOwnProperty(t)&&e[t].forEach((({name:e})=>{this._dispatch.on(`${t}.${e}`,null)}));Jr.t.getInstance().setToken(this._appId,null,o.en.Map),this._indoor.destroy(),this._poi.destroy(),Object.keys(this).forEach((e=>{"isDestroyed"!==e&&"_dispatch"!==e&&delete this[e]})),this._dispatch.call(po)}}async function _o(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 go{_maplibreMap;_layerId;_sourceId;_imageName="poi-01";_imageSize=.75;_iconAnchor="bottom";constructor(e){this._maplibreMap=e;const t=Lr();this._layerId=`MXMap_preset_marker_layer_${t}`,this._sourceId=`MXMap_preset_marker_source_${t}`}async setIcon(e){e&&await _o(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=Xi(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:Xi(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&&Ar(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])}}var mo=i(666);const yo={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}},vo="mmws-source-line-solid",bo="mmws-layer-line-solid",wo="mmws-layer-icon-line-symbol",Lo="mmws-source-line-dashed",So="mmws-layer-line-dashed",Io="mmws-source-icon-connector",Bo="mmws-layer-icon-connector",ko="mmws-source-icon-marker",xo="mmws-layer-icon-marker",Mo=[bo,wo,So,Bo,xo],Co=[vo,Lo,Io,ko];class Eo{_maplibreMap;_routeStyle=yo;_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(J(e)&&e.length){const t=e.slice(1,e.length-1);this._routeStyle.markers={from:e[0],to:(0,mo.A)(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(vo,wo),!0!==this._routeStyle.disableDashedLine&&this._renderDashedLines(s),this._renderConnectors(o),this._renderMarkers(a)}remove(){Mo.forEach((e=>{this._maplibreMap.getLayer(e)&&this._maplibreMap.removeLayer(e)})),Co.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=[];Hr(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],{...Po({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],{...Po({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),Po({venue_id:s,building_id:l,floor_id:c,ordinal:u,isShuttleBus:Fo(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],Po({venue_id:c,building_id:u,floor_id:d,ordinal:h}))),w&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[v,w],Po({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]],Po({venue_id:e,building_id:i,floor_id:n,ordinal:r}))),s.push(this._createIconFeature(`marker-${s.length}`,L[l],{...Po({venue_id:e,building_id:i,floor_id:n,ordinal:r,markerType:`stops_${l}`}),icon:this._routeStyle.markers.stops[l]??(0,mo.A)(this._routeStyle.markers.stops),iconSize:this._routeStyle.markerIconSize}))})),s.push(this._createIconFeature(`marker-${s.length}`,b??y,{...Po({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,{...Po({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(vo,e),this._addLineLayer(vo,bo,{"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(Lo,e),this._addLineLayer(Lo,So,{"line-color":this._routeStyle.dashedLineColor,"line-width":this._routeStyle.dashedLineWidth,"line-dasharray":[.1,1.8]})}_renderConnectors(e){this._addCollectionSource(Io,e),this._addIconLayer(Io,Bo)}_renderMarkers(e){this._addCollectionSource(ko,e),this._addIconLayer(ko,xo,{"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=Oo(this._routeStyle,e??yo),e){if(Object.keys(this._styleDiffs).length){const e={...this._routeStyle.lineSymbol,...this._styleDiffs.lineSymbol??{}},t=this._styleDiffs.markers;let i=this._routeStyle.markers;const 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=yo}async _loadMarkerIcons(){const{markers:e,lineSymbol:t}=this._styleDiffs;if(t?.image&&await _o(this._maplibreMap,t.image),e&&Object.keys(e).length){const{from:t,to:i,stops:n}=e;if(t&&await _o(this._maplibreMap,t),i&&await _o(this._maplibreMap,i),n&&n.length){const e=n.filter((e=>!!e));e.length&&await Promise.all(e.map((e=>_o(this._maplibreMap,e))))}}}async _updateLayers(){if(!this._maplibreMap.getLayer(bo))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(bo,"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(bo,"line-width",r),"boolean"==typeof s?s?this._maplibreMap.setPaintProperty(So,"line-color","transparent"):(this._maplibreMap.setPaintProperty(So,"line-color",this._routeStyle.dashedLineColor),this._maplibreMap.setPaintProperty(So,"line-width",this._routeStyle.dashedLineWidth)):!0!==this._routeStyle.disableDashedLine&&(i&&this._maplibreMap.setPaintProperty(So,"line-color",i),void 0!==o&&o+""&&this._maplibreMap.setPaintProperty(So,"line-width",o)),void 0!==a&&a+""&&this._filterRouteOpacity(),void 0!==c&&c+""&&this._maplibreMap.setLayoutProperty(xo,"icon-size",c),u&&Object.keys(u).length){const{from:e,to:t,stops:i}=u,n=this._maplibreMap.getSource(ko),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]??(0,mo.A)(i)}return n})),n.setData(r)}if(d){const{image:e,size:t,spacing:i}=d;void 0!==e&&this._maplibreMap.setLayoutProperty(wo,"icon-image",e),void 0!==t&&t+""&&this._maplibreMap.setLayoutProperty(wo,"icon-size",t),void 0!==i&&i+""&&this._maplibreMap.setLayoutProperty(wo,"symbol-spacing",i)}void 0!==l&&l+""&&(this._maplibreMap.setPaintProperty(bo,"line-opacity",["case",["==",["get","floor_id"],null],l,1]),this._maplibreMap.setPaintProperty(wo,"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]}Mo.forEach((t=>{this._maplibreMap.getLayer(t)&&this._maplibreMap.setPaintProperty(t,t.includes("layer-line")?"line-opacity":"icon-opacity",e)}))}}function Po(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,Ar(t)?t+"":t])))}function Fo(e){return Gr(e,104,108)}function Oo(e,t){const i={};for(const n in t){const r=e[n],o=t[n];if("markers"===n||"lineSymbol"===n)if(J(o)){const e=o.slice(1,o.length-1);i[n]={from:o[0],to:(0,mo.A)(o),stops:e.length?e:[o[0]]}}else{const e=Oo(r,o);Object.keys(e).length&&(i[n]=e)}else o+""!=r+""&&(i[n]="stops"===n?o??[null]:o)}return i}var $o=i(531),jo=i(792),To=exports;for(var Ao in n)To[Ao]=n[Ao];n.__esModule&&Object.defineProperty(To,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={241:(e,t,i)=>{i.d(t,{A:()=>n});const n=i(1917).A.Symbol},367:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e,t){return function(i){return e(t(i))}}},531:(e,t,i)=>{i.d(t,{k:()=>l});var n=i(7007);class r extends Error{}function o(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)}}r.prototype.name="InvalidTokenError";var s=i(916),a=i(7463);class l extends n.EventEmitter{_appId=null;_secret=null;isClosed=!1;_timeoutId;_isInitialized=!1;_initializationPromise;_tokenManager=a.t.getInstance();_from;constructor(e,t,i=s.en.Access){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.deleteToken(this._appId,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))}forceUpdateToken(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this._isInitialized=!1,this._initializationPromise=this._initToken()}async _initToken(){try{const e=await this._tokenManager.fetchToken(this._appId,this._secret);this._isInitialized=!0,this._tokenManager.updateToken({appId:this._appId,secret:this._secret,token:e,from:this._from});const t=function(e,t){if("string"!=typeof e)throw new r("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 r(`Invalid token specified: missing part #${i+1}`);let s;try{s=o(n)}catch(e){throw new r(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(s)}catch(e){throw new r(`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.updateToken({appId:this._appId,secret:this._secret,token:t,from: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))}}},751:(e,t,i)=>{i.d(t,{A:()=>p});var n=/\s/;const r=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t};var o=/^\s+/;const s=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e};var a=i(3149),l=i(1882),c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;const p=function(e){if("number"==typeof e)return e;if((0,l.A)(e))return NaN;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var i=u.test(e);return i||d.test(e)?h(e.slice(2),i?2:8):c.test(e)?NaN:+e}},901:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(1882);const r=function(e){if("string"==typeof e||(0,n.A)(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},916:(e,t,i)=>{var n,r,o,s,a,l,c,u,d,h;i.d(t,{en:()=>s,Kp:()=>u,MA:()=>n,_P:()=>d,LJ:()=>a,nH:()=>l,ys:()=>r,SV:()=>o,$O:()=>c}),function(e){e[e.SWITCHED_BY_BUILDING=0]="SWITCHED_BY_BUILDING",e[e.SWITCHED_BY_VENUE=1]="SWITCHED_BY_VENUE"}(n||(n={})),function(e){e.ENGLISH="en",e.CHINESE_SIMPLIFIED="zh-Hans",e.CHINESE_TRADITIONAL="zh-Hant",e.CHINESE_TRADITIONAL_TW="zh-Hant-TW",e.JAPANESE="ja",e.KOREAN="ko",e.FILIPINO="fil",e.INDONESIAN="id",e.PORTUGUESE="pt",e.THAI="th",e.VIETNAMESE="vi",e.ARABIC="ar"}(r||(r={})),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",e.MAPXUS_DEFAULT="mapxus_default"}(o||(o={})),function(e){e.Access="access_control",e.Map="map"}(s||(s={})),function(e){e.DEFAULT_NAME="DefaultName"}(a||(a={})),function(e){e.ABSOLUTE_DISTANCE="AbsoluteDistance",e.ACTUAL_DISTANCE="ActualDistance"}(l||(l={})),function(e){e.FOOT="foot",e.WHEELCHAIR="wheelchair",e.ESCALATOR="escalator",e.EMERGENCY="emergency"}(c||(c={})),function(e){e.POINT="Point",e.POLYGON="Polygon"}(u||(u={})),function(e){e.POINT="Point",e.POLYGON="Polygon",e.GATE="Gate"}(d||(d={})),function(e){e.DEFAULT_NAME="DefaultName"}(h||(h={}))},1121:(e,t,i)=>{i.d(t,{A:()=>r});var n=Function.prototype.toString;const r=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1200:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(1917);const r=function(){return!1};var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===o?n.A.Buffer:void 0;const l=(a?a.isBuffer:void 0)||r},1625:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(5707),r=i(8816),o=i(8593),s=Math.max;const a=function(e,t,i){var a=null==e?0:e.length;if(!a)return-1;var l=null==i?0:(0,o.A)(i);return l<0&&(l=s(a+l,0)),(0,n.A)(e,(0,r.A)(t,3),l)}},1882:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(2383),r=i(3098);const o=function(e){return"symbol"==typeof e||(0,r.A)(e)&&"[object Symbol]"==(0,n.A)(e)}},1917:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(2136),r="object"==typeof self&&self&&self.Object===Object&&self;const o=n.A||r||Function("return this")()},2049:(e,t,i)=>{i.d(t,{A:()=>n});const n=Array.isArray},2050:(e,t,i)=>{i.d(t,{A:()=>I});const n=(0,i(8562).A)(Object,"create");const r=function(){this.__data__=n?n(null):{},this.size=0};const o=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var s=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(n){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(t,e)?t[e]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(e){var t=this.__data__;return n?void 0!==t[e]:l.call(t,e)};const u=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};function d(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])}}d.prototype.clear=r,d.prototype.delete=o,d.prototype.get=a,d.prototype.has=c,d.prototype.set=u;const h=d;var p=i(9469),_=i(8335);const f=function(){this.size=0,this.__data__={hash:new h,map:new(_.A||p.A),string:new h}};const g=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const m=function(e,t){var i=e.__data__;return g(t)?i["string"==typeof t?"string":"hash"]:i.map};const y=function(e){var t=m(this,e).delete(e);return this.size-=t?1:0,t};const v=function(e){return m(this,e).get(e)};const b=function(e){return m(this,e).has(e)};const w=function(e,t){var i=m(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this};function L(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])}}L.prototype.clear=f,L.prototype.delete=y,L.prototype.get=v,L.prototype.has=b,L.prototype.set=w;const I=L},2136:(e,t,i)=>{i.d(t,{A:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},2383:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(241),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=n.A?n.A.toStringTag:void 0;const l=function(e){var t=o.call(e,a),i=e[a];try{e[a]=void 0;var n=!0}catch(e){}var r=s.call(e);return n&&(t?e[a]=i:delete e[a]),r};var c=Object.prototype.toString;const u=function(e){return c.call(e)};var d=n.A?n.A.toStringTag:void 0;const h=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":d&&d in Object(e)?l(e):u(e)}},2505:(e,t,i)=>{i.d(t,{A:()=>u});const n=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n};var r=i(5175),o=i(2049),s=i(1200),a=i(5353),l=i(2871),c=Object.prototype.hasOwnProperty;const u=function(e,t){var i=(0,o.A)(e),u=!i&&(0,r.A)(e),d=!i&&!u&&(0,s.A)(e),h=!i&&!u&&!d&&(0,l.A)(e),p=i||u||d||h,_=p?n(e.length,String):[],f=_.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,a.A)(g,f))||_.push(g);return _}},2634:(e,t,i)=>{i.d(t,{A:()=>n});const n=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}},2871:(e,t,i)=>{i.d(t,{A:()=>f});var n=i(2383),r=i(5254),o=i(3098),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const a=function(e){return(0,o.A)(e)&&(0,r.A)(e.length)&&!!s[(0,n.A)(e)]};const l=function(e){return function(t){return e(t)}};var c=i(2136),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,d=u&&"object"==typeof module&&module&&!module.nodeType&&module,h=d&&d.exports===u&&c.A.process,p=function(){try{var e=d&&d.require&&d.require("util").types;return e||h&&h.binding&&h.binding("util")}catch(e){}}();var _=p&&p.isTypedArray;const f=_?l(_):a},3098:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e){return null!=e&&"object"==typeof e}},3149:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3153:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(){return[]}},3456:(e,t,i)=>{i.d(t,{A:()=>u});var n=i(241),r=i(5572),o=i(2049),s=i(1882),a=n.A?n.A.prototype:void 0,l=a?a.toString:void 0;const c=function e(t){if("string"==typeof t)return t;if((0,o.A)(t))return(0,r.A)(t,e)+"";if((0,s.A)(t))return l?l.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i};const u=function(e){return null==e?"":c(e)}},3736:(e,t,i)=>{i.d(t,{A:()=>n});const n=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}},3831:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(6912),r=i(2049);const o=function(e,t,i){var o=t(e);return(0,r.A)(e)?o:(0,n.A)(o,i(e))}},4099:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e,t){return e.has(t)}},4792:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(2634),r=i(3153),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const a=s?function(e){return null==e?[]:(e=Object(e),(0,n.A)(s(e),(function(t){return o.call(e,t)})))}:r.A},4878:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(2049),r=i(6586),o=i(2050);function s(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(s.Cache||o.A),i}s.Cache=o.A;const a=s;var l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,c=/\\(\\)?/g;const u=function(e){var t=a(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(l,(function(e,i,n,r){t.push(n?r.replace(c,"$1"):i||e)})),t}));var d=i(3456);const h=function(e,t){return(0,n.A)(e)?e:(0,r.A)(e,t)?[e]:u((0,d.A)(e))}},4969:(e,t,i)=>{i.d(t,{y:()=>r});var n=i(916);function r(e){let t=null;return!function(e){return/^en(-(US|GB|AU))?$/.test(e)}(e)?!function(e){return/^zh(-(Hans|CN))?$/.test(e)}(e)?!function(e){return/^zh-(Hant|HK|MO)$/.test(e)}(e)?!function(e){return"zh-TW"===e}(e)?!function(e){return/^ja(-JP)?$/.test(e)}(e)?!function(e){return/^ko(-KR)?$/.test(e)}(e)?!function(e){return/^(fil|tl)(-PH)?$/.test(e)}(e)?!function(e){return/^id(-ID)?$/.test(e)}(e)?!function(e){return/^pt(-(BR|PT))?$/.test(e)}(e)?!function(e){return/^th(-TH)?$/.test(e)}(e)?!function(e){return/^vi(-VN)?$/.test(e)}(e)?function(e){return/^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(e)}(e)&&(t=n.ys.ARABIC):t=n.ys.VIETNAMESE:t=n.ys.THAI:t=n.ys.PORTUGUESE:t=n.ys.INDONESIAN:t=n.ys.FILIPINO:t=n.ys.KOREAN:t=n.ys.JAPANESE:t=n.ys.CHINESE_TRADITIONAL_TW:t=n.ys.CHINESE_TRADITIONAL:t=n.ys.CHINESE_SIMPLIFIED:t=n.ys.ENGLISH,t}},5175:(e,t,i)=>{i.d(t,{A:()=>c});var n=i(2383),r=i(3098);const o=function(e){return(0,r.A)(e)&&"[object Arguments]"==(0,n.A)(e)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(e){return(0,r.A)(e)&&a.call(e,"callee")&&!l.call(e,"callee")}},5254:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5353:(e,t,i)=>{i.d(t,{A:()=>r});var n=/^(?:0|[1-9]\d*)$/;const r=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&n.test(e))&&e>-1&&e%1==0&&e<t}},5572:(e,t,i)=>{i.d(t,{A:()=>n});const n=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}},5707:(e,t,i)=>{i.d(t,{A:()=>n});const n=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}},6318:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(4878),r=i(901);const o=function(e,t){for(var i=0,o=(t=(0,n.A)(t,e)).length;null!=e&&i<o;)e=e[(0,r.A)(t[i++])];return i&&i==o?e:void 0}},6586:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(2049),r=i(1882),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;const a=function(e,t){if((0,n.A)(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!(0,r.A)(e))||(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}},6912:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}},6984:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e,t){return e===t||e!=e&&t!=t}},7007: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))}f(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&f(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):_(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 _(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function f(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=_(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):[]}},7271:(e,t,i)=>{i.d(t,{A:()=>r});var n=Object.prototype;const r=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},7311:(e,t,i)=>{i.d(t,{o:()=>s});var n=i(531),r=i(916),o=i(7463);class s{static _instance;_tokenManager=o.t.getInstance();_accessControls=new Map;static setPlatform(e){o.t.setPlatform(e)}static getInstance(){return s._instance||(s._instance=new s),s._instance}get version(){return this._tokenManager.getVersion()}async getIdentifier(){return await this._tokenManager.getIdentifier()}async getToken(e,t){let i=this._tokenManager.getToken(e);if(!i){const o=this._accessControls.get(e);if(o)o.forceUpdateToken(),await o.ready(),i=o.token;else if(t){const o=new n.k(e,t,r.en.Map);await o.ready(),i=o.token,this._accessControls.set(e,o)}}return i}deleteToken(e,t){this._tokenManager.deleteToken(e,t)}getAppId(e){return this._tokenManager.getAppId(e)}disconnect(e){this._tokenManager.on(o._,e)}}},7405:(e,t,i)=>{i.d(t,{A:()=>c});var n=i(2505),r=i(7271);const o=(0,i(367).A)(Object.keys,Object);var s=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.A)(e))return o(e);var t=[];for(var i in Object(e))s.call(e,i)&&"constructor"!=i&&t.push(i);return t};var l=i(8446);const c=function(e){return(0,l.A)(e)?(0,n.A)(e):a(e)}},7463:(e,t,i)=>{i.d(t,{_:()=>je,t:()=>Te});var n=function(){return n=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},n.apply(this,arguments)};function r(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 o(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 s(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 a="4.6.1";function l(e,t){return new Promise((function(i){return setTimeout(i,e,t)}))}function c(e){return!!e&&"function"==typeof e.then}function u(e,t){try{var i=e();c(i)?i.then((function(e){return t(!0,e)}),(function(e){return t(!1,e)})):t(!0,i)}catch(e){t(!1,e)}}function d(e,t,i){return void 0===i&&(i=16),r(this,void 0,void 0,(function(){var n,r,s,a;return o(this,(function(o){switch(o.label){case 0:n=Array(e.length),r=Date.now(),s=0,o.label=1;case 1:return s<e.length?(n[s]=t(e[s],s),(a=Date.now())>=r+i?(r=a,[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:o.sent(),o.label=3;case 3:return++s,[3,1];case 4:return[2,n]}}))}))}function h(e){return e.then(void 0,(function(){})),e}function p(e){return parseInt(e)}function _(e){return parseFloat(e)}function f(e,t){return"number"==typeof e&&isNaN(e)?t:e}function g(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function m(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 y(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 v(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 b(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 w(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 L(e,t){e[0]^=t[0],e[1]^=t[1]}var I=[4283543511,3981806797],S=[3301882366,444984403];function A(e){var t=[0,e[0]>>>1];L(e,t),v(e,I),t[1]=e[0]>>>1,L(e,t),v(e,S),t[1]=e[0]>>>1,L(e,t)}var B=[2277735313,289559509],k=[1291169091,658871167],M=[0,5],x=[0,1390208809],C=[0,944331445];function E(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,v(c,B),b(c,31),v(c,k),L(a,c),b(a,27),y(a,l),v(a,M),y(a,x),v(u,k),b(u,33),v(u,B),L(l,u),b(l,31),y(l,a),v(l,M),y(l,C);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],w(d,48),L(u,d);case 14:d[1]=i[n+13],w(d,40),L(u,d);case 13:d[1]=i[n+12],w(d,32),L(u,d);case 12:d[1]=i[n+11],w(d,24),L(u,d);case 11:d[1]=i[n+10],w(d,16),L(u,d);case 10:d[1]=i[n+9],w(d,8),L(u,d);case 9:d[1]=i[n+8],L(u,d),v(u,k),b(u,33),v(u,B),L(l,u);case 8:d[1]=i[n+7],w(d,56),L(c,d);case 7:d[1]=i[n+6],w(d,48),L(c,d);case 6:d[1]=i[n+5],w(d,40),L(c,d);case 5:d[1]=i[n+4],w(d,32),L(c,d);case 4:d[1]=i[n+3],w(d,24),L(c,d);case 3:d[1]=i[n+2],w(d,16),L(c,d);case 2:d[1]=i[n+1],w(d,8),L(c,d);case 1:d[1]=i[n],L(c,d),v(c,B),b(c,31),v(c,k),L(a,c)}return L(a,r),L(l,r),y(a,l),y(l,a),A(a),A(l),y(a,l),y(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 O(e){return"function"!=typeof e}function P(e,t,i,n){var s=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)})),a=h(d(s,(function(i){return function(e,t){var i=h(new Promise((function(i){var n=Date.now();u(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(O(o))return i((function(){return{value:o,duration:r}}));i((function(){return new Promise((function(e){var t=Date.now();u(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 r(this,void 0,void 0,(function(){var e,t,i,r;return o(this,(function(o){switch(o.label){case 0:return[4,a];case 1:return[4,d(o.sent(),(function(e){return h(e())}),n)];case 2:return e=o.sent(),[4,Promise.all(e)];case 3:for(t=o.sent(),i={},r=0;r<s.length;++r)i[s[r]]=t[r];return[2,i]}}))}))}}function F(){var e=window,t=navigator;return g(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function $(){var e=window,t=navigator;return g(["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 j(){var e=window;return g(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function T(){var e=window,t=e.HTMLElement,i=e.Document;return g(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),i&&"pointerLockElement"in i.prototype])>=4}function V(){var e,t=window;return e=t.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))&&"[object WebPageNamespace]"===String(t.browser)}function R(){var e,t,i=window;return g(["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 N(){var e=window,t=navigator,i=e.CSS,n=e.HTMLButtonElement;return g([!("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 D(){var e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function H(){var e=$(),t=R(),i=window,n=navigator,r="connection";return e?g([!("SharedWorker"in i),n[r]&&"ontypechange"in n[r],!("sinkId"in new Audio)])>=2:!!t&&g(["onorientationchange"in i,"orientation"in i,/android/i.test(n.appVersion)])>=2}function W(e){var t=new Error(e);return t.name=e,t}function z(e,t,i){var n,s,a;return void 0===i&&(i=50),r(this,void 0,void 0,(function(){var r,c;return o(this,(function(o){switch(o.label){case 0:r=document,o.label=1;case 1:return r.body?[3,3]:[4,l(i)];case 2:return o.sent(),[3,1];case 3:c=r.createElement("iframe"),o.label=4;case 4:return o.trys.push([4,,10,11]),[4,new Promise((function(e,i){var n=!1,o=function(){n=!0,e()};c.onload=o,c.onerror=function(e){n=!0,i(e)};var s=c.style;s.setProperty("display","block","important"),s.position="absolute",s.top="0",s.left="0",s.visibility="hidden",t&&"srcdoc"in c?c.srcdoc=t:c.src="about:blank",r.body.appendChild(c);var a=function(){var e,t;n||("complete"===(null===(t=null===(e=c.contentWindow)||void 0===e?void 0:e.document)||void 0===t?void 0:t.readyState)?o():setTimeout(a,10))};a()}))];case 5:o.sent(),o.label=6;case 6:return(null===(s=null===(n=c.contentWindow)||void 0===n?void 0:n.document)||void 0===s?void 0:s.body)?[3,8]:[4,l(i)];case 7:return o.sent(),[3,6];case 8:return[4,e(c,c.contentWindow)];case 9:return[2,o.sent()];case 10:return null===(a=c.parentNode)||void 0===a||a.removeChild(c),[7];case 11:return[2]}}))}))}function G(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?Z(r.style,l):r.setAttribute(a,l)}return r}function Z(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 Y=["monospace","sans-serif","serif"],X=["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 U(e){return e.toDataURL()}var J,q;function K(){var e=this;return function(){if(void 0===q){var e=function(){var t=Q();ee(t)?q=setTimeout(e,2500):(J=t,q=void 0)};e()}}(),function(){return r(e,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return ee(e=Q())?J?[2,s([],J,!0)]:(i=document).fullscreenElement||i.msFullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement?[4,D()]:[3,2]:[3,2];case 1:t.sent(),e=Q(),t.label=2;case 2:return ee(e)||(J=e),[2,e]}var i}))}))}}function Q(){var e=screen;return[f(_(e.availTop),null),f(_(e.width)-_(e.availWidth)-f(_(e.availLeft),0),null),f(_(e.height)-_(e.availHeight)-f(_(e.availTop),0),null),f(_(e.availLeft),null)]}function ee(e){for(var t=0;t<4;++t)if(e[t])return!1;return!0}function te(e){var t;return r(this,void 0,void 0,(function(){var i,n,r,s,a,c,u;return o(this,(function(o){switch(o.label){case 0:for(i=document,n=i.createElement("div"),r=new Array(e.length),s={},ie(n),u=0;u<e.length;++u)"DIALOG"===(a=G(e[u])).tagName&&a.show(),ie(c=i.createElement("div")),c.appendChild(a),n.appendChild(c),r[u]=a;o.label=1;case 1:return i.body?[3,3]:[4,l(50)];case 2:return o.sent(),[3,1];case 3:i.body.appendChild(n);try{for(u=0;u<e.length;++u)r[u].offsetParent||(s[e[u]]=!0)}finally{null===(t=n.parentNode)||void 0===t||t.removeChild(n)}return[2,s]}}))}))}function ie(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function ne(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function re(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function oe(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function se(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function ae(e){return matchMedia("(prefers-reduced-transparency: ".concat(e,")")).matches}function le(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var ce=Math,ue=function(){return 0};var de={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var he=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 pe=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]),_e=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),fe=["FRAGMENT_SHADER","VERTEX_SHADER"],ge=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],me="WEBGL_debug_renderer_info";function ye(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 ve(e,t,i){var n=e.getShaderPrecisionFormat(e[t],e[i]);return n?[n.rangeMin,n.rangeMax,n.precision]:[]}function be(e){return Object.keys(e.__proto__).filter(we)}function we(e){return"string"==typeof e&&!e.match(/[^A-Z0-9_x]/)}function Le(){return R()}function Ie(e){return"function"==typeof e.getParameter}var Se={fonts:function(){var e=this;return z((function(t,i){var n=i.document;return r(e,void 0,void 0,(function(){var e,t,i,r,s,a,l,c,u,d,h;return o(this,(function(o){for((e=n.body).style.fontSize="48px",(t=n.createElement("div")).style.setProperty("visibility","hidden","important"),i={},r={},s=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},a=function(e,t){return s("'".concat(e,"',").concat(t))},l=function(){for(var e={},t=function(t){e[t]=Y.map((function(e){return a(t,e)}))},i=0,n=X;i<n.length;i++){t(n[i])}return e},c=function(e){return Y.some((function(t,n){return e[n].offsetWidth!==i[t]||e[n].offsetHeight!==r[t]}))},u=function(){return Y.map(s)}(),d=l(),e.appendChild(t),h=0;h<Y.length;h++)i[Y[h]]=u[h].offsetWidth,r[Y[h]]=u[h].offsetHeight;return[2,X.filter((function(e){return c(d[e])}))]}))}))}))},domBlockers:function(e){var t=(void 0===e?{}:e).debug;return r(this,void 0,void 0,(function(){var e,i,n,r,s;return o(this,(function(o){switch(o.label){case 0:return j()||H()?(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,te((s=[]).concat.apply(s,i.map((function(t){return e[t]}))))]):[2,void 0];case 1:return n=o.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 g(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 z((function(i,n){var r=n.document,o=r.body,a=o.style;a.width="".concat(t,"px"),a.webkitTextSizeAdjust=a.textSizeAdjust="none",$()?o.style.zoom="".concat(1/n.devicePixelRatio):j()&&(o.style.zoom="reset");var l=r.createElement("div");return l.textContent=s([],Array(t/20|0),!0).map((function(){return"word"})).join(" "),o.appendChild(l),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(de);r<o.length;r++){var s=o[r],a=de[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,_=Object.keys(c);p<_.length;p++){var f=_[p],g=c[f];void 0!==g&&(h.style[f]=g)}i[s]=h,t.append(e.createElement("br"),h)}for(var m=0,y=Object.keys(de);m<y.length;m++){n[s=y[m]]=i[s].getBoundingClientRect().width}return n}))},audio:function(){return j()&&N()&&V()||$()&&(e=navigator,t=window,i=Audio.prototype,n=t.visualViewport,g(["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 g(["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(j()&&!T()&&!function(){var e=window;return g(["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,u=0,d=0;e.oncomplete=function(e){return s(e.renderedBuffer)};var p=function(){setTimeout((function(){return a(W("timeout"))}),Math.min(n,d+r-Date.now()))},_=function(){try{var n=e.startRendering();switch(c(n)&&h(n),e.state){case"running":d=Date.now(),l&&p();break;case"suspended":document.hidden||u++,l&&u>=t?a(W("suspended")):setTimeout(_,i)}}catch(e){a(e)}};_(),o=function(){l||(l=!0,d>0&&p())}}));return[s,o]}(n),a=s[0],l=s[1],u=h(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(),u}}();var e,t,i,n},screenFrame:function(){var e=this;if(j()&&N()&&V())return function(){return Promise.resolve(void 0)};var t=K();return function(){return r(e,void 0,void 0,(function(){var e,i;return o(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:m(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=U(e),n=U(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=U(e);return[r,i]}(s,a),i=t[0],n=t[1]));return{winding:r,geometry:i,text:n}}(j()&&N()&&V())},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))$()&&g([!("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 f(_(navigator.deviceMemory),void 0)},screenResolution:function(){var e,t,i;if(!(j()&&N()&&V()))return e=screen,(i=[(t=function(e){return f(p(e),null)})(e.width),t(e.height)]).sort().reverse(),i},hardwareConcurrency:function(){return f(p(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(_(new Date(n,0,1).getTimezoneOffset()),_(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(!(F()||(e=window,t=navigator,g(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!F())))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&&j()&&!T()?function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return g(["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=p(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!!ne("inverted")||!ne("none")&&void 0},forcedColors:function(){return!!re("active")||!re("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 oe("no-preference")?0:oe("high")||oe("more")?1:oe("low")||oe("less")?-1:oe("forced")?10:void 0},reducedMotion:function(){return!!se("reduce")||!se("no-preference")&&void 0},reducedTransparency:function(){return!!ae("reduce")||!ae("no-preference")&&void 0},hdr:function(){return!!le("high")||!le("standard")&&void 0},math:function(){var e,t=ce.acos||ue,i=ce.acosh||ue,n=ce.asin||ue,r=ce.asinh||ue,o=ce.atanh||ue,s=ce.atan||ue,a=ce.sin||ue,l=ce.sinh||ue,c=ce.cos||ue,u=ce.cosh||ue,d=ce.tan||ue,h=ce.tanh||ue,p=ce.exp||ue,_=ce.expm1||ue,f=ce.log1p||ue;return{acos:t(.12312423423423424),acosh:i(1e308),acoshPf:(e=1e154,ce.log(e+ce.sqrt(e*e-1))),asin:n(.12312423423423424),asinh:r(1),asinhPf:function(e){return ce.log(e+ce.sqrt(e*e+1))}(1),atanh:o(.5),atanhPf:function(e){return ce.log((1+e)/(1-e))/2}(.5),atan:s(.5),sin:a(-1e300),sinh:l(1),sinhPf:function(e){return ce.exp(e)-1/ce.exp(e)/2}(1),cos:c(10.000000000123),cosh:u(1),coshPf:function(e){return(ce.exp(e)+1/ce.exp(e))/2}(1),tan:d(-1e300),tanh:h(1),tanhPf:function(e){return(ce.exp(2*e)-1)/(ce.exp(2*e)+1)}(1),exp:p(1),expm1:_(1),expm1Pf:function(e){return ce.exp(e)-1}(1),log1p:f(10),log1pPf:function(e){return ce.log(1+e)}(10),powPI:function(e){return ce.pow(ce.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(he())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 H()||j()?window.AudioContext&&null!==(e=(new AudioContext).baseLatency)&&void 0!==e?e:-1:-2},dateTimeLocale:function(){if(!window.Intl)return-1;var e=window.Intl.DateTimeFormat;if(!e)return-2;var t=e().resolvedOptions().locale;return t||""===t?t:-3},webGlBasics:function(e){var t,i,n,r,o,s,a=ye(e.cache);if(!a)return-1;if(!Ie(a))return-2;var l=Le()?null:a.getExtension(me);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=ye(e.cache);if(!t)return-1;if(!Ie(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=be(t);h<p.length;h++){var _=t[w=p[h]];s.push("".concat(w,"=").concat(_).concat(pe.has(_)?"=".concat(t.getParameter(_)):""))}if(i)for(var f=0,g=i;f<g.length;f++){var m=g[f];if(!(m===me&&Le()||"WEBGL_polygon_mode"===m&&($()||j()))){var y=t.getExtension(m);if(y)for(var v=0,b=be(y);v<b.length;v++){var w;_=y[w=b[v]];a.push("".concat(w,"=").concat(_).concat(_e.has(_)?"=".concat(t.getParameter(_)):""))}else r.push(m)}}for(var L=0,I=fe;L<I.length;L++)for(var S=I[L],A=0,B=ge;A<B.length;A++){var k=B[A],M=ve(t,S,k);l.push("".concat(S,".").concat(k,"=").concat(M.join(",")))}return a.sort(),s.sort(),{contextAttributes:o,parameters:s,shaderPrecisions:l,extensions:i,extensionParameters:a,unsupportedExtensions:r}}};function Ae(e){var t=function(e){if(H())return.4;if(j())return!T()||N()&&V()?.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 m(.99+.01*e,1e-4)}(t);return{score:t,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(i))}}function Be(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?n({name:(i=t).name,message:i.message,stack:null===(r=i.stack)||void 0===r?void 0:r.split("\n")},i):t;var i,r}),2)}function ke(e){return E(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 Me(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})})):l(Math.min(e,t))}(e,2*e)}function xe(e,t){var i=Date.now();return{get:function(n){return r(this,void 0,void 0,(function(){var r,s,l;return o(this,(function(o){switch(o.label){case 0:return r=Date.now(),[4,e()];case 1:return s=o.sent(),l=function(e){var t,i=Ae(e);return{get visitorId(){return void 0===t&&(t=ke(this.components)),t},set visitorId(e){t=e},confidence:i,components:e,version:a}}(s),(t||(null==n?void 0:n.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(l.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(r-i,"\nvisitorId: ").concat(l.visitorId,"\ncomponents: ").concat(Be(s),"\n```")),[2,l]}}))}))}}}var Ce={load:function(e){var t;return void 0===e&&(e={}),r(this,void 0,void 0,(function(){var i,n,r;return o(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(a,"/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),i=e.delayFallback,n=e.debug,[4,Me(i)];case 1:return o.sent(),r=function(e){return P(Se,e,[])}({cache:{},debug:n}),[2,xe(r,n)]}}))}))},hashComponents:ke,componentsToDebugString:Be},Ee=i(8330),Oe=i(9588),Pe=i(7007),Fe=i(916),$e=i(8301);const je="permission-disconnected";class Te extends Pe.EventEmitter{static instance;static platform={sdkVersion:Ee.rE,identifier:""};_appIds=new Map([[Fe.en.Access,{}],[Fe.en.Map,{}]]);_tokenStorage={};_appIdsHistory=[];static getInstance(){return Te.instance||(Te.instance=new Te),Te.instance}static setPlatform(e){Te.platform=e}updateToken(e){const{appId:t,secret:i,token:n,from:r}=e;this._tokenStorage[t]=n,this._appIds.get(r)[t]=i,this._appIdsHistory.push(t)}deleteToken(e,t){delete this._tokenStorage[e],t&&(delete this._appIds.get(t)[e],this.emit(je,{appId:e,from:t}))}getVersion(){return Te.platform.sdkVersion}getToken(e){return this._tokenStorage[e]}async getIdentifier(){if(!Te.platform.identifier){const e=await Ce.load(),t=await e.get();Te.platform.identifier=t.visitorId}return Te.platform.identifier}getAppId(e){const t=e?Object.keys(this._appIds.get(e)):[...Object.keys(this._appIds.get(Fe.en.Access)),...Object.keys(this._appIds.get(Fe.en.Map))];return(0,$e.A)(this._appIdsHistory.reverse(),(e=>t.includes(e)))}async fetchToken(e,t,i=0){try{const i={appId:e,secret:t,..."bundleId"in Te.platform?{bundleId:Te.platform.bundleId}:"sha1"in Te.platform?{sha1:Te.platform.sha1,packageName:Te.platform.packageName}:{origin:window.location.hostname||"restriction.test.example.com",keyPlatform:"WEB"}},n={"Content-Type":"application/json",sdkVersion:Te.platform.sdkVersion,identifier:Te.platform.identifier??await this.getIdentifier()},r=await fetch(Oe.R0,{method:"POST",body:JSON.stringify(i),headers:n});return(await r.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}}}},7726:(e,t,i)=>{i.d(t,{OFFSET:()=>r.e$,PAGE:()=>r.KL,VERSION:()=>l,convertBrowserLangToPresetLang:()=>o.y,getIdentifier:()=>a});var n=i(8330),r=i(9588),o=i(4969),s=i(7311);async function a(){return s.o.getInstance().getIdentifier()}const l=n.rE},8300:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(2050);const r=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const o=function(e){return this.__data__.has(e)};function s(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new n.A;++t<i;)this.add(e[t])}s.prototype.add=s.prototype.push=r,s.prototype.has=o;const a=s},8301:(e,t,i)=>{i.d(t,{A:()=>s});var n=i(8816),r=i(8446),o=i(7405);const s=function(e){return function(t,i,s){var a=Object(t);if(!(0,r.A)(t)){var l=(0,n.A)(i,3);t=(0,o.A)(t),i=function(e){return l(a[e],e,a)}}var c=e(t,i,s);return c>-1?a[l?t[c]:c]:void 0}}(i(1625).A)},8330:e=>{e.exports={rE:"8.4.0"}},8335:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(8562),r=i(1917);const o=(0,n.A)(r.A,"Map")},8446:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(9610),r=i(5254);const o=function(e){return null!=e&&(0,r.A)(e.length)&&!(0,n.A)(e)}},8562:(e,t,i)=>{i.d(t,{A:()=>y});var n=i(9610);const r=i(1917).A["__core-js_shared__"];var o,s=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";const a=function(e){return!!s&&s in e};var l=i(3149),c=i(1121),u=/^\[object .+?Constructor\]$/,d=Function.prototype,h=Object.prototype,p=d.toString,_=h.hasOwnProperty,f=RegExp("^"+p.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(e){return!(!(0,l.A)(e)||a(e))&&((0,n.A)(e)?f:u).test((0,c.A)(e))};const m=function(e,t){return null==e?void 0:e[t]};const y=function(e,t){var i=m(e,t);return g(i)?i:void 0}},8593:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(8776);const r=function(e){var t=(0,n.A)(e),i=t%1;return t==t?i?t-i:t:0}},8776:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(751),r=1/0;const o=function(e){return e?(e=(0,n.A)(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8816:(e,t,i)=>{i.d(t,{A:()=>xe});var n=i(9469);const r=function(){this.__data__=new n.A,this.size=0};const o=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const s=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var l=i(8335),c=i(2050);const u=function(e,t){var i=this.__data__;if(i instanceof n.A){var r=i.__data__;if(!l.A||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new c.A(r)}return i.set(e,t),this.size=i.size,this};function d(e){var t=this.__data__=new n.A(e);this.size=t.size}d.prototype.clear=r,d.prototype.delete=o,d.prototype.get=s,d.prototype.has=a,d.prototype.set=u;const h=d;var p=i(8300),_=i(3736),f=i(4099);const g=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,g=2&i?new p.A:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var m=e[d],y=t[d];if(n)var v=s?n(y,m,d,t,e,o):n(m,y,d,e,t,o);if(void 0!==v){if(v)continue;h=!1;break}if(g){if(!(0,_.A)(t,(function(e,t){if(!(0,f.A)(g,t)&&(m===e||r(m,e,i,n,o)))return g.push(t)}))){h=!1;break}}else if(m!==y&&!r(m,y,i,n,o)){h=!1;break}}return o.delete(e),o.delete(t),h};var m=i(241),y=i(1917);const v=y.A.Uint8Array;var b=i(6984);const w=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i};var L=i(9959),I=m.A?m.A.prototype:void 0,S=I?I.valueOf:void 0;const A=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 v(e),new v(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,b.A)(+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=w;case"[object Set]":var l=1&n;if(a||(a=L.A),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=g(a(e),a(t),n,r,o,s);return s.delete(e),u;case"[object Symbol]":if(S)return S.call(e)==S.call(t)}return!1};var B=i(3831),k=i(4792),M=i(7405);const x=function(e){return(0,B.A)(e,M.A,k.A)};var C=Object.prototype.hasOwnProperty;const E=function(e,t,i,n,r,o){var s=1&i,a=x(e),l=a.length;if(l!=x(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:C.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 _=s;++c<l;){var f=e[u=a[c]],g=t[u];if(n)var m=s?n(g,f,u,t,e,o):n(f,g,u,e,t,o);if(!(void 0===m?f===g||r(f,g,i,n,o):m)){p=!1;break}_||(_="constructor"==u)}if(p&&!_){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};var O=i(8562);const P=(0,O.A)(y.A,"DataView");const F=(0,O.A)(y.A,"Promise");var $=i(9857);const j=(0,O.A)(y.A,"WeakMap");var T=i(2383),V=i(1121),R="[object Map]",N="[object Promise]",D="[object Set]",H="[object WeakMap]",W="[object DataView]",z=(0,V.A)(P),G=(0,V.A)(l.A),Z=(0,V.A)(F),Y=(0,V.A)($.A),X=(0,V.A)(j),U=T.A;(P&&U(new P(new ArrayBuffer(1)))!=W||l.A&&U(new l.A)!=R||F&&U(F.resolve())!=N||$.A&&U(new $.A)!=D||j&&U(new j)!=H)&&(U=function(e){var t=(0,T.A)(e),i="[object Object]"==t?e.constructor:void 0,n=i?(0,V.A)(i):"";if(n)switch(n){case z:return W;case G:return R;case Z:return N;case Y:return D;case X:return H}return t});const J=U;var q=i(2049),K=i(1200),Q=i(2871),ee="[object Arguments]",te="[object Array]",ie="[object Object]",ne=Object.prototype.hasOwnProperty;const re=function(e,t,i,n,r,o){var s=(0,q.A)(e),a=(0,q.A)(t),l=s?te:J(e),c=a?te:J(t),u=(l=l==ee?ie:l)==ie,d=(c=c==ee?ie:c)==ie,p=l==c;if(p&&(0,K.A)(e)){if(!(0,K.A)(t))return!1;s=!0,u=!1}if(p&&!u)return o||(o=new h),s||(0,Q.A)(e)?g(e,t,i,n,r,o):A(e,t,l,i,n,r,o);if(!(1&i)){var _=u&&ne.call(e,"__wrapped__"),f=d&&ne.call(t,"__wrapped__");if(_||f){var m=_?e.value():e,y=f?t.value():t;return o||(o=new h),r(m,y,i,n,o)}}return!!p&&(o||(o=new h),E(e,t,i,n,r,o))};var oe=i(3098);const se=function e(t,i,n,r,o){return t===i||(null==t||null==i||!(0,oe.A)(t)&&!(0,oe.A)(i)?t!=t&&i!=i:re(t,i,n,r,e,o))};const ae=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 h;if(n)var p=n(c,u,l,e,t,d);if(!(void 0===p?se(u,c,3,n,d):p))return!1}}return!0};var le=i(3149);const ce=function(e){return e==e&&!(0,le.A)(e)};const ue=function(e){for(var t=(0,M.A)(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,ce(r)]}return t};const de=function(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}};const he=function(e){var t=ue(e);return 1==t.length&&t[0][2]?de(t[0][0],t[0][1]):function(i){return i===e||ae(i,e,t)}};var pe=i(6318);const _e=function(e,t,i){var n=null==e?void 0:(0,pe.A)(e,t);return void 0===n?i:n};const fe=function(e,t){return null!=e&&t in Object(e)};var ge=i(4878),me=i(5175),ye=i(5353),ve=i(5254),be=i(901);const we=function(e,t,i){for(var n=-1,r=(t=(0,ge.A)(t,e)).length,o=!1;++n<r;){var s=(0,be.A)(t[n]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++n!=r?o:!!(r=null==e?0:e.length)&&(0,ve.A)(r)&&(0,ye.A)(s,r)&&((0,q.A)(e)||(0,me.A)(e))};const Le=function(e,t){return null!=e&&we(e,t,fe)};var Ie=i(6586);const Se=function(e,t){return(0,Ie.A)(e)&&ce(t)?de((0,be.A)(e),t):function(i){var n=_e(i,e);return void 0===n&&n===t?Le(i,e):se(t,n,3)}};var Ae=i(9008);const Be=function(e){return function(t){return null==t?void 0:t[e]}};const ke=function(e){return function(t){return(0,pe.A)(t,e)}};const Me=function(e){return(0,Ie.A)(e)?Be((0,be.A)(e)):ke(e)};const xe=function(e){return"function"==typeof e?e:null==e?Ae.A:"object"==typeof e?(0,q.A)(e)?Se(e[0],e[1]):he(e):Me(e)}},9008:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e){return e}},9469:(e,t,i)=>{i.d(t,{A:()=>h});const n=function(){this.__data__=[],this.size=0};var r=i(6984);const o=function(e,t){for(var i=e.length;i--;)if((0,r.A)(e[i][0],t))return i;return-1};var s=Array.prototype.splice;const a=function(e){var t=this.__data__,i=o(t,e);return!(i<0)&&(i==t.length-1?t.pop():s.call(t,i,1),--this.size,!0)};const l=function(e){var t=this.__data__,i=o(t,e);return i<0?void 0:t[i][1]};const c=function(e){return o(this.__data__,e)>-1};const u=function(e,t){var i=this.__data__,n=o(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this};function d(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])}}d.prototype.clear=n,d.prototype.delete=a,d.prototype.get=l,d.prototype.has=c,d.prototype.set=u;const h=d},9588:(e,t,i)=>{i.d(t,{KL:()=>s,R0:()=>n,e$:()=>o,hl:()=>r});const n="https://map-api.mapxus.co.jp/sc/api/v1/apikeys/auth",r="https://map-api.mapxus.co.jp/bms",o=10,s=1},9610:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(2383),r=i(3149);const o=function(e){if(!(0,r.A)(e))return!1;var t=(0,n.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9857:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(8562),r=i(1917);const o=(0,n.A)(r.A,"Set")},9959:(e,t,i)=>{i.d(t,{A:()=>n});const n=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.r(n),i.d(n,{AccessControl:()=>Ti.k,AccessControlOrigin:()=>o.en,BuildingFilterControl:()=>Nt,BuildingSelectorHandler:()=>di,BuildingsService:()=>Ae,DistanceSearchType:()=>o.Kp,FloorSelectorHandler:()=>hi,FloorSwitchMode:()=>o.MA,FloorsControl:()=>Jt,Indoor:()=>Ft,Map:()=>mi,Marker:()=>vi,OFFSET:()=>Vi.OFFSET,OrientationDistanceSearchType:()=>o._P,PAGE:()=>Vi.PAGE,Poi:()=>jt,PoisOrderBy:()=>o.LJ,PoisService:()=>ke,PoisSortBy:()=>o.nH,PresetLanguage:()=>o.ys,RoutePainter:()=>Pi,RouteService:()=>xe,SwitchBuildingHandler:()=>ui,SwitchOutdoorHandler:()=>ci,ThemeType:()=>o.SV,VERSION:()=>Vi.VERSION,VehicleType:()=>o.$O,VenuesService:()=>Ie,convertBrowserLangToPresetLang:()=>Vi.convertBrowserLangToPresetLang,getIdentifier:()=>Vi.getIdentifier});var r=i(7007),o=i(916);function s(e){return e.layers.filter(a)}function a(e){return e.source===c}function l(e){return e.source!==c}const c="indoor-planet";var u=i(8562);const d=function(){try{var e=(0,u.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const h=function(e,t,i){"__proto__"==t&&d?d(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};const p=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}}();var _=i(7405);const f=function(e,t){return e&&p(e,t,_.A)};var g=i(8816);const m=function(e,t){var i={};return t=(0,g.A)(t,3),f(e,(function(e,n,r){h(i,t(e,n,r),e)})),i};const y=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};var v=i(8446);const b=function(e,t){return function(i,n){if(null==i)return i;if(!(0,v.A)(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}}(f);const w=function(e,t,i,n,r){return r(e,(function(e,r,o){i=n?(n=!1,e):t(i,e,r,o)})),i};var L=i(2049);const I=function(e,t,i){var n=(0,L.A)(e)?y:w,r=arguments.length<3;return n(e,(0,g.A)(t,4),i,r,b)};function S(e){const{buildingId:t,labelCenter:{lat:i,lon:n},floors:r,name:o,venueId:s,defaultFloor:a}=e,l=m(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"}}const A=require("axios");var B=i.n(A),k=i(9588),M=i(7311);let x="",C="";const E=new Map,O=M.o.getInstance();O.disconnect((async({appId:e,from:t})=>{if(t===o.en.Map){const e=O.getAppId(o.en.Access);e!==x&&(delete B().defaults.headers.common.token,e&&await P.setHeaders(e,"")),x="",C=""}else e!==x&&(delete B().defaults.headers.common.token,x&&C&&await P.setHeaders(x,C))})),B().interceptors.response.use(null,(async e=>{const{config:t,response:i}=e;if(401!==i.status||!t)throw e;{const i=t.url,n=(E.get(i)||0)+1;if(n>1&&n<3&&(O.deleteToken(O.getAppId()),await new Promise((e=>setTimeout(e,1e3)))),n>3)throw E.delete(i),e;t.headers.token=await O.getToken(O.getAppId()),E.set(i,n),t.headers.sdkVersion||(t.headers.sdkVersion=O.version),t.headers.identifier||(t.headers.identifier=await O.getIdentifier());try{const e=await B()(t);return E.delete(i),e}catch(e){throw e}}}));class P{static async setHeaders(e,t){e&&t&&(x=e,C=t);const i=await O.getIdentifier(),n=await O.getToken(e,t);i&&n&&(B().defaults.headers.common={identifier:i,token:n,sdkVersion:O.version,"Content-Type":"application/json"})}static getDefaultRequestParams(e){return{url:e,headers:B().defaults.headers.common}}constructor(e){B().defaults.baseURL=e??k.hl}get(e){return B().get(e)}post(e,t){return B().post(e,t)}}function F(e){const t=(0,L.A)(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()}var $=i(5572);const j=function(e,t){var i=-1,n=(0,v.A)(e)?Array(e.length):[];return b(e,(function(e,r,o){n[++i]=t(e,r,o)})),n};const T=function(e,t){return((0,L.A)(e)?$.A:j)(e,(0,g.A)(t,3))};const V=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 R=i(6318),N=i(6984),D=Object.prototype.hasOwnProperty;const H=function(e,t,i){var n=e[t];D.call(e,t)&&(0,N.A)(n,i)&&(void 0!==i||t in e)||h(e,t,i)};var W=i(4878),z=i(5353),G=i(3149),Z=i(901);const Y=function(e,t,i,n){if(!(0,G.A)(e))return e;for(var r=-1,o=(t=(0,W.A)(t,e)).length,s=o-1,a=e;null!=a&&++r<o;){var l=(0,Z.A)(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=(0,G.A)(u)?u:(0,z.A)(t[r+1])?[]:{})}H(a,l,c),a=a[l]}return e};const X=function(e,t,i){for(var n=-1,r=t.length,o={};++n<r;){var s=t[n],a=(0,R.A)(e,s);i(a,s)&&Y(o,(0,W.A)(s,e),a)}return o};var U=i(3831),J=i(6912);const q=(0,i(367).A)(Object.getPrototypeOf,Object);var K=i(4792),Q=i(3153);const ee=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,J.A)(t,(0,K.A)(e)),e=q(e);return t}:Q.A;var te=i(2505),ie=i(7271);const ne=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t};var re=Object.prototype.hasOwnProperty;const oe=function(e){if(!(0,G.A)(e))return ne(e);var t=(0,ie.A)(e),i=[];for(var n in e)("constructor"!=n||!t&&re.call(e,n))&&i.push(n);return i};const se=function(e){return(0,v.A)(e)?(0,te.A)(e,!0):oe(e)};const ae=function(e){return(0,U.A)(e,se,ee)};const le=function(e,t){if(null==e)return{};var i=(0,$.A)(ae(e),(function(e){return[e]}));return t=(0,g.A)(t),X(e,i,(function(e,i){return t(e,i[0])}))};const ce=function(e,t){return le(e,V((0,g.A)(t)))};var ue=i(5707);const de=function(e){return e!=e};const he=function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1};const pe=function(e,t,i){return t==t?he(e,t,i):(0,ue.A)(e,de,i)};var _e=i(2383),fe=i(3098);const ge=function(e){return"string"==typeof e||!(0,L.A)(e)&&(0,fe.A)(e)&&"[object String]"==(0,_e.A)(e)};var me=i(8593);const ye=function(e,t){return(0,$.A)(t,(function(t){return e[t]}))};const ve=function(e){return null==e?[]:ye(e,(0,_.A)(e))};var be=Math.max;const we=function(e,t,i,n){e=(0,v.A)(e)?e:ve(e),i=i&&!n?(0,me.A)(i):0;var r=e.length;return i<0&&(i=be(r+i,0)),ge(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&pe(e,t,i)>-1},Le=["opening_hours","description","phone","website","email","appURL","icon"];class Ie{_api="/api/v4/venues";_request;constructor(){this._request=new P}searchByIds(e){const t=F(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=k.e$,r=k.KL){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=k.e$,n=k.KL){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=k.e$,i=k.KL){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=T(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=T(e.data.result.venues,(e=>ce(e,((e,t)=>we(Le,t))))),t(e)})).catch(i)}))}}const Se=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","description"];class Ae{_api="/api/v4/buildings";_request;constructor(){this._request=new P}searchByIds(e){const t=F(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=k.e$,r=k.KL){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=k.e$,n=k.KL){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=k.e$,i=k.KL){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=T(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=T(e.data.result.buildings,(e=>ce(e,((e,t)=>we(Se,t))))),t(e)})).catch(i)}))}}const Be=["specialHours","businessStatus","serviceHours","keywords","siteCode","refPhotoId","totalPhotoCount","photos","icon"];class ke{_api="/api/v3/pois";_apiV4="/api/v4/pois";_categoriesApi="/api/v2/categories/pois";_categoriesGroupApi="/api/v5/categories/group";_request;constructor(){this._request=new P}searchByIds(e){const t=F(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=k.e$,page:o=k.KL}=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=k.e$,page:n=k.KL,keywords:r,orderBy:o}=e,s=[`bbox=${t.flat().join()}`,`offset=${i}`,`page=${n}`];Me(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=k.e$,page:n=k.KL,keywords:r,orderBy:o}=e,s=[`buildingId=${t}`,`offset=${i}`,`page=${n}`];Me(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=k.e$,page:n=k.KL,keywords:r,orderBy:o}=e,s=[`venueId=${t}`,`offset=${i}`,`page=${n}`];Me(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=k.e$,page:n=k.KL,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=o._P.POINT}=e,s=[`center=${t.join()}`,`angle=${Math.round(i)}`,`distance=${n}`,`distanceSearchType=${r}`];"ordinal"in e?s.push(`ordinal=${e.ordinal}`):"floorId"in e?s.push(`floorId=${e.floorId}`):"buildingId"in e&&s.push(`buildingId=${e.buildingId}`);const a=`${this._api}/orientation?${s.join("&")}`;return this._request.get(a)}searchByCategory(e){const{center:t,distance:i,page:n=k.KL,offset:r=k.e$}=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=(0,L.A)(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=T(e,((e,t)=>"bounds"===t?`bbox=${e.flat().join()}`:"center"===t?`center=${e.join()}`:"excludedCategories"===t?`excludeCategories=${(0,L.A)(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=T(e.data.result.pois,(e=>{let i=ce(e,((e,t)=>we(Be,t)));return t&&t(i)&&(i=Object.assign({},i,t(i))),i})),i(e)})).catch(n)}))}}function Me(e){return"string"==typeof e&&Boolean(e.trim())}class xe{_api="/api/v3/route/query";_request;constructor(){this._request=new P}search(e){const{points:t,vehicle:i=o.$O.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)}}}var Ce=i(4969);const Ee={lineWidth:3,lineColor:"#A5E3FF",lineOpacity:1},Oe={fontColor:"#8c8c8c",activeFontColor:"#fff",backgroundColor:"#fff",activeBackgroundColor:"#074769",itemSize:50,itemCount:4,defaultFolded:!1},Pe=(0,Ce.y)(window.navigator.language)??o.ys.ENGLISH,Fe=new Ae,$e=new Ie,je=new ke;async function Te(e){try{return(await Fe.searchByIds(e)).data.result.buildings[0]}catch(e){throw new Error(e)}}async function Ve(e){try{const t=(await Fe.searchByFloorId(e)).data.result.buildings[0].buildingId;return await Te(t)}catch(e){throw new Error(e)}}const Re="reserve_mapxus-building-fill";var Ne={value:()=>{}};function De(){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 He(n)}function He(e){this._=e}function We(e,t){for(var i,n=0,r=e.length;n<r;++n)if((i=e[n]).name===t)return i.value}function ze(e,t,i){for(var n=0,r=e.length;n<r;++n)if(e[n].name===t){e[n]=Ne,e=e.slice(0,n).concat(e.slice(n+1));break}return null!=i&&e.push({name:t,value:i}),e}He.prototype=De.prototype={constructor:He,on:function(e,t){var i,n=this._,r=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var i="",n=e.indexOf(".");if(n>=0&&(i=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}}))}(e+"",n),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=ze(n[i],e.name,t);else if(null==t)for(i in n)n[i]=ze(n[i],e.name,null);return this}for(;++o<s;)if((i=(e=r[o]).type)&&(i=We(n[i],e.name)))return i},copy:function(){var e={},t=this._;for(var i in t)e[i]=t[i].slice();return new He(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 Ge=De;class Ze{_historyBuilding;_historyOrdinal;_selectedBuildings;static instance;constructor(){this._historyBuilding=new Map,this._historyOrdinal=new Map,this._selectedBuildings=new Set}static getInstance(){return Ze.instance||(Ze.instance=new Ze),Ze.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 Ye{static instance;_upperBuildings;_lowerBuildings;_hiddenBuildings;constructor(){this._upperBuildings=new Set,this._lowerBuildings=new Set,this._hiddenBuildings=new Set}static getInstance(){return Ye.instance||(Ye.instance=new Ye),Ye.instance}getUpperBuildings(){return this._upperBuildings}getLowerBuildings(){return this._lowerBuildings}getHiddenBuildings(){return this._hiddenBuildings}}var Xe=i(8301),Ue=i(1625),Je=i(1882);const qe=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&&!(0,Je.A)(s):i(s,a)))var a=s,l=o}return l};const Ke=function(e,t){return e<t};const Qe=function(e,t){return e&&e.length?qe(e,(0,g.A)(t,2),Ke):void 0};var et=i(1917);const tt=function(){return et.A.Date.now()};var it=i(751),nt=Math.max,rt=Math.min;const ot=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 _(e){var i=e-l;return void 0===l||i>=t||i<0||d&&e-c>=o}function f(){var e=tt();if(_(e))return g(e);a=setTimeout(f,function(e){var i=t-(e-l);return d?rt(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=tt(),i=_(e);if(n=arguments,r=this,l=e,i){if(void 0===a)return function(e){return c=e,a=setTimeout(f,t),u?p(e):s}(l);if(d)return clearTimeout(a),a=setTimeout(f,t),p(l)}return void 0===a&&(a=setTimeout(f,t)),s}return t=(0,it.A)(t)||0,(0,G.A)(i)&&(u=!!i.leading,o=(d="maxWait"in i)?nt((0,it.A)(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(tt())},m};var st=i(8300);const at=function(e,t){return!!(null==e?0:e.length)&&pe(e,t,0)>-1};const lt=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};var ct=i(4099),ut=i(9857);const dt=function(){};var ht=i(9959),pt=ut.A&&1/(0,ht.A)(new ut.A([,-0]))[1]==1/0?function(e){return new ut.A(e)}:dt;const _t=pt;const ft=function(e,t,i){var n=-1,r=at,o=e.length,s=!0,a=[],l=a;if(i)s=!1,r=lt;else if(o>=200){var c=t?null:_t(e);if(c)return(0,ht.A)(c);s=!1,r=ct.A,l=new st.A}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 gt=function(e,t){return e&&e.length?ft(e,(0,g.A)(t,2)):[]};var mt=i(2634);const yt=function(e,t){var i=[];return b(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i};const vt=function(e,t){return((0,L.A)(e)?mt.A:yt)(e,(0,g.A)(t,3))};var bt=i(3456),wt=0;const Lt=function(e){var t=++wt;return(0,bt.A)(e)+t};var It=i(3736);const St=function(e,t){var i;return b(e,(function(e,n,r){return!(i=t(e,n,r))})),!!i};const At=function(e,t,i){if(!(0,G.A)(i))return!1;var n=typeof t;return!!("number"==n?(0,v.A)(i)&&(0,z.A)(t,i.length):"string"==n&&t in i)&&(0,N.A)(i[t],e)};const Bt=function(e,t,i){var n=(0,L.A)(e)?It.A:St;return i&&At(e,t,i)&&(t=void 0),n(e,(0,g.A)(t,3))},kt="Indoor_selectedFloorChanged",Mt="Indoor_selectedBuildingChanged",xt="Indoor_mapxusMapLoaded",Ct="Indoor_maplibreMapLoaded",Et="mapxus-building-line",Ot="assistant-mapxus-level-outline",Pt=new Ie;class Ft extends r.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=Ge(kt);_fitBuildingBounds;_boundsPadding;_startWithIndoorView;_maplibreMapLoaded=!1;_indoorMapLoaded=!1;_isVenueMode;_isMaskMode;_upperLevels=new Set;_lowerLevels=new Set;_featureIncomplete=!1;_dragPan;_isNewBuilding=!1;_buildingBounds;_history=Ze.getInstance();_layerBuildings=Ye.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.MA.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.MA.SWITCHED_BY_VENUE,this._isMaskMode=c,this._fitBuildingBounds=a,this._boundsPadding=l,this._buildingHighlightStyle=r?Object.assign({},Ee,r):Ee,this._hiddenBuildings=new Set,this._loadData()}destroy(){this._isDestroyed||(this._isDestroyed=!0,this._dispatch.on(`.${kt}`,null),this.removeAllListeners(Mt),this.removeAllListeners(Ct),this.removeAllListeners(xt),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 vt(r,n?t=>t.properties.id===e&&n(t):t=>t.properties.id===e)}async switchFloorByOrdinal(e){this._updateFloorState(e),this._dispatch.call(kt,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=s(this._map.getStyle()),this._copyOverlapLayers(),this._addBuildingHighlightLayer(),this._addCustomLevelFillLayer(),this._isMaskMode&&this._addBuildingMaskLayer(),this._outdoorMapShown||this._setOutdoorVisibility(!1)}setSelectedBuildingBorderStyle(e){e?(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,e),this._map.getLayer(Ot)&&(this._map.setPaintProperty(Ot,"line-color",this._buildingHighlightStyle.lineColor),this._map.setPaintProperty(Ot,"line-opacity",this._buildingHighlightStyle.lineOpacity),this._map.setPaintProperty(Ot,"line-width",this._buildingHighlightStyle.lineWidth),this._map.setPaintProperty(Ot,"line-offset",this._buildingHighlightStyle.lineWidth))):(this._buildingHighlightStyle=Object.assign({},this._buildingHighlightStyle,{"line-opacity":0}),this._map.getLayer(Ot)&&this._map.setPaintProperty(Ot,"line-opacity",0))}onMapChange(e){const t=Lt(`${kt}.`);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(Mt,{buildingId:this._curBuildingId,ordinal:this._ordinal,dragPan:this._dragPan}),this._indoorMapLoaded||(this._indoorMapLoaded=!0,this.emit(xt)),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(Et)&&this.getFeaturesById(this._curBuildingId,{layerIds:[Et]})[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",Et]});if(i.length){const e=(0,Xe.A)(i,(e=>e.layer.id.startsWith("mapxus-level-fill")));t=e?(0,Xe.A)(i,(t=>t.properties.id===e.properties["ref:building"])):(0,Xe.A)(i,(e=>{const{id:t,level_ids:i}=e.properties;return!this._hiddenBuildings.has(t)&&!Bt(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 Te(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=ot((()=>{this._maplibreMapLoaded||(this._maplibreMapLoaded=!0,this.emit(Ct),(!this._startWithIndoorView||this._map.getZoom()<14)&&(this._indoorMapLoaded=!0,this.emit(xt))),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=vt(t,(e=>"indoor-planet"===e.source));return gt(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=(0,Ue.A)(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(l);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}})}_addBuildingMaskLayer(){if(this._map.getLayer(Re))return;const e=this._originIndoorLayers.find((({id:e})=>e===Et));if(e){const t=Object.assign({},e,{id:Re,layout:Object.assign({},e.layout??{},{visibility:"visible"}),paint:Object.assign({},e.paint??{},{"fill-opacity":0})});this._map.addLayer(t,Et)}}_setBuildingLineOpacity(){this._isMaskMode&&this._map.getLayer(Et)&&this._map.setPaintProperty(Et,"fill-opacity",["case",["in",["get","id"],["literal",[...this._upperBuildings]]],0,["in",["get","id"],["literal",[...this._hiddenBuildings]]],0,1])}_addBuildingHighlightLayer(){if(!this._map.getLayer(Ot)){const{lineWidth:e,lineOpacity:t,lineColor:i}=this._buildingHighlightStyle;this._map.addLayer({id:Ot,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(Ot,r.id)}}_filterBuildingHighlight(){this._map.getLayer(Ot)&&this._map.setFilter(Ot,["==","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=(0,Ue.A)(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=(0,Xe.A)(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[(0,Ue.A)(i?.split(",")||[],(e=>e===r))]??null}t||(t=Qe(o,(e=>Math.abs(Number(e)-.1))))}}return t}_getBuildingsOfBbox(e){let t=this._map.queryRenderedFeatures({layers:[Et]});return t=gt(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=gt(vt(this._features,(e=>e.layer.id===Et)),(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 Pt.searchByIds(n);e=function(e){const{address:t,buildings:i,id:n,name:r,type:o}=e;return{layer:{id:"mapxus-venue-fill"},properties:{...I(t,((e,t,i)=>Object.assign(e,"default"===i?{"addr:street":t.street,"addr:housenumber":t.housenumber}:{[`addr:street:${i}`]:t.street})),{}),...m(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.",{cause:e})}this._curVenueFeature=e}this._curBuildingFeature=e,this._curBuildingId=i,this._history.addHistoryBuilding(i);const s=o.split(",");if(t){const i=s[(0,Ue.A)(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:[Et]})[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 $t="Poi_poiClick";class jt{_map;_layerIds=[];_dispatch=Ge($t);_debounceQueryFeatures;constructor(e){this._map=e,this._bindEvents()}destroy(){this._dispatch.on(`.${$t}`,null),this._debounceQueryFeatures?.cancel()}onPoiClick(e){const t=Lt(`${$t}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}_bindEvents(){this._map.on("styledata",this._debounceQueryFeatures=ot((()=>this._queryPoiLayers()),300)),this._initPoiClick()}_queryPoiLayers(){this._layerIds=T(vt(s(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=(0,Xe.A)(t,(e=>e.layer.id.indexOf("mapxus-poi")>-1));if(i?.properties){const{"ref:level":n=null,"ref:building":r}=i.properties,o=(0,Xe.A)(t,(e=>e.properties.id===r))??null,s=(0,Xe.A)(t,(e=>e.properties.id===o?.properties?.["ref:venue"]))??null,{floorName:a,ordinal:l}=this._getFloorDataByFloorId(n,o);this._dispatch.call($t,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=(0,Ue.A)(a,(t=>t===e));l>-1&&(i=(o?.split(",")||[])[l]??null,n=(s?.split(",")||[])[l]??null)}return{floorName:i,ordinal:n}}}function Tt(e){e.parentNode&&e.parentNode.removeChild(e)}function Vt(e,t,i){const n=document.createElement(e);return t&&(n.className=t),i&&i.appendChild(n),n}const Rt=function(e){return"number"==typeof e||(0,fe.A)(e)&&"[object Number]"==(0,_e.A)(e)};class Nt{_map;_maplibre;_buildingId;_features;_$container;_$listContainer;_$buildingList;_listHeight;_language;_visible;_position="top-right";_isMobileMode;_isListShown=!1;constructor(e,t){this._map=e,this._language=e.getLanguage(),this._visible=t??!0,this._detectDeviceMode()}onAdd(e){return this._maplibre=e,this._$container=Vt("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._bindEvents(),this._$container}onRemove(){Tt(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),Rt(i)?e.insertBefore(r,e.children[i]):e.append(r),this._updateBuildingListLayout(t))}else Rt(i)&&n.children[i]!==r&&(n.removeChild(r),n.insertBefore(r,n.children[i]))}_bindEvents(){this._maplibre.on("moveend",(()=>this._refresh())),this._map.onMapChangeListener((e=>{const t=e.building?.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=Vt(e,"mapxus-building-filter-icon");return this._bindMouseOnEvents(t,!1),this._bindMobileTouchEvents(t),t}_buildingNameListCreate(e){return this._$listContainer=Vt(e,"mapxus-building-name-layout"),this._$listContainer.style.display="none",this._$listContainer.style.top="20px",this._$buildingList=Vt(e,"mapxus-building-name-list",this._$listContainer),this._bindMouseOnEvents(this._$listContainer,!0),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._language}`]??n;(0,Xe.A)(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.replaceChildren()}_setBuildingListHeight(e){const t=e.map((e=>{const t=e?.properties?.[`name:${this._language}`]??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=Vt(e,"mapxus-building-name"+(n?" active":""));return r.dataset.id=i,r.innerText=t,this._buildingNameClickEvent(r),r}_toggleList(e){this._isListShown=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)})}_bindMouseOnEvents(e,t){e.onmouseenter=()=>{this._isMobileMode||this._toggleList(!0)},t&&(e.onmouseleave=()=>this._toggleList(!1))}_bindMobileTouchEvents(e){window.addEventListener("resize",(()=>this._detectDeviceMode())),e.ontouchend=()=>this._toggleList(!this._isListShown)}_$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")}_detectDeviceMode(){this._isMobileMode=window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=768}}const Dt=function(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e};var Ht=i(9008);const Wt=function(e){return"function"==typeof e?e:Ht.A};const zt=function(e,t){return((0,L.A)(e)?Dt:b)(e,Wt(t))};var Gt=Math.max,Zt=Math.min;const Yt=function(e,t,i){return e>=Zt(t,i)&&e<Gt(t,i)};var Xt=i(8776);const Ut=function(e,t,i){return t=(0,Xt.A)(t),void 0===i?(i=t,t=0):i=(0,Xt.A)(i),e=(0,it.A)(e),Yt(e,t,i)};class Jt{_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({},Oe,i):Oe,this._isEnabled=n,this._bindEvents()}onAdd(e){return this._maplibre=e,this._addMapMoveEventListener(),this._container=Vt("div","maplibregl-ctrl mapxus-ctrl-floors hidden"),this._container}onRemove(){this._debounceScroll&&this._debounceScroll.cancel(),this._clearScrollEventListener&&this._clearScrollEventListener(),Tt(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),Rt(i)?e.insertBefore(r,e.children[i]):e.append(r),this._show(),this._scrollCenterActiveFloor())}else Rt(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(Mt,(({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=Vt("div","mapxus-ctrl-floors-expanded "+(r?"hidden":""),e);if(this._floorNames.length>1){Vt("div","mapxus-ctrl-floors-close",s).onclick=t}const a=Vt("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=Vt("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=ot((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=Vt("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.replaceChildren(),this._componentDidMount=!1}_$createScrollButton(e,t){return Vt("div",`mapxus-ctrl-floors-arrow mapxus-ctrl-floors-floor ${t}`,e)}_$createFloors(e){const{fontColor:t,itemSize:i}=this._style;let n;zt(this._floorNames,((r,o)=>{n=Vt("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),zt(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 Ut(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 qt{_container;_isEnabled;constructor(e){this._isEnabled=e?.enabled??!0}onAdd(e){if(this._container=Vt("div","maplibregl-ctrl mapxus-ctrl-logo",e.getContainer()),this._isEnabled){const e=Vt("a","mapxus-logo",this._container);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)}return this._container}onRemove(){Tt(this._container)}getDefaultPosition(){return"bottom-left"}}class Kt{_container;_anchor;_theme;constructor(e){this._theme=e.theme?e.theme:"default"}onAdd(e){return this._container=Vt("div","maplibregl-ctrl mapxus-ctrl-attribution",e.getContainer()),this._anchor=Vt("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(){Tt(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":"©Mapxus driven by Kawasaki ©OpenStreetMap contributors","landsD"===e&&(this._anchor.href="https://www.map.gov.hk/gm/")}}class Qt{_container;_$icon;_removeClickEventListener;onAdd(e){return this._container=Vt("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(),Tt(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)}}var ei=i(7463);function ti(e){return`${k.hl}/api/v3/tiles/styles/${e}`}const ii=ti("christmas_mims2_v1"),ni=ti("common_mims2_v1"),ri=ti("halloween_mims2_v1"),oi=ti("mappybee_mims2_v1"),si=ti("mapxus_mims2_v1"),ai=ti("lands_d_mims2_v1"),li=ti("mapxus_mims2_v5");class ci{_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 ui{_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 di{_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 hi{_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 pi="Map_mapClick",_i="Map_pointClick",fi="Map_isRenderComplete",gi="Map_isDestroyed";class mi{_appId;_map;_indoor;_poi;_floorsControl;_buildingFilterControl;_attributionControl;_initialHiddenLayers;_language;_dispatch=Ge(pi,_i,fi,gi);_fitBuildingBounds;_history=Ze.getInstance();_hiddenBuildings=Ye.getInstance().getHiddenBuildings();_debounceHTTPErrorHandler;_debounceTilesFilter;_transformRequestHandler;isDestroyed=!1;switchOutdoor;switchBuilding;buildingSelector;floorSelector;constructor(e){const{map:t,appId:i,secret:n,poiId:r,floorId:s,buildingId:a,venueId:l,theme:c=o.SV.MAPXUS_DEFAULT,floorSelectorEnabled:u,buildingSelectorEnabled:d,outdoorMapShown:h,collapseCopyright:p=!1,floorSwitchMode:_,maskNonSelectedAreas:f,fitBuildingBounds:g=!1,boundsPadding:m=30,selectedBuildingBorderStyle:y,floorSelectorStyle:v,language:b=Pe,autoSelectBuilding:w=!1,transformRequest:L=null,mapxusLogoEnabled:I=!0,platform:S}=e;if(!t)throw new Error("Outdoor Map parameter missing.");if(!i||!n)throw new Error("Permission parameter missing.");S&&M.o.setPlatform(S),P.setHeaders(i,n).then((()=>{this._appId=i,this._map=t,this._language=b,this._indoor=new Ft({map:this._map,startWithIndoorView:Boolean(l||a||s||r),outdoorMapShown:h,floorSwitchMode:_,fitBuildingBounds:g,boundsPadding:m,maskNonSelectedAreas:f,selectedBuildingBorderStyle:y}),this._poi=new jt(this._map),this._fitBuildingBounds=g,this._transformRequestHandler=L,this._resourceRequestTransform(),this._setStyle(this._getStyleUrl(c)),this._checkMapZoom(),p?this._attributionControl=new Qt:(this._attributionControl=new Kt({theme:c}),this._addControl(new qt({enabled:I}))),this._addControl(this._attributionControl),this._addControl(this._buildingFilterControl=new Nt(this,d)),this._addControl(this._floorsControl=new Jt(this._indoor,{style:v,enabled:u})),r?this._selectPoiById(r):s?this.selectFloorById(s):a?this.selectBuildingById(a):l&&this.selectVenueById(l),this.switchOutdoor=new ci(this._indoor),this.switchBuilding=new ui(this._indoor),this.buildingSelector=new di(this._buildingFilterControl),this.floorSelector=new hi(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(_i,null,{point:t,coordinate:i}),this._dispatch.call(pi,null,{coordinate:i,venue:this.venue,building:this.building,floor:this.floor})})),this._map.on("error",this._debounceHTTPErrorHandler=ot((e=>this._updatePermission(e,i,n)),350)),this._indoor.once(Ct,(()=>{this._showIndoorLayers(),this.setLanguage(this._language)})),this._indoor.once(xt,(()=>{w&&this._map.on("moveend",(()=>this._selectCenterBuilding())),this._dispatch.call(fi)}))})).catch((e=>{throw e}))}renderComplete(e){const t=Lt(`${fi}.`);this._dispatch.on(t,e)}destroyed(e){const t=Lt(`${gi}.`);this._dispatch.on(t,(()=>{e(),this._dispatch.on(t,null),0===this._dispatch._[gi].length&&(delete this._dispatch,Object.freeze(this))}))}setTransformRequest(e){this._transformRequestHandler=e}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=(0,Xe.A)(e,(e=>Rt(t)?e.properties.ordinal===t+"":e.layer.id.startsWith("mapxus-level-fill"))),s&&(o=(0,Xe.A)(n,(e=>e.properties.id===s.properties["ref:building"])),r=(0,Xe.A)(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 Ve(e),n=S(t),r=!0;const{maxLat:i,maxLon:o,minLat:s,minLon:a}=t.bbox;this._indoor.setBuildingBounds([[a,s],[o,i]])}else n=(0,Xe.A)(this._indoor?.features||[],(t=>t.properties?.level_ids?.includes(e)&&"mapxus-building-line"===t.layer.id))??null,n?r=!1:(t=await Ve(e),n=S(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 Te(e),i=S(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 Te(e),i=S(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 $e.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=Lt(`${pi}.`);return this._dispatch.on(t,e),{unsubscribe:()=>this._dispatch.on(t,null)}}onPoiClickListener(e){return this._poi?.onPoiClick(e)}onPointClickListener(e){const t=Lt(`${_i}.`);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=ot((()=>this._setIndoorFilter()),250))}setSelectedBuildingBorderStyle(e){return this._indoor?.setSelectedBuildingBorderStyle(e),this}_getStyleUrl(e){let t;if(ve(o.SV).indexOf(e)>-1)switch(e){case o.SV.CHRISTMAS:t=ii;break;case o.SV.HALLOWEEN:t=ri;break;case o.SV.MAPPY_BEE:t=oi;break;case o.SV.MAPXUS:t=si;break;case o.SV.COMMON:t=ni;break;case o.SV.LANDS_D:t=ai;break;default:t=li}else t=function(e){return ti(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 je.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(((e,t)=>{const{host:i}=new URL(e);return i.includes("map-api")&&i.includes("mapxus")?P.getDefaultRequestParams(e):this._transformRequestHandler?this._transformRequestHandler(e,t):{url:e}}))}_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._initialHiddenLayers=s(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(){zt(this._initialHiddenLayers,(({id:e})=>{this._map.getLayer(e)&&this._map.setLayoutProperty(e,"visibility","visible")}))}_updatePermission(e,t,i){401===e.error?.status&&P.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=gt(o,"properties.id"),o=vt(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!==gi&&e.hasOwnProperty(t)&&e[t].forEach((({name:e})=>{this._dispatch.on(`${t}.${e}`,null)}));ei.t.getInstance().deleteToken(this._appId,o.en.Map),this._indoor.destroy(),this._poi.destroy(),Object.keys(this).forEach((e=>{"isDestroyed"!==e&&"_dispatch"!==e&&delete this[e]})),this._dispatch.call(gi)}}async function yi(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 vi{_maplibreMap;_layerId;_sourceId;_imageName="poi-01";_imageSize=.75;_iconAnchor="bottom";constructor(e){this._maplibreMap=e;const t=Lt();this._layerId=`MXMap_preset_marker_layer_${t}`,this._sourceId=`MXMap_preset_marker_source_${t}`}async setIcon(e){e&&await yi(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=T(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:T(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&&Rt(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 bi=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},wi={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}},Li="mmws-source-line-solid",Ii="mmws-layer-line-solid",Si="mmws-layer-icon-line-symbol",Ai="mmws-source-line-dashed",Bi="mmws-layer-line-dashed",ki="mmws-source-icon-connector",Mi="mmws-layer-icon-connector",xi="mmws-source-icon-marker",Ci="mmws-layer-icon-marker",Ei=[Ii,Si,Bi,Mi,Ci],Oi=[Li,Ai,ki,xi];class Pi{_maplibreMap;_routeStyle=wi;_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((0,L.A)(e)&&e.length){const t=e.slice(1,e.length-1);this._routeStyle.markers={from:e[0],to:bi(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(Li,Si),!0!==this._routeStyle.disableDashedLine&&this._renderDashedLines(s),this._renderConnectors(o),this._renderMarkers(a)}remove(){Ei.forEach((e=>{this._maplibreMap.getLayer(e)&&this._maplibreMap.removeLayer(e)})),Oi.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=[];zt(e,((i,o)=>{const{venue_id:s,building_id:l,floor_id:c,ordinal:u,sign:d,type:h,interval:[p,_]}=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],{...Fi({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[_],{...Fi({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,_+1),Fi({venue_id:s,building_id:l,floor_id:c,ordinal:u,isShuttleBus:$i(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:_,building_id:f,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],Fi({venue_id:c,building_id:u,floor_id:d,ordinal:h}))),w&&o.push(this._createLineFeature(`dashed-line-${o.length}`,[v,w],Fi({venue_id:_,building_id:f,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]],Fi({venue_id:e,building_id:i,floor_id:n,ordinal:r}))),s.push(this._createIconFeature(`marker-${s.length}`,L[l],{...Fi({venue_id:e,building_id:i,floor_id:n,ordinal:r,markerType:`stops_${l}`}),icon:this._routeStyle.markers.stops[l]??bi(this._routeStyle.markers.stops),iconSize:this._routeStyle.markerIconSize}))})),s.push(this._createIconFeature(`marker-${s.length}`,b??y,{...Fi({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,{...Fi({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(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(Li,e),this._addLineLayer(Li,Ii,{"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(Ai,e),this._addLineLayer(Ai,Bi,{"line-color":this._routeStyle.dashedLineColor,"line-width":this._routeStyle.dashedLineWidth,"line-dasharray":[.1,1.8]})}_renderConnectors(e){this._addCollectionSource(ki,e),this._addIconLayer(ki,Mi)}_renderMarkers(e){this._addCollectionSource(xi,e),this._addIconLayer(xi,Ci,{"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=ji(this._routeStyle,e??wi),e){if(Object.keys(this._styleDiffs).length){const e={...this._routeStyle.lineSymbol,...this._styleDiffs.lineSymbol??{}},t=this._styleDiffs.markers;let i=this._routeStyle.markers;const 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=wi}async _loadMarkerIcons(){const{markers:e,lineSymbol:t}=this._styleDiffs;if(t?.image&&await yi(this._maplibreMap,t.image),e&&Object.keys(e).length){const{from:t,to:i,stops:n}=e;if(t&&await yi(this._maplibreMap,t),i&&await yi(this._maplibreMap,i),n&&n.length){const e=n.filter((e=>!!e));e.length&&await Promise.all(e.map((e=>yi(this._maplibreMap,e))))}}}async _updateLayers(){if(!this._maplibreMap.getLayer(Ii))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(Ii,"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(Ii,"line-width",r),"boolean"==typeof s?s?this._maplibreMap.setPaintProperty(Bi,"line-color","transparent"):(this._maplibreMap.setPaintProperty(Bi,"line-color",this._routeStyle.dashedLineColor),this._maplibreMap.setPaintProperty(Bi,"line-width",this._routeStyle.dashedLineWidth)):!0!==this._routeStyle.disableDashedLine&&(i&&this._maplibreMap.setPaintProperty(Bi,"line-color",i),void 0!==o&&o+""&&this._maplibreMap.setPaintProperty(Bi,"line-width",o)),void 0!==a&&a+""&&this._filterRouteOpacity(),void 0!==c&&c+""&&this._maplibreMap.setLayoutProperty(Ci,"icon-size",c),u&&Object.keys(u).length){const{from:e,to:t,stops:i}=u,n=this._maplibreMap.getSource(xi),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]??bi(i)}return n})),n.setData(r)}if(d){const{image:e,size:t,spacing:i}=d;void 0!==e&&this._maplibreMap.setLayoutProperty(Si,"icon-image",e),void 0!==t&&t+""&&this._maplibreMap.setLayoutProperty(Si,"icon-size",t),void 0!==i&&i+""&&this._maplibreMap.setLayoutProperty(Si,"symbol-spacing",i)}void 0!==l&&l+""&&(this._maplibreMap.setPaintProperty(Ii,"line-opacity",["case",["==",["get","floor_id"],null],l,1]),this._maplibreMap.setPaintProperty(Si,"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]}Ei.forEach((t=>{this._maplibreMap.getLayer(t)&&this._maplibreMap.setPaintProperty(t,t.includes("layer-line")?"line-opacity":"icon-opacity",e)}))}}function Fi(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,Rt(t)?t+"":t])))}function $i(e){return Ut(e,104,108)}function ji(e,t){const i={};for(const n in t){const r=e[n],o=t[n];if("markers"===n||"lineSymbol"===n)if((0,L.A)(o)){const e=o.slice(1,o.length-1);i[n]={from:o[0],to:bi(o),stops:e.length?e:[o[0]]}}else{const e=ji(r,o);Object.keys(e).length&&(i[n]=e)}else o+""!=r+""&&(i[n]="stops"===n?o??[null]:o)}return i}var Ti=i(531),Vi=i(7726),Ri=exports;for(var Ni in n)Ri[Ni]=n[Ni];n.__esModule&&Object.defineProperty(Ri,"__esModule",{value:!0})})();