vcm-compiled_api_es6.js 914 KB
Newer Older
Patrick's avatar
Patrick committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/************************************************************************************
* Project: virtualcityMAP
* Copyright © 2011-2019 virtualcitySYSTEMS GmbH, Berlin, Germany. All rights reserved.
*************************************************************************************/


(function(e){var t={};function i(s){if(t[s])return t[s].exports;var r=t[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(s,r,function(t){return e[t]}.bind(null,r));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=642)})([,function(e,t,i){(function(e){(function(t,i){e.exports=i()})(0,function(){"use strict";var t,s;function r(){return t.apply(null,arguments)}function n(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function c(e){return void 0===e}function h(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var i,s=[];for(i=0;i<e.length;++i)s.push(t(e[i],i));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function g(e,t){for(var i in t)m(t,i)&&(e[i]=t[i]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,i,s){return qi(e,t,i,s,!0).utc()}function y(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(e){return null==e._pf&&(e._pf=y()),e._pf}function f(e){if(null==e._isValid){var t=_(e),i=s.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function v(e){var t=p(NaN);return null!=e?g(_(t),e):_(t).userInvalidated=!0,t}s=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,s=0;s<i;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var L=r.momentProperties=[];function M(e,t){var i,s,r;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=_(t)),c(t._locale)||(e._locale=t._locale),L.length>0)for(i=0;i<L.length;i++)s=L[i],r=t[s],c(r)||(e[s]=r);return e}var b=!1;function w(e){M(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,r.updateOffset(this),b=!1)}function T(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function S(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function C(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=S(t)),i}function k(e,t,i){var s,r=Math.min(e.length,t.length),n=Math.abs(e.length-t.length),a=0;for(s=0;s<r;s++)(i&&e[s]!==t[s]||!i&&C(e[s])!==C(t[s]))&&a++;return a+n}function E(e){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function I(e,t){var i=!0;return g(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),i){for(var s,n=[],a=0;a<arguments.length;a++){if(s="","object"===typeof arguments[a]){for(var o in s+="\n["+a+"] ",arguments[0])s+=o+": "+arguments[0][o]+", ";s=s.slice(0,-2)}else s=arguments[a];n.push(s)}E(e+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)},t)}var D,P={};function O(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),P[e]||(E(t),P[e]=!0)}function Y(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e){var t,i;for(i in e)t=e[i],Y(t)?this[i]=t:this["_"+i]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function A(e,t){var i,s=g({},e);for(i in t)m(t,i)&&(o(e[i])&&o(t[i])?(s[i]={},g(s[i],e[i]),g(s[i],t[i])):null!=t[i]?s[i]=t[i]:delete s[i]);for(i in e)m(e,i)&&!m(t,i)&&o(e[i])&&(s[i]=g({},s[i]));return s}function j(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)m(e,t)&&i.push(t);return i};var F={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N(e,t,i){var s=this._calendar[e]||this._calendar["sameElse"];return Y(s)?s.call(t,i):s}var H={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function R(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}var z="Invalid date";function G(){return this._invalidDate}var V="%d",B=/\d{1,2}/;function U(e){return this._ordinal.replace("%d",e)}var W={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function q(e,t,i,s){var r=this._relativeTime[i];return Y(r)?r(e,t,i,s):r.replace(/%d/i,e)}function J(e,t){var i=this._relativeTime[e>0?"future":"past"];return Y(i)?i(t):i.replace(/%s/i,t)}var K={};function Z(e,t){var i=e.toLowerCase();K[i]=K[i+"s"]=K[t]=e}function Q(e){return"string"===typeof e?K[e]||K[e.toLowerCase()]:void 0}function $(e){var t,i,s={};for(i in e)m(e,i)&&(t=Q(i),t&&(s[t]=e[i]));return s}var X={};function ee(e,t){X[e]=t}function te(e){var t=[];for(var i in e)t.push({unit:i,priority:X[i]});return t.sort(function(e,t){return e.priority-t.priority}),t}function ie(e,t,i){var s=""+Math.abs(e),r=t-s.length,n=e>=0;return(n?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+s}var se=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,re=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ne={},ae={};function oe(e,t,i,s){var r=s;"string"===typeof s&&(r=function(){return this[s]()}),e&&(ae[e]=r),t&&(ae[t[0]]=function(){return ie(r.apply(this,arguments),t[1],t[2])}),i&&(ae[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function le(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ce(e){var t,i,s=e.match(se);for(t=0,i=s.length;t<i;t++)ae[s[t]]?s[t]=ae[s[t]]:s[t]=le(s[t]);return function(t){var r,n="";for(r=0;r<i;r++)n+=Y(s[r])?s[r].call(t,e):s[r];return n}}function he(e,t){return e.isValid()?(t=ue(t,e.localeData()),ne[t]=ne[t]||ce(t),ne[t](e)):e.localeData().invalidDate()}function ue(e,t){var i=5;function s(e){return t.longDateFormat(e)||e}re.lastIndex=0;while(i>=0&&re.test(e))e=e.replace(re,s),re.lastIndex=0,i-=1;return e}var de=/\d/,me=/\d\d/,ge=/\d{3}/,pe=/\d{4}/,ye=/[+-]?\d{6}/,_e=/\d\d?/,fe=/\d\d\d\d?/,ve=/\d\d\d\d\d\d?/,Le=/\d{1,3}/,Me=/\d{1,4}/,be=/[+-]?\d{1,6}/,we=/\d+/,Te=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ce=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,Ee=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ie={};function De(e,t,i){Ie[e]=Y(t)?t:function(e,s){return e&&i?i:t}}function Pe(e,t){return m(Ie,e)?Ie[e](t._strict,t._locale):new RegExp(Oe(e))}function Oe(e){return Ye(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,s,r){return t||i||s||r}))}function Ye(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var xe={};function Ae(e,t){var i,s=t;for("string"===typeof e&&(e=[e]),h(t)&&(s=function(e,i){i[t]=C(e)}),i=0;i<e.length;i++)xe[e[i]]=s}function je(e,t){Ae(e,function(e,i,s,r){s._w=s._w||{},t(e,s._w,s,r)})}function Fe(e,t,i){null!=t&&m(xe,e)&&xe[e](t,i._a,i,e)}var Ne=0,He=1,Re=2,ze=3,Ge=4,Ve=5,Be=6,Ue=7,We=8;function qe(e){return Je(e)?366:365}function Je(e){return e%4===0&&e%100!==0||e%400===0}oe("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),oe(0,["YY",2],0,function(){return this.year()%100}),oe(0,["YYYY",4],0,"year"),oe(0,["YYYYY",5],0,"year"),oe(0,["YYYYYY",6,!0],0,"year"),Z("year","y"),ee("year",1),De("Y",Te),De("YY",_e,me),De("YYYY",Me,pe),De("YYYYY",be,ye),De("YYYYYY",be,ye),Ae(["YYYYY","YYYYYY"],Ne),Ae("YYYY",function(e,t){t[Ne]=2===e.length?r.parseTwoDigitYear(e):C(e)}),Ae("YY",function(e,t){t[Ne]=r.parseTwoDigitYear(e)}),Ae("Y",function(e,t){t[Ne]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return C(e)+(C(e)>68?1900:2e3)};var Ke,Ze=$e("FullYear",!0);function Qe(){return Je(this.year())}function $e(e,t){return function(i){return null!=i?(et(this,e,i),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function et(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&Je(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),rt(i,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](i))}function tt(e){return e=Q(e),Y(this[e])?this[e]():this}function it(e,t){if("object"===typeof e){e=$(e);for(var i=te(e),s=0;s<i.length;s++)this[i[s].unit](e[i[s].unit])}else if(e=Q(e),Y(this[e]))return this[e](t);return this}function st(e,t){return(e%t+t)%t}function rt(e,t){if(isNaN(e)||isNaN(t))return NaN;var i=st(t,12);return e+=(t-i)/12,1===i?Je(e)?29:28:31-i%7%2}Ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},oe("M",["MM",2],"Mo",function(){return this.month()+1}),oe("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),oe("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Z("month","M"),ee("month",8),De("M",_e),De("MM",_e,me),De("MMM",function(e,t){return t.monthsShortRegex(e)}),De("MMMM",function(e,t){return t.monthsRegex(e)}),Ae(["M","MM"],function(e,t){t[He]=C(e)-1}),Ae(["MMM","MMMM"],function(e,t,i,s){var r=i._locale.monthsParse(e,s,i._strict);null!=r?t[He]=r:_(i).invalidMonth=e});var nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at="January_February_March_April_May_June_July_August_September_October_November_December".split("_");function ot(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months["standalone"]}var lt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function ct(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function ht(e,t,i){var s,r,n,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)n=p([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(n,"").toLocaleLowerCase();return i?"MMM"===t?(r=Ke.call(this._shortMonthsParse,a),-1!==r?r:null):(r=Ke.call(this._longMonthsParse,a),-1!==r?r:null):"MMM"===t?(r=Ke.call(this._shortMonthsParse,a),-1!==r?r:(r=Ke.call(this._longMonthsParse,a),-1!==r?r:null)):(r=Ke.call(this._longMonthsParse,a),-1!==r?r:(r=Ke.call(this._shortMonthsParse,a),-1!==r?r:null))}function ut(e,t,i){var s,r,n;if(this._monthsParseExact)return ht.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(r=p([2e3,s]),i&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[s]||(n="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[s]=new RegExp(n.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(i&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!i&&this._monthsParse[s].test(e))return s}}function dt(e,t){var i;if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=C(t);else if(t=e.localeData().monthsParse(t),!h(t))return e;return i=Math.min(e.date(),rt(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function mt(e){return null!=e?(dt(this,e),r.updateOffset(this,!0),this):Xe(this,"Month")}function gt(){return rt(this.year(),this.month())}var pt=Ee;function yt(e){return this._monthsParseExact?(m(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=pt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}var _t=Ee;function ft(e){return this._monthsParseExact?(m(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=_t),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,i,s=[],r=[],n=[];for(t=0;t<12;t++)i=p([2e3,t]),s.push(this.monthsShort(i,"")),r.push(this.months(i,"")),n.push(this.months(i,"")),n.push(this.monthsShort(i,""));for(s.sort(e),r.sort(e),n.sort(e),t=0;t<12;t++)s[t]=Ye(s[t]),r[t]=Ye(r[t]);for(t=0;t<24;t++)n[t]=Ye(n[t]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Lt(e,t,i,s,r,n,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,i,s,r,n,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,i,s,r,n,a),o}function Mt(e){var t;if(e<100&&e>=0){var i=Array.prototype.slice.call(arguments);i[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function bt(e,t,i){var s=7+t-i,r=(7+Mt(e,0,s).getUTCDay()-t)%7;return-r+s-1}function wt(e,t,i,s,r){var n,a,o=(7+i-s)%7,l=bt(e,s,r),c=1+7*(t-1)+o+l;return c<=0?(n=e-1,a=qe(n)+c):c>qe(e)?(n=e+1,a=c-qe(e)):(n=e,a=c),{year:n,dayOfYear:a}}function Tt(e,t,i){var s,r,n=bt(e.year(),t,i),a=Math.floor((e.dayOfYear()-n-1)/7)+1;return a<1?(r=e.year()-1,s=a+St(r,t,i)):a>St(e.year(),t,i)?(s=a-St(e.year(),t,i),r=e.year()+1):(r=e.year(),s=a),{week:s,year:r}}function St(e,t,i){var s=bt(e,t,i),r=bt(e+1,t,i);return(qe(e)-s+r)/7}function Ct(e){return Tt(e,this._week.dow,this._week.doy).week}oe("w",["ww",2],"wo","week"),oe("W",["WW",2],"Wo","isoWeek"),Z("week","w"),Z("isoWeek","W"),ee("week",5),ee("isoWeek",5),De("w",_e),De("ww",_e,me),De("W",_e),De("WW",_e,me),je(["w","ww","W","WW"],function(e,t,i,s){t[s.substr(0,1)]=C(e)});var kt={dow:0,doy:6};function Et(){return this._week.dow}function It(){return this._week.doy}function Dt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Pt(e){var t=Tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ot(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function Yt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function xt(e,t){return e.slice(t,7).concat(e.slice(0,t))}oe("d",0,"do","day"),oe("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),oe("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),oe("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),oe("e",0,0,"weekday"),oe("E",0,0,"isoWeekday"),Z("day","d"),Z("weekday","e"),Z("isoWeekday","E"),ee("day",11),ee("weekday",11),ee("isoWeekday",11),De("d",_e),De("e",_e),De("E",_e),De("dd",function(e,t){return t.weekdaysMinRegex(e)}),De("ddd",function(e,t){return t.weekdaysShortRegex(e)}),De("dddd",function(e,t){return t.weekdaysRegex(e)}),je(["dd","ddd","dddd"],function(e,t,i,s){var r=i._locale.weekdaysParse(e,s,i._strict);null!=r?t.d=r:_(i).invalidWeekday=e}),je(["d","e","E"],function(e,t,i,s){t[s]=C(e)});var At="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function jt(e,t){var i=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?xt(i,this._week.dow):e?i[e.day()]:i}var Ft="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function Nt(e){return!0===e?xt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}var Ht="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Rt(e){return!0===e?xt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function zt(e,t,i){var s,r,n,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)n=p([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(n,"").toLocaleLowerCase();return i?"dddd"===t?(r=Ke.call(this._weekdaysParse,a),-1!==r?r:null):"ddd"===t?(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:null):(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:null):"dddd"===t?(r=Ke.call(this._weekdaysParse,a),-1!==r?r:(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:null))):"ddd"===t?(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:(r=Ke.call(this._weekdaysParse,a),-1!==r?r:(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:null))):(r=Ke.call(this._minWeekdaysParse,a),-1!==r?r:(r=Ke.call(this._weekdaysParse,a),-1!==r?r:(r=Ke.call(this._shortWeekdaysParse,a),-1!==r?r:null)))}function Gt(e,t,i){var s,r,n;if(this._weekdaysParseExact)return zt.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(r=p([2e3,1]).day(s),i&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(n="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[s]=new RegExp(n.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(i&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(i&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!i&&this._weekdaysParse[s].test(e))return s}}function Vt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ot(e,this.localeData()),this.add(e-t,"d")):t}function Bt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ut(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Yt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}var Wt=Ee;function qt(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=Wt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}var Jt=Ee;function Kt(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Jt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}var Zt=Ee;function Qt(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,i,s,r,n,a=[],o=[],l=[],c=[];for(t=0;t<7;t++)i=p([2e3,1]).day(t),s=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),n=this.weekdays(i,""),a.push(s),o.push(r),l.push(n),c.push(s),c.push(r),c.push(n);for(a.sort(e),o.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)o[t]=Ye(o[t]),l[t]=Ye(l[t]),c[t]=Ye(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function ei(){return this.hours()||24}function ti(e,t){oe(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function ii(e,t){return t._meridiemParse}function si(e){return"p"===(e+"").toLowerCase().charAt(0)}oe("H",["HH",2],0,"hour"),oe("h",["hh",2],0,Xt),oe("k",["kk",2],0,ei),oe("hmm",0,0,function(){return""+Xt.apply(this)+ie(this.minutes(),2)}),oe("hmmss",0,0,function(){return""+Xt.apply(this)+ie(this.minutes(),2)+ie(this.seconds(),2)}),oe("Hmm",0,0,function(){return""+this.hours()+ie(this.minutes(),2)}),oe("Hmmss",0,0,function(){return""+this.hours()+ie(this.minutes(),2)+ie(this.seconds(),2)}),ti("a",!0),ti("A",!1),Z("hour","h"),ee("hour",13),De("a",ii),De("A",ii),De("H",_e),De("h",_e),De("k",_e),De("HH",_e,me),De("hh",_e,me),De("kk",_e,me),De("hmm",fe),De("hmmss",ve),De("Hmm",fe),De("Hmmss",ve),Ae(["H","HH"],ze),Ae(["k","kk"],function(e,t,i){var s=C(e);t[ze]=24===s?0:s}),Ae(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),Ae(["h","hh"],function(e,t,i){t[ze]=C(e),_(i).bigHour=!0}),Ae("hmm",function(e,t,i){var s=e.length-2;t[ze]=C(e.substr(0,s)),t[Ge]=C(e.substr(s)),_(i).bigHour=!0}),Ae("hmmss",function(e,t,i){var s=e.length-4,r=e.length-2;t[ze]=C(e.substr(0,s)),t[Ge]=C(e.substr(s,2)),t[Ve]=C(e.substr(r)),_(i).bigHour=!0}),Ae("Hmm",function(e,t,i){var s=e.length-2;t[ze]=C(e.substr(0,s)),t[Ge]=C(e.substr(s))}),Ae("Hmmss",function(e,t,i){var s=e.length-4,r=e.length-2;t[ze]=C(e.substr(0,s)),t[Ge]=C(e.substr(s,2)),t[Ve]=C(e.substr(r))});var ri=/[ap]\.?m?\.?/i;function ni(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}var ai,oi=$e("Hours",!0),li={calendar:F,longDateFormat:H,invalidDate:z,ordinal:V,dayOfMonthOrdinalParse:B,relativeTime:W,months:at,monthsShort:lt,week:kt,weekdays:At,weekdaysMin:Ht,weekdaysShort:Ft,meridiemParse:ri},ci={},hi={};function ui(e){return e?e.toLowerCase().replace("_","-"):e}function di(e){var t,i,s,r,n=0;while(n<e.length){r=ui(e[n]).split("-"),t=r.length,i=ui(e[n+1]),i=i?i.split("-"):null;while(t>0){if(s=mi(r.slice(0,t).join("-")),s)return s;if(i&&i.length>=t&&k(r,i,!0)>=t-1)break;t--}n++}return ai}function mi(t){var s=null;if(!ci[t]&&"undefined"!==typeof e&&e&&e.exports)try{s=ai._abbr;i(435)("./"+t),gi(s)}catch(r){}return ci[t]}function gi(e,t){var i;return e&&(i=c(t)?_i(e):pi(e,t),i?ai=i:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ai._abbr}function pi(e,t){if(null!==t){var i,s=li;if(t.abbr=e,null!=ci[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=ci[e]._config;else if(null!=t.parentLocale)if(null!=ci[t.parentLocale])s=ci[t.parentLocale]._config;else{if(i=mi(t.parentLocale),null==i)return hi[t.parentLocale]||(hi[t.parentLocale]=[]),hi[t.parentLocale].push({name:e,config:t}),null;s=i._config}return ci[e]=new j(A(s,t)),hi[e]&&hi[e].forEach(function(e){pi(e.name,e.config)}),gi(e),ci[e]}return delete ci[e],null}function yi(e,t){if(null!=t){var i,s,r=li;s=mi(e),null!=s&&(r=s._config),t=A(r,t),i=new j(t),i.parentLocale=ci[e],ci[e]=i,gi(e)}else null!=ci[e]&&(null!=ci[e].parentLocale?ci[e]=ci[e].parentLocale:null!=ci[e]&&delete ci[e]);return ci[e]}function _i(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ai;if(!a(e)){if(t=mi(e),t)return t;e=[e]}return di(e)}function fi(){return D(ci)}function vi(e){var t,i=e._a;return i&&-2===_(e).overflow&&(t=i[He]<0||i[He]>11?He:i[Re]<1||i[Re]>rt(i[Ne],i[He])?Re:i[ze]<0||i[ze]>24||24===i[ze]&&(0!==i[Ge]||0!==i[Ve]||0!==i[Be])?ze:i[Ge]<0||i[Ge]>59?Ge:i[Ve]<0||i[Ve]>59?Ve:i[Be]<0||i[Be]>999?Be:-1,_(e)._overflowDayOfYear&&(t<Ne||t>Re)&&(t=Re),_(e)._overflowWeeks&&-1===t&&(t=Ue),_(e)._overflowWeekday&&-1===t&&(t=We),_(e).overflow=t),e}function Li(e,t,i){return null!=e?e:null!=t?t:i}function Mi(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function bi(e){var t,i,s,r,n,a=[];if(!e._d){for(s=Mi(e),e._w&&null==e._a[Re]&&null==e._a[He]&&wi(e),null!=e._dayOfYear&&(n=Li(e._a[Ne],s[Ne]),(e._dayOfYear>qe(n)||0===e._dayOfYear)&&(_(e)._overflowDayOfYear=!0),i=Mt(n,0,e._dayOfYear),e._a[He]=i.getUTCMonth(),e._a[Re]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ze]&&0===e._a[Ge]&&0===e._a[Ve]&&0===e._a[Be]&&(e._nextDay=!0,e._a[ze]=0),e._d=(e._useUTC?Mt:Lt).apply(null,a),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ze]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==r&&(_(e).weekdayMismatch=!0)}}function wi(e){var t,i,s,r,n,a,o,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)n=1,a=4,i=Li(t.GG,e._a[Ne],Tt(Ji(),1,4).year),s=Li(t.W,1),r=Li(t.E,1),(r<1||r>7)&&(l=!0);else{n=e._locale._week.dow,a=e._locale._week.doy;var c=Tt(Ji(),n,a);i=Li(t.gg,e._a[Ne],c.year),s=Li(t.w,c.week),null!=t.d?(r=t.d,(r<0||r>6)&&(l=!0)):null!=t.e?(r=t.e+n,(t.e<0||t.e>6)&&(l=!0)):r=n}s<1||s>St(i,n,a)?_(e)._overflowWeeks=!0:null!=l?_(e)._overflowWeekday=!0:(o=wt(i,s,r,n,a),e._a[Ne]=o.year,e._dayOfYear=o.dayOfYear)}var Ti=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Si=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ci=/Z|[+-]\d\d(?::?\d\d)?/,ki=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ei=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ii=/^\/?Date\((\-?\d+)/i;function Di(e){var t,i,s,r,n,a,o=e._i,l=Ti.exec(o)||Si.exec(o);if(l){for(_(e).iso=!0,t=0,i=ki.length;t<i;t++)if(ki[t][1].exec(l[1])){r=ki[t][0],s=!1!==ki[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,i=Ei.length;t<i;t++)if(Ei[t][1].exec(l[3])){n=(l[2]||" ")+Ei[t][0];break}if(null==n)return void(e._isValid=!1)}if(!s&&null!=n)return void(e._isValid=!1);if(l[4]){if(!Ci.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=r+(n||"")+(a||""),Ri(e)}else e._isValid=!1}var Pi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Oi(e,t,i,s,r,n){var a=[Yi(e),lt.indexOf(t),parseInt(i,10),parseInt(s,10),parseInt(r,10)];return n&&a.push(parseInt(n,10)),a}function Yi(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xi(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ai(e,t,i){if(e){var s=Ft.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(s!==r)return _(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}var ji={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Fi(e,t,i){if(e)return ji[e];if(t)return 0;var s=parseInt(i,10),r=s%100,n=(s-r)/100;return 60*n+r}function Ni(e){var t=Pi.exec(xi(e._i));if(t){var i=Oi(t[4],t[3],t[2],t[5],t[6],t[7]);if(!Ai(t[1],i,e))return;e._a=i,e._tzm=Fi(t[8],t[9],t[10]),e._d=Mt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function Hi(e){var t=Ii.exec(e._i);null===t?(Di(e),!1===e._isValid&&(delete e._isValid,Ni(e),!1===e._isValid&&(delete e._isValid,r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Ri(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],_(e).empty=!0;var t,i,s,n,a,o=""+e._i,l=o.length,c=0;for(s=ue(e._f,e._locale).match(se)||[],t=0;t<s.length;t++)n=s[t],i=(o.match(Pe(n,e))||[])[0],i&&(a=o.substr(0,o.indexOf(i)),a.length>0&&_(e).unusedInput.push(a),o=o.slice(o.indexOf(i)+i.length),c+=i.length),ae[n]?(i?_(e).empty=!1:_(e).unusedTokens.push(n),Fe(n,i,e)):e._strict&&!i&&_(e).unusedTokens.push(n);_(e).charsLeftOver=l-c,o.length>0&&_(e).unusedInput.push(o),e._a[ze]<=12&&!0===_(e).bigHour&&e._a[ze]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[ze]=zi(e._locale,e._a[ze],e._meridiem),bi(e),vi(e)}else Ni(e);else Di(e)}function zi(e,t,i){var s;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?(s=e.isPM(i),s&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function Gi(e){var t,i,s,r,n;if(0===e._f.length)return _(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)n=0,t=M({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Ri(t),f(t)&&(n+=_(t).charsLeftOver,n+=10*_(t).unusedTokens.length,_(t).score=n,(null==s||n<s)&&(s=n,i=t));g(e,i||t)}function Vi(e){if(!e._d){var t=$(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),bi(e)}}function Bi(e){var t=new w(vi(Ui(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ui(e){var t=e._i,i=e._f;return e._locale=e._locale||_i(e._l),null===t||void 0===i&&""===t?v({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new w(vi(t)):(u(t)?e._d=t:a(i)?Gi(e):i?Ri(e):Wi(e),f(e)||(e._d=null),e))}function Wi(e){var t=e._i;c(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"===typeof t?Hi(e):a(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),bi(e)):o(t)?Vi(e):h(t)?e._d=new Date(t):r.createFromInputFallback(e)}function qi(e,t,i,s,r){var n={};return!0!==i&&!1!==i||(s=i,i=void 0),(o(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),n._isAMomentObject=!0,n._useUTC=n._isUTC=r,n._l=i,n._i=e,n._f=t,n._strict=s,Bi(n)}function Ji(e,t,i,s){return qi(e,t,i,s,!1)}r.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Ki=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ji.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),Zi=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ji.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function Qi(e,t){var i,s;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Ji();for(i=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](i)||(i=t[s]);return i}function $i(){var e=[].slice.call(arguments,0);return Qi("isBefore",e)}function Xi(){var e=[].slice.call(arguments,0);return Qi("isAfter",e)}var es=function(){return Date.now?Date.now():+new Date},ts=["year","quarter","month","week","day","hour","minute","second","millisecond"];function is(e){for(var t in e)if(-1===Ke.call(ts,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var i=!1,s=0;s<ts.length;++s)if(e[ts[s]]){if(i)return!1;parseFloat(e[ts[s]])!==C(e[ts[s]])&&(i=!0)}return!0}function ss(){return this._isValid}function rs(){return Cs(NaN)}function ns(e){var t=$(e),i=t.year||0,s=t.quarter||0,r=t.month||0,n=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,c=t.second||0,h=t.millisecond||0;this._isValid=is(t),this._milliseconds=+h+1e3*c+6e4*l+1e3*o*60*60,this._days=+a+7*n,this._months=+r+3*s+12*i,this._data={},this._locale=_i(),this._bubble()}function as(e){return e instanceof ns}function os(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ls(e,t){oe(e,0,0,function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+ie(~~(e/60),2)+t+ie(~~e%60,2)})}ls("Z",":"),ls("ZZ",""),De("Z",Ce),De("ZZ",Ce),Ae(["Z","ZZ"],function(e,t,i){i._useUTC=!0,i._tzm=hs(Ce,e)});var cs=/([\+\-]|\d\d)/gi;function hs(e,t){var i=(t||"").match(e);if(null===i)return null;var s=i[i.length-1]||[],r=(s+"").match(cs)||["-",0,0],n=60*r[1]+C(r[2]);return 0===n?0:"+"===r[0]?n:-n}function us(e,t){var i,s;return t._isUTC?(i=t.clone(),s=(T(e)||u(e)?e.valueOf():Ji(e).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+s),r.updateOffset(i,!1),i):Ji(e).local()}function ds(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function ms(e,t,i){var s,n=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=hs(Ce,e),null===e)return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(s=ds(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Ps(this,Cs(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:ds(this)}function gs(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ps(e){return this.utcOffset(0,e)}function ys(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ds(this),"m")),this}function _s(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=hs(Se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function fs(e){return!!this.isValid()&&(e=e?Ji(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function vs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ls(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={};if(M(e,this),e=Ui(e),e._a){var t=e._isUTC?p(e._a):Ji(e._a);this._isDSTShifted=this.isValid()&&k(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ms(){return!!this.isValid()&&!this._isUTC}function bs(){return!!this.isValid()&&this._isUTC}function ws(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}r.updateOffset=function(){};var Ts=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ss=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cs(e,t){var i,s,r,n=e,a=null;return as(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:h(e)?(n={},t?n[t]=e:n.milliseconds=e):(a=Ts.exec(e))?(i="-"===a[1]?-1:1,n={y:0,d:C(a[Re])*i,h:C(a[ze])*i,m:C(a[Ge])*i,s:C(a[Ve])*i,ms:C(os(1e3*a[Be]))*i}):(a=Ss.exec(e))?(i="-"===a[1]?-1:1,n={y:ks(a[2],i),M:ks(a[3],i),w:ks(a[4],i),d:ks(a[5],i),h:ks(a[6],i),m:ks(a[7],i),s:ks(a[8],i)}):null==n?n={}:"object"===typeof n&&("from"in n||"to"in n)&&(r=Is(Ji(n.from),Ji(n.to)),n={},n.ms=r.milliseconds,n.M=r.months),s=new ns(n),as(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function ks(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function Es(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Is(e,t){var i;return e.isValid()&&t.isValid()?(t=us(t,e),e.isBefore(t)?i=Es(e,t):(i=Es(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ds(e,t){return function(i,s){var r,n;return null===s||isNaN(+s)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=i,i=s,s=n),i="string"===typeof i?+i:i,r=Cs(i,s),Ps(this,r,e),this}}function Ps(e,t,i,s){var n=t._milliseconds,a=os(t._days),o=os(t._months);e.isValid()&&(s=null==s||s,o&&dt(e,Xe(e,"Month")+o*i),a&&et(e,"Date",Xe(e,"Date")+a*i),n&&e._d.setTime(e._d.valueOf()+n*i),s&&r.updateOffset(e,a||o))}Cs.fn=ns.prototype,Cs.invalid=rs;var Os=Ds(1,"add"),Ys=Ds(-1,"subtract");function xs(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function As(e,t){var i=e||Ji(),s=us(i,this).startOf("day"),n=r.calendarFormat(this,s)||"sameElse",a=t&&(Y(t[n])?t[n].call(this,i):t[n]);return this.format(a||this.localeData().calendar(n,this,Ji(i)))}function js(){return new w(this)}function Fs(e,t){var i=T(e)?e:Ji(e);return!(!this.isValid()||!i.isValid())&&(t=Q(t)||"millisecond","millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(t).valueOf())}function Ns(e,t){var i=T(e)?e:Ji(e);return!(!this.isValid()||!i.isValid())&&(t=Q(t)||"millisecond","millisecond"===t?this.valueOf()<i.valueOf():this.clone().endOf(t).valueOf()<i.valueOf())}function Hs(e,t,i,s){var r=T(e)?e:Ji(e),n=T(t)?t:Ji(t);return!!(this.isValid()&&r.isValid()&&n.isValid())&&(s=s||"()",("("===s[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===s[1]?this.isBefore(n,i):!this.isAfter(n,i)))}function Rs(e,t){var i,s=T(e)?e:Ji(e);return!(!this.isValid()||!s.isValid())&&(t=Q(t)||"millisecond","millisecond"===t?this.valueOf()===s.valueOf():(i=s.valueOf(),this.clone().startOf(t).valueOf()<=i&&i<=this.clone().endOf(t).valueOf()))}function zs(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Gs(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Vs(e,t,i){var s,r,n;if(!this.isValid())return NaN;if(s=us(e,this),!s.isValid())return NaN;switch(r=6e4*(s.utcOffset()-this.utcOffset()),t=Q(t),t){case"year":n=Bs(this,s)/12;break;case"month":n=Bs(this,s);break;case"quarter":n=Bs(this,s)/3;break;case"second":n=(this-s)/1e3;break;case"minute":n=(this-s)/6e4;break;case"hour":n=(this-s)/36e5;break;case"day":n=(this-s-r)/864e5;break;case"week":n=(this-s-r)/6048e5;break;default:n=this-s}return i?n:S(n)}function Bs(e,t){var i,s,r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return t-n<0?(i=e.clone().add(r-1,"months"),s=(t-n)/(n-i)):(i=e.clone().add(r+1,"months"),s=(t-n)/(i-n)),-(r+s)||0}function Us(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ws(e){if(!this.isValid())return null;var t=!0!==e,i=t?this.clone().utc():this;return i.year()<0||i.year()>9999?he(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Y(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",he(i,"Z")):he(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function qs(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var i="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=t+'[")]';return this.format(i+s+r+n)}function Js(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=he(this,e);return this.localeData().postformat(t)}function Ks(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ji(e).isValid())?Cs({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Zs(e){return this.from(Ji(),e)}function Qs(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ji(e).isValid())?Cs({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $s(e){return this.to(Ji(),e)}function Xs(e){var t;return void 0===e?this._locale._abbr:(t=_i(e),null!=t&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var er=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function tr(){return this._locale}var ir=1e3,sr=60*ir,rr=60*sr,nr=3506328*rr;function ar(e,t){return(e%t+t)%t}function or(e,t,i){return e<100&&e>=0?new Date(e+400,t,i)-nr:new Date(e,t,i).valueOf()}function lr(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-nr:Date.UTC(e,t,i)}function cr(e){var t;if(e=Q(e),void 0===e||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?lr:or;switch(e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ar(t+(this._isUTC?0:this.utcOffset()*sr),rr);break;case"minute":t=this._d.valueOf(),t-=ar(t,sr);break;case"second":t=this._d.valueOf(),t-=ar(t,ir);break}return this._d.setTime(t),r.updateOffset(this,!0),this}function hr(e){var t;if(e=Q(e),void 0===e||"millisecond"===e||!this.isValid())return this;var i=this._isUTC?lr:or;switch(e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rr-ar(t+(this._isUTC?0:this.utcOffset()*sr),rr)-1;break;case"minute":t=this._d.valueOf(),t+=sr-ar(t,sr)-1;break;case"second":t=this._d.valueOf(),t+=ir-ar(t,ir)-1;break}return this._d.setTime(t),r.updateOffset(this,!0),this}function ur(){return this._d.valueOf()-6e4*(this._offset||0)}function dr(){return Math.floor(this.valueOf()/1e3)}function mr(){return new Date(this.valueOf())}function gr(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function pr(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function yr(){return this.isValid()?this.toISOString():null}function _r(){return f(this)}function fr(){return g({},_(this))}function vr(){return _(this).overflow}function Lr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Mr(e,t){oe(0,[e,e.length],0,t)}function br(e){return Cr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function wr(e){return Cr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Tr(){return St(this.year(),1,4)}function Sr(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Cr(e,t,i,s,r){var n;return null==e?Tt(this,s,r).year:(n=St(e,s,r),t>n&&(t=n),kr.call(this,e,t,i,s,r))}function kr(e,t,i,s,r){var n=wt(e,t,i,s,r),a=Mt(n.year,0,n.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Er(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}oe(0,["gg",2],0,function(){return this.weekYear()%100}),oe(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Mr("gggg","weekYear"),Mr("ggggg","weekYear"),Mr("GGGG","isoWeekYear"),Mr("GGGGG","isoWeekYear"),Z("weekYear","gg"),Z("isoWeekYear","GG"),ee("weekYear",1),ee("isoWeekYear",1),De("G",Te),De("g",Te),De("GG",_e,me),De("gg",_e,me),De("GGGG",Me,pe),De("gggg",Me,pe),De("GGGGG",be,ye),De("ggggg",be,ye),je(["gggg","ggggg","GGGG","GGGGG"],function(e,t,i,s){t[s.substr(0,2)]=C(e)}),je(["gg","GG"],function(e,t,i,s){t[s]=r.parseTwoDigitYear(e)}),oe("Q",0,"Qo","quarter"),Z("quarter","Q"),ee("quarter",7),De("Q",de),Ae("Q",function(e,t){t[He]=3*(C(e)-1)}),oe("D",["DD",2],"Do","date"),Z("date","D"),ee("date",9),De("D",_e),De("DD",_e,me),De("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Ae(["D","DD"],Re),Ae("Do",function(e,t){t[Re]=C(e.match(_e)[0])});var Ir=$e("Date",!0);function Dr(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}oe("DDD",["DDDD",3],"DDDo","dayOfYear"),Z("dayOfYear","DDD"),ee("dayOfYear",4),De("DDD",Le),De("DDDD",ge),Ae(["DDD","DDDD"],function(e,t,i){i._dayOfYear=C(e)}),oe("m",["mm",2],0,"minute"),Z("minute","m"),ee("minute",14),De("m",_e),De("mm",_e,me),Ae(["m","mm"],Ge);var Pr=$e("Minutes",!1);oe("s",["ss",2],0,"second"),Z("second","s"),ee("second",15),De("s",_e),De("ss",_e,me),Ae(["s","ss"],Ve);var Or,Yr=$e("Seconds",!1);for(oe("S",0,0,function(){return~~(this.millisecond()/100)}),oe(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),oe(0,["SSS",3],0,"millisecond"),oe(0,["SSSS",4],0,function(){return 10*this.millisecond()}),oe(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),oe(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),oe(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),oe(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),oe(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Z("millisecond","ms"),ee("millisecond",16),De("S",Le,de),De("SS",Le,me),De("SSS",Le,ge),Or="SSSS";Or.length<=9;Or+="S")De(Or,we);function xr(e,t){t[Be]=C(1e3*("0."+e))}for(Or="S";Or.length<=9;Or+="S")Ae(Or,xr);var Ar=$e("Milliseconds",!1);function jr(){return this._isUTC?"UTC":""}function Fr(){return this._isUTC?"Coordinated Universal Time":""}oe("z",0,0,"zoneAbbr"),oe("zz",0,0,"zoneName");var Nr=w.prototype;function Hr(e){return Ji(1e3*e)}function Rr(){return Ji.apply(null,arguments).parseZone()}function zr(e){return e}Nr.add=Os,Nr.calendar=As,Nr.clone=js,Nr.diff=Vs,Nr.endOf=hr,Nr.format=Js,Nr.from=Ks,Nr.fromNow=Zs,Nr.to=Qs,Nr.toNow=$s,Nr.get=tt,Nr.invalidAt=vr,Nr.isAfter=Fs,Nr.isBefore=Ns,Nr.isBetween=Hs,Nr.isSame=Rs,Nr.isSameOrAfter=zs,Nr.isSameOrBefore=Gs,Nr.isValid=_r,Nr.lang=er,Nr.locale=Xs,Nr.localeData=tr,Nr.max=Zi,Nr.min=Ki,Nr.parsingFlags=fr,Nr.set=it,Nr.startOf=cr,Nr.subtract=Ys,Nr.toArray=gr,Nr.toObject=pr,Nr.toDate=mr,Nr.toISOString=Ws,Nr.inspect=qs,Nr.toJSON=yr,Nr.toString=Us,Nr.unix=dr,Nr.valueOf=ur,Nr.creationData=Lr,Nr.year=Ze,Nr.isLeapYear=Qe,Nr.weekYear=br,Nr.isoWeekYear=wr,Nr.quarter=Nr.quarters=Er,Nr.month=mt,Nr.daysInMonth=gt,Nr.week=Nr.weeks=Dt,Nr.isoWeek=Nr.isoWeeks=Pt,Nr.weeksInYear=Sr,Nr.isoWeeksInYear=Tr,Nr.date=Ir,Nr.day=Nr.days=Vt,Nr.weekday=Bt,Nr.isoWeekday=Ut,Nr.dayOfYear=Dr,Nr.hour=Nr.hours=oi,Nr.minute=Nr.minutes=Pr,Nr.second=Nr.seconds=Yr,Nr.millisecond=Nr.milliseconds=Ar,Nr.utcOffset=ms,Nr.utc=ps,Nr.local=ys,Nr.parseZone=_s,Nr.hasAlignedHourOffset=fs,Nr.isDST=vs,Nr.isLocal=Ms,Nr.isUtcOffset=bs,Nr.isUtc=ws,Nr.isUTC=ws,Nr.zoneAbbr=jr,Nr.zoneName=Fr,Nr.dates=I("dates accessor is deprecated. Use date instead.",Ir),Nr.months=I("months accessor is deprecated. Use month instead",mt),Nr.years=I("years accessor is deprecated. Use year instead",Ze),Nr.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gs),Nr.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ls);var Gr=j.prototype;function Vr(e,t,i,s){var r=_i(),n=p().set(s,t);return r[i](n,e)}function Br(e,t,i){if(h(e)&&(t=e,e=void 0),e=e||"",null!=t)return Vr(e,t,i,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Vr(e,s,i,"month");return r}function Ur(e,t,i,s){"boolean"===typeof e?(h(t)&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,h(t)&&(i=t,t=void 0),t=t||"");var r,n=_i(),a=e?n._week.dow:0;if(null!=i)return Vr(t,(i+a)%7,s,"day");var o=[];for(r=0;r<7;r++)o[r]=Vr(t,(r+a)%7,s,"day");return o}function Wr(e,t){return Br(e,t,"months")}function qr(e,t){return Br(e,t,"monthsShort")}function Jr(e,t,i){return Ur(e,t,i,"weekdays")}function Kr(e,t,i){return Ur(e,t,i,"weekdaysShort")}function Zr(e,t,i){return Ur(e,t,i,"weekdaysMin")}Gr.calendar=N,Gr.longDateFormat=R,Gr.invalidDate=G,Gr.ordinal=U,Gr.preparse=zr,Gr.postformat=zr,Gr.relativeTime=q,Gr.pastFuture=J,Gr.set=x,Gr.months=ot,Gr.monthsShort=ct,Gr.monthsParse=ut,Gr.monthsRegex=ft,Gr.monthsShortRegex=yt,Gr.week=Ct,Gr.firstDayOfYear=It,Gr.firstDayOfWeek=Et,Gr.weekdays=jt,Gr.weekdaysMin=Rt,Gr.weekdaysShort=Nt,Gr.weekdaysParse=Gt,Gr.weekdaysRegex=qt,Gr.weekdaysShortRegex=Kt,Gr.weekdaysMinRegex=Qt,Gr.isPM=si,Gr.meridiem=ni,gi("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===C(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}}),r.lang=I("moment.lang is deprecated. Use moment.locale instead.",gi),r.langData=I("moment.langData is deprecated. Use moment.localeData instead.",_i);var Qr=Math.abs;function $r(){var e=this._data;return this._milliseconds=Qr(this._milliseconds),this._days=Qr(this._days),this._months=Qr(this._months),e.milliseconds=Qr(e.milliseconds),e.seconds=Qr(e.seconds),e.minutes=Qr(e.minutes),e.hours=Qr(e.hours),e.months=Qr(e.months),e.years=Qr(e.years),this}function Xr(e,t,i,s){var r=Cs(t,i);return e._milliseconds+=s*r._milliseconds,e._days+=s*r._days,e._months+=s*r._months,e._bubble()}function en(e,t){return Xr(this,e,t,1)}function tn(e,t){return Xr(this,e,t,-1)}function sn(e){return e<0?Math.floor(e):Math.ceil(e)}function rn(){var e,t,i,s,r,n=this._milliseconds,a=this._days,o=this._months,l=this._data;return n>=0&&a>=0&&o>=0||n<=0&&a<=0&&o<=0||(n+=864e5*sn(an(o)+a),a=0,o=0),l.milliseconds=n%1e3,e=S(n/1e3),l.seconds=e%60,t=S(e/60),l.minutes=t%60,i=S(t/60),l.hours=i%24,a+=S(i/24),r=S(nn(a)),o+=r,a-=sn(an(r)),s=S(o/12),o%=12,l.days=a,l.months=o,l.years=s,this}function nn(e){return 4800*e/146097}function an(e){return 146097*e/4800}function on(e){if(!this.isValid())return NaN;var t,i,s=this._milliseconds;if(e=Q(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,i=this._months+nn(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(an(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function ln(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN}function cn(e){return function(){return this.as(e)}}var hn=cn("ms"),un=cn("s"),dn=cn("m"),mn=cn("h"),gn=cn("d"),pn=cn("w"),yn=cn("M"),_n=cn("Q"),fn=cn("y");function vn(){return Cs(this)}function Ln(e){return e=Q(e),this.isValid()?this[e+"s"]():NaN}function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var bn=Mn("milliseconds"),wn=Mn("seconds"),Tn=Mn("minutes"),Sn=Mn("hours"),Cn=Mn("days"),kn=Mn("months"),En=Mn("years");function In(){return S(this.days()/7)}var Dn=Math.round,Pn={ss:44,s:45,m:45,h:22,d:26,M:11};function On(e,t,i,s,r){return r.relativeTime(t||1,!!i,e,s)}function Yn(e,t,i){var s=Cs(e).abs(),r=Dn(s.as("s")),n=Dn(s.as("m")),a=Dn(s.as("h")),o=Dn(s.as("d")),l=Dn(s.as("M")),c=Dn(s.as("y")),h=r<=Pn.ss&&["s",r]||r<Pn.s&&["ss",r]||n<=1&&["m"]||n<Pn.m&&["mm",n]||a<=1&&["h"]||a<Pn.h&&["hh",a]||o<=1&&["d"]||o<Pn.d&&["dd",o]||l<=1&&["M"]||l<Pn.M&&["MM",l]||c<=1&&["y"]||["yy",c];return h[2]=t,h[3]=+e>0,h[4]=i,On.apply(null,h)}function xn(e){return void 0===e?Dn:"function"===typeof e&&(Dn=e,!0)}function An(e,t){return void 0!==Pn[e]&&(void 0===t?Pn[e]:(Pn[e]=t,"s"===e&&(Pn.ss=t-1),!0))}function jn(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),i=Yn(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}var Fn=Math.abs;function Nn(e){return(e>0)-(e<0)||+e}function Hn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,s=Fn(this._milliseconds)/1e3,r=Fn(this._days),n=Fn(this._months);e=S(s/60),t=S(e/60),s%=60,e%=60,i=S(n/12),n%=12;var a=i,o=n,l=r,c=t,h=e,u=s?s.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var m=d<0?"-":"",g=Nn(this._months)!==Nn(d)?"-":"",p=Nn(this._days)!==Nn(d)?"-":"",y=Nn(this._milliseconds)!==Nn(d)?"-":"";return m+"P"+(a?g+a+"Y":"")+(o?g+o+"M":"")+(l?p+l+"D":"")+(c||h||u?"T":"")+(c?y+c+"H":"")+(h?y+h+"M":"")+(u?y+u+"S":"")}var Rn=ns.prototype;return Rn.isValid=ss,Rn.abs=$r,Rn.add=en,Rn.subtract=tn,Rn.as=on,Rn.asMilliseconds=hn,Rn.asSeconds=un,Rn.asMinutes=dn,Rn.asHours=mn,Rn.asDays=gn,Rn.asWeeks=pn,Rn.asMonths=yn,Rn.asQuarters=_n,Rn.asYears=fn,Rn.valueOf=ln,Rn._bubble=rn,Rn.clone=vn,Rn.get=Ln,Rn.milliseconds=bn,Rn.seconds=wn,Rn.minutes=Tn,Rn.hours=Sn,Rn.days=Cn,Rn.weeks=In,Rn.months=kn,Rn.years=En,Rn.humanize=jn,Rn.toISOString=Hn,Rn.toString=Hn,Rn.toJSON=Hn,Rn.locale=Xs,Rn.localeData=tr,Rn.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hn),Rn.lang=er,oe("X",0,0,"unix"),oe("x",0,0,"valueOf"),De("x",Te),De("X",ke),Ae("X",function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))}),Ae("x",function(e,t,i){i._d=new Date(C(e))}),r.version="2.24.0",n(Ji),r.fn=Nr,r.min=$i,r.max=Xi,r.now=es,r.utc=p,r.unix=Hr,r.months=Wr,r.isDate=u,r.locale=gi,r.invalid=v,r.duration=Cs,r.isMoment=T,r.weekdays=Jr,r.parseZone=Rr,r.localeData=_i,r.isDuration=as,r.monthsShort=qr,r.weekdaysMin=Zr,r.defineLocale=pi,r.updateLocale=yi,r.locales=fi,r.weekdaysShort=Kr,r.normalizeUnits=Q,r.relativeTimeRounding=xn,r.relativeTimeThreshold=An,r.calendarFormat=xs,r.prototype=Nr,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})}).call(this,i(434)(e))},function(e,t,i){for(var s=i(396),r=i(44),n=i(28),a=i(11),o=i(23),l=i(53),c=i(16),h=c("iterator"),u=c("toStringTag"),d=l.Array,m={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},g=r(m),p=0;p<g.length;p++){var y,_=g[p],f=m[_],v=a[_],L=v&&v.prototype;if(L&&(L[h]||o(L,h,d),L[u]||o(L,u,_),l[_]=d,f))for(y in s)L[y]||n(L,y,s[y],!0)}},function(e,t,i){"use strict";i.d(t,"d",function(){return s}),i.d(t,"h",function(){return r}),i.d(t,"g",function(){return n}),i.d(t,"e",function(){return a}),i.d(t,"f",function(){return o}),i.d(t,"c",function(){return l}),i.d(t,"a",function(){return c}),i.d(t,"b",function(){return h});i(12),i(8),i(2),i(62);function s(e){const t=/^[+a-zA-Z0-9_.!#$%&\'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;return t.test(e)}function r(e,t){if(null!=e){const t=Number.parseInt(String(e),10);if(null!=t&&!Number.isNaN(t))return t}return void 0!==t?t:0}function n(e,t){if(e){const t=Number.parseFloat(String(e));if(null!=t&&!Number.isNaN(t))return t}return void 0!==t?t:0}function a(e,t){return null==e?t:"boolean"===typeof e?e:1===e||0!==e&&("string"===typeof e&&("true"===e.toLowerCase()||"1"===e.toLowerCase())||("string"!==typeof e||"false"!==e.toLowerCase()&&"0"!==e.toLowerCase())&&t)}function o(e,t,i){if(null!=e){const i=Object.values(t).find(t=>{return t==e});if(null!=i)return i}return i}function l(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})}function c(e,t){Array.isArray(e)?e.forEach((e,i,s)=>{t.call(s,e),c(s[i],t)}):e&&"object"===typeof e&&Object.keys(e).forEach(i=>{t.call(e,e[i]),c(e[i],t)})}function h(e){const t=e.target.tagName.toUpperCase();return e.defaultPrevented||"INPUT"===t||"SELECT"===t||"TEXTAREA"===t}},,function(e,t,i){e.exports=i(416)},function(e,t,i){"use strict";function s(e){if(Array.isArray(e))return e}function r(e,t){var i=[],s=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(s=(a=o.next()).done);s=!0)if(i.push(a.value),t&&i.length===t)break}catch(l){r=!0,n=l}finally{try{s||null==o["return"]||o["return"]()}finally{if(r)throw n}}return i}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function a(e,t){return s(e)||r(e,t)||n()}i.d(t,"a",function(){return a})},,function(e,t,i){i(42)("replace",2,function(e,t,i){return[function(s,r){"use strict";var n=e(this),a=void 0==s?void 0:s[t];return void 0!==a?a.call(s,n,r):i.call(String(n),s,r)},i]})},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"c",function(){return r}),i.d(t,"b",function(){return n});i(2);const s={NORTH:1,EAST:2,SOUTH:3,WEST:4},r={north:s.NORTH,east:s.EAST,south:s.SOUTH,west:s.WEST};function n(e){return Object.keys(r).find(t=>r[t]===e)}},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return l}),i.d(t,"d",function(){return c}),i.d(t,"c",function(){return h}),i.d(t,"f",function(){return u}),i.d(t,"e",function(){return d});i(45);var s=i(6),r=(i(2),i(9));function n(e,t){const i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)}function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=e.slice(),s=ol.extent.boundingExtent(i),a=[ol.extent.getBottomLeft(s),ol.extent.getBottomRight(s),ol.extent.getTopRight(s),ol.extent.getTopLeft(s)];let o=a.map(e=>{let t=0,s=1/0;return i.forEach((i,r)=>{const a=n(e,i);a<s&&(s=a,t=r)}),i.splice(t,1)[0]});return t===r["a"].EAST?o=[o[3],o[0],o[1],o[2]]:t===r["a"].SOUTH?o=[o[2],o[3],o[0],o[1]]:t===r["a"].WEST&&(o=[o[1],o[2],o[3],o[0]]),o}function o(e,t){const i=e[0]*t[0]+e[1]*t[1],s=Math.sqrt(e[0]**2+e[1]**2)*Math.sqrt(t[0]**2+t[1]**2);if(0===s)return console.error("caught div by 0 in angleBetweenTwo2DVectors"),null;let r=i/s;const n=1.00000002;return r<-1*n||r>n?(console.error("Number is much smaller than -1 or much larger than 1 in angleBetweenTwo2DVectors"),null):((r<-1||r>1)&&(r=Math.round(r)),Math.acos(r))}function l(e,t){const i=Object(s["a"])(e,2),r=Object(s["a"])(i[0],2),n=r[0],a=r[1],o=Object(s["a"])(i[1],2),l=o[0],c=o[1],h=Object(s["a"])(t,2),u=Object(s["a"])(h[0],2),d=u[0],m=u[1],g=Object(s["a"])(h[1],2),p=g[0],y=g[1];let _,f;const v={x:null,y:null,onLine1:!1,onLine2:!1},L=(y-m)*(l-n)-(p-d)*(c-a);if(0===L)return v;_=a-m,f=n-d;const M=(p-d)*_-(y-m)*f,b=(l-n)*_-(c-a)*f;return _=M/L,f=b/L,v.x=n+_*(l-n),v.y=a+_*(c-a),_>0&&_<1&&(v.onLine1=!0),f>0&&f<1&&(v.onLine2=!0),v}function c(e,t,i,s,r){const c=a(e,!i&&r),h=a(t,!!i&&r),u=[];for(let a=0;a<c.length;++a){const e=[];for(let r=0;r<c.length;++r){const t=r===c.length-1?0:r+1;if(a===r||a===t)continue;if(3===r&&0===t||1===r&&2===t)continue;const i=l([c[a],s],[c[r],c[t]]);if(null==i.x||null==i.y)continue;const h=[s[0]-c[a][0],s[1]-c[a][1]],u=[i.x-c[a][0],i.y-c[a][1]],d=o(h,u);if(null==d)continue;if(d/(180*Math.PI)>5)continue;const m=[c[r][0]-c[t][0],c[r][1]-c[t][1]],g=[c[t][0]-c[r][0],c[t][1]-c[r][1]],p=o(h,m);if(null==p)continue;const y=o(h,g);if(null==y)continue;const _=n(c[r],c[t]);if(0===_)continue;const f=n(c[r],[i.x,i.y])/_;let v=0;0!==f&&(v=o(g,[i.x-c[r][0],i.y-c[r][1]]),null==v)||e.push({cornerPoint:a,intrX:i.x,intrY:i.y,angle:p<=y?p:y,edgeStart:r,edgeEnd:t,ratioStart2End:v/Math.PI*180>5?-1*f:f})}let t=-1,i=-1;for(let s=0;s<e.length;++s)e[s].angle>t&&(t=e[s].angle,i=s);-1!==i&&u.push(e[i])}if(u.length<2)return null;const d=[];for(let n=0;n<u.length;++n)for(let e=n+1;e<u.length;++e)d.push([u[n].angle+u[e].angle,n,e]);let m=null;return d.sort().reverse().find(e=>{const t=[u[e[1]],u[e[2]]],i=h[t[0].edgeEnd],s=h[t[0].edgeStart],r=[i[0]-s[0],i[1]-s[1]],n=[s[0]+r[0]*t[0].ratioStart2End,s[1]+r[1]*t[0].ratioStart2End],a=h[t[1].edgeEnd],c=h[t[1].edgeStart],d=[a[0]-c[0],a[1]-c[1]],g=[c[0]+d[0]*t[1].ratioStart2End,c[1]+d[1]*t[1].ratioStart2End],p=[n[0]-h[t[0].cornerPoint][0],n[1]-h[t[0].cornerPoint][1]],y=[g[0]-h[t[1].cornerPoint][0],g[1]-h[t[1].cornerPoint][1]],_=o(p,y);return null!=_&&(m=l([h[t[0].cornerPoint],n],[h[t[1].cornerPoint],g]),null!=m.x&&null!=m.y)}),m}function h(e,t,i){const s=ol.proj.get("EPSG:4326"),r=i?ol.proj.getTransform(i,s):null,n=t.map(e=>{const t=r?r(e.slice(0,2)):e;return Cesium.Cartographic.fromDegrees(t[0],t[1])});return new Promise((i,s)=>{Cesium.sampleTerrainMostDetailed(e,n).then(e=>{e.forEach((e,i)=>{t[i][2]=e.height}),i(t)},s)})}function u(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=i.dataProjection?ol.proj.transform(t,i.dataProjection,e.projection):t;function r(){const t=e.transformRealWorld2Image(s);return{coords:t,height:e.averageHeight,estimate:!0}}if(t[2]){const i=e.transformRealWorld2Image(s,t[2]);return Promise.resolve({coords:i,height:t[2],estimate:!1})}return!i.dontUseTerrain&&e.terrainProvider?h(e.terrainProvider,[s],e.projection).then(()=>{if(s[2]){const t=e.transformRealWorld2Image(s,s[2]);return{coords:t,height:s[2],estimate:!1}}return console.warn("The configured terrain on the oblique layer could not be queried, position might be inaccurate"),r()}).catch(()=>r()):Promise.resolve(r())}function d(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=ol.proj.get("EPSG:4326"),r=ol.proj.transform(e.transformImage2RealWorld(t,e.averageHeight),e.projection,s),n=i.terrainErrorThreshold||1,a=i.terrainErrorCountThreshold||3;let o=0;function l(i,r){return o+=1,h(e.terrainProvider,[i]).then(()=>{if(null!=i[2]){const c=ol.proj.transform(e.transformImage2RealWorld(t,i[2]),e.projection,s);return c[2]=i[2],Math.abs(r-i[2])<n||o>a?{coords:c,estimate:!1}:l(c,i[2])}return console.log("The configured terrain on the oblique layer could not be queried, position might be inaccurate"),{coords:i,estimate:!0}}).catch(()=>({coords:i,estimate:!0}))}const c=!i.dontUseTerrain&&e.terrainProvider?l(r,e.getAverageHeight()):Promise.resolve({coords:r,estimate:!0});return c.then(t=>{return t.coords=i.dataProjection?ol.proj.transform(t.coords,s,i.dataProjection):ol.proj.transform(t.coords,s,e.projection),t})}},function(e,t){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(e,t,i){"use strict";i(211);var s=i(27),r=i(58),n=i(18),a="toString",o=/./[a],l=function(e){i(28)(RegExp.prototype,a,e,!0)};i(21)(function(){return"/a/b"!=o.call({source:"a",flags:"b"})})?l(function(){var e=s(this);return"/".concat(e.source,"/","flags"in e?e.flags:!n&&e instanceof RegExp?r.call(e):void 0)}):o.name!=a&&l(function(){return o.call(this)})},function(e,t,i){"use strict";var s=i(78),r=i(417),n=Object.prototype.toString;function a(e){return"[object Array]"===n.call(e)}function o(e){return"[object ArrayBuffer]"===n.call(e)}function l(e){return"undefined"!==typeof FormData&&e instanceof FormData}function c(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function h(e){return"string"===typeof e}function u(e){return"number"===typeof e}function d(e){return"undefined"===typeof e}function m(e){return null!==e&&"object"===typeof e}function g(e){return"[object Date]"===n.call(e)}function p(e){return"[object File]"===n.call(e)}function y(e){return"[object Blob]"===n.call(e)}function _(e){return"[object Function]"===n.call(e)}function f(e){return m(e)&&_(e.pipe)}function v(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function L(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function M(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function b(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function w(){var e={};function t(t,i){"object"===typeof e[i]&&"object"===typeof t?e[i]=w(e[i],t):e[i]=t}for(var i=0,s=arguments.length;i<s;i++)b(arguments[i],t);return e}function T(e,t,i){return b(t,function(t,r){e[r]=i&&"function"===typeof t?s(t,i):t}),e}e.exports={isArray:a,isArrayBuffer:o,isBuffer:r,isFormData:l,isArrayBufferView:c,isString:h,isNumber:u,isObject:m,isUndefined:d,isDate:g,isFile:p,isBlob:y,isFunction:_,isStream:f,isURLSearchParams:v,isStandardBrowserEnv:M,forEach:b,merge:w,extend:T,trim:L}},function(e,t,i){"use strict";i(19),i(2),i(8);function s(e){const t=e.length-1;return e.filter((e,i)=>""!==e||i===t)}class r{static get className(){return"vcs.Url"}constructor(e){this.className=r.className,this.base=e.base,this.base.replace("/$",""),this.path=e.path||[],this.hashPath=e.hashPath||[],this.queryParams=e.queryParams||{}}addQueryParams(e){Object.keys(e).forEach(t=>{this.queryParams[t]=e[t]})}getQueryParams(){return this.queryParams}clearQueryParams(){this.queryParams={}}setPath(){const e=[];for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return i.forEach(t=>{e.push(...t.split("/"))}),this.path.splice(0,this.path.length),e.forEach(e=>{this.path.push(e)}),this.path=s(this.path),this}extendPath(){const e=[];for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return i.forEach(t=>{e.push(...t.split("/"))}),e.forEach(e=>{/^\.\.$/.test(e)?this.path.pop():this.path.push(e)}),this.path=s(this.path),this}clone(){return new r({base:this.base,path:this.path.slice(0),hashPath:this.hashPath.slice(0),queryParams:this._cloneQueryParams()})}_cloneQueryParams(){function e(t){const i={};return Object.keys(t).forEach(s=>{const r=t[s];Array.isArray(r)?i[s]=r.splice(0):i[s]="object"===typeof r?e(r):r},this),i}return e(this.queryParams)}toString(){let e=this.path.length?`${this.base}/${this.path.join("/")}`:this.base;return Object.keys(this.queryParams).length>0&&(e+=`?${this._getStringQueryParams()}`),this.hashPath.length>0&&(e+=`#${this.hashPath.join("/")}`),e}_getStringQueryParams(){return Object.keys(this.queryParams).map(e=>{const t=this.queryParams[e];let i;return i=t instanceof Object?JSON.stringify(t):String(t),`${e}=${encodeURIComponent(i)}`}).join("&")}static parse(e){if(r.isUrl(e)){const t=e.split("?"),i=e.split("#");let n=null;if(t.length>1){let e=t[1].split("#")[0];e.endsWith("/")&&(e=e.split("/")[0]),n=r.parseQueryParams(e)}let a=[];if(i.length>1){const e=i[1].split("?")[0];a=e.split("/")}let o,l=t[0].split("#")[0].split("/");return o=/^(https?:\/\/).*/.test(e)?l.splice(0,3).join("/"):l.splice(0,1),l=s(l),new r({base:o,path:l,queryParams:n,hashPath:a})}throw new Error(`Cannot parse url: ${e}`)}static parseQueryParams(e){const t=e.split("&"),i={};return t.forEach(e=>{const t=e.split("=");let s;2===t.length&&t[1].length>0&&(s=decodeURIComponent(t[1]),/^\d*\.?\d*$/.test(s)?s=Number(s):/^(\[|\{)(.*)(\]|\})$/.test(s)?s=JSON.parse(s):"true"===s?s=!0:"false"===s&&(s=!1));const r=i[t[0]];r?Array.isArray(r)?r.push(s):i[t[0]]=[r,s]:i[t[0]]=s}),i}static isUrl(e){const t=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i;return t.test(e)}static hasSameOrigin(e){if(!/^[a-z][a-z0-9+.-]*:/.test(e))return!0;const t=r.parse(window.location.href),i=r.parse(e);return t.base.toLowerCase()===i.base.toLocaleLowerCase()}}t["a"]=r},,function(e,t,i){var s=i(51)("wks"),r=i(37),n=i(11).Symbol,a="function"==typeof n,o=e.exports=function(e){return s[e]||(s[e]=a&&n[e]||(a?n:r)("Symbol."+e))};o.store=s},,function(e,t,i){e.exports=!i(21)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,i){i(42)("split",2,function(e,t,s){"use strict";var r=i(67),n=s,a=[].push,o="split",l="length",c="lastIndex";if("c"=="abbc"[o](/(b)*/)[1]||4!="test"[o](/(?:)/,-1)[l]||2!="ab"[o](/(?:ab)*/)[l]||4!="."[o](/(.?)(.?)/)[l]||"."[o](/()()/)[l]>1||""[o](/.?/)[l]){var h=void 0===/()??/.exec("")[1];s=function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);var s,o,u,d,m,g=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,_=void 0===t?4294967295:t>>>0,f=new RegExp(e.source,p+"g");h||(s=new RegExp("^"+f.source+"$(?!\\s)",p));while(o=f.exec(i)){if(u=o.index+o[0][l],u>y&&(g.push(i.slice(y,o.index)),!h&&o[l]>1&&o[0].replace(s,function(){for(m=1;m<arguments[l]-2;m++)void 0===arguments[m]&&(o[m]=void 0)}),o[l]>1&&o.index<i[l]&&a.apply(g,o.slice(1)),d=o[0][l],y=u,g[l]>=_))break;f[c]===o.index&&f[c]++}return y===i[l]?!d&&f.test("")||g.push(""):g.push(i.slice(y)),g[l]>_?g.slice(0,_):g}}else"0"[o](void 0,0)[l]&&(s=function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)});return[function(i,r){var n=e(this),a=void 0==i?void 0:i[t];return void 0!==a?a.call(i,n,r):s.call(String(n),i,r)},s]})},function(e,t,i){var s=i(27),r=i(65),n=i(48),a=Object.defineProperty;t.f=i(18)?Object.defineProperty:function(e,t,i){if(s(e),t=n(t,!0),s(i),r)try{return a(e,t,i)}catch(o){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},,function(e,t,i){var s=i(20),r=i(43);e.exports=i(18)?function(e,t,i){return s.f(e,t,r(1,i))}:function(e,t,i){return e[t]=i,e}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t){var i={}.hasOwnProperty;e.exports=function(e,t){return i.call(e,t)}},,function(e,t,i){var s=i(24);e.exports=function(e){if(!s(e))throw TypeError(e+" is not an object!");return e}},function(e,t,i){var s=i(11),r=i(23),n=i(25),a=i(37)("src"),o="toString",l=Function[o],c=(""+l).split(o);i(49).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,i,o){var l="function"==typeof i;l&&(n(i,"name")||r(i,"name",t)),e[t]!==i&&(l&&(n(i,a)||r(i,a,e[t]?""+e[t]:c.join(String(t)))),e===s?e[t]=i:o?e[t]?e[t]=i:r(e,t,i):(delete e[t],r(e,t,i)))})(Function.prototype,o,function(){return"function"==typeof this&&this[a]||l.call(this)})},,function(e,t,i){var s=i(38),r=i(11).isFinite;s(s.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},,function(e,t,i){"use strict";var s,r=i(457),n=r.template;function a(e,t,i){return n(e,t,i)}a._=r,e.exports=a,s=function(){return a}.call(t,i,t,e),void 0===s||(e.exports=s)},function(e,t,i){i(42)("search",1,function(e,t,i){return[function(i){"use strict";var s=e(this),r=void 0==i?void 0:i[t];return void 0!==r?r.call(i,s):new RegExp(i)[t](String(s))},i]})},function(e,t,i){var s=i(399),r=i(50);e.exports=function(e){return s(r(e))}},function(e,t,i){i(74)("asyncIterator")},function(e,t,i){"use strict";var s=i(11),r=i(25),n=i(18),a=i(38),o=i(28),l=i(408).KEY,c=i(21),h=i(51),u=i(57),d=i(37),m=i(16),g=i(75),p=i(74),y=i(409),_=i(410),f=i(27),v=i(24),L=i(34),M=i(48),b=i(43),w=i(70),T=i(411),S=i(77),C=i(20),k=i(44),E=S.f,I=C.f,D=T.f,P=s.Symbol,O=s.JSON,Y=O&&O.stringify,x="prototype",A=m("_hidden"),j=m("toPrimitive"),F={}.propertyIsEnumerable,N=h("symbol-registry"),H=h("symbols"),R=h("op-symbols"),z=Object[x],G="function"==typeof P,V=s.QObject,B=!V||!V[x]||!V[x].findChild,U=n&&c(function(){return 7!=w(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a})?function(e,t,i){var s=E(z,t);s&&delete z[t],I(e,t,i),s&&e!==z&&I(z,t,s)}:I,W=function(e){var t=H[e]=w(P[x]);return t._k=e,t},q=G&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},J=function(e,t,i){return e===z&&J(R,t,i),f(e),t=M(t,!0),f(i),r(H,t)?(i.enumerable?(r(e,A)&&e[A][t]&&(e[A][t]=!1),i=w(i,{enumerable:b(0,!1)})):(r(e,A)||I(e,A,b(1,{})),e[A][t]=!0),U(e,t,i)):I(e,t,i)},K=function(e,t){f(e);var i,s=y(t=L(t)),r=0,n=s.length;while(n>r)J(e,i=s[r++],t[i]);return e},Z=function(e,t){return void 0===t?w(e):K(w(e),t)},Q=function(e){var t=F.call(this,e=M(e,!0));return!(this===z&&r(H,e)&&!r(R,e))&&(!(t||!r(this,e)||!r(H,e)||r(this,A)&&this[A][e])||t)},$=function(e,t){if(e=L(e),t=M(t,!0),e!==z||!r(H,t)||r(R,t)){var i=E(e,t);return!i||!r(H,t)||r(e,A)&&e[A][t]||(i.enumerable=!0),i}},X=function(e){var t,i=D(L(e)),s=[],n=0;while(i.length>n)r(H,t=i[n++])||t==A||t==l||s.push(t);return s},ee=function(e){var t,i=e===z,s=D(i?R:L(e)),n=[],a=0;while(s.length>a)!r(H,t=s[a++])||i&&!r(z,t)||n.push(H[t]);return n};G||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(i){this===z&&t.call(R,i),r(this,A)&&r(this[A],e)&&(this[A][e]=!1),U(this,e,b(1,i))};return n&&B&&U(z,e,{configurable:!0,set:t}),W(e)},o(P[x],"toString",function(){return this._k}),S.f=$,C.f=J,i(60).f=T.f=X,i(59).f=Q,i(76).f=ee,n&&!i(54)&&o(z,"propertyIsEnumerable",Q,!0),g.f=function(e){return W(m(e))}),a(a.G+a.W+a.F*!G,{Symbol:P});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ie=0;te.length>ie;)m(te[ie++]);for(var se=k(m.store),re=0;se.length>re;)p(se[re++]);a(a.S+a.F*!G,"Symbol",{for:function(e){return r(N,e+="")?N[e]:N[e]=P(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){B=!0},useSimple:function(){B=!1}}),a(a.S+a.F*!G,"Object",{create:Z,defineProperty:J,defineProperties:K,getOwnPropertyDescriptor:$,getOwnPropertyNames:X,getOwnPropertySymbols:ee}),O&&a(a.S+a.F*(!G||c(function(){var e=P();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))})),"JSON",{stringify:function(e){var t,i,s=[e],r=1;while(arguments.length>r)s.push(arguments[r++]);if(i=t=s[1],(v(t)||void 0!==e)&&!q(e))return _(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!q(t))return t}),s[1]=t,Y.apply(O,s)}}),P[x][j]||i(23)(P[x],j,P[x].valueOf),u(P,"Symbol"),u(Math,"Math",!0),u(s.JSON,"JSON",!0)},function(e,t){var i=0,s=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+s).toString(36))}},function(e,t,i){var s=i(11),r=i(49),n=i(23),a=i(28),o=i(68),l="prototype",c=function(e,t,i){var h,u,d,m,g=e&c.F,p=e&c.G,y=e&c.S,_=e&c.P,f=e&c.B,v=p?s:y?s[t]||(s[t]={}):(s[t]||{})[l],L=p?r:r[t]||(r[t]={}),M=L[l]||(L[l]={});for(h in p&&(i=t),i)u=!g&&v&&void 0!==v[h],d=(u?v:i)[h],m=f&&u?o(d,s):_&&"function"==typeof d?o(Function.call,d):d,v&&a(v,h,d,e&c.U),L[h]!=d&&n(L,h,m),_&&M[h]!=d&&(M[h]=d)};s.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,i){i(42)("match",1,function(e,t,i){return[function(i){"use strict";var s=e(this),r=void 0==i?void 0:i[t];return void 0!==r?r.call(i,s):new RegExp(i)[t](String(s))},i]})},,function(e,t,i){var s=i(11),r=i(412),n=i(20).f,a=i(60).f,o=i(67),l=i(58),c=s.RegExp,h=c,u=c.prototype,d=/a/g,m=/a/g,g=new c(d)!==d;if(i(18)&&(!g||i(21)(function(){return m[i(16)("match")]=!1,c(d)!=d||c(m)==m||"/a/i"!=c(d,"i")}))){c=function(e,t){var i=this instanceof c,s=o(e),n=void 0===t;return!i&&s&&e.constructor===c&&n?e:r(g?new h(s&&!n?e.source:e,t):h((s=e instanceof c)?e.source:e,s&&n?l.call(e):t),i?this:u,c)};for(var p=function(e){e in c||n(c,e,{configurable:!0,get:function(){return h[e]},set:function(t){h[e]=t}})},y=a(h),_=0;y.length>_;)p(y[_++]);u.constructor=c,c.prototype=u,i(28)(s,"RegExp",c)}i(414)("RegExp")},function(e,t,i){"use strict";var s=i(23),r=i(28),n=i(21),a=i(50),o=i(16);e.exports=function(e,t,i){var l=o(e),c=i(a,l,""[e]),h=c[0],u=c[1];n(function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})&&(r(String.prototype,e,h),s(RegExp.prototype,l,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,i){var s=i(71),r=i(56);e.exports=Object.keys||function(e){return s(e,r)}},function(e,t,i){"use strict";var s=i(38),r=i(69),n=i(73),a=i(21),o=[].sort,l=[1,2,3];s(s.P+s.F*(a(function(){l.sort(void 0)})||!a(function(){l.sort(null)})||!i(415)(o)),"Array",{sort:function(e){return void 0===e?o.call(n(this)):o.call(n(this),r(e))}})},function(e,t,i){"use strict";var s=i(6),r=i(442),n=i.n(r),a=i(437),o=i.n(a),l=i(10);const c={LOADING:-1,INACTIVE:0,ACTIVE:1};class h{static get STATE(){return c}constructor(e){this.currentImage=null,this.currentView=null;const t=new ol.source.Vector({features:e.footPrintFeatures});this.footPrintsLayer=new ol.layer.Vector({source:t}),this.rTree=n()(),this.rTree.load(e.rTreeItems),this.olMap=null,this.currentView=null,this.currentImage=null,this.state=c.INACTIVE,this.images=e.images||{},this.projection=e.projection,this.terrainProvider=e.terrainProvider||null,this.direction=e.direction}activate(e,t,i){return this.state===c.INACTIVE?(this.state=c.LOADING,this.olMap=e,this.setView(t,i).then(()=>{this.state=c.ACTIVE})):Promise.resolve(this.state)}deactivate(){this.currentView&&(this.olMap.removeLayer(this.currentView.layer),this.currentView=null),this.currentImage=null,this.state=c.INACTIVE}setView(e,t){const i=this.getImageNameForCoordinates(e);return null!==i?this.setImageOnMap(i).then(()=>{const e=this.currentView.view;e.setZoom(t)}):Promise.reject(new Error("could not find an image in this direction"))}addOptions(e){this.footPrintsLayer.getSource().addFeatures(e.footPrintFeatures),this.rTree.load(e.rTreeItems),Object.assign(this.images,e.images)}postRenderHandler(e){if(this.state===c.ACTIVE){const t=this._pullCoordinateToImageCenter(e.slice()),i=this.currentImage.transformImage2RealWorld(t),s=this.getImageNameForCoordinates(i);null!==s&&s!==this.currentImage.name&&(this.state=c.LOADING,Object(l["e"])(this.currentImage,e).then(e=>this.setImageOnMap(s,e.coords)).catch(()=>{console.warn(`an error occured while setting image ${s} onto the map`),this.state===h.STATE.LOADING&&(this.state=c.ACTIVE)}))}}_pullCoordinateToImageCenter(e){if(this.currentImage){const t=[this.currentImage.size[0]/2,this.currentImage.size[1]/2];e[0]<t[0]?e[0]+=50:e[0]-=50,e[1]<t[1]?e[1]+=50:e[1]-=50}return e}setImageOnMap(e,t){function i(e,t){return e<0?0:e>t?t:e}if(this.state===h.STATE.INACTIVE)return Promise.resolve();this.state=h.STATE.LOADING;let r=Promise.resolve();if(!this.currentImage||e!==this.currentImage.name){const t=this.images[e];r=t.calculateImageAverageHeight().then(()=>{if(this.state===h.STATE.INACTIVE)return;this.currentImage=t;const e=this.currentImage.view,i=!this.currentView||this.currentView&&this.currentView.id!==e.id;this.currentView&&this.currentView.id!==e.id&&this.olMap.removeLayer(this.currentView.layer),this.currentView=e,this.currentView.setImageName(this.currentImage.name),this.olMap.getView()&&this.olMap.getView().getResolution()&&this.currentView.view.setResolution(this.olMap.getView().getResolution()),this.olMap.setView(this.currentView.view),i&&this.olMap.addLayer(this.currentView.layer)})}return r.then(()=>{if(this.state===h.STATE.INACTIVE)return;const e=Object(s["a"])(this.currentImage.size,2),r=e[0],n=e[1];let a=[r/2,n/2];if(t){const e=this.currentImage.transformRealWorld2Image(t,t[2]);e[0]=i(e[0],r),e[1]=i(e[1],n),a=e}this.currentView.view.setCenter(a),this.state=h.STATE.ACTIVE})}getImageIdInDirection(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI/4;if(!this.currentImage)return null;const i=this.currentImage.centerPointOnGround,s=o()(this.rTree,i[0],i[1],20),r=s.find(s=>{if(s.name!==this.currentImage.name){let r=Math.atan2(s.minY-i[1],s.minX-i[0]);r<=0&&(r+=2*Math.PI);let n=r-e;if(n>Math.PI?n-=2*Math.PI:n<-Math.PI&&(n+=2*Math.PI),n<=t&&n>=-t)return s}return!1});return r?r.name:null}getImageNameForCoordinates(e){const t=o()(this.rTree,e[0],e[1],1);return t.length?t[0].name:null}}t["a"]=h},,function(e,t,i){var s=i(24);e.exports=function(e,t){if(!s(e))return e;var i,r;if(t&&"function"==typeof(i=e.toString)&&!s(r=i.call(e)))return r;if("function"==typeof(i=e.valueOf)&&!s(r=i.call(e)))return r;if(!t&&"function"==typeof(i=e.toString)&&!s(r=i.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){var i=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=i)},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,i){var s=i(11),r="__core-js_shared__",n=s[r]||(s[r]={});e.exports=function(e){return n[e]||(n[e]={})}},function(e,t){var i={}.toString;e.exports=function(e){return i.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t){e.exports=!1},function(e,t,i){var s=i(51)("keys"),r=i(37);e.exports=function(e){return s[e]||(s[e]=r(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,i){var s=i(20).f,r=i(25),n=i(16)("toStringTag");e.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,n)&&s(e,n,{configurable:!0,value:t})}},function(e,t,i){"use strict";var s=i(27);e.exports=function(){var e=s(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,i){var s=i(71),r=i(56).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,r)}},function(e,t,i){"use strict";(function(t){var s=i(13),r=i(420),n={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!==typeof XMLHttpRequest?e=i(79):"undefined"!==typeof t&&(e=i(79)),e}var l={adapter:o(),transformRequest:[function(e,t){return r(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};s.forEach(["delete","get","head"],function(e){l.headers[e]={}}),s.forEach(["post","put","patch"],function(e){l.headers[e]=s.merge(n)}),e.exports=l}).call(this,i(419))},function(e,t,i){var s=i(38);s(s.S,"Number",{isNaN:function(e){return e!=e}})},,,function(e,t,i){e.exports=!i(18)&&!i(21)(function(){return 7!=Object.defineProperty(i(66)("div"),"a",{get:function(){return 7}}).a})},function(e,t,i){var s=i(24),r=i(11).document,n=s(r)&&s(r.createElement);e.exports=function(e){return n?r.createElement(e):{}}},function(e,t,i){var s=i(24),r=i(52),n=i(16)("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[n])?!!t:"RegExp"==r(e))}},function(e,t,i){var s=i(69);e.exports=function(e,t,i){if(s(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,s){return e.call(t,i,s)};case 3:return function(i,s,r){return e.call(t,i,s,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,i){var s=i(27),r=i(402),n=i(56),a=i(55)("IE_PROTO"),o=function(){},l="prototype",c=function(){var e,t=i(66)("iframe"),s=n.length,r="<",a=">";t.style.display="none",i(406).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(r+"script"+a+"document.F=Object"+r+"/script"+a),e.close(),c=e.F;while(s--)delete c[l][n[s]];return c()};e.exports=Object.create||function(e,t){var i;return null!==e?(o[l]=s(e),i=new o,o[l]=null,i[a]=e):i=c(),void 0===t?i:r(i,t)}},function(e,t,i){var s=i(25),r=i(34),n=i(403)(!1),a=i(55)("IE_PROTO");e.exports=function(e,t){var i,o=r(e),l=0,c=[];for(i in o)i!=a&&s(o,i)&&c.push(i);while(t.length>l)s(o,i=t[l++])&&(~n(c,i)||c.push(i));return c}},function(e,t){var i=Math.ceil,s=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?s:i)(e)}},function(e,t,i){var s=i(50);e.exports=function(e){return Object(s(e))}},function(e,t,i){var s=i(11),r=i(49),n=i(54),a=i(75),o=i(20).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=n?{}:s.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},function(e,t,i){t.f=i(16)},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,i){var s=i(59),r=i(43),n=i(34),a=i(48),o=i(25),l=i(65),c=Object.getOwnPropertyDescriptor;t.f=i(18)?c:function(e,t){if(e=n(e),t=a(t,!0),l)try{return c(e,t)}catch(i){}if(o(e,t))return r(!s.f.call(e,t),e[t])}},function(e,t,i){"use strict";e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(t,i)}}},function(e,t,i){"use strict";var s=i(13),r=i(421),n=i(423),a=i(424),o=i(425),l=i(80);e.exports=function(e){return new Promise(function(t,c){var h=e.data,u=e.headers;s.isFormData(h)&&delete u["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",g=e.auth.password||"";u.Authorization="Basic "+btoa(m+":"+g)}if(d.open(e.method.toUpperCase(),n(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?d.response:d.responseText,n={data:s,status:d.status,statusText:d.statusText,headers:i,config:e,request:d};r(t,c,n),d=null}},d.onerror=function(){c(l("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(l("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},s.isStandardBrowserEnv()){var p=i(426),y=(e.withCredentials||o(e.url))&&e.xsrfCookieName?p.read(e.xsrfCookieName):void 0;y&&(u[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&s.forEach(u,function(e,t){"undefined"===typeof h&&"content-type"===t.toLowerCase()?delete u[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(_){if("json"!==e.responseType)throw _}"function"===typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===h&&(h=null),d.send(h)})}},function(e,t,i){"use strict";var s=i(422);e.exports=function(e,t,i,r,n){var a=new Error(e);return s(a,t,i,r,n)}},function(e,t,i){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,i){"use strict";function s(e){this.message=e}s.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},s.prototype.__CANCEL__=!0,e.exports=s},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(s){"object"===typeof window&&(i=window)}e.exports=i},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"vm":"VM":i?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(e){return function(t,i,n,a){var o=s(t),l=r[e][s(t)];return 2===o&&(l=l[i?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o=e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return i[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});return o})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},s={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(t,r,n,a){var o=i(t),l=s[e][i(t)];return 2===o&&(l=l[r?0:1]),l.replace(/%d/i,t)}},n=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a=e.defineLocale("ar-ly",{months:n,monthsShort:n,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});return a})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return i[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},i=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,i){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var i=e%10,s=e%100-i,r=e>=100?100:null;return e+(t[i]||t[s]||t[r])},week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t){var i=e.split("_");return t%10===1&&t%100!==11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function i(e,i,s){var r={ss:i?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:i?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:i?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===s?i?"хвіліна":"хвіліну":"h"===s?i?"гадзіна":"гадзіну":e+" "+t(r[s],+e)}var s=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:i,mm:i,h:i,hh:i,d:"дзень",dd:i,M:"месяц",MM:i,y:"год",yy:i},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},i={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},s=e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,i){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},i={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},s=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,i){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i){var s={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+r(s[i],e)}function i(e){switch(s(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function s(e){return e>9?s(e%10):e}function r(e,t){return 2===t?n(e):e}function n(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var a=e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:i},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4}});return a})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i){var s=e+" ";switch(i){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",s;case"m":return t?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",s;case"h":return t?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",s;case"dd":return s+=1===e?"dan":"dana",s;case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",s;case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",s}}var i=e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var i=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(i="a"),e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),i="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),s=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],r=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function n(e){return e>1&&e<5&&1!==~~(e/10)}function a(e,t,i,s){var r=e+" ";switch(i){case"s":return t||s?"pár sekund":"pár sekundami";case"ss":return t||s?r+(n(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":s?"minutu":"minutou";case"mm":return t||s?r+(n(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":s?"hodinu":"hodinou";case"hh":return t||s?r+(n(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||s?"den":"dnem";case"dd":return t||s?r+(n(e)?"dny":"dní"):r+"dny";case"M":return t||s?"měsíc":"měsícem";case"MM":return t||s?r+(n(e)?"měsíce":"měsíců"):r+"měsíci";case"y":return t||s?"rok":"rokem";case"yy":return t||s?r+(n(e)?"roky":"let"):r+"lety"}}var o=e.defineLocale("cs",{months:t,monthsShort:i,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,i="",s=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?i=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(i=s[t]),e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],i=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],s=e.defineLocale("dv",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,i){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var i=e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"===typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,i){return e>11?i?"μμ":"ΜΜ":i?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,i){var s=this._calendarEl[e],r=i&&i.hours();return t(s)&&(s=s.apply(i)),s.replace("{}",r%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,i){return e>11?i?"p.t.m.":"P.T.M.":i?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,n=e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,n=e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,n=e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[i][2]?r[i][2]:r[i][1]:s?r[i][0]:r[i][1]}var i=e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},i={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},s=e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,i){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return i[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),i=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function s(e,t,i,s){var n="";switch(i){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":return s?"sekunnin":"sekuntia";case"m":return s?"minuutin":"minuutti";case"mm":n=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":n=s?"tunnin":"tuntia";break;case"d":return s?"päivän":"päivä";case"dd":n=s?"päivän":"päivää";break;case"M":return s?"kuukauden":"kuukausi";case"MM":n=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":n=s?"vuoden":"vuotta";break}return n=r(e,s)+" "+n,n}function r(e,s){return e<10?s?i[e]:t[e]:e}var n=e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),i="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),s=e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],i=["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],s=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],r=["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],n=["Do","Lu","Má","Ce","Dé","hA","Sa"],a=e.defineLocale("ga",{months:t,monthsShort:i,monthsParseExact:!0,weekdays:s,weekdaysShort:r,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return a})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],i=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],s=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],r=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],n=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],a=e.defineLocale("gd",{months:t,monthsShort:i,monthsParseExact:!0,weekdays:s,weekdaysShort:r,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return a})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?r[i][0]:r[i][1]}var i=e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},i={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},s=e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,i){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?i?'לפנה"צ':"לפני הצהריים":e<18?i?'אחה"צ':"אחרי הצהריים":"בערב"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},s=e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i){var s=e+" ";switch(i){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",s;case"m":return t?"jedna minuta":"jedne minute";case"mm":return s+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",s;case"h":return t?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",s;case"dd":return s+=1===e?"dan":"dana",s;case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",s;case"yy":return s+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",s}}var i=e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function i(e,t,i,s){var r=e;switch(i){case"s":return s||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(s||t)?" másodperc":" másodperce";case"m":return"egy"+(s||t?" perc":" perce");case"mm":return r+(s||t?" perc":" perce");case"h":return"egy"+(s||t?" óra":" órája");case"hh":return r+(s||t?" óra":" órája");case"d":return"egy"+(s||t?" nap":" napja");case"dd":return r+(s||t?" nap":" napja");case"M":return"egy"+(s||t?" hónap":" hónapja");case"MM":return r+(s||t?" hónap":" hónapja");case"y":return"egy"+(s||t?" év":" éve");case"yy":return r+(s||t?" év":" éve")}return""}function s(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var r=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,i){return e<12?!0===i?"de":"DE":!0===i?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return s.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return s.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e){return e%100===11||e%10!==1}function i(e,i,s,r){var n=e+" ";switch(s){case"s":return i||r?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?n+(i||r?"sekúndur":"sekúndum"):n+"sekúnda";case"m":return i?"mínúta":"mínútu";case"mm":return t(e)?n+(i||r?"mínútur":"mínútum"):i?n+"mínúta":n+"mínútu";case"hh":return t(e)?n+(i||r?"klukkustundir":"klukkustundum"):n+"klukkustund";case"d":return i?"dagur":r?"dag":"degi";case"dd":return t(e)?i?n+"dagar":n+(r?"daga":"dögum"):i?n+"dagur":n+(r?"dag":"degi");case"M":return i?"mánuður":r?"mánuð":"mánuði";case"MM":return t(e)?i?n+"mánuðir":n+(r?"mánuði":"mánuðum"):i?n+"mánuður":n+(r?"mánuð":"mánuði");case"y":return i||r?"ár":"ári";case"yy":return t(e)?n+(i||r?"ár":"árum"):n+(i||r?"ár":"ári")}}var s=e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:i,ss:i,m:i,mm:i,h:"klukkustund",hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,i){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()<e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},i=e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var i=e%10,s=e>=100?100:null;return e+(t[e]||t[i]||t[s])},week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},i={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},s=e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,i){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},i={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},s=e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,i){return e<12?"오전":"오후"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],r=e.defineLocale("ku",{months:s,monthsShort:s,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,i){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return i[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});return r})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},i=e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var i=e%10,s=e>=100?100:null;return e+(t[e]||t[i]||t[s])},week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[i][0]:r[i][1]}function i(e){var t=e.substr(0,e.indexOf(" "));return r(t)?"a "+e:"an "+e}function s(e){var t=e.substr(0,e.indexOf(" "));return r(t)?"viru "+e:"virun "+e}function r(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,i=e/10;return r(0===t?i:t)}if(e<1e4){while(e>=10)e/=10;return r(e)}return e/=1e3,r(e)}var n=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:i,past:s,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,i){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function i(e,t,i,s){return t?"kelios sekundės":s?"kelių sekundžių":"kelias sekundes"}function s(e,t,i,s){return t?n(i)[0]:s?n(i)[1]:n(i)[2]}function r(e){return e%10===0||e>10&&e<20}function n(e){return t[e].split("_")}function a(e,t,i,a){var o=e+" ";return 1===e?o+s(e,t,i[0],a):t?o+(r(e)?n(i)[1]:n(i)[0]):a?o+n(i)[1]:o+(r(e)?n(i)[1]:n(i)[2])}var o=e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:i,ss:a,m:s,mm:a,h:s,hh:a,d:s,dd:a,M:s,MM:a,y:s,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return o})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function i(e,t,i){return i?t%10===1&&t%100!==11?e[2]:e[3]:t%10===1&&t%100!==11?e[0]:e[1]}function s(e,s,r){return e+" "+i(t[r],e,s)}function r(e,s,r){return i(t[r],e,s)}function n(e,t){return t?"dažas sekundes":"dažām sekundēm"}var a=e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:n,ss:s,m:r,mm:s,h:r,hh:s,d:r,dd:s,M:r,MM:s,y:r,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,s){var r=t.words[s];return 1===s.length?i?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}},i=e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,i){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){switch(i){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var i=e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,i){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function s(e,t,i,s){var r="";if(t)switch(i){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे";break}else switch(i){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां";break}return r.replace(/%d/i,e)}var r=e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return r})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},i={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},s=e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},s=e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,i){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,n=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,n=e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?i[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},i={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},s=e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function s(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function r(e,t,i){var r=e+" ";switch(i){case"ss":return r+(s(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(s(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(s(e)?"godziny":"godzin");case"MM":return r+(s(e)?"miesiące":"miesięcy");case"yy":return r+(s(e)?"lata":"lat")}}var n=e.defineLocale("pl",{months:function(e,s){return e?""===s?"("+i[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(s)?i[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:r,m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:r,y:"rok",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i){var s={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},r=" ";return(e%100>=20||e>=100&&e%100===0)&&(r=" de "),e+r+s[i]}var i=e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t){var i=e.split("_");return t%10===1&&t%100!==11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function i(e,i,s){var r={ss:i?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:i?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===s?i?"минута":"минуту":e+" "+t(r[s],+e)}var s=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],r=e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:s,longMonthsParse:s,shortMonthsParse:s,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:i,m:i,mm:i,h:"час",hh:i,d:"день",dd:i,M:"месяц",MM:i,y:"год",yy:i},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});return r})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],i=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],s=e.defineLocale("sd",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,i){return e>11?i?"ප.ව.":"පස් වරු":i?"පෙ.ව.":"පෙර වරු"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),i="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function s(e){return e>1&&e<5}function r(e,t,i,r){var n=e+" ";switch(i){case"s":return t||r?"pár sekúnd":"pár sekundami";case"ss":return t||r?n+(s(e)?"sekundy":"sekúnd"):n+"sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?n+(s(e)?"minúty":"minút"):n+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?n+(s(e)?"hodiny":"hodín"):n+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?n+(s(e)?"dni":"dní"):n+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?n+(s(e)?"mesiace":"mesiacov"):n+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?n+(s(e)?"roky":"rokov"):n+"rokmi"}}var n=e.defineLocale("sk",{months:t,monthsShort:i,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t,i,s){var r=e+" ";switch(i){case"s":return t||s?"nekaj sekund":"nekaj sekundami";case"ss":return r+=1===e?t?"sekundo":"sekundi":2===e?t||s?"sekundi":"sekundah":e<5?t||s?"sekunde":"sekundah":"sekund",r;case"m":return t?"ena minuta":"eno minuto";case"mm":return r+=1===e?t?"minuta":"minuto":2===e?t||s?"minuti":"minutama":e<5?t||s?"minute":"minutami":t||s?"minut":"minutami",r;case"h":return t?"ena ura":"eno uro";case"hh":return r+=1===e?t?"ura":"uro":2===e?t||s?"uri":"urama":e<5?t||s?"ure":"urami":t||s?"ur":"urami",r;case"d":return t||s?"en dan":"enim dnem";case"dd":return r+=1===e?t||s?"dan":"dnem":2===e?t||s?"dni":"dnevoma":t||s?"dni":"dnevi",r;case"M":return t||s?"en mesec":"enim mesecem";case"MM":return r+=1===e?t||s?"mesec":"mesecem":2===e?t||s?"meseca":"mesecema":e<5?t||s?"mesece":"meseci":t||s?"mesecev":"meseci",r;case"y":return t||s?"eno leto":"enim letom";case"yy":return r+=1===e?t||s?"leto":"letom":2===e?t||s?"leti":"letoma":e<5?t||s?"leta":"leti":t||s?"let":"leti",r}}var i=e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,i){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,s){var r=t.words[s];return 1===s.length?i?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}},i=e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,s){var r=t.words[s];return 1===s.length?i?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}},i=e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,i){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"e":1===t?"a":2===t?"a":"e";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},i={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},s=e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return i[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,i){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},i=e.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var i=e%10,s=e>=100?100:null;return e+(t[e]||t[i]||t[s])},week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,i){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function i(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq",t}function s(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret",t}function r(e,t,i,s){var r=n(e);switch(i){case"ss":return r+" lup";case"mm":return r+" tup";case"hh":return r+" rep";case"dd":return r+" jaj";case"MM":return r+" jar";case"yy":return r+" DIS"}}function n(e){var i=Math.floor(e%1e3/100),s=Math.floor(e%100/10),r=e%10,n="";return i>0&&(n+=t[i]+"vatlh"),s>0&&(n+=(""!==n?" ":"")+t[s]+"maH"),r>0&&(n+=(""!==n?" ":"")+t[r]),""===n?"pagh":n}var a=e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:i,past:s,s:"puS lup",ss:r,m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},i=e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,i){switch(i){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var s=e%10,r=e%100-s,n=e>=100?100:null;return e+(t[s]||t[r]||t[n])}},week:{dow:1,doy:7}});return i})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,i){return e>11?i?"d'o":"D'O":i?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function i(e,t,i,s){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s?r[i][0]:t?r[i][0]:r[i][1]}return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var s=100*e+t;return s<600?"يېرىم كېچە":s<900?"سەھەر":s<1130?"چۈشتىن بۇرۇن":s<1230?"چۈش":s<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";function t(e,t){var i=e.split("_");return t%10===1&&t%100!==11?i[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?i[1]:i[2]}function i(e,i,s){var r={ss:i?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:i?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:i?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===s?i?"хвилина":"хвилину":"h"===s?i?"година":"годину":e+" "+t(r[s],+e)}function s(e,t){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};if(!0===e)return i["nominative"].slice(1,7).concat(i["nominative"].slice(0,1));if(!e)return i["nominative"];var s=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative";return i[s][e.day()]}function r(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var n=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:s,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:r("[Сьогодні "),nextDay:r("[Завтра "),lastDay:r("[Вчора "),nextWeek:r("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return r("[Минулої] dddd [").call(this);case 1:case 2:case 4:return r("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:i,m:i,mm:i,h:"годину",hh:i,d:"день",dd:i,M:"місяць",MM:i,y:"рік",yy:i},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return n})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],i=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],s=e.defineLocale("ur",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return s})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"sa":"SA":i?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t})},function(e,t,i){(function(e,t){t(i(1))})(0,function(e){"use strict";var t=e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t})},function(e,t,i){i(18)&&"g"!=/./g.flags&&i(20).f(RegExp.prototype,"flags",{configurable:!0,get:i(58)})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){var s=i(453),r=i(454);function n(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;o<16;++o)t[n+o]=a[o];return t||r(a)}e.exports=n},function(e,t,i){"use strict";var s=i(388),r=i.n(s),n=i(10);class a{constructor(e){this.id=r()(),this.name=e.name,this.meta=e.meta,this.viewDirection=e.viewDirection,this.viewDirectionAngle=null!=e.viewDirectionAngle&&this.meta.version>=3.4&&this.meta.buildNumber>=18?e.viewDirectionAngle:null,this.camera=e.camera,this.groundCoordinates=e.groundCoordinates,this.centerPointOnGround=e.centerPointOnGround,this.pToRealworld=e.pToRealworld||null,this.pToImage=e.pToImage||null,this.projectionCenter=e.projectionCenter||null,this.projection=e.projection,this.averageHeight=null,this.terrainProvider=e.terrainProvider||null}get size(){return this.camera&&this.camera.size?this.camera.size:this.meta.size}get view(){return this.camera&&this.camera.view?this.camera.view:this.meta.getView(this.viewDirection)}getAverageHeight(){return null!=this.averageHeight?this.averageHeight:0}transformImage2RealWorld(e,t){let i=e;if(!this.camera)return this.transformNoCamera(i,!0,t);this.camera.hasRadial&&(i=this.camera.radialDistortionCoordinate(i,!0));const s=new Cesium.Cartesian3(i[0],this.size[1]-i[1],1),r=Cesium.Matrix3.multiplyByVector(this.pToRealworld,s,new Cesium.Cartesian3),n=t||this.getAverageHeight(),a=new Cesium.Cartesian3(this.centerPointOnGround[0],this.centerPointOnGround[1],n),o=Cesium.Cartesian3.subtract(this.projectionCenter,a,new Cesium.Cartesian3),l=-1*Cesium.Cartesian3.dot(Cesium.Cartesian3.UNIT_Z,o),c=Cesium.Cartesian3.dot(Cesium.Cartesian3.UNIT_Z,r),h=l/c,u=Cesium.Cartesian3.add(this.projectionCenter,Cesium.Cartesian3.multiplyByScalar(r,h,new Cesium.Cartesian3),new Cesium.Cartesian3);return[u.x,u.y,n]}transformRealWorld2Image(e,t){if(!this.camera)return this.transformNoCamera(e,!1,t);const i=t||this.getAverageHeight(),s=new Cesium.Cartesian4(e[0],e[1],i,1),r=Cesium.Matrix4.multiplyByVector(this.pToImage,s,new Cesium.Cartesian4),n=[r.x/r.z,r.y/r.z],a=[n[0],this.size[1]-n[1]];return this.camera.radialDistortionCoordinate(a,!1)}transformNoCamera(e,t,i){const s=[[0,0],[this.size[0],0],this.size,[0,this.size[1]]],r=Object(n["d"])(t?s:this.groundCoordinates,t?this.groundCoordinates:s,t,e,this.viewDirection),a=i||this.getAverageHeight();if(null===r||null==r.x||null==r.y){console.error("Real world coordinate could not be determined from footprint data, center will be returned");const e=[this.centerPointOnGround[0],this.centerPointOnGround[1]];return t&&e.push(a),e}const o=[r.x,r.y];return t&&o.push(a),o}calculateImageAverageHeight(){if(null===this.averageHeight){const e=(this.groundCoordinates[0][2]+this.groundCoordinates[1][2]+this.groundCoordinates[2][2]+this.groundCoordinates[3][2])/4;if(0===e&&this.terrainProvider)return Object(n["c"])(this.terrainProvider,[this.centerPointOnGround.slice()],this.projection).then(e=>{e[0]&&null!=e[0][2]&&(this.averageHeight=e[0][2])}).catch(()=>{this.averageHeight=e});this.averageHeight=e}return Promise.resolve()}}t["a"]=a},function(e,t,i){"use strict";var s=i(10);class r{constructor(e){this.name=e.name,this.principalPoint=e["principal-point"],this.pixelSize=e["pixel-size"],this.radialE2F=e["radial-distorsion-expected-2-found"],this.radialF2E=e["radial-distorsion-found-2-expected"],this.hasRadial=!!(this.pixelSize&&this.radialE2F&&this.radialF2E),this.size=e.size||null,this.view=e.view||null}radialDistortionCoordinate(e,t){if(this.hasRadial){const i=t?this.radialF2E:this.radialE2F,r=Object(s["a"])(this.principalPoint,e)*this.pixelSize[0];if(0===r)return e.slice();const n=e[0]-this.principalPoint[0],a=e[1]-this.principalPoint[1];let o=0;for(let e=0;e<i.length;++e)o+=i[e]*r**e;const l=(r+o)/this.pixelSize[0],c=Math.atan2(a,n);return[this.principalPoint[0]+l*Math.cos(c),this.principalPoint[1]+l*Math.sin(c)]}return e.slice()}}t["a"]=r},,,,,,function(e,t,i){"use strict";var s=i(397),r=i(398),n=i(53),a=i(34);e.exports=i(400)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?i:"values"==t?e[i]:[i,e[i]])},"values"),n.Arguments=n.Array,s("keys"),s("values"),s("entries")},function(e,t,i){var s=i(16)("unscopables"),r=Array.prototype;void 0==r[s]&&i(23)(r,s,{}),e.exports=function(e){r[s][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,i){var s=i(52);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==s(e)?e.split(""):Object(e)}},function(e,t,i){"use strict";var s=i(54),r=i(38),n=i(28),a=i(23),o=i(25),l=i(53),c=i(401),h=i(57),u=i(407),d=i(16)("iterator"),m=!([].keys&&"next"in[].keys()),g="@@iterator",p="keys",y="values",_=function(){return this};e.exports=function(e,t,i,f,v,L,M){c(i,t,f);var b,w,T,S=function(e){if(!m&&e in I)return I[e];switch(e){case p:return function(){return new i(this,e)};case y:return function(){return new i(this,e)}}return function(){return new i(this,e)}},C=t+" Iterator",k=v==y,E=!1,I=e.prototype,D=I[d]||I[g]||v&&I[v],P=!m&&D||S(v),O=v?k?S("entries"):P:void 0,Y="Array"==t&&I.entries||D;if(Y&&(T=u(Y.call(new e)),T!==Object.prototype&&T.next&&(h(T,C,!0),s||o(T,d)||a(T,d,_))),k&&D&&D.name!==y&&(E=!0,P=function(){return D.call(this)}),s&&!M||!m&&!E&&I[d]||a(I,d,P),l[t]=P,l[C]=_,v)if(b={values:k?P:S(y),keys:L?P:S(p),entries:O},M)for(w in b)w in I||n(I,w,b[w]);else r(r.P+r.F*(m||E),t,b);return b}},function(e,t,i){"use strict";var s=i(70),r=i(43),n=i(57),a={};i(23)(a,i(16)("iterator"),function(){return this}),e.exports=function(e,t,i){e.prototype=s(a,{next:r(1,i)}),n(e,t+" Iterator")}},function(e,t,i){var s=i(20),r=i(27),n=i(44);e.exports=i(18)?Object.defineProperties:function(e,t){r(e);var i,a=n(t),o=a.length,l=0;while(o>l)s.f(e,i=a[l++],t[i]);return e}},function(e,t,i){var s=i(34),r=i(404),n=i(405);e.exports=function(e){return function(t,i,a){var o,l=s(t),c=r(l.length),h=n(a,c);if(e&&i!=i){while(c>h)if(o=l[h++],o!=o)return!0}else for(;c>h;h++)if((e||h in l)&&l[h]===i)return e||h||0;return!e&&-1}}},function(e,t,i){var s=i(72),r=Math.min;e.exports=function(e){return e>0?r(s(e),9007199254740991):0}},function(e,t,i){var s=i(72),r=Math.max,n=Math.min;e.exports=function(e,t){return e=s(e),e<0?r(e+t,0):n(e,t)}},function(e,t,i){var s=i(11).document;e.exports=s&&s.documentElement},function(e,t,i){var s=i(25),r=i(73),n=i(55)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),s(e,n)?e[n]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,i){var s=i(37)("meta"),r=i(24),n=i(25),a=i(20).f,o=0,l=Object.isExtensible||function(){return!0},c=!i(21)(function(){return l(Object.preventExtensions({}))}),h=function(e){a(e,s,{value:{i:"O"+ ++o,w:{}}})},u=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n(e,s)){if(!l(e))return"F";if(!t)return"E";h(e)}return e[s].i},d=function(e,t){if(!n(e,s)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[s].w},m=function(e){return c&&g.NEED&&l(e)&&!n(e,s)&&h(e),e},g=e.exports={KEY:s,NEED:!1,fastKey:u,getWeak:d,onFreeze:m}},function(e,t,i){var s=i(44),r=i(76),n=i(59);e.exports=function(e){var t=s(e),i=r.f;if(i){var a,o=i(e),l=n.f,c=0;while(o.length>c)l.call(e,a=o[c++])&&t.push(a)}return t}},function(e,t,i){var s=i(52);e.exports=Array.isArray||function(e){return"Array"==s(e)}},function(e,t,i){var s=i(34),r=i(60).f,n={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return r(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==n.call(e)?o(e):r(s(e))}},function(e,t,i){var s=i(24),r=i(413).set;e.exports=function(e,t,i){var n,a=t.constructor;return a!==i&&"function"==typeof a&&(n=a.prototype)!==i.prototype&&s(n)&&r&&r(e,n),e}},function(e,t,i){var s=i(24),r=i(27),n=function(e,t){if(r(e),!s(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,s){try{s=i(68)(Function.call,i(77).f(Object.prototype,"__proto__").set,2),s(e,[]),t=!(e instanceof Array)}catch(r){t=!0}return function(e,i){return n(e,i),t?e.__proto__=i:s(e,i),e}}({},!1):void 0),check:n}},function(e,t,i){"use strict";var s=i(11),r=i(20),n=i(18),a=i(16)("species");e.exports=function(e){var t=s[e];n&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,i){"use strict";var s=i(21);e.exports=function(e,t){return!!e&&s(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,i){"use strict";var s=i(13),r=i(78),n=i(418),a=i(61);function o(e){var t=new n(e),i=r(n.prototype.request,t);return s.extend(i,n.prototype,t),s.extend(i,t),i}var l=o(a);l.Axios=n,l.create=function(e){return o(s.merge(a,e))},l.Cancel=i(82),l.CancelToken=i(432),l.isCancel=i(81),l.all=function(e){return Promise.all(e)},l.spread=i(433),e.exports=l,e.exports.default=l},function(e,t){
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,i){"use strict";var s=i(61),r=i(13),n=i(427),a=i(428);function o(e){this.defaults=e,this.interceptors={request:new n,response:new n}}o.prototype.request=function(e){"string"===typeof e&&(e=r.merge({url:arguments[0]},arguments[1])),e=r.merge(s,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[a,void 0],i=Promise.resolve(e);this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});while(t.length)i=i.then(t.shift(),t.shift());return i},r.forEach(["delete","get","head","options"],function(e){o.prototype[e]=function(t,i){return this.request(r.merge(i||{},{method:e,url:t}))}}),r.forEach(["post","put","patch"],function(e){o.prototype[e]=function(t,i,s){return this.request(r.merge(s||{},{method:e,url:t,data:i}))}}),e.exports=o},function(e,t){var i,s,r=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===n||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}function l(e){if(s===clearTimeout)return clearTimeout(e);if((s===a||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(function(){try{i="function"===typeof setTimeout?setTimeout:n}catch(e){i=n}try{s="function"===typeof clearTimeout?clearTimeout:a}catch(e){s=a}})();var c,h=[],u=!1,d=-1;function m(){u&&c&&(u=!1,c.length?h=c.concat(h):d=-1,h.length&&g())}function g(){if(!u){var e=o(m);u=!0;var t=h.length;while(t){c=h,h=[];while(++d<t)c&&c[d].run();d=-1,t=h.length}c=null,u=!1,l(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];h.push(new p(e,t)),1!==h.length||u||o(g)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,i){"use strict";var s=i(13);e.exports=function(e,t){s.forEach(e,function(i,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[s])})}},function(e,t,i){"use strict";var s=i(80);e.exports=function(e,t,i){var r=i.config.validateStatus;i.status&&r&&!r(i.status)?t(s("Request failed with status code "+i.status,i.config,null,i.request,i)):e(i)}},function(e,t,i){"use strict";e.exports=function(e,t,i,s,r){return e.config=t,i&&(e.code=i),e.request=s,e.response=r,e}},function(e,t,i){"use strict";var s=i(13);function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(s.isURLSearchParams(t))n=t.toString();else{var a=[];s.forEach(t,function(e,t){null!==e&&"undefined"!==typeof e&&(s.isArray(e)?t+="[]":e=[e],s.forEach(e,function(e){s.isDate(e)?e=e.toISOString():s.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),n=a.join("&")}return n&&(e+=(-1===e.indexOf("?")?"?":"&")+n),e}},function(e,t,i){"use strict";var s=i(13),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,n,a={};return e?(s.forEach(e.split("\n"),function(e){if(n=e.indexOf(":"),t=s.trim(e.substr(0,n)).toLowerCase(),i=s.trim(e.substr(n+1)),t){if(a[t]&&r.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([i]):a[t]?a[t]+", "+i:i}}),a):a}},function(e,t,i){"use strict";var s=i(13);e.exports=s.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function r(e){var s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=r(window.location.href),function(t){var i=s.isString(t)?r(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(e,t,i){"use strict";var s=i(13);e.exports=s.isStandardBrowserEnv()?function(){return{write:function(e,t,i,r,n,a){var o=[];o.push(e+"="+encodeURIComponent(t)),s.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),s.isString(r)&&o.push("path="+r),s.isString(n)&&o.push("domain="+n),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,i){"use strict";var s=i(13);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){s.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,i){"use strict";var s=i(13),r=i(429),n=i(81),a=i(61),o=i(430),l=i(431);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){c(e),e.baseURL&&!o(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=s.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),s.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||a.adapter;return t(e).then(function(t){return c(e),t.data=r(t.data,t.headers,e.transformResponse),t},function(t){return n(t)||(c(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,i){"use strict";var s=i(13);e.exports=function(e,t,i){return s.forEach(i,function(i){e=i(e,t)}),e}},function(e,t,i){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,i){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,i){"use strict";var s=i(82);function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var i=this;e(function(e){i.reason||(i.reason=new s(e),t(i.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t,i){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){var s={"./af":84,"./af.js":84,"./ar":85,"./ar-dz":86,"./ar-dz.js":86,"./ar-kw":87,"./ar-kw.js":87,"./ar-ly":88,"./ar-ly.js":88,"./ar-ma":89,"./ar-ma.js":89,"./ar-sa":90,"./ar-sa.js":90,"./ar-tn":91,"./ar-tn.js":91,"./ar.js":85,"./az":92,"./az.js":92,"./be":93,"./be.js":93,"./bg":94,"./bg.js":94,"./bm":95,"./bm.js":95,"./bn":96,"./bn.js":96,"./bo":97,"./bo.js":97,"./br":98,"./br.js":98,"./bs":99,"./bs.js":99,"./ca":100,"./ca.js":100,"./cs":101,"./cs.js":101,"./cv":102,"./cv.js":102,"./cy":103,"./cy.js":103,"./da":104,"./da.js":104,"./de":105,"./de-at":106,"./de-at.js":106,"./de-ch":107,"./de-ch.js":107,"./de.js":105,"./dv":108,"./dv.js":108,"./el":109,"./el.js":109,"./en-SG":110,"./en-SG.js":110,"./en-au":111,"./en-au.js":111,"./en-ca":112,"./en-ca.js":112,"./en-gb":113,"./en-gb.js":113,"./en-ie":114,"./en-ie.js":114,"./en-il":115,"./en-il.js":115,"./en-nz":116,"./en-nz.js":116,"./eo":117,"./eo.js":117,"./es":118,"./es-do":119,"./es-do.js":119,"./es-us":120,"./es-us.js":120,"./es.js":118,"./et":121,"./et.js":121,"./eu":122,"./eu.js":122,"./fa":123,"./fa.js":123,"./fi":124,"./fi.js":124,"./fo":125,"./fo.js":125,"./fr":126,"./fr-ca":127,"./fr-ca.js":127,"./fr-ch":128,"./fr-ch.js":128,"./fr.js":126,"./fy":129,"./fy.js":129,"./ga":130,"./ga.js":130,"./gd":131,"./gd.js":131,"./gl":132,"./gl.js":132,"./gom-latn":133,"./gom-latn.js":133,"./gu":134,"./gu.js":134,"./he":135,"./he.js":135,"./hi":136,"./hi.js":136,"./hr":137,"./hr.js":137,"./hu":138,"./hu.js":138,"./hy-am":139,"./hy-am.js":139,"./id":140,"./id.js":140,"./is":141,"./is.js":141,"./it":142,"./it-ch":143,"./it-ch.js":143,"./it.js":142,"./ja":144,"./ja.js":144,"./jv":145,"./jv.js":145,"./ka":146,"./ka.js":146,"./kk":147,"./kk.js":147,"./km":148,"./km.js":148,"./kn":149,"./kn.js":149,"./ko":150,"./ko.js":150,"./ku":151,"./ku.js":151,"./ky":152,"./ky.js":152,"./lb":153,"./lb.js":153,"./lo":154,"./lo.js":154,"./lt":155,"./lt.js":155,"./lv":156,"./lv.js":156,"./me":157,"./me.js":157,"./mi":158,"./mi.js":158,"./mk":159,"./mk.js":159,"./ml":160,"./ml.js":160,"./mn":161,"./mn.js":161,"./mr":162,"./mr.js":162,"./ms":163,"./ms-my":164,"./ms-my.js":164,"./ms.js":163,"./mt":165,"./mt.js":165,"./my":166,"./my.js":166,"./nb":167,"./nb.js":167,"./ne":168,"./ne.js":168,"./nl":169,"./nl-be":170,"./nl-be.js":170,"./nl.js":169,"./nn":171,"./nn.js":171,"./pa-in":172,"./pa-in.js":172,"./pl":173,"./pl.js":173,"./pt":174,"./pt-br":175,"./pt-br.js":175,"./pt.js":174,"./ro":176,"./ro.js":176,"./ru":177,"./ru.js":177,"./sd":178,"./sd.js":178,"./se":179,"./se.js":179,"./si":180,"./si.js":180,"./sk":181,"./sk.js":181,"./sl":182,"./sl.js":182,"./sq":183,"./sq.js":183,"./sr":184,"./sr-cyrl":185,"./sr-cyrl.js":185,"./sr.js":184,"./ss":186,"./ss.js":186,"./sv":187,"./sv.js":187,"./sw":188,"./sw.js":188,"./ta":189,"./ta.js":189,"./te":190,"./te.js":190,"./tet":191,"./tet.js":191,"./tg":192,"./tg.js":192,"./th":193,"./th.js":193,"./tl-ph":194,"./tl-ph.js":194,"./tlh":195,"./tlh.js":195,"./tr":196,"./tr.js":196,"./tzl":197,"./tzl.js":197,"./tzm":198,"./tzm-latn":199,"./tzm-latn.js":199,"./tzm.js":198,"./ug-cn":200,"./ug-cn.js":200,"./uk":201,"./uk.js":201,"./ur":202,"./ur.js":202,"./uz":203,"./uz-latn":204,"./uz-latn.js":204,"./uz.js":203,"./vi":205,"./vi.js":205,"./x-pseudo":206,"./x-pseudo.js":206,"./yo":207,"./yo.js":207,"./zh-cn":208,"./zh-cn.js":208,"./zh-hk":209,"./zh-hk.js":209,"./zh-tw":210,"./zh-tw.js":210};function r(e){var t=n(e);return i(t)}function n(e){var t=s[e];if(!(t+1)){var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}return t}r.keys=function(){return Object.keys(s)},r.resolve=n,e.exports=r,r.id=435},function(e,t,i){"use strict";(function(e){i(39),i(2);var s=i(388),r=i.n(s),n=i(5),a=i.n(n),o=i(440),l=i(389),c=i(390),h=i(441),u=i(3),d=i(46);class m{constructor(e){this.terrainProvider=e.terrainProvider||null,this.projection=e.projection||null,this.directions={},this.options=e,this.meta=[],this.extent=ol.extent.createEmpty(),this.minZoom=Object(u["h"])(e.minZoom,0),this.maxZoom=Object(u["h"])(e.maxZoom,0),this.hideLevels=Object(u["h"])(e.hideLevels,0)}loadData(e){const t=[],i=Array.isArray(e)?e:[e],s=a.a.create();return s.interceptors.response.use(e=>{return e},e=>{return String(e.response.status).startsWith("4")&&e.config&&!e.config.retriedWithNewURL?(e.config.retriedWithNewURL=!0,e.config.url=`${e.config.url}/image.json`,s.request(e.config)):Promise.reject(e)}),i.forEach(e=>{t.push(s.get(e).then(e=>{let t=e.data,i=e.config;const s=i.url.substring(0,i.url.lastIndexOf("/"));this.handleMetadataResponse(t,s)}).catch(t=>{console.log(`Invalid image.json data. Please correct, File: ${e}, Error ${t.message}`)}))}),Promise.all(t)}handleMetadataResponse(e,t){const i=m.getVersion(e);i.version>=3.5||3.4===i.version&&i.buildNumber>=36?this.handleMetadataResponseV35(e,t,i):console.log("Could not load Meta Data, only meta data version 3.5 and higher are supported")}getImageMeta(e,t,i,s,r){const n=this.hideLevels?i.slice(0,i.length-this.hideLevels):i,a=this.meta.find(i=>{return i.isEqual(e,t,n)});if(a)return a;const l=new h["a"]({url:e,size:t,tileSize:s,tileResolution:n,minZoom:this.minZoom,maxZoom:this.maxZoom}),c=new o["a"]({size:t,view:l,version:r.version,buildNumber:r.buildNumber});return this.meta.push(c),c}handleMetadataResponseV35(t,i,s){const n=[t.generalImageInfo.width,t.generalImageInfo.height],a=t.generalImageInfo["tile-resolution"],o=[t.generalImageInfo["tile-width"],t.generalImageInfo["tile-width"]];t.generalImageInfo.width&&t.generalImageInfo.height&&t.generalImageInfo["tile-resolution"]&&this.getImageMeta(i,n,a,o,s);const h=[];t.generalImageInfo.cameraParameter&&Array.isArray(t.generalImageInfo.cameraParameter)&&t.generalImageInfo.cameraParameter.forEach(e=>{h.push(new c["a"](e))});let u=null;if(t.generalImageInfo.crs){const i=r()();e.proj4.defs(i,t.generalImageInfo.crs),u=ol.proj.get(i)}const d=t.images.shift(),m={name:d.indexOf("name"),width:d.indexOf("width"),height:d.indexOf("height"),tileResolution:d.indexOf("tile-resolution"),viewDirection:d.indexOf("view-direction"),viewDirectionAngle:d.indexOf("view-direction-angle"),groundCoordinates:d.indexOf("groundCoordinates"),centerPointOnGround:d.indexOf("centerPointOnGround"),cameraIndex:d.indexOf("camera-index"),projectionCenter:d.indexOf("projection-center"),pToRealworld:d.indexOf("p-to-realworld"),pToImage:d.indexOf("p-to-image")},g={};t.images.forEach(e=>{const t=[];e[m.pToRealworld]&&e[m.pToRealworld].forEach(e=>{t.push(...e)});const r=e[m.pToRealworld]?new Cesium.Matrix3(...t):null,c=[];e[m.pToImage]&&(e[m.pToImage].forEach(e=>{c.push(...e)}),c.push(0,0,0,1));const d=e[m.projectionCenter]?Cesium.Cartesian3.fromArray(e[m.projectionCenter]):null,p=e[m.pToImage]?new Cesium.Matrix4(...c):null,y=e[m.width]&&e[m.height]?[e[m.width],e[m.height]]:n,_=e[m.tileResolution]?e[m.tileResolution]:a,f=this.getImageMeta(i,y,_,o,s),v={name:e[m.name],viewDirection:e[m.viewDirection],viewDirectionAngle:e[m.viewDirectionAngle],groundCoordinates:e[m.groundCoordinates],centerPointOnGround:e[m.centerPointOnGround],meta:f,camera:h[e[m.cameraIndex]],projectionCenter:d,pToRealworld:r,pToImage:p,projection:this.projection||u,terrainProvider:this.terrainProvider},L=new l["a"](v);g[L.viewDirection]||(g[L.viewDirection]={direction:L.viewDirection,images:{},rTreeItems:[],footPrintFeatures:[],projection:this.projection||u,terrainProvider:this.terrainProvider}),g[L.viewDirection].images[L.name]=L,g[L.viewDirection].rTreeItems.push({minX:L.centerPointOnGround[0],minY:L.centerPointOnGround[1],maxX:L.centerPointOnGround[0],maxY:L.centerPointOnGround[1],name:L.name});const M=new ol.geom.Polygon([L.groundCoordinates.concat([L.groundCoordinates[0]])]);M.transform(this.projection||u,ol.proj.get("EPSG:3857"));const b=new ol.Feature({geometry:M});b.setId(L.name),g[L.viewDirection].footPrintFeatures.push(b)}),Object.keys(g).forEach(e=>{this.directions[e]?this.directions[e].addOptions(g[e]):this.directions[e]=this.createDirection(g[e]),this.extent=ol.extent.extend(this.extent,this.directions[e].footPrintsLayer.getSource().getExtent())})}createDirection(e){return new d["a"](e)}static getVersion(e){const t={version:null,buildNumber:null};if(e.version){const i=e.version.match(/\d+\.\d+/);i&&(t.version=Number(i[0]));const s=e.version.match(/-\d+-/);s&&(t.buildNumber=Number(s[0].match(/\d+/)[0]))}return t}getImageByName(e){const t=Object.values(this.directions);for(let i=0;i<t.length;i++){const s=t[i];if(s.images[e])return s.images[e]}return null}}t["a"]=m}).call(this,i(83))},function(e,t,i){"use strict";var s=i(456);function r(e,t,i,r,o,l){var c,h,u,d,m=e.data,g=[],p=e.toBBox,y=new s(null,n);while(m){for(c=0;c<m.children.length;c++)h=m.children[c],u=a(t,i,m.leaf?p(h):h),(!l||u<=l)&&y.push({node:h,isItem:m.leaf,dist:u});while(y.length&&y.peek().isItem)if(d=y.pop().node,o&&!o(d)||g.push(d),r&&g.length===r)return g;m=y.pop(),m&&(m=m.node)}return g}function n(e,t){return e.dist-t.dist}function a(e,t,i){var s=o(e,i.minX,i.maxX),r=o(t,i.minY,i.maxY);return s*s+r*r}function o(e,t,i){return e<t?t-e:e<=i?0:e-i}e.exports=r,e.exports.default=r},function(e,t,i){"use strict";e.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},,function(e,t,i){"use strict";i(2);var s=i(9);class r{constructor(e){this.size=e.size,this.views=new Map,e.view&&Object.values(s["a"]).forEach(t=>{this.views.set(t,e.view.clone())}),this.version=e.version||3.1,this.buildNumber=e.buildNumber||0}getView(e){return this.views.get(e)}isEqual(e,t,i){return this.size[0]===t[0]&&this.size[1]===t[1]&&(this.views.values().next().value.tileResolution.length===i.length&&this.views.values().next().value.url===e)}}t["a"]=r},function(e,t,i){"use strict";var s=i(6),r=i(14);let n=0;class a{constructor(e){this.id=n,n+=1,this.size=e.size,this.url=e.url,this.tileSize=e.tileSize,this.tileResolution=e.tileResolution,this.format=e.format||"jpg",this.minZoom=e.minZoom,this.maxZoom=e.maxZoom,this._createViewAndLayer()}_createViewAndLayer(){const e=[0,0,...this.size],t=new ol.proj.Projection({code:"ZOOMIFY",units:"pixels",extent:e});this.view=new ol.View({projection:t,center:[this.size[0]/2,this.size[1]/2],minZoom:this.minZoom,maxZoom:this.maxZoom>0?this.maxZoom:this.tileResolution.length+4,extent:[-2e3,-2e3,this.size[0]+2e3,this.size[1]+2e3],zoom:this.minZoom});const i={projection:t,tileGrid:new ol.tilegrid.TileGrid({origin:[0,0],extent:e,resolutions:this.tileResolution,tileSize:this.tileSize})};r["a"].hasSameOrigin(this.url)||(i.crossOrigin="anonymous"),this.tileImageSource=new ol.source.TileImage(i),this.layer=new ol.layer.Tile({source:this.tileImageSource,extent:e})}clone(){return new a({size:this.size,url:this.url,tileSize:this.tileSize,tileResolution:this.tileResolution,minZoom:this.minZoom,maxZoom:this.maxZoom})}setSize(e){this.size=e,this._createViewAndLayer()}setImageName(e){this.tileImageSource.setTileUrlFunction(t=>{const i=Object(s["a"])(t,3),r=i[0],n=i[1],a=i[2];return`${this.url}/${e}/${r}/${n}/${a}.${this.format}`}),this.tileImageSource.refresh()}}t["a"]=a},function(e,t,i){"use strict";e.exports=r,e.exports.default=r;var s=i(455);function r(e,t){if(!(this instanceof r))return new r(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function n(e,t,i){if(!i)return t.indexOf(e);for(var s=0;s<t.length;s++)if(i(e,t[s]))return s;return-1}function a(e,t){o(e,0,e.children.length,t,e)}function o(e,t,i,s,r){r||(r=_(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var n,a=t;a<i;a++)n=e.children[a],l(r,e.leaf?s(n):n);return r}function l(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function u(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){var i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,t,i,r,n){var a,o=[t,i];while(o.length)i=o.pop(),t=o.pop(),i-t<=r||(a=t+Math.ceil((i-t)/r/2)*r,s(e,a,t,i,n),o.push(t,a,a,i))}r.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,i=[],s=this.toBBox;if(!y(e,t))return i;var r,n,a,o,l=[];while(t){for(r=0,n=t.children.length;r<n;r++)a=t.children[r],o=t.leaf?s(a):a,y(e,o)&&(t.leaf?i.push(a):p(e,o)?this._all(a,i):l.push(a));t=l.pop()}return i},collides:function(e){var t=this.data,i=this.toBBox;if(!y(e,t))return!1;var s,r,n,a,o=[];while(t){for(s=0,r=t.children.length;s<r;s++)if(n=t.children[s],a=t.leaf?i(n):n,y(e,a)){if(t.leaf||p(e,a))return!0;o.push(n)}t=o.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}var s=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===s.height)this._splitRoot(this.data,s);else{if(this.data.height<s.height){var r=this.data;this.data=s,s=r}this._insert(s,this.data.height-s.height-1,!0)}else this.data=s;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=_([]),this},remove:function(e,t){if(!e)return this;var i,s,r,a,o=this.data,l=this.toBBox(e),c=[],h=[];while(o||c.length){if(o||(o=c.pop(),s=c[c.length-1],i=h.pop(),a=!0),o.leaf&&(r=n(e,o.children,t),-1!==r))return o.children.splice(r,1),c.push(o),this._condense(c),this;a||o.leaf||!p(o,l)?s?(i++,o=s.children[i],a=!1):o=null:(c.push(o),h.push(i),i=0,s=o,o=o.children[0])}return this},toBBox:function(e){return e},compareMinX:c,compareMinY:h,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){var i=[];while(e)e.leaf?t.push.apply(t,e.children):i.push.apply(i,e.children),e=i.pop();return t},_build:function(e,t,i,s){var r,n=i-t+1,o=this._maxEntries;if(n<=o)return r=_(e.slice(t,i+1)),a(r,this.toBBox),r;s||(s=Math.ceil(Math.log(n)/Math.log(o)),o=Math.ceil(n/Math.pow(o,s-1))),r=_([]),r.leaf=!1,r.height=s;var l,c,h,u,d=Math.ceil(n/o),m=d*Math.ceil(Math.sqrt(o));for(f(e,t,i,m,this.compareMinX),l=t;l<=i;l+=m)for(h=Math.min(l+m-1,i),f(e,l,h,d,this.compareMinY),c=l;c<=h;c+=d)u=Math.min(c+d-1,h),r.children.push(this._build(e,c,u,s-1));return a(r,this.toBBox),r},_chooseSubtree:function(e,t,i,s){var r,n,a,o,l,c,h,d;while(1){if(s.push(t),t.leaf||s.length-1===i)break;for(h=d=1/0,r=0,n=t.children.length;r<n;r++)a=t.children[r],l=u(a),c=m(e,a)-l,c<d?(d=c,h=l<h?l:h,o=a):c===d&&l<h&&(h=l,o=a);t=o||t.children[0]}return t},_insert:function(e,t,i){var s=this.toBBox,r=i?e:s(e),n=[],a=this._chooseSubtree(r,this.data,t,n);a.children.push(e),l(a,r);while(t>=0){if(!(n[t].children.length>this._maxEntries))break;this._split(n,t),t--}this._adjustParentBBoxes(r,n,t)},_split:function(e,t){var i=e[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);var n=this._chooseSplitIndex(i,r,s),o=_(i.children.splice(n,i.children.length-n));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(e,t){this.data=_([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,i){var s,r,n,a,l,c,h,d;for(c=h=1/0,s=t;s<=i-t;s++)r=o(e,0,s,this.toBBox),n=o(e,s,i,this.toBBox),a=g(r,n),l=u(r)+u(n),a<c?(c=a,d=s,h=l<h?l:h):a===c&&l<h&&(h=l,d=s);return d},_chooseSplitAxis:function(e,t,i){var s=e.leaf?this.compareMinX:c,r=e.leaf?this.compareMinY:h,n=this._allDistMargin(e,t,i,s),a=this._allDistMargin(e,t,i,r);n<a&&e.children.sort(s)},_allDistMargin:function(e,t,i,s){e.children.sort(s);var r,n,a=this.toBBox,c=o(e,0,t,a),h=o(e,i-t,i,a),u=d(c)+d(h);for(r=t;r<i-t;r++)n=e.children[r],l(c,e.leaf?a(n):n),u+=d(c);for(r=i-t-1;r>=t;r--)n=e.children[r],l(h,e.leaf?a(n):n),u+=d(h);return u},_adjustParentBBoxes:function(e,t,i){for(var s=i;s>=0;s--)l(t[s],e)},_condense:function(e){for(var t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children,t.splice(t.indexOf(e[i]),1)):this.clear():a(e[i],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},function(e,t,i){"use strict";var s=Array.isArray,r=Object.keys,n=Object.prototype.hasOwnProperty;e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){var a,o,l,c=s(t),h=s(i);if(c&&h){if(o=t.length,o!=i.length)return!1;for(a=o;0!==a--;)if(!e(t[a],i[a]))return!1;return!0}if(c!=h)return!1;var u=t instanceof Date,d=i instanceof Date;if(u!=d)return!1;if(u&&d)return t.getTime()==i.getTime();var m=t instanceof RegExp,g=i instanceof RegExp;if(m!=g)return!1;if(m&&g)return t.toString()==i.toString();var p=r(t);if(o=p.length,o!==r(i).length)return!1;for(a=o;0!==a--;)if(!n.call(i,p[a]))return!1;for(a=o;0!==a--;)if(l=p[a],!e(t[l],i[l]))return!1;return!0}return t!==t&&i!==i}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAJhSURBVFiF7ZW/a1pRFMc/70XFYqVFUCq1hSClvCIShw6FItQ9U8EtHVySuYvg0C2BLB0KDeQf6NLFxU0KLRSKGMmDtKldqg3FEKVNaoqa6Hsd9JXrxR9tYsziF85wzzucz/fd++55cHYtAt97sXiOPmdSEPgFmL04Bu5OC24DPghwK/KAYxoGVgfArVi9aPhDoD3CQAd4dFHw60BJBPp8vhOfz3cimSj1aieuVyJIVVUznU4XM5lMUVVVQzLxetLwJxLAXFlZqZimmTdNM7+8vLwvPweWJgWfB47E5pqm/W42m1uWgVartRUKhY4lA3XgznnhNuC92NjhcHRyudxHC25FoVDYcTqdHclEDrCPAsyNMfAMaSvX1tb24vH4kVzo9/vbdru9k81mrwnpm3RvxtsxnIG6D/R94dFo9NAwjLz89mLEYrGf9O/CKfBgGEQZkr8KFBDO0OPxtHVd/xQIBE5Hua5UKrZwOHyvVquJW/8VWKA7vvukDunzUoQrisLGxkZpHBy6R7G5uVlSlL53mwdeDKof9A08RhqpiUTiIJVKHYyDW9I0rVUul23b29suIb0AfAF2xFr5CAKADnisRDAYbOi6/tnlchn/agCg0WgokUhEKxaLV4T0Yc9IeZCBOeANELUSqqqyvr7+TdO0pgzwer1tt9ttANTrdbVardrkmt3dXWcymbxtGH3e3wExurejT0mG/2QmHUkZDlCbooGaBRVvwY9Bri5If1niuS0Bz4EbUvEtaT1ytNIdPKL2pPU+8NRaDBtEo2SOef5fPYcNoqlpZmBmYGZgZuDSDfwBYHFBvEfx+bgAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABOSURBVFiF7dexDQAgCETRO+My7r+GveNga7AmNP86aHihAkvaaszoHA5AkmZuRMSpHGh7vXX7BgAAAAAAAAAAAAAAAPD9Bflur077BgBceZ8FPDUm8YQAAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAPnSURBVFiFtZdNTGNVFMd/fZ1SCjPFxohtnyGY8SMhMaRm2LkRmrqYgG2gJCbETBcTNEZXysLERU10oTvjAhIIloWbBpuujE1oWKgLP1IYYWF00uQlfbwymRJgmBHKe3XxaH1zbUvLlP/ynHPv+d97zr3nHButoxd4DRgBXgJ8wLUz3SGwA/wJ/Ar8CDxsZVNbCzYDwC0gBHS3SPYf4AcgASgXJeAE3gXeAuwtOhZxCnwLzAMn7RAYAL4Erl/QsYg/gA+B+60QeBn4GvCIClmWTyKRyOHo6OhRIBA49vv9OoCqqvZcLufMZrO9qVTKXSgUHHX23QU+AP5uRmAAWBKdy7Jcjsfju7FY7ECSpIbHBDAMg8XFxb54PP6MqqoikSLwNpabsBLoAr7BzPAawuHwfiKR0Nxut9HUs4C9vT17NBr1ra2tXRNUd4B3OMsJa3K9D7xutZydnS2trKxo3d3dlXacA7hcrsrMzMyBoij2jY0Nl0X1LGAAv8N/NzAAJK2EwuHw/urqqnrelZ8HwzAIhULPCTfxEIgA96u737I6l2W5nEgktCd1DiBJEslkcqe/v//UIu4BbgNImD9cyLooHo/vthvzZvB4PPrc3Nw9QXwT6LEBbwCfVaWyLJ8oinK3E6e3olwu2wYHB68LL+NjCfNvryESiRx22jmAw+GojI+PHwjiGxLCswsGg0cd936GUCgk7v2iBPitkuHh4ePLIhAIBMR6IFeTsAav16tfFgGv13sqiK52PthtQgIei4umaRctvedC07QrguiBBKhWSS6Xc14WgVwu1yWIChJmG1VDNpvt5ZKQyWSuCqK/JMweroZUKuXWdb2VVq0t6LpuS6fTYmX8RUJoIAuFgmNpacndaQILCwtuTdOsv+Aj4OfqST8B3qxq/H5/eWtrK+/xeDryJEulkn1oaOj5YrFoJfAd8Hn1GSYwG0gAVFV1RKNRn2E8eT0yDIOpqSm/4Lx85rNWgvcxS+Rw1SKfzzsVRbFPTEwc2WwXSwnDMIjFYt50Ot0nqFaANfh/S7YAvGK1HBsbO0wmkzvthqNUKtknJyf96+vrYuY3bMl0zIQMAbVF+Xzeuby83CdJkjEyMnJstzf/p3Rdt83Pz/dNT0/L29vbLkF9D3gPc5IC6rflLwBfAf2iwuv1liORyEEwGDwKBAInPp/vtFKpoKrqlc3Nza5MJtObTqfFbK+iiNmW37UKGwX3KeAL4NVGJ20Td4CPqDOYNLrP6mxnAENAvRO1gjJmwn0KPKhn0Ep6P43ZQN4ExJg2wiPge8w5Q21m2M776sEcz29gdlF+Hh/PVcy68hvwEy2O5/8CzKw/sVG0Ap4AAAAASUVORK5CYII="},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAABDCAYAAADHyrhzAAAL9UlEQVR4Xs1bfVRU1RY/5zLO4KxRTDEx/EzRhFTmzuAiwq+MUktLW1jqk3LBCpHUQFEqLc0n8RRZIGJi44NXmolpJj5NS40kBBlmBAN8wnsaysPvEHB883HPeevwGtYIM3PPvXOn9e5fwPnt3973x7n3nn32PhD8QVdVVdUgAMDjVqvVn2GYfhjjXgzD9OQ4TgkhVDAM8wAh9BAA8AAA0AIAuIMxvm2xWG5FRETc+yPChN5yotfrB0IIx0AIh2OMB3viB0LYBiFsRAj9SyaTXRo/fjwRTPJLUjHIf99ms4UwDDMGIdRH8mj/R4gZhvnVZrPVyuXyGimFkUQMvV5PpvpEAIAWANDDSyJ0o4UQ3kUI/ajRaH6BEGJP/XosRmVlpQZCGIUx9hUbzPXr11WDBg1qF2sPAPi3TCY7PH78+FsecADRYpSWlvZVKBSvAACGehLAjRs3lDk5ObM3bdr0lSc8EELOZrOVhoWF/Uh+FsMlSgyDwfAMAGAaxlgmxqmjTV5e3rMlJSXPb9myZUtAQIDJUz6GYW5brdaDEyZMuCGUS5AYer3eD0I4BwAwTKgjV/j4+PgVJpOpT2Rk5A/x8fE/S8FLZgbG+EeWZX+GECJaTmoxyEsSAPAmhHAALTkfrri4eIhOp1tMcEqlsiUvLy+bz0bIOEKoJCws7AdaGyox6uvre7e1tb2JMe5HS0yD27hx4yuXL18OtWPffvvt/IkTJzbS2NJiMMYVWq327zR4XjFqampUFoslFiH0GA0hLeb+/fvy5cuXpyCEOt87o0aNurBu3bpvaTkE4PQajeYoH96tGFeuXPFtaWkhQvTnIxI6vmfPHvbEiROzHO0YhrFt27Zti5+fn0UoHx8eQljCsqzbR8atGAaDYRHGeASfIzHjSUlJsXfu3CH5yiNXVFTU0ZiYmEoxnHw2CKGvw8LCfnGFcylGZWVlOABgOp8DMeO1tbX9Pvnkk3ec2fbt27cpOztbJ4aXzwZC+FChUOSGhIQ4XeA5FaOqqupxjuPiMcY+fA7EjGdkZLxQVVVF1ipOr/fee297cHDwXTHcFDYNGo1mjzOcUzGMRuObCKHhFMSiILGxsSkWi4V8qp1eY8eOLVu9evUJUeQURgzDHFar1Re6QruJYTQaQxFCr1JwioIcPnw4+ODBg9HujGUymTk/Pz9dlAM6I5Ovr29WSEjIIy/qR8S4du1az1u3bi0jayA6TuGo1NTUhU1NTSP5LOfMmXNg7ty5tXw4D8bLNBrNd472j4hRUVExhWGYKR44cGva2NjY64MPPkim4Q8MDGxIT0/fS4MVg8EYI7lcnjNu3Ljf7PadYtTX1yva2tqSPEnF+YLKzc2dVFZWNpUPZx/ftGlT5pAhQ9po8UJxDMNcUKvVh7uJ4e1ZQRzakzLaoMPDw88kJib+RIsXius6OzpnhsFgWIIxDhBKSIs/derU8IKCghhaPMF5I3lz4v87jUZTRv7eIYZer/eHEDpdBAkJ3h12w4YNcxsaGsYK5YuJifk8KirqilA7WjzDMNfVanXHIq9DDG8/Infv3vVNTk5e6ZiU0QY7YsSIi+vXrz9EixeKYxiGbDBnkI3lDjGMRmMcQqhbniCU2BU+Pz8/7PTp0zPF8mVlZf2lX79+/xFrz2dnX4RB8hVpb29PRQjxpvN8pK7Gly1btqSlpUX0ptBzzz13fPHixefF+uezgxD+wrLs17C8vHyUTCZbwGcgdryysjIgKysrXqw9sevTp8/NnJycnZ5w8NiaNBrNZqjX6yMhhM97y1F6evqMmpqaCZ7yL1++fFdYWFizpzyu7FtbW/8MjUbjqwihzq03KZ2ZTCZZYmLiKpvNpvCUNyQkpCI1NfWYpzyu7E0mUzYR4y2EkGS73Y7OCgsLxxYVFc2V4gZI8pabm5uhVCptUvB15ZDL5bthZWUlWV/4e8PB6tWrY5qbmyXbCpg1a9ahefPmXfRGrFardS+ZGasQQiqpHdTX1/f5+OOPV0jJO3DgwCubN2/+XEpOB6790GAwrJWiMtY1wOzs7Kl6vX6S1IF/+OGH2UFBQaR/Q+rrEHlM1kvNSvji4uJWms1myWecVqv9acWKFWe8EHMRmRmpUqftx48fH/nll18u9ELAQKFQtOt0uq1e4N7vlXfGunXroq9evRrshYA7KBcsWLB3xowZDVLyI4T2kcckEQAgWZGItBikpKSkSBloV65hw4bVbty48YCUPjDGXxAx/gQA4N2TpHWs0+nCi4uLX6TFi8VJ1cJg989x3E4iBikUkYKRJFdCQsI77e3tkhaonQU2efLkk3FxceckCRoA0NramkFeoFqM8ctSkJ47dy5wx44dcVJw8XGoVKq7n3766XY+HOU41mg0G+D58+cDfHx8llAauYWlpaW9XFdXp5GCi4YjISFhd0RExHUarDsMhPAGy7I7O/YwDAbDGoxxT09ISVK2dOnSFI7j5EJ4fHx8bAEBAVeampqChNgR7OjRow1r164tEmrnBN9RQ7GL8QbG+ClPSPft2xd67Ngx0vBGfZF9iqVLlxaOGTPm3t69e0O///77mRzHUbdO+vj4WHfs2LHZ0+QNY/yVVqu9ZBfD4/dGcnLy4tu3bw+hVeLpp58+v2bNmuOO+IsXL/rv3LlzXmtrK/Wnfvr06d8uXLiwW92UNg6GYSwqlWprUFCQ2b47rmQYZqXYqruQpIyk4tHR0Ydmzpx52VXAaWlpL9XV1ZEGW96rf//+jZmZmfm8QBcAx0KSY91E9KOSmZn5vNFofJYvIH9//+uJiYlfjxw58j4f9siRI0998803r9JsDHnSwsAwTIFarb5K4nEUYyjGuKPzTujF12JA+FiWPZuUlHRaCHdDQ4NfTk7O6/fu3Rvozi40NPTnlStXUnf12bkghPdYlt3W+bujEzG7XkVFRaMLCwvfcBWsQqF4MH/+/IPTpk0TXQjKyMiIqqqqinDlQy6Xm3bv3r1FiNAE27VP45HygNFoHIYQeksI6fvvv//GtWvXRjuzGTBgwNVVq1YdkKLz9+TJkyP2798/11WTS3R09P7Zs2dfoo2drC3UanWeYwN+t1qJwWCgfne4S8oiIiJOJSQklNAGR4MjDfeZmZnRzr5agwcPvpyWlraPhodg7J9TR3w3McrKynorFIpEhBDvjra979uRUKlUti5atOhAZGSkxytDVze2ffv2yeXl5d36SGiTNwjhJZZluzXuO62ikUZ5jDFv5tm1xSAwMLA+JSXlkDdLgXaBSkpKBhUUFLzuuJtGORutvXv3zgkKCmrtKrbLkqLBYIh1d5zq7NmzQ3bt2tX59fF2CdDZLLl582bPrVu3vtbc3NzRq0rTwgAhPMqyrN4Zn0sxqqurH+M4LgEh5DTXsPd9q1Sq35YsWfKVpwdfaJ91ZzidTvdMcXHxC2QsNja2YMqUKb86vVkI/8my7BeufLktNldXV4+1Wq2vdTW2930PHTr0HykpKd/26tXL6snNSGGr1+sDPvvss9efeOKJXz/66KPO1iQ7N8MwLXK5XOeqIZbgeCvvFRUVzzIME+UYcGFh4TiO45j58+eLzgmkEMDZPykrK2vmu+++e8yx//z304+71Wq12xIDrxjE4YULFyI5jvNacVpqYcjMdRDDhDH+q1arvcPnh0oMQkJyD4TQIzOEj/z/YPyB2WwmG0BUh4SpxSA3RrYIIYQvebOxRUIB75vN5r/RCkH1zugaXHl5+fAePXrMwRj3ljBwqalqMcZHtVqtoAOAgmaGPeIzZ874qlSqFxmGUUt9F57wQQhJ39cRlmVFtVmLEsMecHV19ZMcx8324lFvIdpU+/r6nnT36eQj80gMQq7X63sghCbJZDKyhPf4nCtfwF3HyTlWAMBJtVpdL9S2K95jMeyE5GCfyWSa5OPjoxG7fSjkZsjGzO9nVy9KcQ5e1AuUL2DSStnS0hIsk8mCMcZPSikMhJAkV3UAgFq1Wt0olQj2e5JsZjgTqaamRm42m0kddwwAIEhk68MdknJbLJZL4eHhXtsW8MrMcDdzSktLe/r5+fW02WxKUnRyhlUoFNhms5kRQqaHDx+apk6d6pWGNme+/wtn7dJLR+980QAAAABJRU5ErkJggg=="},function(e,t,i){e.exports=i.p+"img/dirt_0.eb1569b0.png"},,,,,function(e,t){var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(i){var s=new Uint8Array(16);e.exports=function(){return i(s),s}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},function(e,t){for(var i=[],s=0;s<256;++s)i[s]=(s+256).toString(16).substr(1);function r(e,t){var s=t||0,r=i;return[r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],"-",r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]],r[e[s++]]].join("")}e.exports=r},function(e,t,i){"use strict";function s(e,t,i,s,n){r(e,t,i||0,s||e.length-1,n||a)}function r(e,t,i,s,a){while(s>i){if(s-i>600){var o=s-i+1,l=t-i+1,c=Math.log(o),h=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*h*(o-h)/o)*(l-o/2<0?-1:1),d=Math.max(i,Math.floor(t-l*h/o+u)),m=Math.min(s,Math.floor(t+(o-l)*h/o+u));r(e,t,d,m,a)}var g=e[t],p=i,y=s;n(e,i,t),a(e[s],g)>0&&n(e,i,s);while(p<y){n(e,p,y),p++,y--;while(a(e[p],g)<0)p++;while(a(e[y],g)>0)y--}0===a(e[i],g)?n(e,i,y):(y++,n(e,y,s)),y<=t&&(i=y+1),t<=y&&(s=y-1)}}function n(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}e.exports=s,e.exports.default=s},function(e,t,i){"use strict";function s(e,t){if(!(this instanceof s))return new s(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||r,this.length>0)for(var i=(this.length>>1)-1;i>=0;i--)this._down(i)}function r(e,t){return e<t?-1:e>t?1:0}e.exports=s,e.exports.default=s,s.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){var t=this.data,i=this.compare,s=t[e];while(e>0){var r=e-1>>1,n=t[r];if(i(s,n)>=0)break;t[e]=n,e=r}t[e]=s},_down:function(e){var t=this.data,i=this.compare,s=this.length>>1,r=t[e];while(e<s){var n=1+(e<<1),a=n+1,o=t[n];if(a<this.length&&i(t[a],o)<0&&(n=a,o=t[a]),i(o,r)>=0)break;t[e]=o,e=n}t[e]=r}}},function(e,t,i){"use strict";var s={},r=Array.prototype,n=Object.prototype,a=r.slice,o=n.toString,l=n.hasOwnProperty,c=r.forEach,h=Object.keys,u=Array.isArray,d=function(){},m=d.each=d.forEach=function(e,t,i){if(null!=e)if(c&&e.forEach===c)e.forEach(t,i);else if(e.length===+e.length){for(var r=0,n=e.length;r<n;r++)if(t.call(i,e[r],r,e)===s)return}else{var a=d.keys(e);for(r=0,n=a.length;r<n;r++)if(t.call(i,e[a[r]],a[r],e)===s)return}};d.keys=h||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var i in e)d.has(e,i)&&t.push(i);return t},d.defaults=function(e){return m(a.call(arguments,1),function(t){if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e},d.isArray=u||function(e){return"[object Array]"===o.call(e)},d.has=function(e,t){if(!d.isArray(t))return null!=e&&l.call(e,t);for(var i=t.length,s=0;s<i;s++){var r=t[s];if(null==e||!l.call(e,r))return!1;e=e[r]}return!!i};var g={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}},p={escape:new RegExp("["+d.keys(g.escape).join("")+"]","g")};d.each(["escape"],function(e){d[e]=function(t){return null==t?"":(""+t).replace(p[e],function(t){return g[e][t]})}}),d.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var y=/(.)^/,_={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},f=/\\|'|\r|\n|\t|\u2028|\u2029/g;d.template=function(e,t,i){var s;i=d.defaults({},i,d.templateSettings);var r=new RegExp([(i.escape||y).source,(i.interpolate||y).source,(i.evaluate||y).source].join("|")+"|$","g"),n=0,a="__p+='";e.replace(r,function(t,i,s,r,o){return a+=e.slice(n,o).replace(f,function(e){return"\\"+_[e]}),i&&(a+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),s&&(a+="'+\n((__t=("+s+"))==null?'':__t)+\n'"),r&&(a+="';\n"+r+"\n__p+='"),n=o+t.length,t}),a+="';\n",i.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{s=new Function(i.variable||"obj","_",a)}catch(l){throw l.source=a,l}if(t)return s(t,d);var o=function(e){return s.call(this,e,d)};return o.source="function("+(i.variable||"obj")+"){\n"+a+"}",o},e.exports=d},function(e,t){ol.Feature.prototype.getProperty=function(e){if("attributes"===e){const e=this.getProperties();return this.getGeometryName()&&delete e[this.getGeometryName()],e}if("olcs_geometryType"===e){const e=this.getGeometry().getType();return"Polygon"===e?1:"LineString"===e?2:"Point"===e?3:"Circle"===e?1:"MultiPolygon"===e?1:"MultiLineString"===e?2:"MultiPoint"===e?3:void 0}return this.get(e)}},function(e,t){Cesium.Material._materialCache.addMaterial("Wallpaper",{fabric:{type:"Wallpaper",uniforms:{image:Cesium.Material.DefaultImageId,anchor:new Cesium.Cartesian2(0,0)},components:{diffuse:"texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).rgb",alpha:"texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).a"}},translucent:!1})},function(e,t){Cesium.Cesium3DTilePointFeature.prototype.getId=function(){return this.getProperty("id")||`${this.content.url}${this._batchId}`}},function(e,t){Cesium.Cesium3DTileFeature.prototype.getId=function(){return this.getProperty("id")||`${this.content.url}${this._batchId}`}},function(e,t){const i=new Cesium.Cartesian3,s=new Cesium.Matrix3,r=new Cesium.Quaternion,n=new Cesium.Color,a=[1,1e5];class o{constructor(e){this._outlinePrimitives=[],this._planesPrimitives=[],this.show="undefined"===typeof e.show||e.show,this._camera=e.camera,this._color=e.color||Cesium.Color.YELLOW,this.allowPicking="undefined"===typeof e.allowPicking||e.allowPicking,this.id=e.id||{}}update(e){if(!this.show)return;const t=this._planesPrimitives,o=this._outlinePrimitives;let l,c;if(0===t.length){const e=this._camera,l=e.frustum,c=l.clone(),h=a;h[0]=this._camera.frustum.near,h[1]=this._camera.frustum.far;const u=e.positionWC,d=e.directionWC,m=e.upWC;let g=e.rightWC;g=Cesium.Cartesian3.negate(g,i);const p=s;Cesium.Matrix3.setColumn(p,0,g,p),Cesium.Matrix3.setColumn(p,1,m,p),Cesium.Matrix3.setColumn(p,2,d,p);const y=Cesium.Quaternion.fromRotationMatrix(p,r);t.length=1,o.length=1,c.near=h[0],c.far=h[1],t[0]=new Cesium.Primitive({allowPicking:this.allowPicking,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.FrustumGeometry({origin:u,orientation:y,frustum:c,_drawNearPlane:!0}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromAlpha(this._color,.1,n))},id:this.id,pickPrimitive:this}),appearance:new Cesium.PerInstanceColorAppearance({translucent:!0,flat:!0}),asynchronous:!1}),o[0]=new Cesium.Primitive({allowPicking:this.allowPicking,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.FrustumOutlineGeometry({origin:u,orientation:y,frustum:c,_drawNearPlane:!0}),attributes:{color:Cesium.ColorGeometryInstanceAttribute.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new Cesium.PerInstanceColorAppearance({translucent:!1,flat:!0}),asynchronous:!1})}for(c=t.length,l=0;l<c;++l)o[l].update(e),t[l].update(e)}destroy(){const e=this._planesPrimitives.length;for(let t=0;t<e;++t)this._outlinePrimitives[t]=this._outlinePrimitives[t]&&this._outlinePrimitives[t].destroy(),this._planesPrimitives[t]=this._planesPrimitives[t]&&this._planesPrimitives[t].destroy();return Cesium.destroyObject(this)}}Cesium.VcsCameraPrimitve=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){"use strict";i.r(t);var s={};i.r(s),i.d(s,"Buildings",function(){return vs}),i.d(s,"CesiumTilesetLayer",function(){return _s}),i.d(s,"Czml",function(){return ws}),i.d(s,"Gltf",function(){return Ss}),i.d(s,"PointCloud",function(){return Es}),i.d(s,"Terrain",function(){return vt}),i.d(s,"ObliqueLayer",function(){return ci}),i.d(s,"GeoJSON",function(){return Js}),i.d(s,"SingleImage",function(){return $s}),i.d(s,"OpenStreetMap",function(){return er}),i.d(s,"TMSBase",function(){return ir}),i.d(s,"Vector",function(){return Ki}),i.d(s,"TiledLayer",function(){return nr}),i.d(s,"VectorCluster",function(){return cr}),i.d(s,"WFS",function(){return ur}),i.d(s,"WMS",function(){return mr}),i.d(s,"WMTS",function(){return pr}),i.d(s,"Wsv",function(){return Lr}),i.d(s,"FeatureStore",function(){return Sr});var r={};i.r(r),i.d(r,"Legend",function(){return on}),i.d(r,"Planning",function(){return $o}),i.d(r,"Query",function(){return Vc}),i.d(r,"Search",function(){return Lh}),i.d(r,"AdvancedWalkMode",function(){return kh}),i.d(r,"BalloonInfo",function(){return Ih}),i.d(r,"Copyright",function(){return Ph}),i.d(r,"CreateLink",function(){return Yh}),i.d(r,"DisplayQuality",function(){return ru}),i.d(r,"Drawing",function(){return ou}),i.d(r,"Export",function(){return cu}),i.d(r,"FeatureList",function(){return uu}),i.d(r,"Locator",function(){return Xc}),i.d(r,"Measurement",function(){return Bu}),i.d(r,"SingleMeasurement",function(){return Wu}),i.d(r,"NavigationControls",function(){return Ku}),i.d(r,"OverviewMap",function(){return Qu}),i.d(r,"PDFCreator",function(){return pd}),i.d(r,"PositionDisplay",function(){return vd}),i.d(r,"Shadow",function(){return Md}),i.d(r,"TransparentTerrainMode",function(){return Ed}),i.d(r,"Flight",function(){return Dd}),i.d(r,"HeightProfile",function(){return Gd});i(33);var n=i(14);i(8),i(30),i(39),i(12),i(2);function a(e,t,i){const s=function(e,t){if(null===t)return null!==e&&`Expected ${l.getErrorValue(e)} to be null`;const s=l.atomic(e,t);if(null!==s)return s;const r=l.value(e,t);if(null!==r)return r;if(Array.isArray(t))return l.array(e,t,i);if(t instanceof Function)return!(e instanceof t)&&`Expected ${l.getErrorValue(e,!0)} to be of Type ${l.getConstructorString(t)}`;if(t===Object)return l.object(e,{});if("object"!==typeof t||"object"!==typeof e)throw new Error(`Cannot handler pattern ${t}`);const n=l.object(e,t);return n||!!i&&l.requireKeys(e,t)};let r;if(Array.isArray(t)&&t.length>1){const i=t.every(t=>{const i=s(e,t);return i});i&&(r=`Expected ${l.getErrorValue(e)} to be a ${t.map(e=>l.getConstructorString(e)).join(" or ")}`)}else r=s(e,t);if(r)throw new Error(`Match failed: ${r}`);return!1}function o(e,t,i){const s=[null,void 0];return Array.isArray(t)&&t.length>1?t.forEach(e=>{s.push(e)}):s.push(t),a(e,s.reverse(),i)}const l={};l.patterns=[[String,"string"],[Number,"number"],[Boolean,"boolean"],[Function,"function"],[void 0,"undefined"]],l.getErrorValue=function(e,t){if(null===e)return"null";if("undefined"===typeof e)return"undefined";if(t)return typeof e;let i;try{i=JSON.stringify(e)}catch(s){i=typeof e}return i.length>20?`${i.substr(0,20)}...`:i},l.getConstructorString=function(e){if(null===e)return"null";const t=l.patterns.find(t=>t[0]===e);if(t)return t[1];let i=e.toString();if(e.className)return e.className;const s=i.match(/function (.*)\(/);if(s&&s.length>1)return s[1];if(l.isPlainObject(e)){const t={};Object.keys(e).forEach(i=>{t[i]=l.getConstructorString(e[i])});try{i=`Object of ${JSON.stringify(t)}`}catch(r){i="Object"}}return i},l.atomic=function(e,t){if(t===Number)return!Number.isFinite(e)&&`expected ${l.getErrorValue(e)} to be a number, excluding NaN`;for(let i=l.patterns.length;i--;)if(t===l.patterns[i][0])return typeof e!==l.patterns[i][1]&&`expected ${l.getErrorValue(e)} to be a ${l.patterns[i][1]}`;return null},l.value=function(e,t){return"string"===typeof t||"number"===typeof t||"boolean"===typeof t?e!==t&&`Expected ${l.getErrorValue(e)} to equal ${t}`:null},l.array=function(e,t,i){if(Array.isArray(t)){if(1!==t.length)throw new Error("Array patterns may only have on type");if(Array.isArray(e)){let s=!1;const r=e.findIndex(e=>{try{a(e,t[0],i)}catch(r){s=r.message.replace(/Match failed:\s/,"")}return s});return r>-1&&`${s} in ${l.getErrorValue(e)}`}return`Expected ${l.getErrorValue(e)} to be an Array`}return null},l.object=function(e,t,i){const s=i?`${i}.`:"",r=l.isPlainObject(e);if(!r)return`Expected ${l.getErrorValue(e)} to be a plain Object`;let n=!1;const o=Object.keys(t).find(i=>{const r=e[i];if(l.isPlainObject(t[i]))n=l.object(r,t[i],s+i);else if("undefined"===typeof r&&void 0!==t[i])n=`Missing key ${s}${i} in ${l.getErrorValue(e)}`;else try{a(r,t[i])}catch(o){n=o.message.replace(/Match failed:\s/,"")}return n});return!!o&&`${n} in object.${s}${o}`},l.isPlainObject=function(e){const t={};if(!e||"[object Object]"!==t.toString(e))return!1;const i=Object.getPrototypeOf(e);if(!i)return!0;const s=t.hasOwnProperty,r=s.call(i,"constructor")&&i.constructor;return"function"===typeof r&&s.toString.call(r)===s.toString.call(Object)},l.requireKeys=function(e,t,i){const s=i?`${i}.`:"";let r=!1;const n=Object.keys(e).find(i=>{if(l.isPlainObject(t[i])){const n=e[i];r=l.requireKeys(n,t[i],s+i)}else t[i]||(r=`Found additional key ${s}${i}`);return r=!!r&&r.replace(/\sin.*/,""),r});return!!n&&`${r} in ${l.getErrorValue(e)}`};var c=i(3),h=i(9);i(19),i(35),i(36);const u={OFF:1,ERROR:2,WARN:4,INFO:8,DEBUG:16},d={ERROR:0,WARN:0,INFO:0,DEBUG:0};d.ERROR=u.ERROR|u.WARN|u.INFO|u.DEBUG,d.WARN=u.WARN|u.INFO|u.DEBUG,d.INFO=u.INFO|u.DEBUG,d.DEBUG=u.DEBUG;let m=u.INFO,g=!1;const p={};let y;const _=new Map;_.set(u.ERROR,"error"),_.set(u.WARN,"warn"),_.set(u.INFO,"info"),_.set(u.DEBUG,"log");class f{static get loggers(){return p}static get enabled(){return Object.keys(u).find(e=>u[e]===m)||"OFF"}static set enabled(e){if(e){const t="string"===typeof e?e.toUpperCase():"INFO";m=u[t]||u.INFO}else m=u.OFF}static get timestamp(){return g}static set timestamp(e){g=e}constructor(e){this.className=e,this.deprecations=new Set}static getLogger(e){return e?f.loggers[e]||f.createLogger(e):y}static createLogger(e){const t=new f(e);return f.loggers[e]=t,t}error(e){if(a(e,String),m&d.ERROR){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._log(e,u.ERROR,i)}}warning(e){if(a(e,String),m&d.WARN){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._log(e,u.WARN,i)}}deprecate(e,t){if(a(e,String),o(t,String),!this.deprecations.has(e)){this.deprecations.add(e);let i=`${e} has been deprecated and will be removed`;t&&(i=`${i}. ${t}`),this.warning(i)}}info(e){if(a(e,String),m&d.INFO){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._log(e,u.INFO,i)}}debug(e){if(a(e,String),m&d.DEBUG){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._log(e,u.DEBUG,i)}}log(e){if(a(e,String),m&d.DEBUG){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this._log(e,u.DEBUG,i)}}_log(e,t,i){let s=e;if(this.className&&(s=`[${this.className}] ${s}`),g){const e=new Date(Date.now());s=`${e.toLocaleDateString()} ${e.toLocaleTimeString()} ${s}`}console[_.get(t)](s,...i),t&u.ERROR&&(console.group(),console.trace(),console.groupEnd())}}y=new f;var v=f;class L{constructor(e){this.className=e.className?e.className:"vcs.vcm.Framework",this.id=Object(c["c"])(),this.framework=G.getInstance(),this.options=e,this.logger=v.getLogger(this.className),this.name=e.name||Object(c["c"])()}getClassName(){return this.logger.deprecate("getClassName","Access the property className directly"),this.className}getName(){return this.logger.deprecate("getName","Access the property name directly"),this.name}getId(){return this.logger.deprecate("getId","Use name property as a unique identifier"),this.id}getConfigObject(){return{type:this.className,name:this.name}}}var M=L;const b=ol.proj.getTransform("EPSG:4326","EPSG:3857"),w=ol.proj.getTransform("EPSG:3857","EPSG:4326");class T extends M{static get className(){return"vcs.vcm.util.Projection"}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.className=T.className,super(e),this.proj=null,this.proj4=null,this.epsg=null;let t=e.epsg,i=e.proj4;if("string"===typeof t&&""===t.trim()&&(t=null),t){if("string"===typeof t&&0!==t.indexOf("EPSG:")&&(t=`EPSG:${t}`),Number.isFinite(t)&&(t=`EPSG:${t}`),"string"===typeof i&&""===i.trim()&&(i=null),i&&(this.proj4=i,window.proj4.defs(t,i)),e.alias){const i=e.alias;i.forEach(e=>{window.proj4.defs(e,window.proj4.defs(t))},this)}this.epsg=t,this.proj=ol.proj.get(t)}this.proj||(this.framework.getProjection()?this.epsg=this.framework.getProjection().getEPSG():this.epsg="EPSG:4326",this.proj=ol.proj.get(this.epsg))}getProjection(){return this.proj}getEPSG(){return this.epsg}getPROJ4(){return this.proj4}static transform(e,t,i){const s=ol.proj.getTransform(t.getProjection(),e.getProjection()),r=new Array(2);return s([i[0],i[1]],r,2),i.length>2&&r.push(i[2]),r}transformTo(e,t){return T.transform(e,this,t)}static transformCoordinates(e,t,i){const s=[];for(let r=0;r<i.length;r++)s.push(T.transform(e,t,i[r]));return s}static getTransformer(e,t){return ol.proj.getTransform(t.getProjection(),e.getProjection())}transformFrom(e,t){return T.transform(this,e,t)}getConfigObject(){const e={epsg:this.epsg};return this.proj4&&(e.proj4=this.proj4),e}static createGeographicProjection(){return new T({epsg:4326})}static createMercatorProjection(){return new T({epsg:3857})}static parseUrlParameter(e){const t=e.epsg,i=e.proj4;return new T({epsg:t,proj4:i})}static mercatorToWgs84(e,t){return w(e,t?e:void 0,e.length)}static wgs84ToMercator(e,t){return b(e,t?e:void 0,e.length)}}var S=T;const C=v.getLogger("vcs.vcm.util.ViewPoint");class k{constructor(e){if(this.name=e.name?e.name:Object(c["c"])(),this.cameraPosition=e.cameraPosition?e.cameraPosition:null,Array.isArray(this.cameraPosition)&&3===this.cameraPosition.length)for(var t=0;t<this.cameraPosition.length;t++){var i=this.cameraPosition[t];"string"===typeof i&&(this.cameraPosition[t]=Number(i))}else this.cameraPosition=null;if(this.groundPosition=e.groundPosition?e.groundPosition:null,Array.isArray(this.groundPosition))for(t=0;t<this.groundPosition.length;t++){i=this.groundPosition[t];"string"===typeof i&&(this.groundPosition[t]=Number(i))}this.distance=null!=e.distance?e.distance:null,"string"===typeof this.distance&&(this.distance=Number(this.distance)),this.heading=e.heading?e.heading:0,"string"===typeof this.heading&&(this.heading=Number(this.heading)),this.pitch=e.pitch?e.pitch:-90,"string"===typeof this.pitch&&(this.pitch=Number(this.pitch)),this.roll=e.roll?e.roll:0,"string"===typeof this.roll&&(this.roll=Number(this.roll)),this.animate=!!e.animate&&e.animate,this.proj=e.proj?e.proj:null}getConfigObject(){return{name:this.name,distance:this.distance,cameraPosition:this.cameraPosition,groundPosition:this.groundPosition,heading:this.heading,pitch:this.pitch,roll:this.roll,animate:this.animate}}clone(){return new k({cameraPosition:this.cameraPosition?this.cameraPosition.slice():null,groundPosition:this.groundPosition?this.groundPosition.slice():null,distance:this.distance,heading:this.heading,pitch:this.pitch,roll:this.roll,animate:this.animate,proj:this.proj})}getName(){return C.deprecate("getName","Access the property name directly"),this.name}getCameraPosition(){return this.cameraPosition}setCameraPosition(e){this.cameraPosition=e}getAnimate(){return this.animate}setAnimate(e){this.animate=e}getGroundPosition(){return this.groundPosition}setGroundPosition(e){this.groundPosition=e}getDistance(){return this.distance}setDistance(e){this.distance=e}getHeading(){return this.heading}setHeading(e){this.heading=e}getPitch(){return this.pitch}setPitch(e){this.pitch=e}getRoll(){return this.roll}setRoll(e){this.roll=e}getProjection(){return this.proj}setProjection(e){this.proj=e}toString(){const e=`ViewPoint: [Ground:${String(this.groundPosition?this.groundPosition:null)}]`+`[Camera:${String(this.cameraPosition?this.cameraPosition:null)}]`+`[Distance:${this.distance}]`+`[heading:${this.distance}]`+`[pitch:${this.distance}]`+`[roll:${this.distance}]`;return e}static createViewPointFromExtent(e){if(e&&4===e.length){const t=e[0],i=e[1],s=e[2],r=e[3],n=[(s-t)/2+t,(r-i)/2+i];let a=0;const o=Math.max(s-t,r-i);return a=o<.001?400:3e5*o,new k({name:"viewpointFromExtend",distance:a,groundPosition:n,heading:360,pitch:-90,roll:0,animate:!0})}return null}static parseURLparameter(e){let t=e.cameraPosition;if(null!=t){t=t.split(",");for(var i=0;i<t.length;i++)t[i]=Number(t[i])}let s=e.groundPosition;if(null!=s){s=s.split(",");for(i=0;i<s.length;i++)s[i]=Number(s[i])}if(null!=e.epsg){const i=S.parseUrlParameter(e),r=S.createGeographicProjection();s&&(s=S.transform(r,i,s)),t&&(t=S.transform(r,i,t))}const r={cameraPosition:t,groundPosition:s,distance:Number(e.distance),pitch:Number(e.pitch),heading:Number(e.heading),roll:Number(e.roll)};return new k(r)}getLink(e){const t={};let i="",s=this.groundPosition,r=this.cameraPosition;if(null!=e.queryParams.epsg){const t=S.createGeographicProjection(),i=new S({epsg:e.queryParams.epsg});s&&(s=S.transform(i,t,this.groundPosition)),r&&(r=S.transform(i,t,this.cameraPosition))}r&&(r.forEach(e=>{i+=`${e.toFixed(5)},`}),i=i.slice(0,-1),t.cameraPosition=i),i="",s&&(s.forEach(e=>{i+=`${e.toFixed(5)},`}),i=i.slice(0,-1),t.groundPosition=i),null!=this.distance&&(t.distance=this.distance.toFixed(2)),null!=this.pitch&&(t.pitch=this.pitch.toFixed(2)),null!=this.heading&&(t.heading=this.heading.toFixed(2)),null!=this.roll&&(t.roll=this.roll.toFixed(2)),e.addQueryParams(t)}isValid(){try{let t=!1,i=!1;try{t=!a(this.cameraPosition,[Number])&&3===this.cameraPosition.length}catch(e){i=!a(this.groundPosition,[Number])&&this.groundPosition.length>1&&this.groundPosition.length<4}if(!t&&!i)throw new Error("Viewpoint is missing position");return i&&a(this.distance,Number),a(this.heading,Number),a(this.pitch,Number),a(this.roll,Number),!0}catch(e){return!1}}}var E=k;i(41);const I={LOCALE_CHANGED:"LOCALE_CHANGED"};let D=null;class P{constructor(){this.languages=[{token:"de",language:"Deutsch",data:{}},{token:"en",language:"English",data:{}}],this.currentlocale="",this.defaultLocale="de",this.availableLocales=[],this.logger=v.getLogger("vcs.vcm.i18n"),this.i18nNumber=0}static getInstance(){return D||(D=new P),D}static registerLanguage(e,t,i){P.getInstance().registerLanguage(e,t,i)}detectBrowserLocale(){if(navigator.language){const e=navigator.language;return e.substring(0,2)}return null}static getNextI18nNumber(){const e=P.getInstance();return e.i18nNumber++,e.i18nNumber}initialize(e){e.i18n&&this.setConfig(e.i18n);const t=e.availableLocales;if(Array.isArray(t))for(let s=0;s<t.length;s++){const e=t[s];if(null!==e&&"object"===typeof e){const t=e.locale;t&&(this.isLanguageAvailable(t)||this.registerLanguage(t,t,{}),this.availableLocales.push(t))}else this.isLanguageAvailable(t[s])&&this.availableLocales.push(t[s])}this.setDefaultLocale(e.locale),e.locale&&(this.defaultLocale=e.locale);const i=this.detectBrowserLocale();i&&this.availableLocales.indexOf(i)>=0&&(this.defaultLocale=i)}setDefaultLocale(e){this.defaultLocale=this.availableLocales[0],e&&this.isLanguageAvailable(e)&&(this.defaultLocale=e);const t=this.detectBrowserLocale();t&&this.isLanguageAvailable(t)&&(this.defaultLocale=t)}setConfig(e){for(const t in e)if(this.isLanguageAvailable(t)){for(let i=0;i<this.languages.length;i++)if(this.languages[i].token===t)for(const s in e[t])this.languages[i].data[s]=e[t][s]}else this.registerLanguage(t,t,e[t])}getLocaleAwareString(e){return"string"===typeof e?e.replace("$locale$",this.currentlocale):e}registerLanguage(e,t,i){const s={token:e,language:t,data:i};for(let r=0;r<this.languages.length;r++)if(this.languages[r].token==e)return void this.logger.info(`Language ${t} already registered`);this.languages.push(s)}isLanguageAvailable(e){for(let t=0;t<this.languages.length;t++)if(this.languages[t].token==e)return!0;return!1}handleURLParameter(e){e.lang&&this.isLanguageAvailable(e.lang)&&(this.defaultLocale=e.lang)}static getMessage(e){return P.getInstance().getSingleMessage(e)}static setMessage(e,t,i){const s={};s[t]=i;const r=P.getInstance(),n=r.getLanguageData(e);n&&(n[t]=i)}getSingleMessage(e){const t=this.getLanguageData(this.currentlocale),i=this.getLanguageData("en"),s=Object.assign({},i,t);return s&&s.hasOwnProperty(e)?s[e]:e}getLanguageData(e){for(let t=0;t<this.languages.length;t++)if(this.languages[t].token==e)return this.languages[t].data;return this.languages.length>0?this.languages[0].data:null}getLocale(){return this.currentlocale?this.currentlocale:this.defaultLocale}setLocale(e){e||(e=this.defaultLocale),this.currentlocale!=e&&(this.currentlocale=e,this.translateAll(),G.getInstance().publish(I.LOCALE_CHANGED,this.currentlocale))}getRegisteredLanguages(){const e=[];for(let t=0;t<this.languages.length;t++)e.push(this.languages[t].token);return e}static setDataForElement(e,t){const i={};Array.isArray(t)||(t=[t]);for(let s=0;s<t.length;s++)i[`data-${String(s)}`]=t[s];if(e)for(const s in i)e.setAttribute(s,i[s]);P.updateElement(e)}static updateElement(e){const t=P.getInstance(),i=e.classList;for(let s=0;s<i.length;s++){const r=i[s];if(-1!==r.indexOf("i18n")){let i=t.getSingleMessage(r);i=t.setParamValuesInTranslation(i,e),e.textContent=i}}}translateAll(e){const t=this.getLanguageData(this.currentlocale),i=this.getLanguageData("en"),s=Object.assign({},i,t);let r=[];const n=e||document.getElementById("balloonContainer")||document;for(const a in s){r=n.querySelectorAll(`.${a}`);let e=s[a];for(let t=0;t<r.length;t++){const i=r[t];e=this.setParamValuesInTranslation(e,i),a.indexOf("tooltip")===a.length-"tooltip".length?i.title=e:"input"==i.nodeName.toLowerCase()?"submit"===i.attributes.type.value||"button"===i.attributes.type.value?i.value=e:i.placeholder=e:i.innerHTML=e}}}setParamValuesInTranslation(e,t){const i=new RegExp("{[0-9]}","g"),s=e.match(i);if(s)for(let r=0;r<s.length;r++){const i=s[r].match(/{(.*)}/)[1],n=new RegExp(`{[${r}]}`,"g"),a=t.getAttribute(`data-${i}`);a?e=e.replace(n,a):(e=e.replace(n,""),this.logger.warning(`No attribute found to replace the placeholder at element: ${t}`))}return e}replaceParamsInTranslation(e,t){const i=new RegExp("{[0-9]}","g"),s=e.match(i);if(s)for(let r=0;r<s.length;r++){s[r].match(/{(.*)}/)[1];const i=new RegExp(`{[${r}]}`,"g"),n=t[r];e=n?e.replace(i,n):e.replace(i,"")}return e}}var O=P;I.SELECTED_ITEM_CHANGED="SELECTED_ITEM_CHANGED",I.SELECTIONSET_CHANGED="SELECTIONSET_CHANGED";let Y=null;class x{constructor(e){this.className="vcs.vcm.SelectBehavior",this.logger=v.getLogger(this.className);const t={invertClickBehaviorForCesiumMap:!(!e||!e.invertClickBehaviorForCesiumMap)&&e.invertClickBehaviorForCesiumMap,highlightStyle:{selectionset:{color:e&&e.highlightStyle&&e.highlightStyle.selectionset&&e.highlightStyle.selectionset.color?e.highlightStyle.selectionset.color:"#3F51B5"},currentItem:{color:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.color?e.highlightStyle.currentItem.color:"#F44336",pointStyle:{},lineStyle:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.lineStyle?e.highlightStyle.currentItem.lineStyle:{color:"#83f52c",width:1.25},polygonStyle:{fill:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.polygonStyle&&e.highlightStyle.currentItem.polygonStyle.fill?e.highlightStyle.currentItem.polygonStyle.fill:{color:"rgba(255,255,255,0.4)"},stroke:e&&e.highlightStyle&&e.highlightStyle.currentItem&&e.highlightStyle.currentItem.polygonStyle&&e.highlightStyle.currentItem.polygonStyle.stroke?e.highlightStyle.currentItem.polygonStyle.stroke:{color:"#83f52c",width:1}}}}};let i,s;if(e&&e.highlightStyle&&e.highlightStyle.currentItem?e.highlightStyle.currentItem.pointStyle.icon?t.highlightStyle.currentItem.pointStyle.icon=e.highlightStyle.currentItem.pointStyle.icon:e.highlightStyle.currentItem.pointStyle.circle?t.highlightStyle.currentItem.pointStyle.circle=e.highlightStyle.currentItem.pointStyle.circle:t.highlightStyle.currentItem.pointStyle={icon:{scale:1,src:"{layerIcon}"}}:t.highlightStyle.currentItem.pointStyle={icon:{scale:1,src:"{layerIcon}"}},s=t.highlightStyle.selectionset.color,i=olcs.core.convertColorToCesium(s),this._selectionsetHighlightColor=i,s=t.highlightStyle.currentItem.color,i=olcs.core.convertColorToCesium(s),this._currentItemHighlightColor=i,t.highlightStyle.currentItem.pointStyle.icon)this._currentItemHighlightPointStyle=new ol.style.Style({image:new ol.style.Icon(t.highlightStyle.currentItem.pointStyle.icon)});else{const e=t.highlightStyle.currentItem.pointStyle.circle.stroke?new ol.style.Stroke(t.highlightStyle.currentItem.pointStyle.circle.stroke):void 0,i=new ol.style.Fill(t.highlightStyle.currentItem.pointStyle.circle.fill),s=t.highlightStyle.currentItem.pointStyle.circle.radius?t.highlightStyle.currentItem.pointStyle.circle.radius:5,r=new ol.style.Circle({fill:i,radius:s,stroke:e});this._currentItemHighlightPointStyle=new ol.style.Style({image:r})}this._currentItemHighlightLineStyle=new ol.style.Style({stroke:new ol.style.Stroke(t.highlightStyle.currentItem.lineStyle)});const r={};r.stroke=new ol.style.Stroke(t.highlightStyle.currentItem.polygonStyle.stroke),r.fill=new ol.style.Fill(t.highlightStyle.currentItem.polygonStyle.fill),this._currentItemHighlightPolygonStyle=new ol.style.Style(r),this._invertClickBehaviorForCesiumMap=!!t.invertClickBehaviorForCesiumMap,this._selectionset=[],this.selectMode="toplevelfeature",this._currentItem={},this._currentItemHighlightedUnderneath=!1,this.framework=G.getInstance(),this.active=!1,this.options=t,this.activateClickBehavior(),this.framework.subscribe(I.LAYER_DEACTIVATED,this.layerDeactivatedListener.bind(this)),this.framework.subscribe(I.FEATURE_REMOVED,this.featureRemovedListener.bind(this)),this.framework.subscribe(I.MAP_ACTIVATED,this.mapActivatedListener.bind(this));const n=this.framework.getLayers();this.selectionSetLayers=[],n.forEach(function(e){"vcs.vcm.layer.cesium.Buildings"!==e.className&&"vcs.vcm.layer.cesium.CesiumTilesetLayer"!==e.className&&"vcs.vcm.layer.TiledLayer"!==e.className&&"vcs.vcm.layer.FeatureStore"!==e.className||this.selectionSetLayers.push(e)},this),this.framework.subscribe(I.LAYER_ACTIVATED,this.synchronizeSelectionSet.bind(this)),this.transformGeometryOnMove=!this.framework.isIE11}static getInstance(e){return Y||(Y=new x(e)),Y}static dispose(){Y=null}activateClickBehavior(){this.active||(this.active=!0,this._invertClickBehaviorForCesiumMap?(this.featureClickedKey=this.framework.subscribe(I.FEATURE_CLICKED,this.handleFeatureCTRLClickedEvent.bind(this)),this.featureCtrlClickedKey=this.framework.subscribe(I.FEATURE_CTRL_CLICKED,this.handleFeatureClickedEvent.bind(this))):(this.featureClickedKey=this.framework.subscribe(I.FEATURE_CLICKED,this.handleFeatureClickedEvent.bind(this)),this.featureCtrlClickedKey=this.framework.subscribe(I.FEATURE_CTRL_CLICKED,this.handleFeatureCTRLClickedEvent.bind(this))),this.mapClickedKey=this.framework.subscribe(I.MAP_CLICKED,this.handleMapClickedEvent.bind(this)))}deactivateClickBehavior(){this.active&&(this.active=!1,this.framework.unsubscribeByKey(this.featureClickedKey),this.framework.unsubscribeByKey(this.featureCtrlClickedKey),this.framework.unsubscribeByKey(this.mapClickedKey),this.clearCurrentItem())}isClickBehaviorActivated(){return this.logger.deprecate("isClickBehaviorActivated","check the .active property"),this.active}getInvertClickBehaviorForCesiumMap(){return this._invertClickBehaviorForCesiumMap}setInvertClickBehaviorForCesiumMap(e){this._invertClickBehaviorForCesiumMap=e,this.deactivateClickBehavior(),this.activateClickBehavior()}addToSelectionSet(e){let t=!1;e.forEach(function(e){if(-1===this._selectionset.indexOf(e))if(t=!0,this._selectionset.push(e),this._currentItem&&this._currentItem.id===e)this._currentItemHighlightedUnderneath=!0;else{const t={};t[e]=this._selectionsetHighlightColor,this.selectionSetLayers.forEach(e=>{e.initialized&&e.highlight(t)})}},this),t&&this.framework.publish(I.SELECTIONSET_CHANGED)}removeFromSelectionSet(e){let t=!1;e.forEach(function(e){const i=this._selectionset.indexOf(e);-1!==i&&(t=!0,this._currentItem&&this._currentItem.id&&this._currentItem.object?this._currentItem.id!==this._selectionset[i]?this.selectionSetLayers.forEach(function(e){e.initialized&&e.unHighlight([this._selectionset[i]])},this):this._currentItemHighlightedUnderneath=null:this.selectionSetLayers.forEach(function(e){e.initialized&&e.unHighlight([this._selectionset[i]])},this),this._selectionset.splice(i,1))},this),t&&this.framework.publish(I.SELECTIONSET_CHANGED)}synchronizeSelectionSet(){const e=this._selectionset.splice(0);this.clearSelectionSet(),this.addToSelectionSet(e)}getSizeOfSelectionSet(){return this._selectionset.length}getSelectionSet(){return this._selectionset}clearSelectionSet(){this.removeFromSelectionSet(this._selectionset.slice(0))}setCurrentItem(e,t,i){if(a(e,String),o(t,Object),i&&!/^vcs\.vcm\.layer/.test(i.className))throw new Error(`Match failed: expected ${i} to be an instanceof vcs.vcm.layer.Layer`);this.framework.publish(I.SELECTED_ITEM_CHANGED,e,t,i),this.clearCurrentItem();for(var s=0;s<this._selectionset.length;s++)this._selectionset[s]===e&&(this.selectionSetLayers.forEach(function(e){e.initialized&&e.unHighlight([this._selectionset[s]])},this),this._currentItemHighlightedUnderneath=!0);if(i){const s={};s[e]=i.determineHighlightStyle(e,t),i.highlight(s),this._currentItem={id:e,object:t,layer:i}}else this.selectionSetLayers.forEach(i=>{const s={};s[e]=i.determineHighlightStyle(e,t),i.highlight(s)}),this._currentItem={id:e,object:t,layer:this.selectionSetLayers};t&&i&&this.passToBalloonInfo(t,i)}determineDefaultVectorHighlightStyle(e,t,i){const s=t.getGeometry(),r=t.get("olcs_extrudedHeight")||t.get("olcs_storeyNumber")&&t.get("olcs_storeyHeight");if(s instanceof ol.geom.Point||s instanceof ol.geom.MultiPoint){let s,n=t.getStyle()?t.getStyle():i.getStyle().style,a=!1;if(n instanceof Function&&(n=n(t),a=!0),n.getImage())if(this._currentItemHighlightPointStyle.getImage()instanceof ol.style.Icon)if(n.getImage()instanceof ol.style.Icon){if(!a)if("{layerIcon}"===this._currentItemHighlightPointStyle.getImage().getSrc())n=i.getStyle().style;else if("{featureIcon}"===this._currentItemHighlightPointStyle.getImage().getSrc()){const t=i.getFeatureById(e);n=t.getStyle()}const t=n.getImage().getImage();let r;if("canvas"===t.nodeName.toLowerCase()){const e=n.getImage().getSize();r={img:t,imgSize:[e[0],e[1]],scale:this.options.highlightStyle.currentItem.pointStyle.icon.scale?this.options.highlightStyle.currentItem.pointStyle.icon.scale:1}}else{const e=n.getImage().getSrc();r=Object.assign({},this.options.highlightStyle.currentItem.pointStyle.icon,{src:e})}s=new ol.style.Style({image:new ol.style.Icon(r)})}else{const e=n.getImage().clone(),t=this.options.highlightStyle.currentItem.pointStyle.icon.scale?e.getScale()*this.options.highlightStyle.currentItem.pointStyle.icon.scale:2*e.getScale();e.setScale(t),s=new ol.style.Style({image:e})}else this._currentItemHighlightPointStyle.getImage()instanceof ol.style.Circle&&(s=new ol.style.Style({image:this._currentItemHighlightPointStyle.getImage()}));else s=new ol.style.Style({});if(n.getText()){const e=n.getText().clone(),t=e.getScale()||1,i=this.options.highlightStyle.currentItem.pointStyle.icon.scale?t*this.options.highlightStyle.currentItem.pointStyle.icon.scale:2*t;e.setScale(i),e.setFill(this._currentItemHighlightPolygonStyle.getFill()),s.setText(e)}return r&&s.setStroke(this._currentItemHighlightLineStyle.getStroke()),s}return s instanceof ol.geom.LineString||s instanceof ol.geom.MultiLineString?r?this._currentItemHighlightPolygonStyle:this._currentItemHighlightLineStyle:s instanceof ol.geom.Polygon||s instanceof ol.geom.Circle||s instanceof ol.geom.MultiPolygon?this._currentItemHighlightPolygonStyle:void 0}passToBalloonInfo(e,t){const i=this.getBalloonInfoWidget();if(i){const s=t.getGenericFeatureFromClickedObject(e);s?i.createBalloonForGenericFeature(s):this.logger.warning("Could not create generic feature to pass to balloonInfo")}}getBalloonInfoWidget(){return this.balloonWidget||(this.balloonWidget=this.framework.getWidgetByType("vcs.vcm.widgets.BalloonInfo")),this.balloonWidget}clearCurrentItem(e){function t(e,t,s){e.unHighlight([t]),s&&(i={},i[t]=s,e.highlight(i))}let i;if(this._currentItem&&this._currentItem.id&&this._currentItem.layer){const e=this._currentItem.layer,i=this._currentItem.id;if(this._currentItem={},Array.isArray(e))e.forEach(function(e){const s=!!this._currentItemHighlightedUnderneath&&this._selectionsetHighlightColor;t(e,i,s)},this);else{const s=!!this._currentItemHighlightedUnderneath&&this._selectionsetHighlightColor;t(e,i,s)}}this._currentItemHighlightedUnderneath=!1;const s=this.getBalloonInfoWidget();s&&s.clearBalloon(),e||this.framework.publish(I.SELECTED_ITEM_CHANGED,null)}getCurrentItem(){return this._currentItem}handleFeatureClickedEvent(e,t,i){this.setCurrentItem(e,t,i)}handleFeatureCTRLClickedEvent(e,t,i){-1!==this._selectionset.indexOf(e)?this.removeFromSelectionSet([e]):this.addToSelectionSet([e])}getLink(e){if(null!=this._currentItem.id&&null!=this._currentItem.layer){const t={};if(t.slLayer=this._currentItem.layer.name,t.slId=this._currentItem.id,this._currentItem.object instanceof ol.Feature){const e=this._currentItem.object.getGeometry();t.slOlT=e.getType()}e.addQueryParams(t)}}handleMapClickedEvent(){this.clearCurrentItem()}layerDeactivatedListener(e){this._currentItem.layer===e&&this.clearCurrentItem()}featureRemovedListener(e){this.removeFromSelectionSet([e.id]),this._currentItem.id===e.id&&this.clearCurrentItem()}mapActivatedListener(e){this._currentItem.layer&&this._currentItem.object&&(this._currentItem.layer.isSupported(e)?this.passToBalloonInfo(this._currentItem.object,this._currentItem.layer):this.clearCurrentItem())}}var A=x;class j{constructor(){this.key_=1,this.pendingKeys_=[],this.publishDepth_=0,this.subscriptions_=[],this.topics_={}}subscribe(e,t,i){a(e,String),a(t,Function);let s=this.topics_[e];s||(s=this.topics_[e]=[]);const r=this.key_;return this.subscriptions_[r]=e,this.subscriptions_[r+1]=t,this.subscriptions_[r+2]=i,this.key_=r+3,s.push(r),r}subscribeOnce(e,t,i){let s=!1;var r=this.subscribe(e,function(e){s||(s=!0,this.unsubscribeByKey(r),t.apply(i,arguments))},this);return r}unsubscribe(e,t,i){const s=this.topics_[e];if(s){const e=this.subscriptions_,r=s.find(s=>e[s+1]==t&&e[s+2]==i);if(r)return this.unsubscribeByKey(r)}return!1}unsubscribeByKey(e){const t=this.subscriptions_[e];if(t){const i=this.topics_[t];if(0!=this.publishDepth_)this.pendingKeys_.push(e),this.subscriptions_[e+1]=function(){};else{if(i){const t=i.indexOf(e);i.splice(t,1)}delete this.subscriptions_[e],delete this.subscriptions_[e+1],delete this.subscriptions_[e+2]}}return!!t}publish(e,t){const i=this.topics_[e];if(i){const e=new Array(arguments.length-1);for(var s=1,r=arguments.length;s<r;s++)e[s-1]=arguments[s];if(this.async_)for(s=0;s<i.length;s++){var n=i[s];j.runAsync_(this.subscriptions_[n+1],this.subscriptions_[n+2],e)}else{this.publishDepth_++;try{for(s=0,r=i.length;s<r;s++){n=i[s];this.subscriptions_[n+1].apply(this.subscriptions_[n+2],e)}}finally{if(this.publishDepth_--,this.pendingKeys_.length>0&&0==this.publishDepth_){let e;while(e=this.pendingKeys_.pop())this.unsubscribeByKey(e)}}}return 0!=s}return!1}clear(e){if(e){const t=this.topics_[e];t&&(t.forEach(this.unsubscribeByKey,this),delete this.topics_[e])}else this.subscriptions_.length=0,this.topics_={}}getCount(e){if(e){const t=this.topics_[e];return t?t.length:0}let t=0;for(const i in this.topics_)t+=this.getCount(i);return t}disposeInternal(){this.clear(),this.pendingKeys_.length=0}}var F=j;let N,H=0;const R=Symbol("VcsConfigStyle");class z{constructor(){this.widgets={},this.maps={},this.layers={},this.viewpoints={},this.styles={},this.flights={},this.activemap=null,this.lastactivemap=null,this.startingmap="",this.startViewPoint=null,this.mapcontainer=null,this.urlParameter=null,this.pubsub=new F,this.projection=null,this.logger=v.getLogger("vcs.vcm.Framework"),this.layerIndexCounter=0,this.numberOfLocales=0,this.initialized=!1,this.exclusiveListener={id:null,listeners:[],removedCallback:null},this.config={},this.currentLocale=null,this.libraryBasePath="",this.baseUrl="",this.isIE11=!!window.MSInputMethodContext&&!!document.documentMode}static activateLogging(){v.enabled="info"}static get VCM_VERSION(){return"3.6.339-stable #217f884"}static get configContentSymbol(){return R}setInitialized(e){this.initialized=e}isInitialized(){return this.initialized}static getVersion(){return/VCM_VERSION/.test(z.VCM_VERSION)?"3.6.000-devel #12345":z.VCM_VERSION}loadLibraries(e,t,i){this.libs||(this.libs={});const s=[];for(let n=0;n<e.length;n++){var r=e[n];""===this.libraryBasePath||t||(r=this.libraryBasePath+r),this.libs[r]?s.push(this.libs[r]):(this.libs[r]=new Promise((e,t)=>{const s=document.createElement("script");s.type="text/javascript",s.src=r,s.defer=!1,s.async=!1,s.onload=e,s.onerror=t,i&&(/\.es6\.js$/.test(r)?s.type="module":s.noModule=!0),document.head.appendChild(s)}),s.push(this.libs[r]))}return Promise.all(s)}addElementsToMapContainer(){const e=document.createElement("div");e.setAttribute("id","balloonContainer"),e.classList.add("mapElement"),e.classList.add("vcm-map-top");const t=document.createElement("div");t.setAttribute("id","vcmui"),this.mapcontainer.appendChild(e),this.mapcontainer.appendChild(t),this.mapcontainer.classList.add("vcs_map_container"),this.mapcontainer.classList.add("vcm-font-default")}getConfig(e){let t=this.config;if(e){const i=e.split(".");for(let e=0;e<i.length;e+=1){const s=i[e];if("undefined"===typeof t[s])return{};t=t[s]}}return t}handleUiPlugins(e){e&&e.plugins&&Object.keys(e.plugins).forEach(function(t){const i=e.plugins[t],s=i._entry||`plugins/${t}/${t}.js`;if("_dev"!==s){const r=[s],n=i._esmodule;n&&r.unshift(s.replace(/\.js$/,".es6.js")),this.loadLibraries(r,null,n).then(()=>{this.logger.info(`Loaded Plugin: ${t}`)}).catch(()=>{this.logger.warning(`Could not find JS file for ui plugin ${t}`),delete e.plugins[t]})}},this)}getI18nConfig(){return{availableLocales:this.config.availableLocales,locale:this.config.locale,i18n:this.config.i18n}}addStyle(e){this.styles[e.name]=e}getStyleByName(e){return a(e,String),this.styles[e]}getStyles(){return this.styles}addFlight(e){a(e.name,String),this.flights[e.name]=e}getFlightByName(e){return a(e,String),this.flights[e]}getFlights(){return Object.values(this.flights)}getLogger(){return this.logger}getActiveMap(){return this.activemap}addMap(e){return this.maps[e.name]?(this.logger.warning(`The map ${e.name} already exist.`),!1):(this.maps[e.name]=e,!0)}getMapByName(e){return this.maps[e]||null}getMapByType(e){return Object.values(this.maps).find(t=>t.className===e)}activateMap(e,t){let i=this.getMapByType(e);i||(i=this.getMapByName(e));const s=this.activemap?this.activemap.className:null,r=i?i.className:null;if("vcs.vcm.maps.Cesium"===s&&"vcs.vcm.maps.Openlayers"===r){const e=this.activemap.getViewPoint();e&&(i.fixedNorthOrientation&&e.setHeading(0),e.setPitch(-90),e.setAnimate(!0),e.getGroundPosition()&&e.setCameraPosition(null),this.activemap.gotoViewPoint(e,1,null,()=>{const e={listener:null};e.listener=this.activemap.getScene().postRender.addEventListener(()=>{e.listener&&e.listener(),this._activateMapHandler(i,t)})}))}else this._activateMapHandler(i,t)}_synchronizeLayers(){Object.values(this.layers).forEach(e=>{e.isSupported()&&(e.isInitialized()||!e.isActiveOnStartup()||e.isCommonLayer()||"vcs.vcm.layer.oblique.ObliqueLayer"===e.className?e.isCommonLayer()&&e.synchronizeImplementations(this.lastactivemap,this.activemap).then(()=>{return e.activate(e.isActive())}):e.activate(!0))})}_activateMapHandler(e,t){const i=e.name;if(e){let s=!1,r=t;if(r)if(this.activemap){if(this.activemap.name===i)return void this.activemap.gotoViewPoint(r);s=this.activemap.deactivate().then(()=>{return this.lastactivemap=this.activemap,this.activemap=e,this.activemap.activate()})}else this.activemap=e,s=this.activemap.activate();else if(this.activemap){if(this.activemap.name===i)return;s=this.activemap.deactivate().then(t=>{return this.lastactivemap=this.activemap,this.activemap=e,r=t,this.activemap.activate()})}else this.activemap=e,s=this.activemap.activate();s?s.then(()=>{e.active&&(this._synchronizeLayers(),r&&this.activemap.gotoViewPoint(r),this.publish(I.MAP_ACTIVATED,e))}).catch(e=>{this.logger.error(e.message)}):this.logger.error("could not activate map")}}getMaps(){return Object.values(this.maps)}createViewPointObject(e){const t=new E(e);this.addViewPoint(t)}addViewPoint(e){this.viewpoints[e.name]=e}getViewPointByName(e){for(const t in this.viewpoints)if(this.viewpoints.hasOwnProperty(t)&&this.viewpoints[t].name==e)return this.viewpoints[t];return null}getViewPoints(){const e=[];for(const t in this.viewpoints)this.viewpoints.hasOwnProperty(t)&&e.push(this.viewpoints[t]);return e}getStartViewPoint(){return this.startViewPoint}addLayer(e){return this.layers[e.name]?(this.logger.warning("Could not add Layer with same name twice, make sure the LayerName is unique"),!1):(this.layers[e.name]=e,e.index=this.layerIndexCounter,this.layerIndexCounter+=1,this.getActiveMap()&&!e.isInitialized()&&e.isActiveOnStartup()&&e.activate(!0),!0)}removeLayerByName(e){const t=this.getLayerByName(e);t&&(t.dispose(),this.removeLayer(t))}removeLayer(e){this.layers[e.name]&&delete this.layers[e.name]}getLayerByName(e){return this.layers[e]||null}getLayers(){return Object.values(this.layers)}addWidget(e){return this.widgets[e.name]?(this.logger.warning("Could not add Widget with same name twice, make sure the widgetname is unique"),!1):(this.widgets[e.name]=e,!0)}getWidgetByName(e){return this.widgets[e]||null}getWidgetsByType(e){return Object.values(this.widgets).filter(t=>t.className===e)}getWidgets(){return Object.values(this.widgets)}setStartViewPoint(e){this.startViewPoint=e}getMapContainer(){return this.mapcontainer}getWidgetByType(e){return Object.values(this.widgets).find(t=>t.className===e)}subscribe(e,t,i){return this.pubsub.subscribe(e,t,i)}subscribeOnce(e,t,i){return e?this.pubsub.subscribeOnce(e,t,i):null}subscribeExclusive(e,t,i,s,r){a(e,[String,I]),a(t,Function),a(i,String),o(s,Function),this.setExclusive(i,s);const n=this.pubsub.subscribe(e,t,r);return this.exclusiveListener.listeners.push(n),n}subscribeOnceExclusive(e,t,i,s,r){let n;a(e,[String,I]),a(t,Function),a(i,String),o(s,Function),this.setExclusive(i,s);const l=function(){this.exclusiveListener.listeners=this.exclusiveListener.listeners.filter(e=>e!==n),0===this.exclusiveListener.listeners.length&&this.clearExclusive(),t.call(r,...arguments)};return n=this.pubsub.subscribeOnce(e,l,this),this.exclusiveListener.listeners.push(n),n}setExclusive(e,t){if(null!==this.exclusiveListener.id&&this.exclusiveListener.id!==e){this.exclusiveListener.removedCallback&&this.exclusiveListener.removedCallback();while(this.exclusiveListener.listeners.length>0)this.unsubscribeByKey(this.exclusiveListener.listeners.shift())}A.getInstance().deactivateClickBehavior(),this.exclusiveListener.id=e,this.exclusiveListener.removedCallback=t}clearExclusive(){A.getInstance().activateClickBehavior(),this.exclusiveListener.id=null,this.exclusiveListener.removedCallback=null}unsubscribe(e,t,i){this.pubsub.unsubscribe(e,t,i)}unsubscribeByKey(e){const t=this.exclusiveListener.listeners.indexOf(e);t>-1&&(this.exclusiveListener.listeners.splice(t,1),0===this.exclusiveListener.listeners.length&&this.clearExclusive()),this.pubsub.unsubscribeByKey(e)}publish(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.logger.debug(`Published: ${e}`,...i),this.pubsub.publish.apply(this.pubsub,arguments)}static getInstance(){return N||(N=new z),N}getLocale(){return this.currentLocale}getLocales(){return O.getInstance().getRegisteredLanguages()}setLocale(e){this.currentLocale!==e&&(this.currentLocale=e,O.getInstance().setLocale(this.currentLocale))}setProjection(e){this.projection=e}getProjection(){return this.projection}getSelectBehavior(){return A.getInstance()}getNextUniqueId(){return`:${(H++).toString(36)}`}isMobile(){let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}dispose(){if(N){const e=z.getInstance();e.isInitialized()&&(Object.values(this.layers).forEach(e=>e.dispose()),Object.values(this.maps).forEach(e=>e.dispose()),Object.values(this.widgets).forEach(e=>e.dispose()),this.widgets={},this.maps={},this.layers={},this.viewpoints={},this.startViewPoint=null,this.activemap=null,this.startingmap="",this.pubsub=new F,this.mapcontainer=null),N=void 0}}}var G=z;let V=null;class B{constructor(){this.layers={},this.framework=G.getInstance(),this.framework.subscribe(I.LAYER_ACTIVATED,this.handleLayerActivated,this)}static getInstance(){return V||(V=new B),V}static registerLayer(e){if(e.isExclusive()){const t=B.getInstance(),i=e.getExclusiveGroup();i&&(t.layers[i]||(t.layers[i]=[]),t.layers[i].includes(e)||t.layers[i].push(e))}}handleLayerActivated(e){if(e.isExclusive()){let i=null;for(const s in this.layers)if(this.layers.hasOwnProperty(s))for(var t=0;t<this.layers[s].length;t++)this.layers[s][t]==e&&(i=s);if(i)for(t=0;t<this.layers[i].length;t++)this.layers[i][t]!=e&&this.layers[i][t].isActive()&&this.layers[i][t].activate(!1)}}}var U=B,W=(i(45),i(5)),q=i.n(W);let J=1;class K{static get interactionTypeCounter(){return J}static getNextBit(e){return e<<1}}const Z={NONE:J=K.getNextBit(J),ALT:J=K.getNextBit(J),CTRL:J=K.getNextBit(J),SHIFT:J=K.getNextBit(J),ALL:0};Z.ALL=Z.NONE|Z.ALT|Z.CTRL|Z.SHIFT;const Q={NONE:0,CLICK:J=K.getNextBit(J),DBLCLICK:J=K.getNextBit(J),DRAG:J=K.getNextBit(J),DRAGSTART:J=K.getNextBit(J),DRAGEND:J=K.getNextBit(J),MOVE:J=K.getNextBit(J),DRAGEVENTS:0,CLICKMOVE:0,ALL:0};Q.DRAGEVENTS=Q.DRAG|Q.DRAGEND|Q.DRAGSTART,Q.CLICKMOVE=Q.CLICK|Q.MOVE,Q.ALL=Object.values(Q).reduce((e,t)=>e|t,0);const $={LEFT:J=K.getNextBit(J),RIGHT:J=K.getNextBit(J),MIDDLE:J=K.getNextBit(J),ALL:0};$.ALL=$.LEFT|$.RIGHT|$.CENTER;let X=0;function ee(){return X+=1,X}class te{constructor(){this.id=ee(),this._defaultActive=Q.NONE,this.active=this._defaultActive,this._defaultModificationKey=Z.NONE,this.modificationKey=this._defaultModificationKey,this._defaultPointerKey=$.LEFT,this.pointerKey=this._defaultPointerKey}initialize(){this.handleMapChange(G.getInstance().getActiveMap())}handleMapChange(e){}pipe(e){return this.pipeThrough(e)}pipeThrough(e){return Promise.resolve(e)}setActive(e){"undefined"===typeof e?(this.active=this._defaultActive,this.modificationKey=this._defaultModificationKey,this.pointerKey=this._defaultPointerKey):this.active="boolean"===typeof e?e?this._defaultActive:Q.NONE:e}setModification(e){this.modificationKey=e||this._defaultModificationKey}setPointer(e){this.pointerKey=e||this._defaultPointerKey}}var ie=te;class se extends ie{constructor(e){super(),this.chain=e||[],this._defaultActive=Q.ALL,this._defaultModificationKey=Z.ALL,this._defaultPointerKey=$.ALL,this.setActive()}addInteraction(e,t){null!=t?this.chain.splice(t,0,e):this.chain.push(e)}removeInteraction(e){const t=this.chain.findIndex(t=>t.id===e.id);return t>-1&&this.chain.splice(t,1),t}initialize(){this.chain.forEach(e=>{e.initialize()})}handleMapChange(e){this.chain.forEach(t=>{t.handleMapChange(e)})}pipe(e){let t=Promise.resolve(e);const i=this.chain.length;for(let s=0;s<i;s++){const i=this.chain[s];i.active&e.type&&i.modificationKey&e.key&&i.pointerKey&e.pointer&&(t=t.then(function(e){return e.stopPropagation?Promise.resolve(e):this.pipe(e)}.bind(i)))}return t}setModification(){this.modificationKey=this._defaultModificationKey}setPointer(){this.pointerKey=this._defaultPointerKey}}var re=se;I.MAP_ACTIVATED="MAP_ACTIVATED",I.MAP_CLICKED="MAP_CLICKED",I.CLICKED="CLICKED",I.CLICKED_FIRST_HIT="CLICKED_FIRST_HIT",I.FEATURE_CLICKED="FEATURE_CLICKED",I.FEATURE_CTRL_CLICKED="FEATURE_CTRL_CLICKED",I.CLUSTER_CLICKED="CLUSTER_CLICKED";const ne={};class ae extends M{static get specificLayerImpl(){return ne}constructor(e){super(e),this.mapElement=document.createElement("div"),this.mapElement.setAttribute("id",Object(c["c"])()),this.framework.getMapContainer().appendChild(this.mapElement),this.mapElement.classList.add("mapElement"),this.mapElement.classList.add("vcm-map-top"),this.hide(),this.supportedlayers=[],this.active=!1,this.initialized=!1,this.layerState={},this.layerStateObject={state:!1},this.class_map_loading="vcm_map_loading",this.movementDisabled=!1}isSupported(){return!0}isInitialized(){return this.initialized}static registerSpecificLayerImpl(e,t,i){ae.specificLayerImpl[e]||(ae.specificLayerImpl[e]={}),ae.specificLayerImpl[e][t]=i}static createSpecificLayerImpl(e,t){return ae.specificLayerImpl[e.className][t.className]?new ae.specificLayerImpl[e.className][t.className](t.options):null}raiseClickEvent(e,t,i,s,r){if(t&&i&&null!=s){const n={longitude:t,latitude:i,height:s};r&&(n.obliqueParameters=r),this.framework.publish(e,n)}}raiseClickedFirstHitEvent(e){e.latitude&&e.longitude&&e.height&&this.framework.publish(I.CLICKED_FIRST_HIT,e)}isActive(){return this.active}setLayerLoading(e,t){this.layerState[e.name]=t,this.layerStateObject.state=Object.values(this.layerState).some(e=>e)}activate(e){return Promise.resolve()}deactivate(){this.active=!1;const e=this.getViewPoint();return this.hide(),Promise.resolve(e)}show(){if(null!==this.mapElement){this.mapElement.style.display="";const e=this.className.substr(this.className.lastIndexOf(".")+1,this.className.length);this.framework.getMapContainer().classList.add(e)}}hide(){if(null!==this.mapElement){this.mapElement.style.display="none";const e=this.className.substr(this.className.lastIndexOf(".")+1,this.className.length);this.framework.getMapContainer().classList.remove(e)}}supportsLayer(e){if(null!=e){const t=e.getType();for(let e=0;e<this.supportedlayers.length;e++)if(this.supportedlayers[e]==t)return!0}return!1}disableMovement(e){this.movementDisabled=e}gotoViewPoint(e,t,i,s){}getViewPoint(e,t){throw new Error}dispose(){this.mapElement.parentElement.removeChild(this.mapElement),this.mapElement=null}pointIsVisible(e){throw new Error}handleURLParameter(e){}requestRender(){}activateMouseClickEvents(e){return e}getActiveMouseClickEvents(){return!1}}var oe=ae,le=(i(62),i(211),i(6));let ce=null;class he{constructor(){this.className="vcs.vcm.NavigationMode",this.logger=v.getLogger(this.className),this.timeLastTick=null,this.lookFactor=.05,this.moveFactor=1,this.framework=G.getInstance(),this.allowHeightChanges=!1,this.useAbsoluteHeight=!1,this.referenceHeight=1.6,this.navActive=!1,this.initialized=!1,this.clockListenerRemover=null,this.boundClockTickHandler=this.clockOnTickHandler.bind(this),this.values={referenceHeight:this.referenceHeight,active:!1,walkmode:!1},this.flags={looking:!1,moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,increaseFOV:!1,decreaseFOV:!1,rotation:!1,tiltUp:!1,tiltDown:!1,rotateEast:!1,rotateWest:!1},this.heading=null,this.defaultFOV=null}setOptions(e){this.referenceHeight=e.referenceHeight||this.referenceHeight,this.moveFactor=e.moveFactor||this.moveFactor}static getInstance(){return ce||(ce=new he),ce}static dispose(){ce=null}getLink(e){const t=this.framework.getActiveMap();this.navActive&&"vcs.vcm.maps.Cesium"===t.className&&e.addQueryParams({nav_uah:this.useAbsoluteHeight,nav_ahc:this.allowHeightChanges,nav_rh:this.referenceHeight})}handleURLParameter(e){e.nav_rh&&(this.referenceHeight=e.nav_rh,this.values.referenceHeight=this.referenceHeight,this.activateFirstPersonMode(null,null,null,e.nav_ahc,e.nav_uah))}isActive(){return this.logger.deprecate("isActive","access the navActive property directly"),this.navActive}setFlags(e){Object.entries(e).forEach(e=>{let t=Object(le["a"])(e,2),i=t[0],s=t[1];null!=this.flags[i]&&(this.flags[i]=s)})}setFlag(e,t){this.flags[e]=t}activateFirstPersonMode(e,t,i,s,r){const n=this.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===n.className){if(this.activateOverviewControls(!1),this.useAbsoluteHeight=r||!1,this.allowHeightChanges="boolean"===typeof s?s:this.allowHeightChanges,e){e.animate=!0;const s=t||null,r=i||null;this.navActive=!1,n.gotoViewPoint(e,s,r,()=>{this.navActive=!0,this.activateFirstPersonControls(!0)})}else this.navActive=!0,this.activateFirstPersonControls(!0);Object.keys(this.flags).forEach(e=>{this.flags[e]=!1}),this.values.walkmode=!0}else this.logger.warning("First person mode only available on Cesium (3D) map")}activateOverviewMode(e,t,i){const s=this.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===s.className)if(this.useAbsoluteHeight=!1,this.values.referenceHeight=1.6,this.navActive=!1,this.values.walkmode=!1,this.activateFirstPersonControls(!1),e){const r=t||null,n=i||null;s.gotoViewPoint(e,r,n,this.activateOverviewControls.bind(this,!0))}else this.activateOverviewControls(!0);else this.logger.warning("First person mode only available on Cesium (3D) map")}activateFirstPersonControls(e){if(e&&this.navActive)if(this.initializeCesium()){const e=this.cesiumMap.getViewPoint(!1),t=this.cesiumScene.globe.getHeight(Cesium.Cartographic.fromDegrees(e.cameraPosition[0],e.cameraPosition[1]));this.useAbsoluteHeight&&(this.values.referenceHeight=e.getCameraPosition()[2]-t),this.correctCurrentHeight(t),this.cesiumHandler.setInputAction(e=>{this.flags.looking=!0,this.startMousePosition=Cesium.Cartesian3.clone(e.position),this.mousePosition=this.startMousePosition},Cesium.ScreenSpaceEventType.LEFT_DOWN),this.cesiumHandler.setInputAction(e=>{this.mousePosition=e.endPosition},Cesium.ScreenSpaceEventType.MOUSE_MOVE),this.cesiumHandler.setInputAction(()=>{this.flags.looking=!1},Cesium.ScreenSpaceEventType.LEFT_UP),this.clockListenerRemover&&this.clockListenerRemover(),this.clockListenerRemover=this.cesiumViewer.clock.onTick.addEventListener(this.boundClockTickHandler)}else this.logger.warning("Could not initialize, is Cesium active");else this.initialized&&(null!==this.defaultFOV&&(this.cesiumViewer.camera.frustum.fov=this.defaultFOV),this.clockListenerRemover&&this.clockListenerRemover(),this.cesiumHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOWN),this.cesiumHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_UP),this.cesiumHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE))}initializeCesium(){return!!this.initialized||(this.cesiumMap=this.framework.getMapByType("vcs.vcm.maps.Cesium"),this.cesiumMap&&(this.cesiumViewer=this.cesiumMap.viewer,this.defaultFOV=this.cesiumViewer.camera.frustum.fov,this.cesiumScene=this.cesiumMap.getScene(),this.cesiumCanvas=this.cesiumScene.canvas,this.cesiumCanvas.setAttribute("tabindex","0"),this.cesiumCanvas.onclick=function(){this.cesiumCanvas.focus()}.bind(this),this.cesiumHandler=new Cesium.ScreenSpaceEventHandler(this.cesiumCanvas),this.cesiumEllipsoid=this.cesiumScene.globe.ellipsoid,this.initialized=!0),!0)}activateOverviewControls(e){this.initializeCesium()?(this.cesiumScene.screenSpaceCameraController.enableRotate=e,this.cesiumScene.screenSpaceCameraController.enableTranslate=e,this.cesiumScene.screenSpaceCameraController.enableZoom=e,this.cesiumScene.screenSpaceCameraController.enableTilt=e,this.cesiumScene.screenSpaceCameraController.enableLook=e):this.logger.warning("Could not initialize, is Cesium active")}clockOnTickHandler(e){if(this.cesiumMap.movementDisabled)return;let t=this.timeLastTick?e.currentTime.secondsOfDay-this.timeLastTick.secondsOfDay:1/60;(t<=0||t>1)&&(t=1/60);const i=t/(1/60);this.timeLastTick=e.currentTime;const s=this.cesiumViewer.camera,r=this.lookFactor*i;if(this.flags.increaseFOV&&(s.frustum.fov=s.frustum.fov+.01>=5*Math.PI/8?s.frustum.fov:s.frustum.fov+.01),this.flags.decreaseFOV&&(s.frustum.fov=s.frustum.fov-.01<=Math.PI/10?Math.PI/10:s.frustum.fov-.01),this.flags.looking){const e=this.cesiumCanvas.clientWidth,t=this.cesiumCanvas.clientHeight,i=(this.mousePosition.x-this.startMousePosition.x)/e,n=-(this.mousePosition.y-this.startMousePosition.y)/t;s.look(s.position,r*i),s.lookUp(n*r)}if(this.flags.rotation&&s.look(s.position,r/10),this.flags.tiltUp&&s.lookUp(r/10),this.flags.tiltDown&&s.lookUp(-r/10),this.flags.rotateEast&&s.look(s.position,r/10),this.flags.rotateWest&&s.look(s.position,-r/10),null!==this.heading){const e=Cesium.Math.toRadians(this.heading)-s.heading;s.look(s.position,e),this.heading=null}const n=this.cesiumEllipsoid.cartesianToCartographic(s.position).height;let a=this.cesiumScene.globe.getHeight(this.cesiumEllipsoid.cartesianToCartographic(s.position));a&&!this.useAbsoluteHeight||(a=n-this.referenceHeight);const o=(n-a)/30*i*this.moveFactor,l={heading:s.heading,pitch:s.pitch,roll:0},c=Cesium.Math.PI/2-.1;l.pitch>c&&(l.pitch=c),s.setView({orientation:{heading:s.heading,pitch:0,roll:0}}),this.flags.moveForward&&s.moveForward(o),this.flags.moveBackward&&s.moveBackward(o),this.flags.moveUp&&(this.referenceHeight+=o/2,this.values.referenceHeight=Number(this.referenceHeight.toFixed(2))),this.flags.moveDown&&(this.referenceHeight-=o/2,this.referenceHeight<1&&(this.referenceHeight=1),this.values.referenceHeight=Number(this.referenceHeight.toFixed(2))),this.flags.moveLeft&&s.moveLeft(o),this.flags.moveRight&&s.moveRight(o),this.correctCurrentHeight(a,l)}correctCurrentHeight(e,t){const i=this.cesiumViewer.camera,s=t||{heading:i.heading,pitch:i.pitch,roll:0};let r;if(null==e||this.allowHeightChanges)i.setView({orientation:s});else{const t=i.positionCartographic,n=Number.parseFloat(this.values.referenceHeight.toString());Number.isNaN(n)||n.toFixed(2)===this.referenceHeight.toFixed(2)||(this.referenceHeight=n),this.values.referenceHeight=Number(this.referenceHeight.toFixed(2)),t.height=e+this.referenceHeight,r=Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),i.setView({destination:r,orientation:s})}}setValues(e){a(e,{referenceHeight:Number,active:Boolean,walkmode:Boolean},!1),this.values=e}setHeading(e){this.logger.deprecate("setHeading","set the heading property instead"),this.heading=e}}var ue=he;const de=v.getLogger("vcs.vcm.util.Extent");class me{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.projection=new S(e),this.extent=e.coordinates||this.projection.getProjection().getExtent()}get inputCoordinates(){return de.deprecate("inputCoordinates","use .extent instead"),this.extent}set inputCoordinates(e){de.deprecate("inputCoordinates","use .extent instead"),this.extent=e}getInputCoordinates(){return de.deprecate("getInputCoordinates","access the .extent property directly"),this.extent}getProjection(){return de.deprecate("getProjection","access the .projection property directly"),this.projection}getCoordinatesInProjection(e,t){if(e.epsg===this.projection.epsg){const e=t?t.splice(0,4,...this.extent):this.extent.slice();return e}const i=S.getTransformer(e,this.projection),s=t||[];return i(this.extent,s,2),s}isValid(){return!(!this.extent||!Array.isArray(this.extent)||4!==this.extent.length)&&(!!(Number.isFinite(this.extent[0])&&Number.isFinite(this.extent[1])&&Number.isFinite(this.extent[2])&&Number.isFinite(this.extent[3]))&&(this.extent[0]<=this.extent[2]&&this.extent[1]<=this.extent[3]))}getConfigObject(){return Object.assign({coordinates:this.extent.slice()},this.projection.getConfigObject())}static get WGS_84_EXTENT(){return[-180,-90,180,90]}}var ge=me;const pe={VECTOR:"vector",DECLARATIVE:"declarative",REFERENCE:"reference"};class ye{constructor(e){this.className=e.className||"vcs.vcm.util.style.StyleItem",this.name=e.name||e.id||Object(c["c"])(),this.title=e.title||{en:this.name},this.legend=e.legend||[],this.supportedLayers=[],this.cesiumStyle=new Cesium.Cesium3DTileStyle({show:!0}),this.styleChanged=new Cesium.Event,this.colorBlendMode=Object(c["f"])(e.colorBlendMode,Cesium.Cesium3DTileColorBlendMode,Cesium.Cesium3DTileColorBlendMode.HIGHLIGHT),this.style=null}isSupported(e){return 0===this.supportedLayers.length||this.supportedLayers.indexOf(e)>-1}getOptions(e){return e&&e.meta?{name:this.name.toString(),title:this.title,legend:this.legend.length?this.legend:void 0}:{}}clone(e){return e}assign(e){return e}getReference(){return{type:pe.REFERENCE,name:this.name}}_styleChanged(){this.styleChanged.raiseEvent()}}var _e=ye;const fe=v.getLogger("vcs.vcm.util.style.StyleHelpers"),ve={NWSE:1,SWNE:2,DIAGONALCROSS:3,NS:4,WE:5,CROSS:6};function Le(e,t){let i=e.substring(1);return 3===i.length&&(i=i.replace(/([\w\d])/g,"$1$1")),[parseInt(i.substring(0,2),16),parseInt(i.substring(2,4),16),parseInt(i.substring(4,6),16),null!=t?t:1]}function Me(e){const t=e.toBytes();return t[3]/=255,t}function be(e){if(Array.isArray(e))return 3===e.length&&e.push(1),e;if("string"===typeof e){if(/^#/.test(e))return Le(e);if(/^rgba?\((\d+(,\s?)?){3}((0|1)(\.\d+)?)?\)/.test(e)){const t=e.replace(/^rgba?\(([\s\S]+?)\)/,"$1").replace(/\s/,"").split(",").map(e=>Number(e));return 3===t.length&&t.push(1),t}}if(e instanceof CanvasPattern)return[255,255,255,.4];throw new Error(`Cannot parse color ${e}`)}function we(e){return`rgba(${be(e).join(",")})`}function Te(e,t){const i=ol.has.DEVICE_PIXEL_RATIO,s=t||document.createElement("canvas");t&&s.width||(s.width=(e.pattern.size||10)*i,s.height=(e.pattern.size||10)*i);const r=s.getContext("2d"),n=s.width;function a(t,i){r.strokeStyle=we(e.pattern.color),r.lineWidth=e.pattern.width,r.lineCap="square",r.beginPath(),r.moveTo(t[0],t[1]),r.lineTo(i[0],i[1]),r.stroke()}switch(r.fillStyle=we(e.color),r.fillRect(0,0,n,n),e.pattern.type){case 1:a([n/2,n],[n,n/2]),a([0,n/2],[n/2,0]);break;case 2:a([n/2,n],[0,n/2]),a([n,n/2],[n/2,0]);break;case 3:a([n/2,n],[n,n/2]),a([0,n/2],[n/2,0]),a([n/2,n],[0,n/2]),a([n,n/2],[n/2,0]);break;case 4:a([n/2,0],[n/2,n]);break;case 5:a([0,n/2],[n,n/2]);break;case 6:a([n/2,0],[n/2,n]),a([0,n/2],[n,n/2]);break;default:return null}return r.createPattern(s,"repeat")}function Se(e){function t(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}return e.slice(0,3).reduce((e,i)=>`${e}${t(i)}`,"#")}function Ce(e){return/^#[0-9a-f]{6}$/.test(e)}function ke(e){if("string"!==typeof e)return e;let t=null,i=null,s="normal",r="normal",n="normal",a="normal";return e.split(/\s+/).forEach(e=>{switch(e){case"normal":break;case"italic":case"oblique":s=e;break;case"small-caps":n=e;break;case"bold":case"bolder":case"lighter":case"100":case"200":case"300":case"400":case"500":case"600":case"700":case"800":case"900":r=e;break;default:if(!i){const t=e.split("/");i=t[0],t.length>1&&(a=t[1]);break}t=t?`${t} ${e}`:e;break}}),{fontStyle:s,fontVariant:n,fontWeight:r,fontSize:i,lineHeight:a,fontFamily:t}}function Ee(e){const t=["fontStyle","fontVariant","fontWeight","fontSize","fontFamily"];let i=null;return Object.entries(e).filter(e=>"normal"!==e[1]&&"lineWeight"!==e[0]).sort((e,i)=>{const s=t.indexOf(e[0]),r=t.indexOf(i[0]);return s<r?-1:s>r?1:0}).forEach(e=>{i=i?`${i} ${e[1]}`:e[1]}),i||""}function Ie(e,t,i,s){const r=s||[0,0],n=e.getImageData(r[0],r[1],i[0],i[1]),a=n.data,o=Object(le["a"])(t,3),l=o[0],c=o[1],h=o[2],u=a.length;for(let d=0;d<u;d+=4)a[d]=l,a[d+1]=c,a[d+2]=h;e.putImageData(n,r[0],r[1])}function De(e){if(e.getFill()){let i=e.getFill().getColor();try{i=be(i).slice()}catch(t){fe.warning(t.message)}return{color:i}}}function Pe(e){let t=e.getColor();if(t)try{t=be(t).slice()}catch(i){fe.warning(i.message)}return{color:t,width:e.getWidth(),lineDash:e.getLineDash()}}function Oe(e){return{font:e.getFont(),fill:De(e),stroke:e.getStroke()?Pe(e.getStroke()):void 0,textBaseline:e.getTextBaseline(),offsetY:e.getOffsetY(),offsetX:e.getOffsetX()}}function Ye(e){const t=Object.assign({},e);return!t.fill||t.fill instanceof ol.style.Fill||(t.fill=new ol.style.Fill(t.fill)),!t.stroke||t.stroke instanceof ol.style.Stroke||(t.stroke=new ol.style.Stroke(t.stroke)),t.font&&"string"!==typeof t.font&&(t.font=Ee(t.font)),new ol.style.Text(t)}const xe=new ol.style.Style({}),Ae=[255,255,255,1],je=[0,0,0,1],Fe={image:{fill:{color:[255,255,255,.4]},stroke:{color:je,width:1},radius:5},stroke:{color:[51,153,204,1],width:1.25},fill:{color:[255,255,255,.4]},text:{font:"bold 18px sans-serif",textBaseline:"bottom",offsetY:-15,offsetX:0}},Ne={olcs_color:we(Ae),olcs_scale:"1.0",olcs_outlineWidth:"0.0",olcs_outlineColor:we(je),olcs_pointSize:"8.0",olcs_image:void 0,olcs_font:`'${Fe.text.font}'`,olcs_fontColor:we(je),olcs_fontOutlineWidth:"1.0",olcs_fontOutlineColor:we(Ae),olcs_labelText:void 0,olcs_anchorLineColor:we(Ae)};function He(e,t){const i=`Boolean(\${${e}})===true`,s=t?`color(\${${e}})`:`\${${e}}`;return[[i,s],["true",Ne[e]]]}function Re(e){return!e.fill||e.fill instanceof ol.style.Fill||(e.fill=new ol.style.Fill(e.fill)),!e.stroke||e.stroke instanceof ol.style.Stroke||(e.stroke=new ol.style.Stroke(e.stroke)),e.points?new ol.style.RegularShape(e):new ol.style.Circle(e)}class ze{constructor(){this.shapes=[]}addImage(e){const t=Re(Object.assign({},e)),i=t.getImage(1);e.src=i.toDataURL(),this.shapes.push(e)}}const Ge=new ze,Ve={fill:new ol.style.Fill({color:[255,255,255,1]}),stroke:new ol.style.Stroke({color:[0,0,0,1],width:1}),radius:16};[null,{points:3},{points:3,angle:Math.PI},{points:4,angle:Math.PI/4},{points:6}].forEach(e=>{const t=e?Object.assign(e,Ve):Ve;Ge.addImage(t)});const Be={POLYGON:1,POLYLINE:2,POINT:3},Ue=v.getLogger("vcs.vcm.util.style.StyleItem"),We=Symbol("VcsVectorStyleItem");class qe extends _e{constructor(e){super(e),qe.validateOptions(e),this.exclude={fill:!1===e.fill,stroke:!1===e.stroke,image:!1===e.image},this._fillOptions=null,this._fill=void 0,this._stroke=e.stroke?new ol.style.Stroke(e.stroke):void 0,this._text=void 0,e.text&&(this._text=Ye(e.text)),this._label=e.label,this._cesiumColor=new Cesium.Color,this._image=void 0,e.image&&(this._image=e.image.radius?Re(Object.assign({},e.image)):new ol.style.Icon(e.image)),this._style=new ol.style.Style({image:this._image,stroke:this._stroke,text:this._text}),e.fill?(this._fillOptions=e.fill,this._setFill()):this.updateCesiumStyle()}static validateOptions(e){function t(e){try{e.color=be(e.color),a(e.color,[Number]),a(e.color.length,[3,4])}catch(t){Ue.error(t.message),e.color=[255,255,255,.4]}}function i(e){t(e),e.width||(Ue.error("missing width for stroke, setting to 1.5"),e.width=1.5)}e.fill&&(t(e.fill),e.fill.pattern&&(i(e.fill.pattern),e.fill.pattern.type&&Object.values(ve).includes(e.fill.pattern.type)||(Ue.error(`Cannot find pattern ${e.fill.pattern.type}`),e.fill.pattern.type=ve.NWSE))),e.stroke&&i(e.stroke),e.image&&(e.image.icon?e.image=e.image.icon:e.image.circle&&(e.image=e.image.circle),e.image.src||e.image.radius||(Ue.error("missing source or label in style, setting default circle"),e.image={fill:{color:"rgba(255,255,255,0.4)"},stroke:{color:"#3399CC",width:1},radius:5}),e.image.radius&&(e.image.radius=Number(e.image.radius),Number.isFinite(e.image.radius)||(Ue.error("radius must be a number"),e.image.radius=5),e.image.fill&&t(e.image.fill),e.image.stroke&&i(e.image.stroke)))}get fillColor(){return this._fillOptions?this._fillOptions.color:null}get cesiumFillColor(){const e=this.fillColor?this.fillColor.slice():null;return e?(e[3]=e[3]||1,e[3]*=255,Cesium.Color.fromBytes(...e,this._cesiumColor)):Cesium.Color.RED.clone(this._cesiumColor)}set fillColor(e){this.exclude.fill=!1,this._style instanceof ol.style.Style?e?(this._fillOptions?this._fillOptions.color=be(e):this._fillOptions={color:be(e)},this._setFill()):(this._fillOptions=null,this._fill=void 0,this._style.setFill(this._fill),this.updateCesiumStyleColor(!0)):Ue.info("trying to set fill on a style function")}get pattern(){return this._fillOptions&&this._fillOptions.pattern?this._fillOptions.pattern:null}set pattern(e){this._fillOptions?(e?(o(e,{color:[String,[Number]],width:Number,type:Number,size:[Number,void 0,null]},!0),this._fillOptions.pattern=e):this._fillOptions.pattern=void 0,this._setFill()):Ue.error("Missing fill color")}get stroke(){return this._stroke}set stroke(e){this.exclude.stroke=!1,this._style instanceof ol.style.Style?(o(e,ol.style.Stroke),this._style.setStroke(e),this._stroke=e,this.updateCesiumStyleColor(!0)):Ue.info("trying to set stroke on a style function")}get label(){return this._label}set label(e){o(e,String),e.length?this._label=e:this._label=void 0,this._text&&this._text.setText(e)}get text(){return this._text}set text(e){this._style instanceof ol.style.Style?(o(e,ol.style.Text),this._text=e,this._text.setText(this._label),this._style.setText(this._text)):Ue.info("trying to set text on a style function")}get image(){return this._image}set image(e){this.exclude.image=!1,this._style instanceof ol.style.Style?(o(e,ol.style.Image),this._image=e,this._style.setImage(this._image),this.updateCesiumStyle()):Ue.info("trying to set text on a style function")}get style(){return this._style}set style(e){o(e,[ol.style.Style,Function]),e instanceof ol.style.Style?(this._stroke=e.getStroke(),this._fill=e.getFill(),this._text=e.getText(),this._image=e.getImage()):(this._stroke=void 0,this._fill=void 0,this._text=void 0,this._image=void 0),this._style=e,this._fill&&this._fill.getColor()&&(this._fillOptions={color:be(this._fill.getColor())}),this._text&&this._text.setText(this._label),this.updateCesiumStyle()}_setFill(){if(this._style instanceof ol.style.Style){const e=this._fillOptions.pattern?Te(this._fillOptions):this._fillOptions.color;this._fill?this._fill.setColor(e):(this._fill=new ol.style.Fill({color:e}),this._style.setFill(this._fill)),this._fillOptions.pattern&&(this._fill.fallBackColor=this._fillOptions.color),this.updateCesiumStyle()}}updateCesiumStyle(){this.updateCesiumStyleColor(!0),this.updateCesiumStyleImage(!0),this.updateCesiumStyleText(!0),this._styleChanged()}updateCesiumStyleColor(e){const t=He("olcs_color",!0);this.stroke&&this.stroke.getColor()&&t.splice(1,0,[`\${olcs_geometryType}===${Be.POLYLINE}`,we(this.stroke.getColor())]),this._image instanceof ol.style.Circle&&this._image.getFill()&&t.splice(1,0,[`\${olcs_geometryType}===${Be.POINT}`,we(this._image.getFill().getColor())]),this.fillColor&&t.splice(-1,1,["true",we(this.fillColor)]),this.cesiumStyle.color={conditions:t},e||this._styleChanged()}updateCesiumStyleImage(e){const t=He("olcs_scale"),i=He("olcs_outlineWidth"),s=He("olcs_outlineColor",!0),r=He("olcs_pointSize"),n=He("olcs_image");if(this._image)if(null!=this._image.getScale()&&t.splice(1,1,["true",`${this._image.getScale()}`]),this._image instanceof ol.style.Circle){const e=this._image.getStroke();let t=2*this._image.getRadius();if(e){this._image.getStroke().getColor()&&s.splice(1,1,["true",we(this._image.getStroke().getColor())]);const e=this._image.getStroke().getWidth();i.splice(1,1,["true",`${e}`]),t-=e}r.splice(1,1,["true",`${t}`])}else if(this._image instanceof ol.style.RegularShape){const e=this._image.getImage(1).toDataURL();n.splice(1,1,["true",`"${e}"`])}else this._image instanceof ol.style.Icon&&n.splice(1,1,["true",`"${this._image.getSrc()}"`]);this.cesiumStyle.scale={conditions:t},this.cesiumStyle.pointOutlineWidth={conditions:i},this.cesiumStyle.pointOutlineColor={conditions:s},this.cesiumStyle.pointSize={conditions:r},this.cesiumStyle.image={conditions:n},this.cesiumStyle.verticalOrigin="1",this.cesiumStyle.horizontalOrigin="0",e||this._styleChanged()}updateCesiumStyleText(e){const t=He("olcs_font"),i=He("olcs_labelText"),s=He("olcs_fontColor",!0),r=He("olcs_fontOutlineWidth"),n=He("olcs_fontOutlineColor",!0);this._text&&(this._text.getFont()&&t.splice(1,1,["true",`'${this._text.getFont()}'`]),this._text.getText()&&i.splice(1,1,["true",`'${this._text.getText()}'`]),this._text.getFill()&&this._text.getFill().getColor()&&s.splice(1,1,["true",we(this._text.getFill().getColor())]),this._text.getStroke()&&this._text.getStroke().getColor()&&(n.splice(1,1,["true",we(this._text.getStroke().getColor())]),r.splice(1,1,["true",`${this._text.getStroke().getWidth()||1.25}`]))),this.cesiumStyle.font={conditions:t},this.cesiumStyle.labelText={conditions:i},this.cesiumStyle.labelColor={conditions:s},this.cesiumStyle.labelOutlineWidth={conditions:r},this.cesiumStyle.labelOutlineColor={conditions:n},this.cesiumStyle.labelStyle="Boolean(${olcs_fontOutlineWidth}) === true ? 2 : 0",this.cesiumStyle.labelHorizontalOrigin="0",this.cesiumStyle.labelVerticalOrigin="1",e||this._styleChanged()}clone(e){return e?(e.style=this._style instanceof ol.style.Style?this._style.clone():this._style,this._fillOptions&&this._fillOptions.color&&(e.fillColor=this._fillOptions.color.slice(),this._fillOptions.pattern&&(e.pattern=Object.assign({},this._fillOptions.pattern))),Object.keys(this.exclude).forEach(t=>{this.exclude[t]&&e.unset(t)}),e):new qe(this.getOptions())}assign(e){return e.fillColor&&(this.fillColor=e.fillColor.slice()),e.pattern?this.pattern=Object.assign({},e.pattern):this.pattern=void 0,e.stroke&&(this.stroke=e.stroke.clone()),e.image&&(this.image=e.image.clone()),e.text&&(this.text=e.text.clone()),e.label&&(this.label=e.label),Object.keys(e.exclude).forEach(t=>{e.exclude[t]&&this.unset(t)}),this}getOptions(e){const t=super.getOptions(e);t.type=pe.VECTOR;const i=e||{fill:!0,stroke:!0,text:!0,image:!0};return i.fill&&(this._fillOptions?(t.fill={color:be(this._fillOptions.color).slice()},this._fillOptions.pattern&&(t.fill.pattern=Object.assign({},this._fillOptions.pattern))):this.exclude.fill&&(t.fill=!1)),i.stroke&&(this._stroke?t.stroke=Pe(this._stroke):this.exclude.stroke&&(t.stroke=!1)),i.text&&this._text&&(t.text=Oe(this._text)),i.label&&(t.label=this._label),i.image&&(this._image instanceof ol.style.Icon?t.image={src:this._image.getSrc(),scale:this._image.getScale(),opacity:this._image.getOpacity()}:this._image instanceof ol.style.Circle?t.image={scale:this._image.getScale(),fill:De(this._image),radius:this._image.getRadius(),stroke:this._image.getStroke()?Pe(this._image.getStroke()):void 0}:this._image instanceof ol.style.RegularShape?t.image={scale:this._image.getScale(),fill:De(this._image),points:this._image.getPoints(),angle:this._image.getAngle(),radius:this._image.getRadius(),stroke:this._image.getStroke()?Pe(this._image.getStroke()):void 0}:this.exclude.image&&(t.image=!1)),t}getOptionsForFeature(e){const t=e.getGeometry().getType(),i=e.get("olcs_extrudedHeight")||e.get("olcs_storeyHeight")&&e.get("olcs_storeyNumber"),s={};return"Point"===t||"MultiPoint"===t?(null!=e[We].label&&(s.text=!0,s.label=!0),s.image=!0,i&&(s.stroke=!0)):"LineString"===t||"MultiLineString"===t?(s.stroke=!0,i&&(s.fill=!0)):"Polygon"===t||"MultiPolygon"===t||"Circle"===t?(s.stroke=!0,s.fill=!0):"GeometryCollection"===t&&(s.stroke=!0,s.fill=!0,s.image=!0,s.text=!0),this.getOptions(s)}unset(e){a(e,Object.keys(this.exclude)),"fill"===e?this.fillColor=void 0:this[e]=void 0,this.exclude[e]=!0}}var Je=qe;const Ke=new qe(Fe);function Ze(e){const t=e.toBytes();return t[3]/=255,new qe({fill:{color:t},stroke:{color:t,width:Ke.stroke.getWidth()}})}const Qe=new Cesium.Color,$e=v.getLogger("vcs.vcm.util.style.DeclarativeStyleItem"),Xe=new ol.style.Text({font:"30px sans-serif",fill:new ol.style.Fill({color:Ae}),textAlign:"left",offsetY:-15});function et(e,t,i){i[t].conditions?e[t]=new Cesium.ConditionsExpression(i[t],i.defines):e[t]=new Cesium.Expression(i[t],i.defines)}class tt extends _e{static get className(){return"vcs.vcm.util.style.DeclarativeStyleItem"}constructor(e){e.className=tt.className,super(e);const t=e.declarativeStyle||{};t.show=null==t.show||t.show,this.cesiumStyle=new Cesium.Cesium3DTileStyle(t),this.style=this._styleFunction.bind(this),t.strokeColor&&et(this.cesiumStyle,"strokeColor",t),t.strokeWidth&&et(this.cesiumStyle,"strokeWidth",t),this._styleOptions=t}getOptions(e){const t=super.getOptions(e);t.type=pe.DECLARATIVE;const i=e||{declarativeStyle:!0,defaults:!0};return i.declarativeStyle&&(t.declarativeStyle=this.cesiumStyle.style),t}clone(e){return e?e.assign(this):new tt(this.getOptions())}assign(e){return this.cesiumStyle=e.cesiumStyle,this._styleOptions=this.cesiumStyle.style,this}_styleFunction(e){if(!this.cesiumStyle.show.evaluate(e))return xe;const t=e.getGeometry().getType();return"Point"===t?this._stylePoint(e):"Polygon"===t?this._stylePolygon(e):"LineString"===t?this._styleLineString(e):"Circle"===t?this._stylePolygon(e):"MultiPoint"===t?this._stylePoint(e):"MultiPolygon"===t?this._stylePolygon(e):"MultiLineString"===t?this._styleLineString(e):($e.warning(`could not style geometry type: ${t}`),xe)}_stylePolygon(e){const t=new ol.style.Style({}),i=this.cesiumStyle.color?this.cesiumStyle.color.evaluate(e,Qe):Cesium.Color.WHITE;return i&&t.setFill(new ol.style.Fill({color:Me(i)})),this._evaluateStroke(e,t),t}_styleLineString(e){const t=new ol.style.Style({}),i=e.get("olcs_extrudedHeight")||e.get("olcs_storeyHeight")&&e.get("olcs_storeyNumber"),s=this.cesiumStyle.color?this.cesiumStyle.color.evaluate(e,Qe):Cesium.Color.WHITE;if(s)if(i)t.setFill(new ol.style.Fill({color:Me(s)}));else{const i=this.cesiumStyle.strokeWidth?this.cesiumStyle.strokeWidth.evaluate(e):1;t.setStroke(new ol.style.Stroke({width:Number.isFinite(i)?i:1,color:Me(s)}))}return i&&this._evaluateStroke(e,t),t}_stylePoint(e){const t=new ol.style.Style({});if(this.cesiumStyle.labelText){const i=this.cesiumStyle.labelText.evaluate(e);if(i){const s=Xe.clone();if(s.setText(i.toString()),this.cesiumStyle.font){const t=this.cesiumStyle.font.evaluate(e);t&&s.setFont(t)}if(this.cesiumStyle.labelColor){const t=this.cesiumStyle.labelColor.evaluateColor(e,Qe);t&&s.getFill().setColor(Me(t))}if(this.cesiumStyle.labelOutlineColor){const t=this.cesiumStyle.labelOutlineColor.evaluate(e,Qe);if(t){const i=this.cesiumStyle.labelOutlineWidth?this.cesiumStyle.labelOutlineWidth.evaluate(e):1;s.setStroke(new ol.style.Stroke({color:Me(t),width:i}))}}t.setText(s)}}if(this.cesiumStyle.image){const i=this.cesiumStyle.image.evaluate(e);i&&t.setImage(new ol.style.Icon({src:i}))}else{const i={radius:4},s=this.cesiumStyle.color?this.cesiumStyle.color.evaluate(e,Qe):Cesium.Color.WHITE;if(i.fill=new ol.style.Fill({color:Me(s)}),this.cesiumStyle.pointSize){const t=this.cesiumStyle.pointSize.evaluate(e);i.radius=t/2}const r=this.cesiumStyle.pointOutlineWidth?this.cesiumStyle.pointOutlineWidth.evaluate(e):0;if(r){const t=this.cesiumStyle.pointOutlineColor?this.cesiumStyle.pointOutlineColor.evaluateColor(e,Qe):Cesium.Color.BLACK;i.stroke=new ol.style.Stroke({color:Me(t),width:r}),i.radius+=r/2}t.setImage(new ol.style.Circle(i))}if(this.cesiumStyle.scale&&t.getImage()){const i=this.cesiumStyle.scale.evaluate(e);Number.isFinite(i)&&t.getImage().setScale(i)}return this._evaluateStroke(e,t),t}_evaluateStroke(e,t){if(this.cesiumStyle.strokeColor){const i=this.cesiumStyle.strokeColor.evaluateColor(e,Qe);if(i){const s=this.cesiumStyle.strokeWidth?this.cesiumStyle.strokeWidth.evaluate(e):1;t.setStroke(new ol.style.Stroke({width:Number.isFinite(s)?s:1,color:Me(i)}))}}}get show(){return this._styleOptions.show}set show(e){this._styleOptions.show=e,this.cesiumStyle.show=e,this._styleChanged()}get color(){return this._styleOptions.color}set color(e){this._styleOptions.color=e,this.cesiumStyle.color=e,this._styleChanged()}get strokeColor(){return this._styleOptions.strokeColor}set strokeColor(e){this._styleOptions.strokeColor=e,this.cesiumStyle.strokeColor=e,this._styleChanged()}get strokeWidth(){return this._styleOptions.strokeWidth}set strokeWidth(e){this._styleOptions.strokeWidth=e,this.cesiumStyle.strokeWidth=e,this._styleChanged()}get image(){return this._styleOptions.image}set image(e){this._styleOptions.image=e,this.cesiumStyle.image=e,this._styleChanged()}get labelText(){return this._styleOptions.labelText}set labelText(e){this._styleOptions.labelText=e,this.cesiumStyle.labelText=e,this._styleChanged()}get labelColor(){return this._styleOptions.labelColor}set labelColor(e){this._styleOptions.labelColor=e,this.cesiumStyle.labelColor=e,this._styleChanged()}get font(){return this._styleOptions.font}set font(e){this._styleOptions.font=e,this.cesiumStyle.font=e,this._styleChanged()}get pointSize(){return this._styleOptions.pointSize}set pointSize(e){this._styleOptions.pointSize=e,this.cesiumStyle.pointSize=e,this._styleChanged()}}var it=tt;const st=new tt({declarativeStyle:{show:!0,color:{conditions:He("olcs_color",!0)},scale:{conditions:He("olcs_scale")},pointOutlineWidth:{conditions:He("olcs_outlineWidth")},pointOutlineColor:{conditions:He("olcs_outlineColor",!0)},pointSize:{conditions:He("olcs_pointSize")},image:{conditions:He("olcs_image")},font:{conditions:He("olcs_font")},labelStyle:"2",labelText:{conditions:He("olcs_labelText")},labelColor:{conditions:He("olcs_fontColor",!0)},labelOutlineWidth:{conditions:He("olcs_fontOutlineWidth")},labelOutlineColor:{conditions:He("olcs_fontOutlineColor",!0)},verticalOrigin:"1",horizontalOrigin:"0",labelHorizontalOrigin:"0",labelVerticalOrigin:"1"}});class rt{constructor(){this.hiddenObjects={},this.highlightedObjects={},this.lastUpdated=Date.now()}static featureExists(e){return e&&e.content&&!e.content.isDestroyed()&&!e.content.batchTable.isDestroyed()}highlight(e){let t=!1;Object.entries(e).forEach(e=>{let i=Object(le["a"])(e,2),s=i[0],r=i[1],n=r;r instanceof Cesium.Color?n=Ze(r):r instanceof ol.style.Style&&(n=new Je({}),r.getText()&&r.getText().getText()&&(n.label=r.getText().getText()),n.style=r),n=n,this.highlightedObjects[s]?this.highlightedObjects[s].style.fillColor.some((e,t)=>e!==n.fillColor[t])&&(this.highlightedObjects[s].style=n,t=!0):(this.highlightedObjects[s]={style:n,features:new Map},t=!0)}),t&&(this.lastUpdated=Date.now())}unHighlight(e){e.forEach(e=>{this.highlightedObjects[e]&&(this.highlightedObjects[e].features.forEach((t,i)=>{i instanceof Cesium.Cesium3DTileFeature||i instanceof Cesium.Cesium3DTilePointFeature?rt.featureExists(i)&&(i.color=t):i instanceof ol.Feature&&(this.hiddenObjects[e]||i.setStyle(t))}),delete this.highlightedObjects[e])})}clearHighlighting(){this.unHighlight(Object.keys(this.highlightedObjects))}hideObjects(e){let t=!1;e.forEach(e=>{this.hiddenObjects[e]||(this.hiddenObjects[e]=new Set,t=!0)}),t&&this._update()}showObjects(e){let t=!1;e.forEach(e=>{this.hiddenObjects[e]&&(t=!0,this.hiddenObjects[e].forEach(t=>{if(t instanceof Cesium.Cesium3DTileFeature||t instanceof Cesium.Cesium3DTilePointFeature)rt.featureExists(t)&&(t.show=!0);else if(t instanceof ol.Feature)if(this.highlightedObjects[e]){if(!this.highlightedObjects[e].features.has(t)){const i=t[We]?t[We].style:void 0;this.highlightedObjects[e].features.set(t,i)}t.setStyle(this.highlightedObjects[e].style.style)}else t.setStyle(t[We]?t[We].style:void 0)}),delete this.hiddenObjects[e])}),t&&this._update()}clearHiddenObjects(){this.showObjects(Object.keys(this.hiddenObjects))}_update(){this.lastUpdated=Date.now();const e=G.getInstance().getActiveMap();e&&e.requestRender()}}var nt=rt;class at{constructor(){this.hiddenObjects={},this._hiddenObjectFeatures={},this.lastUpdated=Date.now()}hideObjects(e){a(e,[String]);let t=!1;e.forEach(e=>{this.hiddenObjects[e]||(t=!0,this.hiddenObjects[e]=0),this.hiddenObjects[e]+=1}),t&&this._update()}showObjects(e){a(e,[String]);let t=!1;e.forEach(e=>{this.hiddenObjects[e]&&(this.hiddenObjects[e]-=1,0===this.hiddenObjects[e]&&(t=!0,this._hiddenObjectFeatures[e]&&(this._hiddenObjectFeatures[e].forEach(e=>{e instanceof Cesium.Cesium3DTileFeature||e instanceof Cesium.Cesium3DTilePointFeature?nt.featureExists(e)&&(e.show=!0):e instanceof ol.Feature&&e.setStyle(e[We]?e[We].style:void 0)}),this._hiddenObjectFeatures[e].clear()),delete this.hiddenObjects[e]))}),t&&this._update()}addFeature(e,t){this._hiddenObjectFeatures[e]||(this._hiddenObjectFeatures[e]=new Set),this._hiddenObjectFeatures[e].add(t)}hasFeature(e,t){return!!this._hiddenObjectFeatures[e]&&this._hiddenObjectFeatures[e].has(t)}_update(){this.lastUpdated=Date.now();const e=G.getInstance().getActiveMap();e&&e.requestRender()}}let ot;function lt(){return ot||(ot=new at),ot}I.LAYER_CHANGED="LAYER_CHANGED",I.LAYER_ACTIVATED="LAYER_ACTIVATED",I.LAYER_DEACTIVATED="LAYER_DEACTIVATED";const ct={lastLayerId:0},ht=ct.lastLayerId++,ut=Symbol("vcsLayerName"),dt="1.0";class mt extends M{static get UNDEFINED(){return ht}static get className(){return"vcs.vcm.layer.Layer"}static get vcsLayerNameSymbol(){return ut}constructor(e){super(e),this.extent=new ge(e.extent),this.activeOnStartup=!!e.activeOnStartup,this.active=!1,this.loading=!1,this.enabled=!0,this.initialized=!1,this.type=null!=e.layertype?e.layertype:ct.UNDEFINED,this.data={},this.mapNames=e.mapNames||[],this.exclusive=!1,this.exclusiveGroup="",this.url=e.url,this.index=null,this.hiddenObjectIds=Array.isArray(e.hiddenObjectIds)?e.hiddenObjectIds:[],this.iconManagerInUse=!1,this.groupedWith=[];const t=e.exclusive||"false";"true"===t||!0===t?(this.exclusive=!0,this.exclusiveGroup="default"):"false"===t||!1===t?(this.exclusive=!1,this.exclusiveGroup="default"):(this.exclusive=!0,this.exclusiveGroup=String(t)),this.exclusive&&U.registerLayer(this),this.allowPicking=null==e.allowPicking||e.allowPicking,this.style=this.getStyleOrDefaultStyle(e.activeStyleName||e.style),this.defaultStyle=this.style,this.featureVisibility=null,this.globalHider=lt(),this._genericFeatureProperties=e.genericFeatureProperties||{}}raiseFeatureEvent(e,t,i,s){this.framework.publish(e,t,i,s)}objectClickedHandler(e,t,i){return!1}getExtent(){return this.extent}initialize(){throw new Error}isExclusive(){return this.exclusive}isIconManagerInUse(){return this.iconManagerInUse}getExclusiveGroup(){return this.exclusiveGroup}isInitialized(){return this.initialized}getType(){return this.type}isActiveOnStartup(){return this.activeOnStartup}isSupported(e){const t=e||this.framework.getActiveMap();return!(!t||!(0===this.mapNames.length||this.mapNames.indexOf(t.name)>=0))&&t.supportsLayer(this)}isActive(){return this.active}activate(e){const t=function(){return this.show(),this.active=e,this.framework.publish(I.LAYER_ACTIVATED,this),this.framework.publish(I.LAYER_CHANGED,this),this.globalHider.hideObjects(this.hiddenObjectIds),Promise.resolve()}.bind(this),i=function(){return this.hide(),this.active=e,this.framework.publish(I.LAYER_DEACTIVATED,this),this.framework.publish(I.LAYER_CHANGED,this),this.globalHider.showObjects(this.hiddenObjectIds),Promise.resolve()}.bind(this);if(e!=this.isActive()){if(!e)return this.isInitialized()?i():Promise.reject();if(this.isSupported()){const e=this.initialize();return e?e.then(t,()=>Promise.reject()):t()}}return Promise.resolve()}dispose(){}show(){}hide(){}getGenericFeatureFromClickedObject(e){return this.logger.warning("This method should be implemented by any specific layers"),null}addGenericFeatureProperties(e){a(e,Object),Object.assign(this._genericFeatureProperties,e)}isCommonLayer(){return!1}handleURLParameter(e){}highlight(e){this.featureVisibility&&this.featureVisibility.highlight(e)}unHighlight(e){this.featureVisibility&&this.featureVisibility.unHighlight(e)}clearHighlighting(){this.featureVisibility&&this.featureVisibility.clearHighlighting()}hideObjects(e){this.featureVisibility&&this.featureVisibility.hideObjects(e)}showObjects(e){this.featureVisibility&&this.featureVisibility.showObjects(e)}clearHiddenObjects(){this.featureVisibility&&this.featureVisibility.clearHiddenObjects()}determineHighlightStyle(e,t){return null}isPartOfAGroupLayer(){return this.groupedWith.length>0}getStyleOrDefaultStyle(e,t){if("string"===typeof e){const t=this.framework.getStyleByName(e);if(t)return t;this.logger.warning(`could not find style with name ${e}`)}else{if(e&&e instanceof _e)return e;if(e){if(e.type===pe.DECLARATIVE||e.declarativeStyle)return new it(e);if(e.type!==pe.REFERENCE){const i=new Je(e);return t?t.assign(i):i}{const t=this.framework.getStyleByName(e.name);if(t)return t;this.logger.warning(`could not find style with name ${e.name}`)}}}return t||st.clone()}setStyle(e,t){if(a(e,[ol.style.Style,_e,Function,String]),"string"===typeof e){const t=this.framework.getStyleByName(e);if(!t)return void this.logger.warning(`could not find style with name ${e}`);this.style=t}else e instanceof _e?this.style=e:(this.style=new Je({}),this.style.style=e)}clearStyle(){this.setStyle(this.defaultStyle)}}var gt=mt;const pt={};function yt(e){if(!pt[e.url])return pt[e.url]=new Cesium.CesiumTerrainProvider(e),pt[e.url];let t=pt[e.url];return!t.requestVertexNormals&&e.requestVertexNormals&&(pt[e.url]=new Cesium.CesiumTerrainProvider(e),t=pt[e.url]),t}function _t(e,t,i){const s=i?S.getTransformer(S.createGeographicProjection(),i):null,r=t.map(e=>{const t=s?s(e,e.slice(),e.length):e;return Cesium.Cartographic.fromDegrees(t[0],t[1])});return new Promise((i,s)=>{Cesium.sampleTerrainMostDetailed(e,r).then(e=>{e.forEach((e,i)=>{t[i][2]=e.height||0}),i(t)},s)})}ct.CESIUM_TERRAIN=ct.lastLayerId,ct.lastLayerId+=1;class ft extends gt{static get className(){return"vcs.vcm.layer.cesium.Terrain"}constructor(e){e.layertype=ct.CESIUM_TERRAIN,e.className=ft.className,super(e),this.requestVertexNormals=null==e.requestVertexNormals||e.requestVertexNormals}initialize(){this.initialized||(this.cesiumTerrainProvider=yt({url:this.url,requestVertexNormals:this.requestVertexNormals}),this.initialized=!0)}show(){const e=this.framework.getActiveMap();if(e&&e.isInitialized()){this.framework.getLayers().filter(e=>e instanceof ft).forEach(e=>{e.activate(!1)});const t=e.getScene(),i=t.globe;i.depthTestAgainstTerrain=!0,i.terrainProvider=this.cesiumTerrainProvider}}hide(){const e=this.framework.getActiveMap();if(e){this.ellipsoidProvider||(this.ellipsoidProvider=new Cesium.EllipsoidTerrainProvider({}));const t=e.getScene(),i=t.globe;i.depthTestAgainstTerrain=!1,i.terrainProvider=this.ellipsoidProvider}}dispose(){const e=this.framework.getActiveMap();e&&(e.getCesiumWidget().terrainProvider=new Cesium.EllipsoidTerrainProvider({})),this.ellipsoidProvider=null,this.cesiumTerrainProvider=null,this.initialized=!1,this.active=!1,this.framework.removeLayer(this)}getHeightForWGS84Coordinates(e){return _t(this.cesiumTerrainProvider,e)}}var vt=ft;class Lt extends oe{static get className(){return"vcs.vcm.maps.Cesium"}constructor(e){e.className=Lt.className,super(e),this.viewer=null,this.debugMode=!1,this.enableLightning=Object(c["e"])(e.enableLightning,!0),this.tileCacheSize=Object(c["h"])(e.tileCacheSize,1),this.eventHandler=null,this.invertClickBehavior=!1,this.defaultJDate=Cesium.JulianDate.fromDate(new Date(2014,6,20,13,0,0,0)),this.supportedlayers=[ct.CESIUM_BUILDINGSLAYER,ct.CESIUM_TERRAIN,ct.CESIUM_POINTCLOUDLAYER,ct.CESIUM_GLTFLAYER,ct.CESIUM_ENTITIESLAYER,ct.CESIUM_CZMLLAYER,ct.CESIUM_TILESET_LAYER,ct.TMSBase,ct.VECTOR,ct.FEATURESTORE,ct.CLUSTER,ct.WMS,ct.WMTS,ct.WSV,ct.GEOJSON,ct.IMAGE,ct.OPENSTREETMAP,ct.TILED_LAYER],this.urlParameter=null,this.webGLaa=Object(c["e"])(e.webGLaa,!1),this.enableTerrainAdjustmentWhenLoading=Object(c["e"])(e.enableTerrainAdjustmentWhenLoading,!0),this.limitCameraHeight=null!=e.limitCameraHeight?Object(c["g"])(e.limitCameraHeight,0):null,this.globeColor=e.globeColor?Cesium.Color.fromCssColorString(e.globeColor):Cesium.Color.fromBytes(63,71,204),this._clusterDataSourceDisplay=null}initialize(){if(!this.initialized){try{this.viewer=new Cesium.CesiumWidget(this.mapElement.getAttribute("id"),{requestRenderMode:!1,scene3DOnly:!0,imageryProvider:!1,shadows:!1,terrainShadows:Cesium.ShadowMode.ENABLED,contextOptions:{webgl:{failIfMajorPerformanceCaveat:!1,antialias:this.webGLaa}}})}catch(e){return this.hide(),document.getElementById("error-message").classList.remove("vcm_ui_hidden"),this.initialized=!1,!1}this.viewer.scene.globe.tileCacheSize=this.tileCacheSize,this.viewer.scene.globe.baseColor=this.globeColor,this.dataSourceDisplay=new Cesium.DataSourceDisplay({scene:this.viewer.scene,dataSourceCollection:new Cesium.DataSourceCollection}),this.viewer.scene.frameState.creditDisplay.update=()=>{},this.viewer.scene.frameState.creditDisplay.beginFrame=()=>{},this.viewer.scene.frameState.creditDisplay.endFrame=()=>{};const t=this.viewer.clock;t.shouldAnimate=!0,t.onTick.addEventListener(()=>{const e=t.currentTime;this.dataSourceDisplay.update(e)}),this.viewer.scene.shadowMap.maximumDistance=5e3,this.viewer.scene.shadowMap.darkness=.6,this.viewer.scene.globe.depthTestAgainstTerrain=!0,this.viewer.scene.highDynamicRange=!1,this.viewer.scene.globe.enableLighting=this.enableLightning,this.viewer.scene.camera.enableTerrainAdjustmentWhenLoading=this.enableTerrainAdjustmentWhenLoading,this.setDay(this.defaultJDate);const i=document.getElementsByClassName("cesium-widget-credits");if(i)for(let e=0;e<i.length;e++){const t=i[e];t.style.display="none"}const s=new Cesium.Cartographic;this.viewer.scene.preUpdate.addEventListener(()=>{null!==this.limitCameraHeight&&(Cesium.Cartographic.fromCartesian(this.viewer.scene.camera.position,Cesium.Ellipsoid.WGS84,s),s&&s.height<this.limitCameraHeight&&(s.height=this.limitCameraHeight,Cesium.Cartographic.toCartesian(s,Cesium.Ellipsoid.WGS84,this.viewer.scene.camera.position)))}),this.eventHandler=new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.ol3map=new ol.Map({view:new ol.View({resolutions:[1],resolution:1})}),this.clusterConverter=new olcs.ClusterConverter(this.viewer.scene),this.synchronizer=new olcs.VectorSynchronizer(this.ol3map,this.viewer.scene),this.clusterSynchronizer=new olcs.VectorSynchronizer(this.ol3map,this.viewer.scene,this.clusterConverter),this.initialized=!0,this.urlParameter&&this.handleURLParameter(this.urlParameter)}return!0}activate(e){return this.active=!0,this.show(),this.initialize()?(this.viewer.resize(),e&&this.gotoViewPoint(e),Promise.resolve()):Promise.resolve()}show(){this.viewer&&(this.viewer.container.style.display="",this.viewer.useDefaultRenderLoop=!0,this.cesiumInspectorContainer&&(this.cesiumInspectorContainer.style.display="")),super.show()}hide(){this.viewer&&(this.viewer.useDefaultRenderLoop=!1,this.viewer.container.style.display="none",this.cesiumInspectorContainer&&(this.cesiumInspectorContainer.style.display="none")),super.hide()}getOL3Map(){return this.logger.deprecate("getOL3Map","is deprecated in v3.6, use the property ol3map directly"),this.ol3map}getSynchronizer(e){return"vcs.vcm.layer.cesium.VectorCluster"===e.className?this.clusterSynchronizer:this.synchronizer}getClusterConverter(){return this.clusterConverter}getHeightFromTerrain(e){const t=this.viewer.scene.terrainProvider;return t.availability?_t(t,e,S.createMercatorProjection()):Promise.resolve(e)}getPositionOnGround(e,t){const i=Cesium.Cartesian3.fromDegreesArrayHeights(e)[0],s=Cesium.Cartesian3.fromDegreesArrayHeights(t)[0],r=new Cesium.Ray(i,s),n=this.viewer.scene.globe.pick(r,this.viewer.scene);if(n){const e=Cesium.Ellipsoid.WGS84.cartesianToCartographic(n),t=[Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude),e.height];return t}return null}getViewPoint(e,t){if(!this.viewer||!this.viewer.scene)return null;const i=null==e||e,s=this.viewer.scene.camera,r=s.position;let n=null,a=null;if(i){const e=new Cesium.Ray(s.position,s.direction),t=this.viewer.scene.globe.pick(e,this.viewer.scene);if(t){a=Cesium.Cartesian3.distance(t,r);const e=Cesium.Ellipsoid.WGS84.cartesianToCartographic(t);n=[Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude),e.height]}}const o=s.positionCartographic,l=[Cesium.Math.toDegrees(o.longitude),Cesium.Math.toDegrees(o.latitude),o.height],c=new E({groundPosition:i?n:[],cameraPosition:l,distance:a,heading:Cesium.Math.toDegrees(s.heading),pitch:Cesium.Math.toDegrees(s.pitch),roll:Cesium.Math.toDegrees(s.roll)});return t?Promise.resolve(c):c}gotoViewPoint(e,t,i,s){if(this.movementDisabled)return;const r=null!==t?t:void 0,n=null!==i?i:void 0;if(ue.getInstance().navActive&&ue.getInstance().activateOverviewMode(),!e.isValid())return;let a=null,o=e.getDistance(),l=0;const c=Cesium.Math.toRadians(e.getHeading()),h=Cesium.Math.toRadians(e.getPitch()),u=Cesium.Math.toRadians(e.getRoll());if(e.getCameraPosition()){const t=e.getCameraPosition();a=Cesium.Cartesian3.fromDegrees(t[0],t[1],t[2])}else{if(!e.getGroundPosition())return;const t=e.getGroundPosition(),i=Cesium.Cartesian3.fromDegrees(t[0],t[1],t[2]),s=new Cesium.Camera(this.viewer.scene),r={destination:i,orientation:{heading:c,pitch:h,roll:u}};if(s.setView(r),!t[2]){const e=this.framework.getLayers(),i=e.filter(e=>e.active).find(e=>e instanceof vt);i&&i.getHeightForWGS84Coordinates([[t[0],t[1]]]).then(e=>{const t=e[0][2];if(t>0){const e=this.viewer.scene.camera.positionCartographic.height,i=t+l-e;this.viewer.scene.camera.moveBackward(i)}});const n=Cesium.Cartographic.fromDegrees(t[0],t[1]),a=this.viewer.scene.globe.getHeight(n);if(a&&a>0){const e=Cesium.Cartesian3.fromDegrees(t[0],t[1],a);r.destination=e,s.setView(r)}}null===o||void 0===o?o=2e3:o>0&&s.moveBackward(o),a=s.position}const d=this.viewer.scene.camera,m={heading:c,pitch:h,roll:u};a=a||null,e.getAnimate()?d.flyTo({destination:a,orientation:m,duration:r,maximumHeight:n,complete:s}):(d.setView({destination:a,orientation:m}),s&&s()),l=d.positionCartographic.height}disableMovement(e){super.disableMovement(e),e?(this.originalState={enableRotate:this.viewer.scene.screenSpaceCameraController.enableRotate,enableTranslate:this.viewer.scene.screenSpaceCameraController.enableTranslate,enableZoom:this.viewer.scene.screenSpaceCameraController.enableZoom,enableTilt:this.viewer.scene.screenSpaceCameraController.enableTilt,enableLook:this.viewer.scene.screenSpaceCameraController.enableLook},this.viewer.scene.screenSpaceCameraController.enableRotate=!1,this.viewer.scene.screenSpaceCameraController.enableTranslate=!1,this.viewer.scene.screenSpaceCameraController.enableZoom=!1,this.viewer.scene.screenSpaceCameraController.enableTilt=!1,this.viewer.scene.screenSpaceCameraController.enableLook=!1):!e&&this.originalState&&(this.viewer.scene.screenSpaceCameraController.enableRotate=this.originalState.enableRotate,this.viewer.scene.screenSpaceCameraController.enableTranslate=this.originalState.enableTranslate,this.viewer.scene.screenSpaceCameraController.enableZoom=this.originalState.enableZoom,this.viewer.scene.screenSpaceCameraController.enableTilt=this.originalState.enableTilt,this.viewer.scene.screenSpaceCameraController.enableLook=this.originalState.enableLook,this.originalState=null)}setDay(e){this.viewer.clock.currentTime=e,this.viewer.clock.multiplier=1}setLightning(e){this.enableLightning=e,this.viewer.scene.globe.enableLighting=e}getCesiumWidget(){return this.viewer}getEntities(){return this.dataSourceDisplay.defaultDataSource.entities}getDatasources(){return this.dataSourceDisplay.dataSources}getClusterDatasources(){if(this._clusterDataSourceDisplay)return this._clusterDataSourceDisplay.dataSources;const e=new Cesium.DataSourceCollection;function t(e,t,i){const s=i.entities;return[new Cesium.BillboardVisualizer(t,s),new Cesium.LabelVisualizer(t,s),new Cesium.PointVisualizer(t,s)]}return this._clusterDataSourceDisplay=new Cesium.DataSourceDisplay({scene:this.viewer.scene,dataSourceCollection:e,visualizersCallback:t}),this.viewer.clock.onTick.addEventListener(e=>{this._clusterDataSourceDisplay.update(e.currentTime)}),e}getDataSourceDisplay(){return this.dataSourceDisplay}getScene(){return this.viewer.scene}getViewer(){return this.viewer}pointIsVisible(e){const t=this.viewer.scene.camera,i=Cesium.Cartesian3.fromDegrees(e[0],e[1],0),s=t.frustum.computeCullingVolume(t.positionWC,t.directionWC,t.upWC);return s.computeVisibility(new Cesium.BoundingSphere(i))===Cesium.Intersect.INSIDE}handleURLParameter(e){e.debug&&(this.initialized?this.setDebugMode():this.urlParameter=e)}setDebugMode(){this.debugMode||(this.debugMode=!0,this.cesiumInspectorContainer=document.createElement("div"),this.cesiumInspectorContainer.className="cesium-viewer-cesiumInspectorContainer",this.framework.getMapContainer().appendChild(this.cesiumInspectorContainer),this.cesiumInspector=new Cesium.CesiumInspector(this.cesiumInspectorContainer,this.getScene()))}pickPositionSupported(){return!!this.initialized&&this.viewer.scene.pickPositionSupported}isGroundPrimitiveSupported(){return!!this.initialized&&this.viewer.scene.context.fragmentDepth}}var Mt=Lt,bt=i(10);function wt(e,t,i){const s=6371e3,r=Cesium.Math.toRadians(i),n=Cesium.Math.toRadians(e[1]),a=Cesium.Math.toRadians(e[0]),o=Math.asin(Math.sin(n)*Math.cos(t/s)+Math.cos(n)*Math.sin(t/s)*Math.cos(r)),l=a+Math.atan2(Math.sin(r)*Math.sin(t/s)*Math.cos(n),Math.cos(t/s)-Math.sin(n)*Math.sin(o));return[parseFloat(Cesium.Math.toDegrees(l).toFixed(5)),parseFloat(Cesium.Math.toDegrees(o).toFixed(5))]}function Tt(e,t){const i=Cesium.Math.toRadians(e[0]),s=Cesium.Math.toRadians(e[1]),r=Cesium.Math.toRadians(t[0]),n=Cesium.Math.toRadians(t[1]),a=Math.sin(r-i)*Math.cos(n),o=Math.cos(s)*Math.sin(n)-Math.sin(s)*Math.cos(n)*Math.cos(r-i);let l=Cesium.Math.toDegrees(Math.atan2(a,o));return l=(l+360)%360,l}function St(e,t){const i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)}const Ct=new ol.Sphere(6378137);function kt(e,t){if(e instanceof ol.geom.Polygon)return null!=t?e.getLinearRing(t):e.getLinearRings();if(e instanceof ol.geom.MultiLineString)return null!=t?e.getLineString(t):e.getLineStrings();if(e instanceof ol.geom.MultiPoint)return null!=t?e.getPoint(t):e.getPoints();if(e instanceof ol.geom.MultiPolygon)return null!=t?e.getPolygon(t):e.getPolygons();if(e instanceof ol.geom.GeometryCollection)return null!=t?e.getGeometries()[t]:e.getGeometries();throw new Error("Geometry is not a MultiGeometry")}function Et(e,t){if(e instanceof ol.geom.Polygon&&t instanceof ol.geom.LinearRing)e.appendLinearRing(t);else if(e instanceof ol.geom.MultiLineString&&t instanceof ol.geom.LineString)e.appendLineString(t);else if(e instanceof ol.geom.MultiPoint&&t instanceof ol.geom.Point)e.appendPoint(t);else{if(!(e instanceof ol.geom.MultiPolygon&&t instanceof ol.geom.Polygon))throw new Error("Geometry is not a MultiGeometry");e.appendPolygon(t)}}let It=new Cesium.Cartesian2,Dt=new Cesium.Cartesian2,Pt=new Cesium.Cartesian2,Ot=new Cesium.Cartesian3,Yt=new Cesium.Cartesian3,xt=new Cesium.Cartesian3;function At(e,t,i){Ot=Cesium.Cartesian3.fromElements(t[0]-e[0],t[1]-e[1],t[2]-e[2],Ot),Ot.equals(Cesium.Cartesian3.ZERO)&&(Ot=Cesium.Cartesian3.fromElements(1,1,1,Ot)),Ot=Cesium.Cartesian3.normalize(Ot,Ot),Yt=Cesium.Cartesian3.fromElements(i[0]-e[0],i[1]-e[1],i[2]-e[2],Yt);const s=Cesium.Cartesian3.dot(Ot,Yt);return Ot=Cesium.Cartesian3.multiplyByScalar(Ot,s,Ot),[Ot.x+e[0],Ot.y+e[1],Ot.z+e[2]]}function jt(e,t){return Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2)}function Ft(e,t){return Ot=Cesium.Cartesian3.fromElements(e[0],e[1],e[2],Ot),Yt=Cesium.Cartesian3.fromElements(t[0],t[1],t[2],Yt),Cesium.Cartesian3.distance(Ot,Yt)}function Nt(e,t,i,s){Ot=Cesium.Cartesian3.fromElements(t[0]-e[0],t[1]-e[1],t[2]-e[2],Ot),Yt=Cesium.Cartesian3.fromElements(i[0]-e[0],i[1]-e[1],i[2]-e[2],Yt),xt=Cesium.Cartesian3.fromElements(i[0]-t[0],i[1]-t[1],i[2]-i[2],xt);const r=Cesium.Cartesian3.magnitude(Ot);return!(r<Cesium.Cartesian3.magnitude(Yt)||r<Cesium.Cartesian3.magnitude(xt))&&(Ot=Cesium.Cartesian3.normalize(Ot,Ot),Yt=Cesium.Cartesian3.normalize(Yt,Yt),Ot.equalsEpsilon(Yt,s||Cesium.Math.EPSILON5))}function Ht(e,t,i,s){It=Cesium.Cartesian2.fromElements(t[0]-e[0],t[1]-e[1],It),Dt=Cesium.Cartesian2.fromElements(i[0]-e[0],i[1]-e[1],Dt),Pt=Cesium.Cartesian2.fromElements(i[0]-t[0],i[1]-t[1],Pt);const r=Cesium.Cartesian2.magnitude(It);return!(r<Cesium.Cartesian2.magnitude(Dt)||r<Cesium.Cartesian2.magnitude(Pt))&&(It=Cesium.Cartesian2.normalize(It,It),Dt=Cesium.Cartesian2.normalize(Dt,Dt),It.equalsEpsilon(Dt,s||Cesium.Math.EPSILON5))}function Rt(e,t){const i=S.mercatorToWgs84(e);return Ot=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),Yt=t.globe.ellipsoid.geodeticSurfaceNormal(Ot,Yt),Yt=Cesium.Cartesian3.cross(t.camera.rightWC,Yt,Yt),Yt=Cesium.Cartesian3.normalize(Yt,Yt),Cesium.Plane.fromPointNormal(Ot,Yt)}function zt(e,t){const i=S.mercatorToWgs84(e);return Ot=Cesium.Cartesian3.fromDegrees(i[0],i[1],i[2]),Yt=t.globe.ellipsoid.geodeticSurfaceNormal(Ot,Yt),Cesium.Plane.fromPointNormal(Ot,Yt)}function Gt(e,t){const i=t||e.getCoordinates();let s=null;return e instanceof ol.geom.Point?s=[i]:e instanceof ol.geom.LineString?s=i:e instanceof ol.geom.Polygon?s=i.reduce((e,t)=>e.concat(t)):e instanceof ol.geom.MultiPoint?s=i:e instanceof ol.geom.MultiLineString?s=i.reduce((e,t)=>e.concat(t)):e instanceof ol.geom.MultiPolygon?s=i.reduce((e,t)=>e.concat(t)).reduce((e,t)=>e.concat(t)):e instanceof ol.geom.Circle?s=i:e instanceof ol.geom.GeometryCollection&&(s=e.getGeometries().map((e,t)=>Gt(e,i[t])).reduce((e,t)=>e.concat(t))),s}function Vt(e,t,i){let s=-1/0,r=1/0;const n=e.getGeometry();if(n){const t=Gt(n);let a=t.length;while(a--)3===t[a].length&&(s=t[a][2]>s?t[a][2]:s,r=t[a][2]<r?t[a][2]:r);if(!i&&"sphere"===e.get("olcs.circle_type")&&n instanceof ol.geom.Circle){const e=n.getCoordinates();S.mercatorToWgs84(e[0],!0),S.mercatorToWgs84(e[1],!0);const t=Ct.haversineDistance(e[0],e[1]),i=e[0][2]||0;s=i+t>s?i+t:s,r=i-t<r?i-t:r}}if(r=r===1/0?0:r,!i){let i=e.get("olcs_extrudedHeight");if(!i){const s=e.get("olcs_storeyHeight")||t,r=e.get("olcs_storeyNumber");s&&r&&(i=r*s)}const n=e.get("olcs_groundLevel");i&&(r=n||r),Array.isArray(i)||i&&(i>0?(s=n||s,s=r+i>s?r+i:s):(s=r>s?r:s,r=r+i<r?r+i:r))}return{max:r>s?r:s,min:r}}function Bt(e,t,i,s){function r(e){let r=e.length;while(r--)null==e[r][2]||s?e[r][2]=i:e[r][2]+=t;return e}const n=e.getCoordinates(),a=Gt(e,n);r(a),e.setCoordinates(n)}function Ut(e){e.unset("olcs_groundLevel",!0);const t=G.getInstance().getActiveMap();if(t instanceof Mt){const i=e.getGeometry();if(i){const e=i.getCoordinates(),s=Gt(i,e);return t.getHeightFromTerrain(s).then(()=>{i.setCoordinates(e)})}}return Promise.resolve()}function Wt(e){e.set("olcs_altitudeMode","clampToGround")}function qt(e){return e instanceof ol.geom.Circle?ol.geom.Polygon.fromCircle(e):(e instanceof ol.geom.Polygon&&e.unset("_vcsGeomType"),e)}function Jt(e,t){const i=Ct.offset(S.mercatorToWgs84(e),t,Math.PI/2),s=S.wgs84ToMercator(i),r=e[0]-s[0],n=e[1]-s[1],a=r*r,o=n*n,l=Math.sqrt(a+o);return new ol.geom.Circle(e,l,"XYZ")}function Kt(e){let t=0;for(let i=0;i<e.length;i++){let s=i+1;s>=e.length&&(s=0);const r=e[i],n=e[s],a=St(r,n);a>t&&(t=a)}return t}function Zt(e,t){const i=Kt(t.groundCoordinates),s=Math.PI/3,r=e.getViewport(),n={height:r.offsetHeight,width:r.offsetWidth},a=n.width/n.height,o=2*Math.atan(Math.tan(.5*s)/a),l=i/t.size[0];return{size:n,fovy:o,metersPerUnit:l}}function Qt(e,t,i){const s=e instanceof ol.geom.Circle?ol.geom.Polygon.fromCircle(e):e,r=s.getCoordinates(),n=Gt(s,r),a=ol.proj.getTransform(ol.proj.get("EPSG:4326"),i.projection),o=n.map(e=>{return S.mercatorToWgs84(e,!0),Cesium.Cartographic.fromDegrees(e[0],e[1])});return Cesium.sampleTerrainMostDetailed(i.terrainProvider,o).then(e=>{return n.forEach(e=>a(e,e,3)),e.forEach((e,t)=>{const s=i.transformRealWorld2Image(n[t],e.height);n[t][0]=s[0],n[t][1]=s[1]}),t.setCoordinates(r),t})}function $t(e,t,i){const s=e.getCoordinates(),r=ol.proj.get("EPSG:3857"),n=Gt(e,s),a=n.map(e=>Object(bt["e"])(i,e,{dataProjection:r}).then(t=>{e[0]=t.coords[0],e[1]=t.coords[1],e[2]=t.coords[2]}));return Promise.all(a).then(()=>{return t.setCoordinates(s),t})}var Xt=i(436),ei=i(389),ti=i(390),ii=i(46);class si extends ii["a"]{constructor(e){super(e),this.layer=e.layer||null,this.suppressPublish=!1}activateWithViewPoint(e,t){return this.state===ii["a"].STATE.INACTIVE&&(this.state=ii["a"].STATE.LOADING,this.olMap=e,t)?this.setViewPoint(t).then(()=>{this.state=ii["a"].STATE.ACTIVE}):Promise.resolve(this.state)}setImageOnMap(e,t){const i=!this.suppressPublish&&(!this.currentImage||this.currentImage.name!==e);return super.setImageOnMap(e,t).then(()=>{i&&G.getInstance().publish(I.OBLIQUE_IMAGE_CHANGED,this.layer,this.currentImage)})}setViewPoint(e){let t=e.getGroundPosition();t||(t=e.getCameraPosition());const i=ol.proj.transform(t,S.createGeographicProjection().getProjection(),this.projection),s=this.getImageNameForCoordinates(i);if(null!=s){const r=t[2]||!this.terrainProvider?Promise.resolve([i]):Object(bt["c"])(this.terrainProvider,[i],this.projection);return r.then(e=>{let t=Object(le["a"])(e,1),i=t[0];return this.setImageOnMap(s,i)}).catch(()=>this.setImageOnMap(s,i)).then(()=>{let t=e.getDistance();t||(t=e.getCameraPosition()?e.getCameraPosition()[2]:1e3);const i=Zt(this.olMap,this.currentImage),s=i.size,r=i.fovy,n=i.metersPerUnit,a=2*t*Math.tan(r/2),o=a/n,l=o/s.height,c=this.currentView.view;c.setResolution(c.constrainResolution(l))})}return Promise.reject(new Error("could not find an image in this direction"))}canShowViewpoint(e){let t=e.getGroundPosition();t||(t=e.getCameraPosition());const i=ol.proj.transform(t,S.createGeographicProjection().getProjection(),this.projection),s=this.getImageNameForCoordinates(i);if(null!=s){const e=this.images[s],t=ol.extent.boundingExtent(e.groundCoordinates);return ol.extent.containsCoordinate(t,i)}return!1}}var ri=si;class ni extends Xt["a"]{constructor(e){super(e),this.layer=e.layer,this.directions={}}handleMetadataResponse(e,t){const i=Xt["a"].getVersion(e);i.version>=3.5||3.4===i.version&&i.buildNumber>=36?this.handleMetadataResponseV35(e,t,i):i.version>=3.1||null===i.version?this.handleMetadataResponseV34(e,t,i):console.log("Could not load Meta Data, only meta data version 3.4 and higher are supported")}createDirection(e){return new ri(Object.assign({layer:this.layer},e))}handleMetadataResponseV34(e,t,i){const s=[e.generalImageInfo.width,e.generalImageInfo.height],r=e.generalImageInfo["tile-resolution"],n=[e.generalImageInfo["tile-width"],e.generalImageInfo["tile-width"]];e.generalImageInfo.width&&e.generalImageInfo.height&&e.generalImageInfo["tile-resolution"]&&this.getImageMeta(t,s,r,n,i);const a=[],o=e.generalImageInfo.cameraParameter;o&&Object.keys(o).forEach(e=>{const t=new ti["a"](Object.assign({name:e},o[e]));a.push(t)});const l={};e.images&&Array.isArray(e.images)&&(e.images.forEach(e=>{const c=ni.getImageOptionsFromJSON(e,a,o),h=e.width&&e.height?[e.width,e.height]:s,u=e["tile-resolution"]?e["tile-resolution"]:r,d=this.getImageMeta(t,h,u,n,i),m=new ei["a"](Object.assign({terrainProvider:this.terrainProvider,projection:this.projection,meta:d},c));l[m.viewDirection]||(l[m.viewDirection]={direction:m.viewDirection,images:{},rTreeItems:[],footPrintFeatures:[],projection:this.projection,terrainProvider:this.terrainProvider}),l[m.viewDirection].images[m.name]=m,l[m.viewDirection].rTreeItems.push({minX:m.centerPointOnGround[0],minY:m.centerPointOnGround[1],maxX:m.centerPointOnGround[0],maxY:m.centerPointOnGround[1],name:m.name});const g=new ol.geom.Polygon([m.groundCoordinates.concat([m.groundCoordinates[0]])]);g.transform(this.projection,ol.proj.get("EPSG:3857"));const p=new ol.Feature({geometry:g});p.setId(m.name),l[m.viewDirection].footPrintFeatures.push(p)}),Object.keys(l).forEach(e=>{this.directions[e]?this.directions[e].addOptions(l[e]):this.directions[e]=this.createDirection(l[e]),this.extent=ol.extent.extend(this.extent,this.directions[e].footPrintsLayer.getSource().getExtent())}))}static getImageOptionsFromJSON(e,t,i){const s=h["c"][e["view-direction"]],r=e["view-directionAngle"],n=e["projection-center"],a=e.name,o=e.groundCoordinates,l=e.centerPointOnGround,c=e["camera-name"],u=t.find(e=>e.name===c),d={name:a,viewDirection:s,viewDirectionAngle:r,groundCoordinates:o,centerPointOnGround:l};if(u){const t=i[c],s=Cesium.Matrix3.fromRowMajorArray([].concat(...t["camera-matrix"])),r=Cesium.Matrix3.inverse(s,new Cesium.Matrix3),a=Cesium.Matrix3.fromRowMajorArray([].concat(...e["rotation-matrix"])),o=Cesium.Matrix3.transpose(a,new Cesium.Matrix3),l=-1*t["focal-length"];Cesium.Matrix3.multiplyByScalar(r,l,r);const h=Cesium.Matrix3.multiply(o,r,new Cesium.Matrix3),m=Cesium.Matrix4.fromRotationTranslation(s,Cesium.Cartesian3.ZERO,new Cesium.Matrix4),g=Cesium.Cartesian3.fromArray(n),p=Cesium.Matrix4.fromTranslation(Cesium.Cartesian3.multiplyByScalar(g,-1,new Cesium.Cartesian3),new Cesium.Matrix4),y=Cesium.Matrix4.fromRotationTranslation(a,Cesium.Cartesian3.ZERO,new Cesium.Matrix4),_=Cesium.Matrix4.multiply(m,Cesium.Matrix4.multiply(y,p,new Cesium.Matrix4),new Cesium.Matrix4);d.projectionCenter=g,d.camera=u,d.pToRealworld=h,d.pToImage=_}return d}}var ai=ni;function oi(e){const t=e.getHeading();let i=h["a"].NORTH;return t>=45&&t<135?i=h["a"].EAST:t>=135&&t<225?i=h["a"].SOUTH:t>=225&&t<315&&(i=h["a"].WEST),i}ct.OBLIQUE_OBLIQUELAYER=ct.lastLayerId,ct.lastLayerId+=1,I.OBLIQUE_IMAGE_CHANGED="OBLIQUE_IMAGE_CHANGED",I.OBLIQUE_DIRECTION_CHANGED="OBLIQUE_DIRECTION_CHANGED";class li extends gt{static get className(){return"vcs.vcm.layer.oblique.ObliqueLayer"}constructor(e){e.layertype=ct.OBLIQUE_OBLIQUELAYER,e.className=li.className,super(e);const t=e.terrain?e.terrain.url:e.terrainUrl;this.terrainProvider=t?yt({url:t}):null,this.sourceProjection=e.projection?new S(e.projection):new S({epsg:e.epsg,proj4:e.proj4}),this.terrainErrorThreshold=Object(c["g"])(e.terrainErrorThreshold,1),this.terrainErrorCountThreshold=Object(c["h"])(e.terrainErrorCountThreshold,3),this.obliqueCollection=new ai({terrainProvider:this.terrainProvider,projection:this.sourceProjection.getProjection(),minZoom:e.minZoom,maxZoom:e.maxZoom,hideLevels:e.hideLevels,layer:this}),this.obliqueMap=null,this.currentDirection=null,this.isDefaultObliqueLayer=this.activeOnStartup}get currentImage(){return this.currentDirection?this.currentDirection.currentImage:null}initialize(){return this.initialized?Promise.resolve():(this.obliqueMap||(this.obliqueMap=this.framework.getMapByType("vcs.vcm.maps.Oblique"),this.obliqueMap||this.logger.warning(`Oblique layer is not loading on top of an oblique map, please check: ${this.name}`),this.olMap=this.obliqueMap.getolMap()),this.obliqueCollection.loadData(this.url).then(()=>{this.initialized=!0,this.currentDirection=this.obliqueCollection.directions[h["a"].NORTH]}))}activate(e){if(e&&e!==this.active&&this.isSupported()){const e=this.framework.getActiveMap();return this.olMap=e.olMap,e.setObliqueLayer(this)}return Promise.resolve()}show(e){return this.active=!0,this.initialize().then(()=>{return e?this.setViewPoint(e):this.currentDirection.activate(this.olMap,[0,0],this.obliqueCollection.options.minZoom)})}canShowViewpoint(e){return this.initialize().then(()=>{const t=oi(e);return!!this.obliqueCollection.directions[t]&&this.obliqueCollection.directions[t].canShowViewpoint(e)})}hide(){this.active=!1,this.currentDirection&&this.currentDirection.deactivate()}getExtent(){return this.extent}getExtentOfCurrentImage(){return this.currentImage&&this.currentImage.groundCoordinates?new ge({coordinates:ol.extent.boundingExtent(this.currentImage.groundCoordinates),epsg:this.sourceProjection.getEPSG()}):(this.logger.warning("No currentImage, cannot compute extent"),null)}computeViewpoint(e){if(!this.currentImage)return e?Promise.resolve(null):null;if(e)return Object(bt["e"])(this.currentImage,this.olMap.getView().getCenter(),{dataProjection:ol.proj.get("EPSG:4326")}).then(e=>{let t=e.coords;return this._computeViewpointInternal(t)});const t=this.olMap.getView().getCenter(),i=this.currentImage.transformImage2RealWorld(t,this.currentImage.averageHeight),s=this.sourceProjection.transformTo(S.createGeographicProjection(),i);return this._computeViewpointInternal(s)}_computeViewpointInternal(e){const t={[h["a"].NORTH]:0,[h["a"].EAST]:90,[h["a"].SOUTH]:180,[h["a"].WEST]:270},i=Zt(this.olMap,this.currentImage),s=i.size,r=i.fovy,n=i.metersPerUnit,a=this.olMap.getView(),o=a.getResolution(),l=o*s.height,c=l*n,u=Math.abs(c/2/Math.tan(r/2)),d=e[2]||this.currentImage.averageHeight,m=u+d;return new E({cameraPosition:[e[0],e[1],m],groundPosition:e,heading:t[this.currentImage.viewDirection],pitch:0,roll:0,distance:u})}setViewPoint(e){const t=oi(e);if(this.currentDirection){if(this.currentDirection.direction===t)return this.currentDirection.state===ii["a"].STATE.ACTIVE?this.currentDirection.setViewPoint(e):this.currentDirection.activateWithViewPoint(this.olMap,e);this.currentDirection.deactivate()}return this.obliqueCollection.directions[t]&&(this.currentDirection=this.obliqueCollection.directions[t]),this.currentDirection.suppressPublish=!0,this.currentDirection.activateWithViewPoint(this.olMap,e).then(()=>{this.framework.publish(I.OBLIQUE_DIRECTION_CHANGED,this,this.currentDirection),this.framework.publish(I.OBLIQUE_IMAGE_CHANGED,this,this.currentImage),this.currentDirection.suppressPublish=!1}).catch(e=>{this.logger.error(e.message),this.currentDirection.suppressPublish=!1})}getCurrentImage(){return this.currentImage}existsImageForViewDirection(e){const t=this.currentImage.transformRealWorld2Image(e);return!(t[0]<0||t[0]>this.currentImage.size[0]||t[1]<0||t[1]>this.currentImage.size[1])}}var ci=li;I.OBLIQUE_FALLBACK_ACTIVATED="OBLIQUE_FALLBACK_ACTIVATED";class hi extends oe{static get className(){return"vcs.vcm.maps.Oblique"}constructor(e){e.className=hi.className,super(e),this.mouseClickEvents=!1,this.activeLayer=null,this.listenerKey=null,this.mapChangeEvent=e.changeOnMoveEnd?"moveend":"postrender",this.switchThreshold=Object(c["g"])(e.switchThreshold,0),this.switchThreshold>1&&(this.switchThreshold=.2),this._switchOnEdge=null==e.switchOnEdge||e.switchOnEdge,this.switchEnabled=!0,this.supportedlayers=[ct.OBLIQUE_OBLIQUELAYER,ct.VECTOR,ct.GEOJSON,ct.WSV,ct.CLUSTER],this.interactionsDefaultsObject={altShiftDragRotate:!1,pinchRotate:!1,shiftDragZoom:!1,doubleClickZoom:!1},this._initialViewpoint=null,this.fallbackMap=e.fallbackMap}get switchOnEdge(){return this._switchOnEdge}set switchOnEdge(e){this.logger.warning("switchOnEdge is deprecated, use switchEnabled instead"),this._switchOnEdge=e}initialize(){if(!this.initialized){this.olMap||(this.olMap=new ol.Map({layers:[],logo:!1,controls:[],loadTilesWhileInteracting:!0,interactions:this.getMapInteractions(),target:this.mapElement}));const e=Object.values(this.framework.getLayers()).filter(e=>e instanceof ci),t=e.find(e=>e.isDefaultObliqueLayer)||e[0];if(!t)return Promise.reject(new Error("Could not find an oblique layer for configured oblique map"));this.setLayerLoading(t,!0);let i=Promise.resolve(!0);if(this.fallbackMap&&this._initialViewpoint){const e=this.framework.getMapByName(this.fallbackMap);e?i=t.canShowViewpoint(this._initialViewpoint):(this.logger.warning(`cannot use ${this.fallbackMap} as a fallback, it does not exist`),this.fallbackMap=void 0)}this.inializedPromise=i.then(e=>{return!1===e?e:t.activate(!0)}).then(e=>{return!1!==e&&(this._initialViewpoint=null,this.initialized=!0,this.olMap.on(this.mapChangeEvent,this._postRenderHandler.bind(this))),e})}return this.inializedPromise}getOl3Map(){return this.olMap}setObliqueLayer(e){this.switchEnabled=!1;let t=Promise.resolve(null);if(this.activeLayer){const e=this.activeLayer;t=e.computeViewpoint(!0).then(t=>{return e.hide(),this.framework.publish(I.LAYER_CHANGED,e),this.framework.publish(I.LAYER_DEACTIVATED,e),t})}else this._initialViewpoint&&(this.olMap.updateSize(),t=Promise.resolve(this._initialViewpoint));return this.setLayerLoading(e,!0),this.activeLayer=e,t.then(e=>this.activeLayer.show(e)).then(()=>{this.framework.getActiveMap().setLayerLoading(e,!1),this.switchEnabled=!0,this.framework.publish(I.LAYER_CHANGED,this.activeLayer),this.framework.publish(I.LAYER_ACTIVATED,this.activeLayer)}).catch(t=>{this.activeLayer=null,this.logger.warning(`could not show oblique layer ${e.name}`),this.logger.warning(`${t.message}`)})}_postRenderHandler(){if(this.active&&this._switchOnEdge&&this.switchEnabled){const e=this.olMap.getView().getCenter(),t=this.activeLayer,i=t.currentImage,s=t.currentDirection,r=this.switchThreshold,n=1-r;if(!i||e[0]/i.size[0]>r&&e[0]/i.size[0]<n&&e[1]/i.size[1]>r&&e[1]/i.size[1]<n)return;if(null===i.averageHeight)return;s.postRenderHandler(e)}}activate(e){let t;return this.show(),this.switchEnabled=!0,this.initialized?t=e?this.gotoViewPoint(e):Promise.resolve():(this._initialViewpoint=e,t=this.initialize().then(e=>{return!1!==e&&(this.show(),this.olMap.updateSize()),e})),t.then(t=>{!1===t?(this.framework.publish("OBLIQUE_FALLBACK_ACTIVATED",!0),this.framework.activateMap(this.fallbackMap,e)):this.active=!0}).catch(e=>{this.logger.warning("could not activate oblique map"),this.logger.warning(`${e.message}`)})}getExtentOfCurrentImage(){return this.activeLayer?this.activeLayer.getExtentOfCurrentImage():(this.logger.warning("Could not compute extent, because no oblique layer is active in the map"),new ge({coordinates:[-18924313.4349,-15538711.0963,18924313.4349,15538711.0963],epsg:"EPSG:3857"}))}getExtent(){return this.activeLayer?this.activeLayer.getExtent():(this.logger.warning("Could not compute extent, because no oblique layer is active in the map"),new ge({coordinates:[-18924313.4349,-15538711.0963,18924313.4349,15538711.0963],epsg:"EPSG:3857"}))}getCurrentImage(){return this.activeLayer?this.activeLayer.currentImage:(this.logger.warning("Could not obtain currentImage, because no oblique layer is active in the map"),null)}deactivate(){return this.inializedPromise.then(()=>{return this.active=!1,this.getViewPoint(!1,!0).then(e=>{return this.hide(),e})})}getViewPoint(e,t){return this.activeLayer?this.activeLayer.computeViewpoint(t):this._initialViewpoint?t?Promise.resolve(this._initialViewpoint):this._initialViewpoint:t?Promise.reject(new Error("no active layer or cachedViewpoint")):null}disableMovement(e){super.disableMovement(e),this.olMap.getInteractions().forEach(t=>{t.setActive(!e)})}gotoViewPoint(e){return this.movementDisabled?Promise.resolve():this.activeLayer?this.fallbackMap?this.activeLayer.canShowViewpoint(e).then(t=>{return t?this.activeLayer.setViewPoint(e):Promise.resolve(!1)}):this.activeLayer.setViewPoint(e):(this.logger.warning("Can't go to viewpoint, no active oblique layer."),Promise.resolve())}getMapInteractions(){return ol.interaction.defaults(this.interactionsDefaultsObject)}getolMap(){return this.olMap}pointIsVisible(e){const t=this.olMap.getView(),i=t.calculateExtent(this.olMap.getSize());let s=[i[0],i[3]];s=this.activeLayer.currentImage.transformImage2RealWorld(s);let r=[i[2],i[1]];r=this.activeLayer.currentImage.transformImage2RealWorld(r);const n=[s,r],a=S.transformCoordinates(S.createGeographicProjection(),this.activeLayer.sourceProjection,n);return ol.extent.containsXY(ol.extent.boundingExtent(a),e[0],e[1])}requestRender(){this.initialized&&this.olMap.render()}}var ui=hi;let di=new Cesium.Cartographic,mi=new Cesium.Cartesian3;class gi extends ie{constructor(){super(),this.activeMapHandler=this.pipeThrough,this._defaultActive=Q.ALL,this._defaultModificationKey=Z.ALL,this.setActive()}pipe(e){return this.activeMapHandler(e)}handleMapChange(e){this.activeMapHandler=e instanceof Mt?gi.cesiumHandler.bind(null,e):e instanceof ui?gi.obliqueHandler.bind(null,e):this.pipeThrough}static cesiumHandler(e,t){const i=e.getScene();return t.ray=i.camera.getPickRay(t.windowPosition),mi=i.globe.pick(t.ray,i,mi),mi?(di=Cesium.Cartographic.fromCartesian(mi,i.globe.ellipsoid,di),t.position=S.wgs84ToMercator([Cesium.Math.toDegrees(di.longitude),Cesium.Math.toDegrees(di.latitude),di.height],!0)):(mi=new Cesium.Cartesian3,t.position=[0,0,0]),t.positionOrPixel=t.position,Promise.resolve(t)}static obliqueHandler(e,t){if(e.activeLayer&&e.activeLayer.currentImage){const i=t.type&(Q.MOVE^Q.DRAGEVENTS),s=t.position.slice(0,2);return Object(bt["e"])(e.activeLayer.currentImage,s,{dontUseTerrain:!!i,dataProjection:S.createMercatorProjection().getProjection()}).then(e=>{return t.obliqueParameters={pixel:s},t.position=e.coords,t.obliqueParameters.estimate=e.estimate,t})}return t.stopPropagation=!0,Promise.resolve(t)}}var pi=gi;class yi extends oe{static get className(){return"vcs.vcm.maps.Openlayers"}constructor(e){e.className=yi.className,super(e),this.ol3map=null,this.listenerKey=null,this.fixedNorthOrientation=null==e.fixedNorthOrientation||e.fixedNorthOrientation,this.supportedlayers=[ct.TMSBase,ct.VECTOR,ct.CLUSTER,ct.WSV,ct.WMS,ct.WMTS,ct.GEOJSON,ct.IMAGE,ct.OPENSTREETMAP,ct.TILED_LAYER]}initialize(){if(!this.initialized){var e=[];this.ol3map=new ol.Map({layers:e,logo:!1,controls:[],interactions:ol.interaction.defaults({altShiftDragRotate:!1,pinchRotate:!1,shiftDragZoom:!1,doubleClickZoom:!1}),loadTilesWhileInteracting:!0,target:this.mapElement,view:new ol.View({center:[1230922.6203948376,6350766.117974091],zoom:13})}),this.initialized=!0}}activate(e){return this.active=!0,this.show(),this.initialize(),e&&(this.fixedNorthOrientation&&e.setHeading(0),this.gotoViewPoint(e)),this.ol3map.updateSize(),Promise.resolve()}getViewPoint(e,t){const i=this.ol3map.getView(),s=i.getCenter(),r=ol.proj.getTransform(i.getProjection(),"EPSG:4326"),n=Math.PI/3,a=this.ol3map.getViewport(),o={};o.height=a.offsetHeight,o.width=a.offsetWidth;const l=o.width/o.height,c=2*Math.atan(Math.tan(.5*n)/l),h=r(s.slice(0,2)),u=i.getProjection().getMetersPerUnit(),d=i.getResolution(),m=d*o.height,g=Math.cos(Math.abs(Cesium.Math.toRadians(h[1]))),p=m*u*g,y=Math.abs(p/2/Math.tan(c/2)),_=-Cesium.Math.toDegrees(i.getRotation()),f=h,v=-90,L=new E({groundPosition:f,pitch:v,heading:_,distance:y});return t?Promise.resolve(L):L}disableMovement(e){super.disableMovement(e),this.ol3map.getInteractions().forEach(t=>{t.setActive(!e)})}gotoViewPoint(e){if(this.movementDisabled)return;const t=this.ol3map.getView(),i=ol.proj.getTransform("EPSG:4326",t.getProjection());let s=[];s=e.getGroundPosition()?e.getGroundPosition().slice(0,2):e.getCameraPosition().slice(0,2);let r=e.getDistance();null==r&&(r=e.getCameraPosition()[2]);const n=i(s),a=Math.PI/3,o=this.ol3map.getViewport(),l={};l.height=o.offsetHeight?o.offsetHeight:1,l.width=o.offsetWidth?o.offsetWidth:1;const c=l.width/l.height,h=2*Math.atan(Math.tan(.5*a)/c),u=2*r*Math.tan(h/2),d=t.getProjection().getMetersPerUnit(),m=Math.cos(Math.abs(Cesium.Math.toRadians(s[1]))),g=u/d/m,p=g/l.height;if(e.getAnimate()){let i=0;this.fixedNorthOrientation||null==e.getHeading()||(i=-Cesium.Math.toRadians(e.getHeading())),t.animate({duration:100,center:n,source:t.getCenter(),easing:ol.easing.inAndOut,resolution:p,rotation:i})}else t.setCenter(n),t.setResolution(p),this.fixedNorthOrientation||null==e.getHeading()||t.setRotation(-Cesium.Math.toRadians(e.getHeading()))}getolMap(){return this.ol3map}getOl3Map(){return this.ol3map}pointIsVisible(e){const t=this.ol3map.getView(),i=t.calculateExtent(this.ol3map.getSize()),s=ol.proj.getTransform(t.getProjection(),"EPSG:4326"),r=[i[0],i[3]],n=[i[2],i[1]],a=[s(r),s(n)];return ol.extent.containsXY(ol.extent.boundingExtent(a),e[0],e[1])}requestRender(){this.initialized&&this.ol3map.render()}}var _i=yi;function fi(e,t,i,s){const r=1e-6,n=[0,0,0],a=[0,0,0],o=[0,0,0],l=[0,0,0],c=[0,0,0];function h(e,t,i){let s=t[0],r=t[1],n=t[2],a=i[0],o=i[1],l=i[2];return e[0]=r*l-n*o,e[1]=n*a-s*l,e[2]=s*o-r*a,e}function u(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function d(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}u(n,s[1],s[0]),u(a,s[2],s[0]),h(l,i,a);const m=d(n,l);if(m<r)return null;u(o,t,s[0]);const g=d(o,l);if(g<0||g>m)return null;h(c,o,n);const p=d(i,c);if(p<0||g+p>m)return null;const y=d(a,c)/m;return e[0]=t[0]+y*i[0],e[1]=t[1]+y*i[1],e[2]=t[2]+y*i[2],e}function vi(e){const t=4;e||console.error("b3dmBuffer is not defined.");const i=new Uint8Array(e),s=Cesium.getStringFromTypedArray(i,0,4);"b3dm"!==s&&console.error(`Invalid magic, expected "b3dm", got: "${s}".`);const r=new DataView(e);let n=4;const a=r.getUint32(n,!0);1!==a&&console.error(`Invalid version, only "1" is valid, got: "${a}".`),n+=t;const o=r.getUint32(n,!0);n+=t;let l=r.getUint32(n,!0);n+=t;let c=r.getUint32(n,!0);n+=t;let h=r.getUint32(n,!0);n+=t;let u,d=r.getUint32(n,!0);n+=t,h>=570425344?(n-=2*t,u=l,h=c,d=0,l=0,c=0):d>=570425344&&(n-=t,u=h,h=l,d=c,l=0,c=0),n+=h,n+=d,n+=l,n+=c,0!==d&&console.error("The length of the binary BatchTable is not zero, currently only JSON based BatchTables are supported");const m=new Uint8Array(e,n,o-n);return{header:{magic:s,version:a,batchLength:u},batchTable:null,binaryGLTF:m}}function Li(e){const t=4;function i(e){const t=Cesium.getMagic(e);return"glTF"===t}i(e)||console.error("bgltf is not a valid Binary glTF file.");const s=new DataView(e.buffer,e.byteOffset,e.byteLength);let r=t;const n=s.getUint32(r,!0);if(1!==n&&2!==n&&console.error(`Only Binary glTF version 1 is supported.  Version ${n} is not.`),1===n){r+=t;const i=s.getUint32(r,!0);console.log("len",i),r+=t;const a=s.getUint32(r,!0);r+=t;const o=s.getUint32(r,!0);0!==o&&console.error("content format should be 0 (-> JSON)");const l=20+a;r+=t;const c=r,h=c+a,u=Cesium.getStringFromTypedArray(e,c,a),d=e.subarray(l,i);return{glTF:JSON.parse(u),binaryOffset:h,binaryData:d,version:n,contentLength:a}}let a=null;r+=t;const o=s.getUint32(r,!0);let l,c=12;while(c<o){const t=new DataView(e.buffer,e.byteOffset+c,8),i=t.getInt32(0,!0),s=t.getInt32(4,!0);c+=8;const r=e.subarray(c,c+i);if(c+=i,1313821514===s){const e=Cesium.getStringFromTypedArray(r);a=JSON.parse(e)}else 5130562===s&&(l=r)}return{glTF:a,version:n,binaryData:l}}function Mi(e){const t=[],i=e.meshes;for(const s in i){if(!i.hasOwnProperty(s))continue;const r=i[s].primitives;for(let i=0;i<r.length;i++){const s=r[i].mode;if(4!=s){console.log(`Unknown mode: ${s}`);continue}const n=r[i].attributes.POSITION,a=e.accessors[n],o=a.bufferView,l=void 0!==r[i].attributes.BATCHID&&null!==r[i].attributes.BATCHID?r[i].attributes.BATCHID:r[i].attributes._BATCHID,c=e.accessors[l],h=c.bufferView,u={positionAccessor:a,positionBufferView:e.bufferViews[o],batchIdAccessor:c,batchIdBufferView:e.bufferViews[h]};t.push(u)}}return t}function bi(e){const t=[];for(let i=0;i<e.length;i+=3){const s=[];s.push(e[i]),s.push(e[i+1]),s.push(e[i+2]),t.push(s)}return t}function wi(e,t,i,s,r,n){const a=new Array(3);let o=new Cesium.Matrix4;new Cesium.Matrix4;const l=Object.keys(n.glTF.nodes);o=Cesium.Matrix4.fromArray(n.glTF.nodes[l[0]].matrix,0,o);for(let g=0;g<3;g++)a[g]=e.getFloat32(t+i*g,!0);let c=new Cesium.Cartesian3;c=Cesium.Matrix4.multiplyByPoint(o,new Cesium.Cartesian3(a[0],a[1],a[2]),c);const h=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationX(Cesium.Math.PI_OVER_TWO));let u=new Cesium.Cartesian3;u=Cesium.Matrix4.multiplyByPoint(h,c,u);const d=Cesium.Cartesian3.fromArray(r.center,0);let m=new Cesium.Cartesian3;return m=Cesium.Cartesian3.add(d,u,m),[m.x,m.y,m.z]}function Ti(e,t,i,s){function r(e){const t=e.componentType;switch(t){case 5120:case 5121:return 1;case 5122:case 5123:return 2;case 5126:return 4}}const n=i.glTF.extensions.CESIUM_RTC,a=(Cesium.Cartographic.fromCartesian(new Cesium.Cartesian3(n.center[0],n.center[1],n.center[2])),i.contentLength,[]);for(let o=0;o<t.length;o++){const e=t[o];if(e.batchIdAccessor.min[0]<=s&&e.batchIdAccessor.max[0]>=s){const t=r(e.positionAccessor),o=r(e.batchIdAccessor);let l,c;1===i.version?(l=null!=e.positionAccessor.byteStride?e.positionAccessor.byteStride:t,c=null!=e.batchIdAccessor.byteStride?e.batchIdAccessor.byteStride:o):(l=null!=e.positionBufferView.byteStride?e.positionBufferView.byteStride:t,c=null!=e.batchIdBufferView.byteStride?e.batchIdBufferView.byteStride:o);const h=e.positionBufferView,u=e.batchIdBufferView,d=new DataView(i.binaryData.buffer,i.binaryData.byteOffset+u.byteOffset,u.byteLength),m=new DataView(i.binaryData.buffer,i.binaryData.byteOffset+h.byteOffset,h.byteLength),g=null!=e.positionAccessor.byteOffset?e.positionAccessor.byteOffset:0;for(let r=0,p=e.batchIdAccessor.byteOffset;r<e.batchIdAccessor.count;r++,p+=c){const e=d.getUint16(p,!0);if(e===s){const e=wi(m,g+r*l,t,l,n,i);a.push(e)}}}}return a}function Si(e,t){function i(e,t){let i,s=0;for(i=0;i<e.length;i++)s+=Math.pow(e[i]-t[i],2);return s}let s,r=99999999999;for(let n=0;n<t.length;n++){const a=fi([],e.origin,e.direction,t[n]);if(null!=a){const t=i(e.origin,a);r>=t&&(r=t,s=a)}}return null==s?(console.error("No intersection found!"),null):s}function Ci(e,t,i,s){return Cesium.Resource.fetchArrayBuffer({url:e}).then(e=>{const r=vi(e),n=r.binaryGLTF,a=Li(n),o=Mi(a.glTF),l=Ti(n,o,a,t),c=bi(l),h={origin:[i.origin.x,i.origin.y,i.origin.z],direction:[i.direction.x,i.direction.y,i.direction.z]},u=Si(h,c);if(u)return Cesium.Cartesian3.fromElements(u[0],u[1],u[2],s)}).otherwise(e=>{console.error(e)})}var ki=i(443),Ei=i.n(ki);class Ii extends gt{constructor(e){super(e),this.specificImpl={},this.active=this.activeOnStartup,this.options.commonLayer=this}getImplementation(e){const t=e.id;return this.specificImpl[t]||(this.specificImpl[t]=this.getImplementationObject(e.className)),this.specificImpl[t]}getImplementationObject(e){return oe.specificLayerImpl[e]&&oe.specificLayerImpl[e][this.className]?new oe.specificLayerImpl[e][this.className](this.options):null}isCommonLayer(){return!0}initialize(){this.initialized=!0}synchronizeImplementations(e,t){let i=Promise.resolve();if(e){const t=this.getImplementation(e);t&&(i=i.then(()=>{return t.mapDeactivated(e)}))}if(t){const e=this.getImplementation(t);e&&(i=i.then(()=>{return e.mapActivated(t)}))}return i}activate(e){return new Promise(t=>{const i=this.framework.getActiveMap(),s=this.getImplementation(i);if(s&&this.isSupported(i)){var r=s.initialized;if(e!==s.isActive())if(e){const i=s.initialize();if(i){const n=function(){this.initialize(),s.show(),this.sendLayerEvents(e,r),t()}.bind(this);i.then(n).catch(n)}else this.initialize(),s.show(),this.sendLayerEvents(e,r),t()}else{for(var n in this.specificImpl)this.specificImpl[n]&&this.specificImpl[n].initialized&&this.specificImpl[n].hide();this.sendLayerEvents(e,r),t()}else t()}else if(e)t();else{for(var n in this.specificImpl)this.specificImpl[n]&&this.specificImpl[n].initialized&&this.specificImpl[n].hide();this.sendLayerEvents(e,r),t()}})}setStyle(e,t){super.setStyle(e,t),Object.values(this.specificImpl).forEach(e=>{e&&e.updateStyle(t)})}sendLayerEvents(e,t){(e!==this.active||!t&&e)&&(this.active=e,e?this.framework.publish(I.LAYER_ACTIVATED,this):this.framework.publish(I.LAYER_DEACTIVATED,this),this.framework.publish(I.LAYER_CHANGED,this))}dispose(){for(const e in this.specificImpl)this.specificImpl[e]&&this.specificImpl[e].dispose();this.initialized=!1,this.active=!1,this.framework.removeLayer(this)}}var Di=Ii;let Pi=K.interactionTypeCounter;const Oi={NONE:Pi=K.getNextBit(Pi),SELECT:Pi=K.getNextBit(Pi),TRANSLATE:Pi=K.getNextBit(Pi),ROTATE:Pi=K.getNextBit(Pi),SCALE:Pi=K.getNextBit(Pi),CREATE:Pi=K.getNextBit(Pi),EDIT:Pi=K.getNextBit(Pi),REMOVEVERTEX:Pi=K.getNextBit(Pi),TRANSLATEVERTEX:Pi=K.getNextBit(Pi),PAINTBUCKET:Pi=K.getNextBit(Pi),PIPETTE:Pi=K.getNextBit(Pi),FEATUREMODES:0,GEOMETRYMODES:0,PROPAGATEONSELECT:0};Oi.FEATUREMODES=Oi.SELECT|Oi.TRANSLATE|Oi.ROTATE|Oi.SCALE|Oi.PAINTBUCKET|Oi.PIPETTE,Oi.GEOMETRYMODES=Oi.CREATE|Oi.EDIT|Oi.REMOVEVERTEX|Oi.TRANSLATEVERTEX,Oi.PROPAGATEONSELECT=Oi.TRANSLATE|Oi.PAINTBUCKET|Oi.PIPETTE;const Yi={EDITING:Pi=K.getNextBit(Pi),EDITABLE:Pi=K.getNextBit(Pi),VERTEX:Pi=K.getNextBit(Pi),HEIGHTVERTEX:Pi=K.getNextBit(Pi)},xi={none:Oi.NONE,select:Oi.SELECT,translate:Oi.TRANSLATE,rotate:Oi.ROTATE,scale:Oi.SCALE,create:Oi.CREATE,edit:Oi.EDIT,removeVertex:Oi.REMOVEVERTEX,translateVertex:Oi.TRANSLATEVERTEX,paintBucket:Oi.PAINTBUCKET,pipette:Oi.PIPETTE,geometryModes:Oi.GEOMETRYMODES,featureModes:Oi.FEATUREMODES},Ai={CLAMP:1,ABSOLUTE:2,ZPLANE:4},ji={clampToGround:Ai.CLAMP,absolute:Ai.ABSOLUTE,zPlane:Ai.ZPLANE},Fi={both:Cesium.ClassificationType.BOTH,terrain:Cesium.ClassificationType.TERRAIN,cesium3DTile:Cesium.ClassificationType.CESIUM_3D_TILE},Ni={[Fi.both]:"both",[Fi.terrain]:"terrain",[Fi.cesium3DTile]:"cesium3DTile"};function Hi(e,t){if(e.image&&e.image.src&&/^data:/.test(e.image.src))if(t){let i=t.indexOf(e.image.src);-1===i&&(t.push(e.image.src),i=t.length-1),e.image.src=`:${i}`}else e.image={radius:5};return e}function Ri(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[G.configContentSymbol]?t.style=e.getReference():e instanceof Je?t.style=Hi(e.getOptions(),t.embeddedIcons):e instanceof it&&(t.style=e.getOptions()),t}var zi=Ri;ct.VECTOR=ct.lastLayerId++,I.FEATURE_REMOVED="FEATURE_REMOVED";const Gi=Symbol("alreadyTransformedToMercator"),Vi=Symbol("alreadyTransformedToImage"),Bi=Symbol("imageGeometryChanged"),Ui=Symbol("obliqueGeometry"),Wi=Symbol("doNotTransform"),qi=Symbol("OriginalFeature");class Ji extends Di{static get className(){return"vcs.vcm.layer.Vector"}static get alreadyTransformedToMercator(){return Gi}static get alreadyTransformedToImage(){return Vi}static get imageGeometryChanged(){return Bi}static get obliqueGeometry(){return Ui}static get doNotTransform(){return Wi}static get originalFeatureSymbol(){return qi}constructor(e){e.layertype=e.layertype?e.layertype:ct.VECTOR,e.className=e.className?e.className:Ji.className,super(e),this.source=new ol.source.Vector({}),this.projection=new S(e.projection),this.maxResolution=null!=e.maxResolution?e.maxResolution:null,this.minResolution=null!=e.minResolution?e.minResolution:null,this.dontUseTerrainForOblique=!!e.dontUseTerrainForOblique,this.sourceProjection=this.projection.getProjection(),this._altitudeMode=e.altitudeMode||"relativeToGround",this._skirt=Object(c["g"])(e.skirt,null),this._storeyHeight=Object(c["g"])(e.storeyHeight,null),this._classificationType=e.classificationType,this.balloonHeightOffset=Object(c["h"])(e.balloonHeightOffset,10),this.zIndex=Object(c["h"])(e.zIndex,50),this.zCoordinateEyeOffset=Object(c["h"])(e.zCoordinateEyeOffset,0),this.heightAboveGround=null!=e.heightAboveGround?e.heightAboveGround:null,this.scaleByDistance=e.scaleByDistance||null,this.internalProjection=S.createMercatorProjection(),this.destinationProjection=this.internalProjection.getProjection(),this.highlightStyle=e.highlightStyle?new Je(e.highlightStyle):null,this.featureVisibility=e.featureVisibility||new nt,this.hasFeatureUUID=!1,this.visibility=!0,this.isDynamic=e.isDynamic,this.FVlastUpdated=0,this._onStyleChangeRemover=null}get altitudeMode(){return this._altitudeMode}set altitudeMode(e){this._altitudeMode=e,Object.values(this.specificImpl).forEach(t=>{t.olLayer&&t.olLayer.set("olcs_altitudeMode",e)})}get skirt(){return this._skirt}set skirt(e){this._skirt=e,Object.values(this.specificImpl).forEach(t=>{t.olLayer&&t.olLayer.set("olcs_skirt",e)})}get storeyHeight(){return this._storeyHeight}set storeyHeight(e){this._storeyHeight=e,Object.values(this.specificImpl).forEach(t=>{t.olLayer&&t.olLayer.set("olcs_storeyHeight",e)})}get classificationType(){return this._classificationType}set classificationType(e){this._classificationType=e,Object.values(this.specificImpl).forEach(t=>{t.olLayer&&t.olLayer.set("olcs_classificationType",e)})}initialize(){super.initialize(),this._trackStyleChanges()}getVcsMeta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={version:dt};if(this.skirt&&(t.skirt=this.skirt),this.storeyHeight&&(t.storeyHeight=this.storeyHeight),this.classificationType&&(t.classificationType=this.classificationType),this.altitudeMode&&(t.altitudeMode=this.altitudeMode),e.embedIcons&&(t.embeddedIcons=[]),e.writeStyle){const i=this.getStyleOrDefaultStyle(this.options.activeStyleName||this.options.style);!e.writeDefaultStyle&&Ei()(i.getOptions(),this.style.getOptions())||zi(this.style,t)}return t}setVcsMeta(e){e.skirt!==this.skirt&&(this.skirt=e.skirt),e.storeyHeight!==this.storeyHeight&&(this.storeyHeight=e.storeyHeight),e.altitudeMode&&e.altitudeMode!==this.altitudeMode&&(this.altitudeMode=e.altitudeMode),e.classificationType!==this.classificationType&&(this.classificationType=e.classificationType)}getStyleOrDefaultStyle(e,t){return super.getStyleOrDefaultStyle(e,t||Ke.clone())}setStyle(e,t){super.setStyle(e,t),this._trackStyleChanges();const i=e instanceof it;this.getFeatures().forEach(e=>{e[We]&&(i?this.featureVisibility.highlightedObjects[e.getId()]&&this.featureVisibility.highlightedObjects[e.getId()].features.has(e)?this.featureVisibility.highlightedObjects[e.getId()].features.set(e,void 0):e.setStyle(void 0):e.getStyle()?this.featureVisibility.highlightedObjects[e.getId()]&&this.featureVisibility.highlightedObjects[e.getId()].features.has(e)&&this.featureVisibility.highlightedObjects[e.getId()].features.set(e,e[We].style):e.setStyle(e[We].style))})}_trackStyleChanges(){this._onStyleChangeRemover&&(this._onStyleChangeRemover(),this._onStyleChangeRemover=null);const e=this.style instanceof it;this._onStyleChangeRemover=this.style.styleChanged.addEventListener(()=>{this.getFeatures().forEach(t=>{!e&&t[We]||t.changed()})})}setHighlightStyle(e){a(e,[ol.style.Style,Je,Function]),e instanceof Je?this.highlightStyle=e:(this.highlightStyle||(this.highlightStyle=new Je({})),this.highlightStyle.style=e)}postRenderStyling(){if(this.FVlastUpdated<this.featureVisibility.lastUpdated||this.FVlastUpdated<this.globalHider.lastUpdated){if(this.visibility){const e=Object.keys(this.featureVisibility.highlightedObjects),t=e.length;for(let r=0;r<t;r++){const t=e[r];if(!this.featureVisibility.hiddenObjects[t]){const e=this.getFeatureById(t);e&&(this.featureVisibility.highlightedObjects[t].features.has(e)||this.featureVisibility.highlightedObjects[t].features.set(e,e.getStyle()),e.getStyle()!==this.featureVisibility.highlightedObjects[t].style.style&&e.setStyle(this.featureVisibility.highlightedObjects[t].style.style))}}const i=Object.keys(this.featureVisibility.hiddenObjects),s=i.length;for(let r=0;r<s;r++){const e=i[r],t=this.getFeatureById(e);t&&!this.featureVisibility.hiddenObjects[e].has(t)&&(t.setStyle(xe.clone()),this.featureVisibility.hiddenObjects[e].add(t))}if(this.hasFeatureUUID){const e=Object.keys(this.globalHider.hiddenObjects),t=e.length;for(let i=0;i<t;i++){const t=e[i],s=this.getFeatureById(t);s&&!this.globalHider.hasFeature(t,s)&&(s.setStyle(xe.clone()),this.globalHider.addFeature(t,s))}}}this.FVlastUpdated=Date.now()}}getSource(){return this.source}updateGeometryOfFeature(e,t){t=t.transform(this.sourceProjection,this.destinationProjection);const i=this.source.getFeatureById(e);i&&i.setGeometry(t)}addFeatures(e){const t=[];let i=null;const s=this.style instanceof it;for(let r=0;r<e.length;r++){if(i=e[r],null==i.getId())i.setId(Object(c["c"])());else{this.hasFeatureUUID=!0;const e=i.getId();if(e&&this.getFeatureById(e.toString())){t.push(e.toString());continue}}if(this.projection.getEPSG()!==this.internalProjection.getEPSG()){const e=i.getGeometry();e&&(e[Ji.alreadyTransformedToMercator]||(e.transform(this.sourceProjection,this.destinationProjection),e[Ji.alreadyTransformedToMercator]=!0))}this.zCoordinateEyeOffset&&!i.get("olcs_zCoordinateEyeOffset")&&i.set("olcs_zCoordinateEyeOffset",this.zCoordinateEyeOffset,!1),this.heightAboveGround&&!i.get("olcs_heightAboveGround")&&i.set("olcs_heightAboveGround",this.heightAboveGround,!1),this.scaleByDistance&&!i.get("olcs_scaleByDistance")&&i.set("olcs_scaleByDistance",this.scaleByDistance,!1),i[gt.vcsLayerNameSymbol]=this.name,s&&i[We]&&i.setStyle(),this.source.addFeature(i),t.push(i.getId())}return this.FVlastUpdated=0,t}removeFeaturesById(e){const t=this.getFeaturesById(e);for(let i=0;i<t.length;i++)this.source.removeFeature(t[i]),delete t[gt.vcsLayerNameSymbol]}removeAllFeatures(){this.source.clear()}getFeaturesById(e){const t=[];let i,s=null;for(let r=0;r<e.length;r++)i=e[r],s=this.getFeatureById(i),s&&t.push(s);return t}getFeatureById(e){-1!==String(e).indexOf("_OBLIQUE")&&(e=String(e).split("_OBLIQUE")[0]);const t=this.source.getFeatureById(e);return t}getFeatures(){return this.source.getFeatures()}setVisibility(e){const t=this.getImplementation(this.framework.getActiveMap());t&&t.setVisibility(e),this.visibility=e}determineHighlightStyle(e,t){const i=t||this.source.getFeatureById(e);return i?this.highlightStyle?this.highlightStyle:this.framework.getSelectBehavior().determineDefaultVectorHighlightStyle(e,i,this):(this.logger.warning("No object found to highlight."),null)}objectClickedHandler(e,t,i){if(this.allowPicking){e=this.getFeatureById(e.getId());const s=e.getId();return this.raiseFeatureEvent(t,s,e,i||this),!0}return!1}getGenericFeatureFromClickedObject(e){if(!(e instanceof ol.Feature))return null;const t=e.getProperties();delete t[e.getGeometryName()];let i=e.clickedPosition;const s=e.getGeometry();if(s&&("Point"===s.getType()||i&&!i.exactPosition||!i&&s)){const e=ol.extent.getCenter(s.getExtent());e&&(S.mercatorToWgs84(e,!0),i={longitude:e[0],latitude:e[1]})}let r=Vt(e,this.storeyHeight).max,n=!1;const a=e.get("olcs_altitudeMode")||this.altitudeMode;return r&&(ji[a]===Ai.ABSOLUTE||e.get("olcs_extrudedHeight")||e.get("olcs_storeyNumber"))||(r=this.heightAboveGround,n=!0),r+=this.balloonHeightOffset,delete t.clickedPosition,{layerName:this.name,layerClass:this.className,attributes:Object.assign({},this._genericFeatureProperties,t),longitude:i.longitude,latitude:i.latitude,height:r,relativeToGround:n}}isVisible(){return this.logger.deprecate("isVisible","Access the property visibility directly"),this.visibility}getZCoordinateEyeOffset(){return this.logger.deprecate("zCoordinateEyeOffset","Access the property zCoordinateEyeOffset directly"),this.zCoordinateEyeOffset}getHeightAboveGround(){return this.logger.deprecate("getHeightAboveGround","Access the property heightAboveGround directly"),this.heightAboveGround}getZIndex(){return this.zIndex}getAltitudeMode(){return this.logger.deprecate("altitudeMode","Access the property altitudeMode directly"),this.altitudeMode}getScaleByDistance(){return this.logger.deprecate("scaleByDistance","Access the property scaleByDistance directly"),this.scaleByDistance}getProjection(){return this.projection}setProjection(e){this.projection=e}getStyle(){return this.style}getMaxResolution(){return this.maxResolution}getMinResolution(){return this.minResolution}}var Ki=Ji;let Zi=null,Qi=new Cesium.Cartographic,$i=new Cesium.Cartesian3,Xi=new Cesium.Cartesian3;class es extends ie{constructor(){super(),this.activeMapHandler=this.pipeThrough,this._pickPosition=Q.CLICK,this._pickPositionMask=-1,this.pickTranslucent=!0,this.pullPickedPosition=0,this.hitTolerance=10,this._defaultModificationKey=Z.ALL,this._defaultActive=Q.ALL^Q.MOVE,this.setActive()}get pickPosition(){return this._pickPosition}set pickPosition(e){this._pickPosition=e&this._pickPositionMask}get excludedPickPositionEvents(){return~this._pickPositionMask}set excludedPickPositionEvents(e){this._pickPositionMask=~e}pipe(e){return e.type&Q.DRAG&&!(this._pickPosition&Q.DRAG)?(Zi&&(e.feature=Zi),Promise.resolve(e)):(e.type&Q.DRAGEND&&(Zi=null),this.activeMapHandler(e).then(t=>{return e.type&Q.DRAGSTART&&t.feature&&(Zi=t.feature),e.type&Q.DRAG&&Zi&&(e.feature=Zi),Promise.resolve(e)}))}handleMapChange(e){this.activeMapHandler=e instanceof _i?this._openlayersHandler.bind(this,e):e instanceof ui?this._obliqueHandler.bind(this,e):e instanceof Mt?this._cesiumHandler.bind(this,e):this.pipeThrough}setActive(e){"undefined"===typeof e&&(this.pickPosition=Q.CLICK,this.pullPickedPosition=0),super.setActive(e)}_openlayersHandler(e,t){let i=null,s=null;return e.ol3map.forEachFeatureAtPixel([t.windowPosition.x,t.windowPosition.y],(e,t)=>{return!e||null!=e.get("olcs_allowPicking")&&!0!==e.get("olcs_allowPicking")||(i=e,s=t),!0},{hitTolerance:this.hitTolerance}),i&&s&&(t.feature=i,i.get("features")&&(t.feature[gt.vcsLayerNameSymbol]=s.get("name")),t.exactPosition=!0),Promise.resolve(t)}_obliqueHandler(e,t){let i=null,s=null;return e.getOl3Map().forEachFeatureAtPixel([t.windowPosition.x,t.windowPosition.y],(e,t)=>{return e&&(i=e.get("features")&&!e[Ki.originalFeatureSymbol]?e:e[Ki.originalFeatureSymbol]),s=t,!0},{hitTolerance:this.hitTolerance}),i&&s&&(t.feature=i,i.get("features")&&(t.feature[gt.vcsLayerNameSymbol]=s.get("name")),t.exactPosition=!0),Promise.resolve(t)}_cesiumHandler(e,t){const i=e.getScene(),s=i.pick(t.windowPosition,this.hitTolerance,this.hitTolerance),r=()=>{return $i?(this.pullPickedPosition&&t.ray&&(Xi=Cesium.Cartesian3.multiplyByScalar(t.ray.direction,this.pullPickedPosition,Xi),$i=Cesium.Cartesian3.subtract($i,Xi,$i)),Qi=Cesium.Cartographic.fromCartesian($i,i.globe.ellipsoid,Qi),t.position=S.wgs84ToMercator([Cesium.Math.toDegrees(Qi.longitude),Cesium.Math.toDegrees(Qi.latitude),Qi.height],!0),t.positionOrPixel=t.position,i.pickTranslucentDepth=!1,Promise.resolve(t)):($i=new Cesium.Cartesian3,Promise.resolve(t))};if(s){if(s.primitive&&s.primitive.olFeature)t.feature=s.primitive.olFeature;else if(s.primitive&&s.primitive[gt.vcsLayerNameSymbol]&&(s instanceof Cesium.Cesium3DTileFeature||s instanceof Cesium.Cesium3DTilePointFeature)){t.feature=s;const e=Object.getOwnPropertySymbols(s.primitive),i=e.length;for(let r=0;r<i;r++)t.feature[e[r]]=s.primitive[e[r]]}else if(s.id&&s.id.olFeature)t.feature=s.id.olFeature;else if(s.id&&s.id[gt.vcsLayerNameSymbol])t.feature=s,t.feature[gt.vcsLayerNameSymbol]=s.id[gt.vcsLayerNameSymbol];else if(Array.isArray(s.id)){if(1!==s.id.length)return Qi=Cesium.Cartographic.fromCartesian(s.primitive.position,null,Qi),t.position=S.wgs84ToMercator([Cesium.Math.toDegrees(Qi.longitude),Cesium.Math.toDegrees(Qi.latitude),Qi.height],!0),t.positionOrPixel=t.position,t.feature=new ol.Feature({geometry:new ol.geom.Point(t.position),features:s.id.map(e=>e.olFeature)}),t.feature[gt.vcsLayerNameSymbol]=s.id[0].olLayer.get("layerName"),Promise.resolve(t);t.feature=s.id[0].olFeature}else t.feature=s;if(!(t.type&this.pickPosition))return Promise.resolve(t);if(i.pickPositionSupported)return s.primitive&&this.pickTranslucent&&(i.pickTranslucentDepth=!0,i.render(e.getViewer().clock.currentTime),t.exactPosition=!0),$i=i.pickPosition(t.windowPosition,$i),r();if(s.content&&s.content.url&&null!=s._batchId){const e=t.ray||i.camera.getPickRay(t.windowPosition);return Ci(s.content.url,s._batchId,e,$i).then(e=>{return e?r():Promise.resolve(t)})}}return Promise.resolve(t)}}var ts=es;class is extends ie{constructor(e){super(),this.events=Object.assign({},e||I),this._defaultActive=Q.CLICK,this._defaultModificationKey=Z.NONE|Z.CTRL,this.setActive()}pipe(e){if(e.key&Z.CTRL){if(e.feature&&e.feature[gt.vcsLayerNameSymbol]){const t=G.getInstance().getLayerByName(e.feature[gt.vcsLayerNameSymbol]);t.objectClickedHandler(e.feature,I.FEATURE_CTRL_CLICKED)}return Promise.resolve(e)}if(!e.position.every(e=>0===e)){const t=S.mercatorToWgs84(e.position),i=Object(le["a"])(t,3),s=i[0],r=i[1],n=i[2],a={latitude:r,longitude:s,height:n||0};if(e.obliqueParameters&&(a.obliqueParameters=e.obliqueParameters),this.raise(I.CLICKED,a),e.feature&&e.feature[gt.vcsLayerNameSymbol]){a.exactPosition=e.exactPosition,e.feature.clickedPosition=a;const t=G.getInstance().getLayerByName(e.feature[gt.vcsLayerNameSymbol]);t.objectClickedHandler(e.feature,I.FEATURE_CLICKED)}else this.raise(I.MAP_CLICKED,a)}return Promise.resolve(e)}raise(e){if(this.events[e]){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];G.getInstance().publish(e,...i)}}}var ss=is;const rs=new pi,ns=new ts,as=new ss,os=new re([rs,ns,as]);let ls=null;class cs{constructor(){this.listeners=[],this.clickDuration=400,this.dragDuration=100,this._lastDown=null,this._lastClick={time:null,windowPosition:new Cesium.Cartesian2},this._dragging=null,this._running=!1,this._eventQueue=[];const e=G.getInstance();e.subscribe("MAP_ACTIVATED",this.handleMapChange,this),this.handleMapChange(G.getInstance().getActiveMap()),os.initialize();const t=()=>{this._dragging=null,this._lastClick.time=null,this._lastDown=null,this._multiples=!1};e.getMapContainer().addEventListener("mouseout",t),this.removeMapContainerEventListener=()=>{e.getMapContainer().removeEventListener("mouseout",t)},this._exclusiveInteraction=null,this._exclusiveFrameworkKey=null,this._multiples=!1}get positionInteraction(){return rs}get featureInteraction(){return ns}get eventEmitter(){return as}get interactions(){return os.chain.slice()}addExclusiveInteraction(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,s=arguments.length>3?arguments[3]:void 0;return a(e,ie),a(t,Function),a(i,Number),o(s,String),this._exclusiveInteraction&&this._exclusiveInteraction.id!==s&&this._removeExclusive(),e.handleMapChange(G.getInstance().getActiveMap()),os.addInteraction(e,i),this._exclusiveInteraction?(this._exclusiveInteraction.interactions.push(e),this._exclusiveInteraction.cb.push(t)):this._exclusiveInteraction={id:s||Object(c["c"])(),cb:[t],interactions:[e]},null===this._exclusiveFrameworkKey&&(this._exclusiveFrameworkKey=G.getInstance().subscribeExclusive(I.CLICKED,()=>{},"vcs:EventHandler",this._removeExclusive.bind(this))),this._exclusiveUnListen.bind(this,e,this._exclusiveInteraction.id)}_removeExclusive(){this._exclusiveInteraction&&(this._exclusiveInteraction.interactions.filter(e=>e).forEach(e=>{os.removeInteraction(e)}),this._exclusiveInteraction.cb.filter(e=>e).forEach(e=>{e()}),this._exclusiveInteraction=null)}_exclusiveUnListen(e,t){if(!this._exclusiveInteraction||this._exclusiveInteraction&&this._exclusiveInteraction.id!==t)return 0;const i=os.removeInteraction(e),s=this._exclusiveInteraction.interactions.findIndex(t=>t&&t.id===e.id);return s>-1&&(this._exclusiveInteraction.interactions.splice(s,1,void 0),this._exclusiveInteraction.cb.splice(s,1,void 0)),this._exclusiveInteraction.interactions.every(e=>void 0===e)&&(this._exclusiveInteraction=null,G.getInstance().unsubscribeByKey(this._exclusiveFrameworkKey),this._exclusiveFrameworkKey=null),-1!==i?1:0}addPersistentInteraction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return a(e,ie),a(t,Number),e.handleMapChange(G.getInstance().getActiveMap()),os.addInteraction(e,t),()=>-1!==os.removeInteraction(e)?1:0}handleMapChange(e){this.listeners.forEach(e=>{e()}),this.listeners.splice(0),e instanceof _i||e instanceof ui?this._setupOpenlayersHandlers(e):e instanceof Mt&&this._setupCesiumHandlers(e),os.handleMapChange(e)}_mouseDown(e,t,i){if(this._lastDown)return void(this._multiples=!0);const s=e(t,i);0===s.windowPosition.x&&0===s.windowPosition.y||(this._lastDown=s,this._lastDown.time=Date.now())}_mouseUp(e,t,i){const s=e(t,i);return s.multipleTouch?(this._multiples=!0,void(this._lastDown=null)):this._multiples?(this._lastDown=null,void(this._multiples=!1)):(this._dragging?(s.type=Q.DRAGEND,s.key=this._dragging.key,s.pointer=this._dragging.pointer,this._startChain(s)):this._lastDown&&(this._lastClick.time&&Date.now()-this._lastClick.time<this.clickDuration&&Cesium.Cartesian2.distanceSquared(this._lastClick.windowPosition,s.windowPosition)<12?(this._lastClick.time=null,s.type=Q.DBLCLICK):(this._lastClick.time=Date.now(),Cesium.Cartesian2.clone(s.windowPosition,this._lastClick.windowPosition),s.type=Q.CLICK),this._startChain(s)),this._dragging=null,void(this._lastDown=null))}_mouseMove(e,t,i){let s=e(t,i);this._lastDown?this._dragging?(s.type=Q.DRAG,s.key=this._dragging.key,s.pointer=this._dragging.pointer,this._startChain(s,!0)):!this._dragging&&Date.now()-this._lastDown.time>this.dragDuration&&(s=Object.assign({type:Q.DRAGSTART},this._lastDown),this._dragging=s,this._startChain(s,!0)):(s.type=Q.MOVE,this._startChain(s,!0))}_startChain(e,t){this._running&&t||(this._running?this._eventQueue.push(e):(this._running=!0,os.pipe(e).then(this._endChain.bind(this)).catch(this._endChain.bind(this))))}_endChain(){this._running=!1,this._eventQueue.length>0&&this._startChain(this._eventQueue.shift())}_setupOpenlayersHandlers(e){const t=(e,t)=>{const i={"-1":$.ALL,0:$.LEFT,1:$.MIDDLE,2:$.RIGHT};let s=t.originalEvent.shiftKey?Z.SHIFT:Z.NONE;s=t.originalEvent.ctrlKey?Z.CTRL:s,s=t.originalEvent.altKey?Z.ALT:s,s!==Z.NONE&&t.preventDefault(),t.originalEvent.preventDefault();const r=[t.coordinate[0],t.coordinate[1],0];return{position:r,positionOrPixel:r,windowPosition:Cesium.Cartesian2.fromArray(t.pixel,0,new Cesium.Cartesian2),key:s,pointer:i[t.originalEvent.button||0]}},i=e.getOl3Map(),s=[];s.push(i.on("pointerdown",this._mouseDown.bind(this,t,null))),s.push(i.on("pointerup",this._mouseUp.bind(this,t,null))),s.push(i.on("pointermove",this._mouseMove.bind(this,t,null))),this.listeners=s.map(e=>()=>{ol.Observable.unByKey(e)})}_setupCesiumHandlers(e){const t={[Cesium.KeyboardEventModifier.ALT]:Z.ALT,[Cesium.KeyboardEventModifier.CTRL]:Z.CTRL,[Cesium.KeyboardEventModifier.SHIFT]:Z.SHIFT},i=(i,s)=>{let r=i.mod,n=i.pointer;const a=e.eventHandler._positions.length>1;return{windowPosition:s.position||s.endPosition,key:t[r]||Z.NONE,pointer:n,multipleTouch:a}},s={[Cesium.ScreenSpaceEventType.LEFT_DOWN]:{handler:this._mouseDown,pointer:$.LEFT},[Cesium.ScreenSpaceEventType.LEFT_UP]:{handler:this._mouseUp,pointer:$.LEFT},[Cesium.ScreenSpaceEventType.RIGHT_DOWN]:{handler:this._mouseDown,pointer:$.RIGHT},[Cesium.ScreenSpaceEventType.RIGHT_UP]:{handler:this._mouseUp,pointer:$.RIGHT},[Cesium.ScreenSpaceEventType.MIDDLE_DOWN]:{handler:this._mouseDown,pointer:$.MIDDLE},[Cesium.ScreenSpaceEventType.MIDDLE_UP]:{handler:this._mouseUp,pointer:$.MIDDLE},[Cesium.ScreenSpaceEventType.MOUSE_MOVE]:{handler:this._mouseMove,pointer:$.ALL}};Object.keys(s).forEach(r=>{const n=Object.keys(t);n.push(void 0),n.forEach(t=>{const n=s[r],a=n.handler,o=n.pointer;null!=t?(e.eventHandler.setInputAction(a.bind(this,i,{mod:t,pointer:o}),r,t),this.listeners.push(()=>{e.eventHandler.removeInputAction(r,t)})):(e.eventHandler.setInputAction(a.bind(this,i,{mod:t,pointer:o}),r),this.listeners.push(()=>{e.eventHandler.removeInputAction(r)}))})})}static destroy(){ls&&(ls._removeExclusive(),ls.listeners.forEach(e=>{e()}),ls.removeMapContainerEventListener()),ls=null}}var hs=cs;function us(){return null===ls&&(ls=new cs),ls}function ds(e){const t=e.getPropertyNames(),i={};for(let s=0;s<t.length;s++)i[t[s]]=e.getProperty(t[s]);return null==i.id&&(i.id=`${e.content.url}${e._batchId}`),i.attributes?i.attributes.gmlId=i.id:null==i.gmlId&&(i.gmlId=i.id),i.clickedPosition=e.clickedPosition?e.clickedPosition:{},i}const ms=Symbol("_lastUpdated");class gs extends gt{static get className(){return"vcs.vcm.layer.cesium.AbstractCesiumTilesetLayer"}static get lastUpdated(){return ms}constructor(e){super(e),this.url&&!/\.json$/.test(this.url)&&(this.url=`${this.url.replace(/\/$/,"")}/tileset.json`),this.featureVisibility=e.featureVisibility||new nt,this.highlightStyle=e.highlightStyle?new Je(e.highlightStyle):null,this.jumpToLocation=!!e.jumpToLocation,this.screenSpaceError=Object(c["h"])(e.screenSpaceError,16),this.screenSpaceErrorMobile=Object(c["h"])(e.screenSpaceErrorMobile,32),this.maximumMemoryUsage=Object(c["h"])(e.maximumMemoryUsage,16);const t=e.tilesetOptions||{};this.tilesetOptions=Object.assign({url:this.url,maximumScreenSpaceError:this.framework.isMobile()?this.screenSpaceErrorMobile:this.screenSpaceError,maximumMemoryUsage:this.maximumMemoryUsage},t),this._styleLastUpdated=Date.now(),this._loadProgressListener=null}initialize(){this.initialized||(this.cesium3DTileset=new Cesium.Cesium3DTileset(this.tilesetOptions),this.cesium3DTileset[gt.vcsLayerNameSymbol]=this.name,this.cesium3DTileset.tileVisible.addEventListener(this.applyStyle.bind(this)),this.cesium3DTileset.tileUnload.addEventListener(e=>{delete e[gs.lastUpdated]}),this.layerLoadingEventListener=function(e,t){0===e&&0===t?this.framework.getActiveMap().setLayerLoading(this,!1):this.framework.getActiveMap().setLayerLoading(this,!0)}.bind(this),this.jumpToLocation&&this.cesium3DTileset.readyPromise.then(e=>{const t=this.framework.getActiveMap();t.getCesiumWidget().camera.viewBoundingSphere(e.boundingSphere,new Cesium.HeadingPitchRange(0,-2,0)),t.getCesiumWidget().camera.lookAtTransform(Cesium.Matrix4.IDENTITY)}),this.initialized=!0,this.setStyle(this.style))}show(){const e=this.framework.getActiveMap();e&&"vcs.vcm.maps.Cesium"===e.className&&(e.getScene().primitives.contains(this.cesium3DTileset)||e.getScene().primitives.add(this.cesium3DTileset)),this._loadProgressListener||(this._loadProgressListener=this.cesium3DTileset.loadProgress.addEventListener(this.layerLoadingEventListener)),this.cesium3DTileset.show=!0}hide(){this._loadProgressListener&&(this._loadProgressListener(),this._loadProgressListener=null),this.cesium3DTileset.show=!1,this.framework.getActiveMap().setLayerLoading(this,!1)}objectClickedHandler(e,t,i){if(this.allowPicking){const s=ds(e);if(s)return this.raiseFeatureEvent(t,s.id,s,i||this),!0}return!1}getGenericFeatureFromClickedObject(e){const t=Object.assign({},this._genericFeatureProperties,e.attributes||e);return{layerName:this.name,layerClass:this.className,attributes:t,longitude:e.clickedPosition.longitude,latitude:e.clickedPosition.latitude,height:e.clickedPosition.height,relativeToGround:!1}}getCesium3DTileset(){return this.logger.warning("Function getCesium3DTileset is deprecated and will be removed in the next release. Access the property cesium3DTileset directly instead"),this.cesium3DTileset}setStyle(e,t){super.setStyle(e,t),this.initialized&&(this.cesium3DTileset.style=this.style.cesiumStyle,this._onStyleChangeRemover&&this._onStyleChangeRemover(),this._onStyleChangeRemover=this.style.styleChanged.addEventListener(()=>{this.cesium3DTileset.makeStyleDirty(),this._styleLastUpdated=Date.now(),this._lastUpdated=Date.now()}),this._styleLastUpdated=Date.now(),this.featureVisibility.lastUpdated=Date.now(),this.cesium3DTileset.readyPromise.then(()=>{this.cesium3DTileset.colorBlendMode!==this.style.colorBlendMode&&(this.style.colorBlendMode!==Cesium.Cesium3DTileColorBlendMode.HIGHLIGHT?this.cesium3DTileset.extras&&this.cesium3DTileset.extras._3DTILESDIFFUSE&&(this.cesium3DTileset.colorBlendMode=this.style.colorBlendMode):this.cesium3DTileset.colorBlendMode=this.style.colorBlendMode)}))}applyStyle(e){if(e.content instanceof Cesium.Composite3DTileContent)for(let t=0;t<e.content.innerContents.length;t++)this.styleContent(e.content.innerContents[t]);else this.styleContent(e.content)}styleContent(e){if(!e[gs.lastUpdated]||e[gs.lastUpdated]<this.featureVisibility.lastUpdated||e[gs.lastUpdated]<this.globalHider.lastUpdated||e[gs.lastUpdated]<this._styleLastUpdated){const t=e.featuresLength;for(let i=0;i<t;i++){const t=e.getFeature(i);if(t){let s=t.getProperty("id");s||(s=`${e.url}${i}`),this.featureVisibility.highlightedObjects[s]&&((!this.featureVisibility.highlightedObjects[s].features.has(t)||this._styleLastUpdated>e[gs.lastUpdated])&&this.featureVisibility.highlightedObjects[s].features.set(t,t.color.clone()),t.color=this.featureVisibility.highlightedObjects[s].style.cesiumFillColor),this.featureVisibility.hiddenObjects[s]?(this.featureVisibility.hiddenObjects[s].add(t),t.show=!1):this.globalHider.hiddenObjects[s]&&(this.globalHider.addFeature(s,t),t.show=!1)}}e[gs.lastUpdated]=Date.now()}}determineHighlightStyle(){return this.highlightStyle?this.highlightStyle:A.getInstance()._currentItemHighlightColor}setMaximumScreenSpaceError(e){this.cesium3DTileset&&(this.cesium3DTileset.maximumScreenSpaceError=e)}dispose(){if(this.cesium3DTileset){this.hide();const e=this.framework.getMapByType("vcs.vcm.maps.CesiumMap");let t=!1;e&&e.initialized&&(t=e.getScene().primitives.remove(this.cesium3DTileset)),t||this.cesium3DTileset.destroy(),this.cesium3DTileset=null}this.initialized=!1,this.active=!1,this.framework.removeLayer(this)}handleURLParameter(e){e.debug&&(this.cesium3DTileset?(this.cesium3DTileset.debugShowRenderingStatistics=!0,this.cesium3DTileset.debugShowBoundingVolume=!0,this.cesium3DTileset.debugShowContentBoundingVolume=!0):(this.tilesetOptions.debugShowRenderingStatistics=!0,this.tilesetOptions.debugShowBoundingVolume=!0,this.tilesetOptions.debugShowContentBoundingVolume=!0))}}var ps=gs;ct.CESIUM_TILESET_LAYER=ct.lastLayerId,ct.lastLayerId+=1;class ys extends ps{static get className(){return"vcs.vcm.layer.cesium.CesiumTilesetLayer"}constructor(e){e.layertype=e.layertype||ct.CESIUM_TILESET_LAYER,e.className=e.className||ys.className,super(e),this.pickMode=e.pickMode||"topLevelFeature"}}var _s=ys;ct.CESIUM_BUILDINGSLAYER=ct.lastLayerId,ct.lastLayerId+=1;class fs extends _s{static get className(){return"vcs.vcm.layer.cesium.Buildings"}constructor(e){e.layertype=ct.CESIUM_BUILDINGSLAYER,e.className=fs.className,super(e)}}var vs=fs;ct.CESIUM_ENTITIESLAYER=ct.lastLayerId++;class Ls extends gt{static get className(){return"vcs.vcm.layer.cesium.Entities"}constructor(e){e.layertype=ct.CESIUM_ENTITIESLAYER,e.className=e.className||Ls.className,super(e),this.dataSource=e.dataSource||new Cesium.CustomDataSource(this.name),this.entities=this.dataSource.entities}initialize(){if(!this.initialized){const e=this.framework.getActiveMap();e.getDatasources().add(this.dataSource),this.initialized=!0}}getEntities(){return this.logger.deprecate("getEntities","access the entities property directly"),this.entities}getDataSource(){return this.logger.deprecate("getEntities","access the dataSource property directly"),this.dataSource}show(){this.dataSource.show=!0}hide(){this.dataSource.show=!1}dispose(){if(this.entities.removeAll(),this.initialized){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");e&&e.getDatasources().contains(this.dataSource)&&e.getDatasources().remove(this.dataSource)}this.initialized=!1,this.active=!1,this.framework.removeLayer(this)}hideObjects(e){e.forEach(function(e){const t=this.entities.getById(e);t&&(t.show=!1)},this)}showObjects(e){e.forEach(function(e){const t=this.entities.getById(e);t&&(t.show=!0)},this)}addEntity(e,t,i){const s=this.entities.add(e);return s[gt.vcsLayerNameSymbol]=this.name,s.attributes=t||null,s.allowPicking=null!=i?i:this.allowPicking,s.id}flyToEntity(e){const t=this.framework.getActiveMap(),i=this.entities.getById(e);if(!i)return void this.logger.warning("could not find entity on this layer");const s=t.getDataSourceDisplay(),r=t.getScene(),n=r.camera,a=new Cesium.BoundingSphere,o=t.getViewPoint(),l=o.getHeading(),c=o.getPitch(),h=new Cesium.HeadingPitchRange(Cesium.Math.toRadians(l),Cesium.Math.toRadians(c<-45?c:-45),void 0);let u,d=0;function m(){const e=s.getBoundingSphere(i,!0,a);if(e!==Cesium.BoundingSphereState.PENDING){if(e===Cesium.BoundingSphereState.FAILED)return d++,void(d>3&&u());n.flyToBoundingSphere(a,{duration:1,offset:h}),u()}}const g=s.defaultDataSource;if(g.isLoading){let e;e=g.loadingEvent.addEventListener(()=>{u=r.postRender.addEventListener(m),e()})}else u=r.postRender.addEventListener(m)}removeObjectById(e){return this.entities.removeById(e)}objectClickedHandler(e,t,i){if(this.allowPicking&&e.id.allowPicking){const s=e.id.id,r=e.id;return r.clickedPosition=e.clickedPosition,this.raiseFeatureEvent(t,s,r,i||this),!0}return!1}getGenericFeatureFromClickedObject(e){const t=Object.assign({},this._genericFeatureProperties,e.attributes||{});return{layerName:this.name,layerClass:this.className,attributes:t,longitude:e.clickedPosition.longitude,latitude:e.clickedPosition.latitude,height:e.clickedPosition.height,relativeToGround:!1}}}var Ms=Ls;ct.CESIUM_CZMLLAYER=ct.lastLayerId++;class bs extends Ms{static get className(){return"vcs.vcm.layer.cesium.Czml"}constructor(e){e.layertype=ct.CESIUM_CZMLLAYER,e.className=bs.className,e.dataSource=new Cesium.CzmlDataSource,super(e),this._loadedResolve=function(){},this._loadedReject=function(){},this.loaded=new Promise((e,t)=>{this._loadedResolve=e,this._loadedReject=t})}initialize(){if(!this.initialized){super.initialize();const e=this.dataSource.load(this.url);return e.then(this._handleLoaded.bind(this),this._loadedReject),this.initialized=!0,e}}_handleLoaded(){this.entities.values.forEach(e=>{e[gt.vcsLayerNameSymbol]=this.name,e.allowPicking=this.allowPicking}),this._loadedResolve()}}var ws=bs;ct.CESIUM_GLTFLAYER=ct.lastLayerId++;class Ts extends Ms{static get className(){return"vcs.vcm.layer.cesium.Gltf"}constructor(e){e.layertype=ct.CESIUM_GLTFLAYER,e.className=Ts.className,super(e),this.modelConfigs=e.models||[]}initialize(){this.initialized||(super.initialize(),this.modelConfigs.forEach(this.addObject,this))}addObject(e){const t=this.getEntityOptionsFromModel(e);if(!t)return null;let i={uri:t.url,scale:t.scale};i=e.modelOptions?Object.assign({},e.modelOptions,i):i;const s={name:t.url,position:t.position,orientation:t.orientation,show:t.show,model:i};return this.addEntity(s,t.attributes,t.allowPicking)}getEntityOptionsFromModel(e){const t={};if("string"!==typeof e.url)return this.logger.warning(`Could not find URL for model ${e}`),null;t.url=e.url;const i=[e.longitude,e.latitude,e.height].every(e=>Number.isFinite(e));if(!i)return this.logger.warning(`Could not find longitude/latitude/height for model${e}`),null;t.position=Cesium.Cartesian3.fromDegrees(e.longitude,e.latitude,e.height);let s=0;Number.isFinite(e.heading)?s=e.heading/180*Math.PI:Number.isFinite(e.rotation)&&(s=e.rotation/180*Math.PI);let r=0;Number.isFinite(e.pitch)&&(r=e.pitch/180*Math.PI);let n=0;Number.isFinite(e.roll)&&(n=e.roll/180*Math.PI);const a=new Cesium.HeadingPitchRoll(s,r,n);return t.orientation=Cesium.Transforms.headingPitchRollQuaternion(t.position,a),t.scale=1,Number.isFinite(e.scale)&&(t.scale=e.scale),t.attributes={},e.attributes&&(t.attributes=e.attributes),t.allowPicking=null==e.allowPicking||e.allowPicking,t.show=null==e.show||e.show,t}updateEntityById(e,t){const i=this.entities.getById(e),s=this.getEntityOptionsFromModel(t);i&&s&&(i.model.scale=s.scale,i.orientation=s.orientation,i.position=s.position,i.attributes=s.attributes,i.allowPicking=s.allowPicking)}}var Ss=Ts;ct.CESIUM_POINTCLOUDLAYER=ct.lastLayerId,ct.lastLayerId+=1;const Cs=new it({});class ks extends ps{static get className(){return"vcs.vcm.layer.cesium.PointCloud"}constructor(e){e.layertype=ct.CESIUM_POINTCLOUDLAYER,e.className=ks.className,super(e),this.defaultPointSize=null!=e.pointSize?e.pointSize:null,this._pointSize=this.defaultPointSize}getStyleOrDefaultStyle(e,t){return super.getStyleOrDefaultStyle(e,t||Cs)}set pointSize(e){o(e,[Number,String]),this._pointSize=e,this._assignPointSize()}get pointSize(){return this._pointSize}initialize(){super.initialize(),this._assignPointSize()}clearStyle(){super.clearStyle(),this.pointSize=this.defaultPointSize}setStyle(e,t){e instanceof Je?this.logger.warning("trying to apply vector style to point cloud layer."):super.setStyle(e,t)}_assignPointSize(){this.initialized&&(this.cesium3DTileset.style?(this.cesium3DTileset.style.pointSize=this._pointSize,this.cesium3DTileset.makeStyleDirty()):null!=this._pointSize&&(this.cesium3DTileset.style=new Cesium.Cesium3DTileStyle({pointSize:this._pointSize})))}}var Es=ks;const Is=Symbol("vcsFeatureType"),Ds={DYNAMIC:"dynamic",STATIC:"static",EDITED:"edited"},Ps=new ol.format.GeoJSON,Os="EPSG:3857",Ys=new ol.Sphere(6378137),xs=v.getLogger("vcs.vcm.layer.GeoJSONHelper");function As(e){const t=Object(le["a"])(e[e.length-1],2),i=t[0],s=t[1];e[0][0]===i&&e[0][1]===s||e.push(e[0].slice())}function js(e){const t=Object(le["a"])(e[e.length-1],2),i=t[0],s=t[1];e[0][0]===i&&e[0][1]===s&&e.pop()}function Fs(e){if(e instanceof ol.geom.Polygon){const t=e.getCoordinates();t.forEach(e=>{js(e)}),e.setCoordinates(t)}else if(e instanceof ol.geom.MultiPolygon){const t=e.getCoordinates();t.forEach(e=>{e.forEach(e=>{js(e)})}),e.setCoordinates(t)}}function Ns(e){const t=e.crs;if(t){if("name"===t.type)return t.properties.name;if("EPSG"===t.type)return`EPSG:${t.properties.code}`}return null}function Hs(e){if(e.get("altitudeMode")&&(e.set("olcs_altitudeMode",e.get("altitudeMode"),!0),e.unset("altitudeMode",!0)),e.get("extrudedHeight")){if(e.get("drawingType"))e.set("olcs_extrudedHeight",e.get("extrudedHeight"),!0);else{const t=Vt(e).min;e.set("olcs_extrudedHeight",e.get("extrudedHeight")-t,!0)}e.unset("extrudedHeight",!0)}e.get("skirt")&&(e.set("olcs_skirt",e.get("skirt"),!0),e.unset("skirt",!0)),e.get("radius")&&e.unset("radius",!0)}function Rs(e,t){const i=Ps.readGeometry(e,t.formatOptions);return"EPSG:3857"===String(t.formatOptions.featureProjection)&&(i[Ki.alreadyTransformedToMercator]=!0),Fs(i),new ol.Feature({geometry:i})}function zs(e,t){return e.image&&e.image.src&&/^:\d+$/.test(e.image.src)&&(t.embeddedIcons?e.image.src=t.embeddedIcons[e.image.src.substring(1)]:delete e.image.src),e}function Gs(e,t){const i=!!e.color&&be(e.color),s=e.width||1.25,r=e.pointRadius||5,n=e.opacity||.8;if(delete e.color,delete e.width,delete e.pointRadius,delete e.opacity,"Polygon"===t||"Circle"===t){const e=i?i.slice():[255,255,255,.4];return e[3]=n,{fill:{color:e},stroke:{color:i||be("#3399CC"),width:s}}}return"LineString"===t?{stroke:{color:i||be("#3399CC"),width:s}}:"Point"===t?{image:{fill:{color:[255,255,255,.4]},radius:r,stroke:{color:i||be("#3399CC"),width:1}}}:void 0}function Vs(e,t){if(!e.geometry)return null;const i=e.geometry.olcs_radius;let s=Ps.readGeometry(e.geometry,t.formatOptions);if(e.radius&&s instanceof ol.geom.Point){const t=s.getCoordinates();2===t.length&&t.push(0),s=new ol.geom.Circle(t,e.radius,"XYZ")}if(i&&s instanceof ol.geom.Point){const e=s.getCoordinates();2===e.length&&e.push(0),s=Jt(e,i)}"EPSG:3857"===String(t.formatOptions.featureProjection)&&(s[Ki.alreadyTransformedToMercator]=!0),e.vcsMeta=e.vcsMeta||{},e.vcsStyle&&(e.vcsMeta.style=e.vcsMeta.style||e.vcsStyle);const r=e.properties;t.readLegacyStyleOptions&&!e.vcsMeta.style&&(e.vcsMeta.style=Gs(r,s.getType())),Fs(s);const n=new ol.Feature(Object.assign({},r,{geometry:s}));if(e.id&&n.setId(e.id),e.state&&(n[Is]=e.state),e.vcsMeta.style&&!t.dontReadStyle){let i;e.vcsMeta.style=zs(e.vcsMeta.style,t),t.defaultStyle?(i=t.defaultStyle.clone().assign(new Je(e.vcsMeta.style)),null!=i.label&&s.set("_vcsGeomType","Label")):i=new Je(e.vcsMeta.style),n[We]=i,n.setStyle(i.style)}return Hs(n),n}function Bs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i="string"===typeof e?JSON.parse(e):e,s=Ns(i),r=s?{epsg:s}:t.dataProjection,n={formatOptions:{dataProjection:r?r.epsg:S.createGeographicProjection().epsg,featureProjection:t.targetProjection?t.targetProjection.epsg:S.createMercatorProjection().epsg},dontReadStyle:t.dontReadStyle,readLegacyStyleOptions:t.readLegacyStyleOptions,defaultStyle:t.defaultStyle};if(t.dynamicStyle&&!n.defaultStyle&&(n.defaultStyle=Ke),"FeatureCollection"===i.type){let e;return i.vcsMeta=i.vcsMeta||{embeddedIcons:i.vcsEmbeddedIcons,style:i.vcsStyle},i.vcsMeta.embeddedIcons&&(n.embeddedIcons=i.vcsMeta.embeddedIcons),i.vcsMeta.style&&t.dynamicStyle&&(i.vcsMeta.style.type===pe.REFERENCE?(e=G.getInstance().getStyleByName(i.vcsMeta.style.name),e?e instanceof Je&&(n.defaultStyle=e):xs.warning(`could not load referenced style ${i.vcsMeta.style.name}`)):i.vcsMeta.style.type===pe.DECLARATIVE?e=new it(i.vcsMeta.style):(i.vcsMeta.style=zs(i.vcsMeta.style,n),n.defaultStyle=n.defaultStyle.clone().assign(new Je(i.vcsMeta.style)),e=n.defaultStyle)),{features:i.features.map(e=>Vs(e,n)).filter(e=>e),style:i.vcsMeta.style?e:void 0,vcsMeta:i.vcsMeta?i.vcsMeta:void 0}}if("Feature"===i.type){const e=Vs(i,n);return{features:e?[e]:[],vcsMeta:i.vcsMeta?i.vcsMeta:void 0}}return null!=i.type?{features:[Rs(i,n)]}:{features:[]}}function Us(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const s={type:"Feature",properties:e.getProperties()};t.writeId&&(s.id=e.getId()),delete s.properties[e.getGeometryName()],delete s.properties.style,delete s.properties.olcs_allowPicking;let r=e.getGeometry(),n=null;if(r instanceof ol.geom.Circle){const e=r.getCoordinates();n=Ys.haversineDistance(S.mercatorToWgs84(e[0],!0),S.mercatorToWgs84(e[1],!0)),r=new ol.geom.Point(r.getCenter())}else if(r instanceof ol.geom.Polygon){const e=r.getCoordinates();e.forEach(e=>{As(e)}),r.setCoordinates(e)}else if(r instanceof ol.geom.MultiPolygon){const e=r.getCoordinates();e.forEach(e=>{e.forEach(e=>{As(e)})}),r.setCoordinates(e)}return s.geometry=Ps.writeGeometryObject(r,{featureProjection:Os,rightHanded:!0}),n&&(s.geometry.olcs_radius=n),s.vcsMeta={},t.writeStyle&&e[We]&&(s.vcsMeta.style=Hi(e[We].getOptionsForFeature(e),i)),s}function Ws(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=e.vcsMeta||{};i.version=dt;const s=e.features.map(e=>Us(e,t,i.embeddedIcons)),r={type:"FeatureCollection",features:s,vcsMeta:i};return t.writeStyle&&e.style&&(xs.deprecate("data.style","use layer.getVcsMeta and pass that in instead"),zi(e.style,r.vcsMeta)),t.asObject?r:JSON.stringify(r,null,t.prettyPrint?2:null)}ct.GEOJSON=ct.lastLayerId++;class qs extends Ki{static get className(){return"vcs.vcm.layer.GeoJSON"}constructor(e){e.className=qs.className,e.projection||(e.projection=S.createGeographicProjection().getConfigObject()),super(e),this.url=e.url||null,this.altitudeMode=e.altitudeMode||"none",this._dataFetchedPromise=null}fetchData(){return this._dataFetchedPromise?this._dataFetchedPromise:null!=this.url?(this.framework.getActiveMap().setLayerLoading(this,!0),this._dataFetchedPromise=q.a.get(this.url).then(e=>{const t=e.data;this.dataFetchedHandler(t)}).catch(e=>{return this.logger.warning(`Could not send request for loading layer content (${e.message})`),Promise.reject(e)}).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)}),this._dataFetchedPromise):(this.logger.warning("Could not load GeoJSON layer, no url is set"),Promise.reject(new Error("missing url in GeoJSON layer")))}dataFetchedHandler(e){const t=Bs(e,{dataProjection:this.projection,dynamicStyle:!0});this.addFeatures(t.features),t.style&&this.setStyle(t.style)}}var Js=qs;class Ks extends Di{constructor(e){super(e),this.url=e.url||"";const t=null!=e.minLevel?e.minLevel:e.minZoom,i=null!=e.maxLevel?e.maxLevel:e.maxZoom;this.minLevel=Object(c["h"])(t,0),this.maxLevel=Object(c["h"])(i,18),this.tilingSchema=e.tilingSchema,null==t&&e.extent&&this.calculateMinLevel(),this.opacity=Object(c["g"])(e.opacity,1),this.opacity=this.opacity<0?0:this.opacity,this.opacity=this.opacity>1?1:this.opacity,"string"!==typeof this.url&&this.framework.subscribe("LOCALE_CHANGED",this.handleLocaleChange,this)}handleLocaleChange(){const e=this.isActive(),t=function(){Object.values(this.specificImpl).forEach(e=>{e.initialized=!1}),e&&this.activate(!0)}.bind(this);e?this.activate(!1).then(t):t()}getUrl(){if("string"===typeof this.url)return this.url;const e=this.framework.getLocale();return this.url[e]?this.url[e]:Object.values(this.url)[0]}getTilingScheme(){const e={};return this.numberOfLevelZeroTilesX&&this.numberOfLevelZeroTilesY&&(e.numberOfLevelZeroTilesX=this.numberOfLevelZeroTilesX,e.numberOfLevelZeroTilesY=this.numberOfLevelZeroTilesY),"mercator"===this.tilingSchema?new Cesium.WebMercatorTilingScheme(e):new Cesium.GeographicTilingScheme(e)}_getExtentPoints(){const e=this.extent.getCoordinatesInProjection(S.createGeographicProjection()),t=[ol.extent.getBottomLeft(e),ol.extent.getBottomRight(e),ol.extent.getTopRight(e),ol.extent.getTopLeft(e)];return t.map(e=>Cesium.Cartographic.fromDegrees(e[0],e[1]))}calculateMinLevel(){if(!this.extent.isValid())return;const e=this.getTilingScheme(),t=this._getExtentPoints();while(this.minLevel<this.maxLevel){const i=t.map(function(t){return e.positionToTileXY(t,this.minLevel)},this),s=[];if(s.push(Math.abs(i[0].x-i[1].x)),s.push(Math.abs(i[0].y-i[3].y)),s[0]>1||s[1]>1){this.minLevel=this.minLevel-1;break}this.minLevel=this.minLevel+1}}setOpacity(e){this.opacity=e,Object.values(this.specificImpl).forEach(e=>{e.updateOpacity()})}}var Zs=Ks;ct.IMAGE=ct.lastLayerId,ct.lastLayerId+=1;class Qs extends Zs{static get className(){return"vcs.vcm.layer.SingleImage"}constructor(e){e.layertype=ct.IMAGE,e.className=Qs.className,super(e),this.imageExtent=e.imageExtent,this.credit=e.credit}setExtent(e){this.imageExtent=e;const t=this.getImplementation(this.framework.getActiveMap());t&&t.updateLayer()}}var $s=Qs;ct.OPENSTREETMAP=ct.lastLayerId++;class Xs extends Di{static get className(){return"vcs.vcm.layer.OpenStreetMap"}constructor(e){e.layertype=ct.OPENSTREETMAP,e.className=Xs.className,super(e)}}var er=Xs;ct.TMSBase=ct.lastLayerId++;class tr extends Zs{static get className(){return"vcs.vcm.layer.TMSBase"}constructor(e){e.layertype=ct.TMSBase,e.className=tr.className,e.tilingSchema=e.tilingSchema||"mercator",super(e),this.format=e.format||"jpeg",this.tileWidth=Object(c["h"])(e.tileWidth,256),this.tileHeight=Object(c["h"])(e.tileHeight,256)}}var ir=tr;ct.TILED_LAYER=ct.lastLayerId,ct.lastLayerId+=1;const sr=Symbol("isTiledFeature");class rr extends Di{static get className(){return"vcs.vcm.layer.TiledLayer"}constructor(e){e.layertype=e.layertype?e.layertype:ct.TILED_LAYER,e.className=e.className?e.className:rr.className,super(e),this.featureVisibility=e.featureVisibility||new nt,this.highlightStyle=null,e.highlightStyle&&(this.highlightStyle=e.highlightStyle instanceof Je?e.highlightStyle:new Je(e.highlightStyle)),this.cesiumTilesetLayerOptions=Object.assign({},e.cesiumTilesetLayerOptions,{featureVisibility:this.featureVisibility,highlightStyle:this.highlightStyle,genericFeatureProperties:this._genericFeatureProperties}),this.openlayersTiledLayerOptions=Object.assign({},e.openlayersTiledLayerOptions,{featureVisibility:this.featureVisibility,highlightStyle:this.highlightStyle,genericFeatureProperties:this._genericFeatureProperties}),this._dataFetched=!1,this.source=new ol.source.Vector({}),this.projection=S.createMercatorProjection(),this.sourceProjection=this.projection.getProjection(),this.internalProjection=S.createMercatorProjection(),this.zIndex=50,this.editing=null,this.addedEditingSymbol=!1,this.FVlastUpdated=0,this._dataFetchedPromise=null}get screenSpaceErrorMobile(){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(e){const t=this.getImplementation(e);if(t)return t.screenSpaceErrorMobile}return null}get screenSpaceError(){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(e){const t=this.getImplementation(e);if(t)return t.screenSpaceError}return null}getSource(){return this.source}postRenderStyling(){Ki.prototype.postRenderStyling.call(this)}setEditing(e,t){this._dataFetched?this.addedEditingSymbol&&!t?(this.source.getFeatures().forEach(t=>{delete t[e]}),this.addedEditingSymbol=!1):t&&(this.addedEditingSymbol=!0,this.source.getFeatures().forEach(i=>{i[e]=t})):this.editing={symbol:e,featureType:t}}getFeatureById(e){let t=e;return-1!==String(e).indexOf("_OBLIQUE")&&(t=String(e).split("_OBLIQUE")[0]),this.source.getFeatureById(t)}initialize(){const e=this.framework.getActiveMap(),t="vcs.vcm.maps.Cesium"===e.className?!!this.cesiumTilesetLayerOptions.url:!!this.openlayersTiledLayerOptions.url;t&&super.initialize()}activate(e){const t=this.framework.getActiveMap(),i="vcs.vcm.maps.Cesium"===t.className?!!this.cesiumTilesetLayerOptions.url:!!this.openlayersTiledLayerOptions.url;return i?super.activate(e):Promise.resolve()}setHighlightStyle(e){this.highlightStyle=e}determineHighlightStyle(e,t){const i=this.framework.getActiveMap();if(this.highlightStyle)return this.highlightStyle;if("vcs.vcm.maps.Cesium"===i.className){const e=this.getImplementation(this.framework.getActiveMap());return e.determineHighlightStyle()}return Ki.prototype.determineHighlightStyle.call(this,e,t)}setMaximumScreenSpaceError(e){const t=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(t){const i=this.getImplementation(t);i&&i.setMaximumScreenSpaceError(e)}}fetchData(){return this._dataFetchedPromise?this._dataFetchedPromise:(null!=this.openlayersTiledLayerOptions.url?(this.framework.getActiveMap().setLayerLoading(this,!0),this._dataFetchedPromise=q.a.get(this.openlayersTiledLayerOptions.url).then(e=>{let t=e.data;const i=Bs({features:t.features,type:"FeatureCollection"},{defaultStyle:this.defaultStyle instanceof Je?this.defaultStyle:Ke}),s=i.features;s.forEach(e=>{e[sr]=!0}),Ki.prototype.addFeatures.call(this,s),this.editing&&(this.setEditing(this.editing.symbol,this.editing.featureType),this.editing=null)}).catch(e=>{return this.logger.warning(`Could not send request for loading layer content (${e.message})`),Promise.reject(e)}).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)})):(this._dataFetched=!0,this._dataFetchedPromise=Promise.resolve()),this._dataFetchedPromise)}objectClickedHandler(e,t,i){if(this.allowPicking){const s=this.framework.getActiveMap();if((e instanceof Cesium.Cesium3DTileFeature||e instanceof Cesium.Cesium3DTilePointFeature)&&"vcs.vcm.maps.Cesium"===s.className){const r=this.getImplementation(s);return r.objectClickedHandler(e,t,i||this)}if(e instanceof ol.Feature&&("vcs.vcm.maps.Openlayers"===s.className||"vcs.vcm.maps.Oblique"===s.className))return Ki.prototype.objectClickedHandler.call(this,e,t,i||this)}return!1}getGenericFeatureFromClickedObject(e){const t=this.framework.getActiveMap(),i=this.getImplementation(t);return i?i.getGenericFeatureFromClickedObject(e):null}}var nr=rr,ar=i(32),or=i.n(ar);ct.CLUSTER=ct.lastLayerId,ct.lastLayerId+=1;class lr extends Ki{static get className(){return"vcs.vcm.layer.VectorCluster"}constructor(e){e.layertype=ct.CLUSTER,e.className=lr.className,e.zCoordinateEyeOffset=Object(c["h"])(e.zCoordinateEyeOffset,-200),e.heightAboveGround=Object(c["h"])(e.heightAboveGround,65),e.activeOnStartup=!0,e.altitudeMode=e.altitudeMode||"none",e.zIndex=Object(c["h"])(e.zIndex,60),super(e),this.clusterSource=new ol.source.Cluster({source:this.source,distance:Object(c["h"])(e.clusterDistance,40)}),this.clusterLayers=e.clusterLayers||[],this.activeClusterLayers=[],this.activeClusterLayersLastUpdated={},this.lastClickedFeatures=[];let t=e.defaultFeatureTemplate||"<%=title%>";Array.isArray(t)&&(t=t.join(" ")),this.defaultFeatureTemplate=or()(t),this.showInContent=!!e.showInContent;const i=e.style||{};this.icon=i.icon||"images/clusterIcon.svg",this.selectedIcon=i.selectedIcon||"images/clusterSelectedIcon.svg",this.iconWidth=Object(c["h"])(i.iconWidth,40),this.iconHeight=Object(c["h"])(i.iconHeight,44),this.iconScaleFactor=Object(c["h"])(i.iconScaleFactor,.05),this.fontSize=Object(c["h"])(i.fontSize,16),this.textOffset=Object(c["h"])(i.textOffset,-4),this.breaks=i.breaks||[2,3,4,5,10,15,20,25],this.zeroScaleOffset=Object(c["h"])(i.zeroScaleOffset,3),this._icons=new Array(this.breaks.length),this._selectedIcons=new Array(this.breaks.length),this._images=new Array(this.breaks.length),this._inactive2dClustering=!0,this._resultLayer=new Ki({name:`_clusterResultLayer${this.name}`,altitudeMode:this.altitudeMode,activeOnStartup:!0,zCoordinateEyeOffset:this.zCoordinateEyeOffset-20,zIndex:1e3,projection:S.createMercatorProjection().getConfigObject(),allowPicking:!1}),this._resultFeature=null,this._initialActivation=!1,this.framework.subscribe(I.LAYER_ACTIVATED,this._handleActivation.bind(this)),this.framework.subscribe(I.LAYER_DEACTIVATED,this._handleDeactivation.bind(this)),this.framework.subscribe(I.SELECTED_ITEM_CHANGED,this._handleSelectedItemChanged.bind(this)),this.mapNames=[]}activate(e){if(this.isSupported()){if(!e)return this.logger.warning("trying to deactivate cluster layer!"),Promise.reject(new Error("cannot deactivate cluster layer"));"vcs.vcm.maps.Openlayers"!==this.framework.getActiveMap().className?(this._inactive2dClustering=!0,this.clusterSource.setPause(!0)):(this._inactive2dClustering=!1,this.clusterSource.setPause(!1)),this.clusterLayers=this._validateLayers(this.clusterLayers);const t=super.activate(!0);return this._initialActivation?t:t.then(()=>this.framework.loadLibraries(["./lib/thirdparty/canvg-1.4/rgbcolor.js","./lib/thirdparty/canvg-1.4/StackBlur.js","./lib/thirdparty/canvg-1.4/canvg.js"])).then(this._createIcons.bind(this)).then(()=>{this.setStyle(this._styleFunction.bind(this)),this._resultLayer.setStyle(this._getSelectedStyle()),this.framework.addLayer(this._resultLayer),this._initialActivation=!0})}return Promise.resolve()}_validateLayers(e,t){return e.filter(e=>{const i=this.framework.getLayerByName(e.name);if(!(i&&i instanceof Ki))return this.logger.warning(`Missconfigured cluster layer, failed with layer: ${i}`),!1;if("string"===typeof e.featureTemplate&&(e.featureTemplate=or()(e.featureTemplate)),i.heightAboveGround=this.heightAboveGround,i.altitudeMode=this.altitudeMode,i.setVisibility(!1),t){const t=this.clusterLayers.find(t=>t.name===e.name);t?(t.title=e.title||t.title,t.featureTemplate=e.featureTemplate||t.featureTemplate):this.clusterLayers.push(e)}return!0})}_createIcons(){function e(e,t,i,s,r){let n=t-this.zeroScaleOffset;n=n>0?n:0,n=r?n:n+.2;const a=Math.round(this.iconWidth*(1+this.iconScaleFactor*n)),o=Math.round(this.iconHeight*(1+this.iconScaleFactor*n));return new Promise(e=>{const t=document.createElement("canvas");t.width=a,t.height=o,canvg(t,i,{renderCallback(){e(t)}})}).then(i=>new Promise(s=>{const r=this.fontSize;let n;n=t<this.zeroScaleOffset?e:`${e}+`;const l=`<svg xmlns="http://www.w3.org/2000/svg" width="${a}" heigth="${o}" viewbox="0 0 ${a} ${o}">`+`<text x="${a/2}" y="${o/2+r/2+this.textOffset}" text-anchor="middle" `+`lengthAdjust="spacingAndGlyphs" textLength="${a-20}" `+`font-size="${r}" font-family="Arial" font-weight="bold">${n}</text></svg>`,c=document.createElement("canvas");c.width=a,c.height=o,canvg(c,l,{ignoreDimensions:!0,renderCallback(){const e=document.createElement("canvas");e.width=a,e.height=o;const t=e.getContext("2d");t.drawImage(i,0,0),t.drawImage(c,0,0),s(e)}})})).then(e=>{return r&&(this._images[t]=e),s[t]=new ol.style.Style({image:new ol.style.Icon({img:e,imgSize:[a,o],anchor:[.5,.5]})}),Promise.resolve()})}const t=this.breaks.map((t,i)=>Promise.all([e.bind(this)(t,i,this.icon,this._icons,!0),e.bind(this)(t,i,this.selectedIcon,this._selectedIcons,!1)]));return Promise.all(t)}getSource(){return this.clusterSource}_styleFunction(e){const t=e.get("features");if(t&&t.length>1){const e=t.length;let i=this.breaks.findIndex((t,i)=>{return i>this.zeroScaleOffset?e<t:e<=t});return i=i>this.zeroScaleOffset?i-1:i,-1===i?this._icons[this._icons.length-1]:this._icons[i]}const i=t?t[0]:e,s=i[Ki.originalFeatureSymbol]||i,r=this.framework.getLayerByName(s.get("_layerName"));return r?s.getId()&&A.getInstance().getCurrentItem().id===s.getId()?r.highlightStyle?r.highlightStyle.style:null:r.style.style:new ol.style.Style({})}_getSelectedStyle(){return function(e){const t=e[Ki.originalFeatureSymbol]||e,i=t.get("features");if(i&&i.length>1){const e=i.length;let t=this.breaks.findIndex((t,i)=>{return i>this.zeroScaleOffset?e<t:e<=t});return t=t>this.zeroScaleOffset?t-1:t,-1===t?this._selectedIcons[this._selectedIcons.length-1]:this._selectedIcons[t]}return this._selectedIcons[0]}.bind(this)}cesiumStyleFunction(e,t){if(e.length<2)return;let i;const s=e.length;let r=this.breaks.findIndex((e,t)=>{return t>this.zeroScaleOffset?s<e:s<=e});r=r>this.zeroScaleOffset?r-1:r,i=-1===r?this._images[this._images.length-1]:this._images[r],t.billboard.setImage(this.name+r,i),t.billboard.show=!0}objectClickedHandler(e,t,i){this.unSelect();const s=e.get("features");if(s&&s.length>1){this.lastClickedFeatures.splice(0),s.forEach(e=>{const t=e[Ki.originalFeatureSymbol]||e,i=this.clusterLayers.find(e=>e.name===t.get("_layerName")),s=t.getProperties();s.template=i&&i.featureTemplate?i.featureTemplate(s):this.defaultFeatureTemplate(s),s.template=s.template.replace(/\[br\]/g,"<br>");const r={id:s.id,template:s.template,_layerName:s._layerName};this.lastClickedFeatures.push(r)}),this.raiseFeatureEvent(I.CLUSTER_CLICKED,"",s,this),this.framework.getSelectBehavior().clearCurrentItem();const t=e.getGeometry().clone();return t[Ki.alreadyTransformedToImage]="vcs.vcm.maps.Oblique"===this.framework.getActiveMap().className,this._resultFeature=new ol.Feature({geometry:t,features:this.lastClickedFeatures}),this._resultLayer.addFeatures([this._resultFeature]),!0}const r=s?s[0]:e,n=r[Ki.originalFeatureSymbol]||r,a=this.framework.getLayerByName(n.get("_layerName"));return a.objectClickedHandler(n,t,i)}contains(e){const t=this.clusterLayers.findIndex(t=>t.name===e);return t>-1}_handleActivation(e){const t=this.activeClusterLayers.findIndex(t=>t===e.name);if(this.contains(e.name)&&-1===t&&e instanceof Ki){const t=e.getSource();if("ready"===t.getState()){const i=e.name,s=t.getFeatures();s.forEach(e=>{e.set("_layerName",i,!0),e.getId()||e.setId(this.framework.getNextUniqueId())}),this.source.addFeatures(s),this.activeClusterLayers.push(i)}else t.once("change",this._handleActivation.bind(this,e))}}_handleDeactivation(e){if(this.contains(e.name)&&e instanceof Ki){this._inactive2dClustering||this.clusterSource.setPause(!0);const t=e.getSource();t.getFeatures().forEach(e=>{this.source.removeFeature(e,!0)}),this.source.changed();const i=this.activeClusterLayers.findIndex(t=>t===e.name);this.activeClusterLayers.splice(i,1),delete this.activeClusterLayersLastUpdated[e.name],this._inactive2dClustering||this.clusterSource.setPause(!1);const s=this.lastClickedFeatures.slice();this.lastClickedFeatures.splice(0),s.forEach(t=>{t._layerName!==e.name&&this.lastClickedFeatures.push(t)}),this._resultFeature&&this._resultFeature.changed()}}_handleSelectedItemChanged(e){const t=this.lastClickedFeatures.find(t=>t.id===e);e&&!t&&this.unSelect()}postRenderStyling(){let e=!1;for(let t=0;t<this.activeClusterLayers.length;t++){const i=this.activeClusterLayers[t],s=this.framework.getLayerByName(i);if(s&&(!this.activeClusterLayersLastUpdated[i]||this.activeClusterLayersLastUpdated[i]<s.featureVisibility.lastUpdated)){const t=s.getSource();t.getFeatures().forEach(t=>{this.source.getFeatureById(t.getId())?s.featureVisibility.hiddenObjects[t.getId()]&&(this.source.removeFeature(t,!0),e=!0):s.featureVisibility.hiddenObjects[t.getId()]||(this.source.addFeature(t,!0),e=!0)}),this.activeClusterLayersLastUpdated[i]=Date.now()}}e&&this.source.changed()}unSelect(){this._resultFeature=null,this._resultLayer.removeAllFeatures()}addLayers(e){this._validateLayers(Array.isArray(e)?e:[e],!0)}}var cr=lr;class hr extends Ki{static get className(){return"vcs.vcm.layer.WFS"}constructor(e){e.className=hr.className;const t=new S(e.projection).getConfigObject();t.alias=[`http://www.opengis.net/gml/srs/epsg.xml#${t.epsg.match(/\d+/)[0]}`],e.projection=t,super(e),this.featureType=Array.isArray(e.featureType)?e.featureType:[e.featureType],this.featureNS=e.featureNS,this.featurePrefix=e.featurePrefix,this.getFeaturesOptions=e.getFeatureOptions||{},this.wfsFormat=new ol.format.WFS({featureNS:this.featureNS,featureType:this.featureType}),this._dataFetchedPromise=null}fetchData(){if(this._dataFetchedPromise)return this._dataFetchedPromise;if(null!=this.url){let e=this.wfsFormat.writeGetFeature(Object.assign({featureNS:this.featureNS,featurePrefix:this.featurePrefix,featureTypes:[this.featureType],srsName:this.projection.epsg},this.getFeaturesOptions));e=(new XMLSerializer).serializeToString(e),this.framework.getActiveMap().setLayerLoading(this,!0),this._dataFetchedPromise=q.a.post(this.url,e,{headers:{"Content-Type":"application/text+xml"}}).then(e=>{const t=e.data;this.dataFetchedHandler(t)}).catch(e=>{return this.logger.info(`Could not send request for loading layer content (${e.message})`),Promise.reject(e)}).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)})}return this.logger.warning("Could not load WFS layer, no url is set"),Promise.reject(new Error("missing url in WFS layer"))}dataFetchedHandler(e){const t=this.wfsFormat.readFeatures(e);this.addFeatures(t)}}var ur=hr;ct.WMS=ct.lastLayerId++;class dr extends Zs{static get className(){return"vcs.vcm.layer.Wms"}constructor(e){if(e.layertype=ct.WMS,e.className=dr.className,e.tilingSchema=e.tilingSchema||"geographic",super(e),this.layers=e.layers?e.layers.split(","):[],this.version=e.version||"1.1.1",this.parameters={},e.parameters){let t;"string"===typeof e.parameters?t=n["a"].parseQueryParams(e.parameters):e.parameters instanceof Object&&(t=e.parameters),Object.keys(t).forEach(e=>{this.parameters[e.toUpperCase()]=t[e]})}null==this.parameters.TRANSPARENT&&(this.parameters.TRANSPARENT=!1),this.version&&(this.parameters.VERSION=this.version),this.parameters.LAYERS=this.layers.join(","),this.addTiledParameter&&(this.parameters.TILED=!0),this.featureInfo=e.featureInfo||!1,this.addTiledParameter=null==e.addTiledParameter||e.addTiledParameter,this.featureInfoResponseType=e.featureInfo&&e.featureInfo.responseType?e.featureInfo.responseType:"text/xml",this.featureInfoActivated=!1,this.featureInfoListenerKey=null,this.geoJsonFormats=["application/geojson","application/json","application/vnd.geo+json"]}getParameter(){return this.parameters}activateFeatureInfo(e){e&&!this.featureInfoActivated?(this.featureInfoListenerKey=this.framework.subscribe(I.MAP_CLICKED,this.featureInfoHandler.bind(this)),this.featureInfoActivated=!0):!e&&this.featureInfoActivated&&this.featureInfoListenerKey&&(this.framework.unsubscribeByKey(this.featureInfoListenerKey),this.featureInfoActivated=!1,this.featureInfoListenerKey=null)}featureInfoHandler(e){const t=this.framework.getActiveMap();let i=0;if("vcs.vcm.maps.Openlayers"===t.className)i=t.getOl3Map().getView().getResolution()/1e5;else if("vcs.vcm.maps.Cesium"===t.className){const s=t.getViewPoint(),r=Math.PI/3,n={};n.width=this.framework.getMapContainer().offsetWidth,n.height=this.framework.getMapContainer().offsetHeight;const a=n.width/n.height,o=2*Math.atan(Math.tan(.5*r)/a),l=2*s.getDistance()*Math.tan(o/2),c=111194.87428468118,h=Math.cos(Math.abs(Cesium.Math.toRadians(e.latitude))),u=l/c/h;i=u/n.height}let s="EPSG:4326";"1.3.0"===this.version&&(s="CRS:84");let r=[e.longitude,e.latitude];"mercator"===this.tilingSchema&&(r=S.createGeographicProjection().transformTo(S.createMercatorProjection(),r),s="EPSG:3857");const n=this.wmsSource.getGetFeatureInfoUrl(r,i,s,{INFO_FORMAT:this.featureInfoResponseType});n&&q.a.get(n).then(t=>{let i,s;if(t=t.data,"text/xml"===this.featureInfoResponseType)i=new ol.format.WFS;else{if(-1===this.geoJsonFormats.indexOf(this.featureInfoResponseType))return void this.logger.warning("Only geojson and text/xml is supported");i=new ol.format.GeoJSON}try{s=i.readFeatures(t)}catch(r){return void this.logger.warning("Features could not be read, please verify the featureInfoResponseType with the capabilities from the server")}if(Array.isArray(s)&&s.length>=1){const t="wmsFeatureInfo",i=s[0];i.setGeometry(new ol.geom.Point([e.longitude,e.latitude])),this.framework.publish(I.FEATURE_CLICKED,t,i,this)}})}getTilingOptions(){const e="geographic"===this.tilingSchema?S.createGeographicProjection():S.createMercatorProjection(),t=e.getProjection().getExtent(),i=ol.extent.getWidth(t),s="geographic"===this.tilingSchema?i/512:i/256,r=this.maxLevel+1,n=[];for(let o=0;o<r;++o)n.push(s/Math.pow(2,o));const a={origin:ol.extent.getTopLeft(t),resolutions:n,minZoom:this.minLevel};return this.extent.isValid()&&(a.extent=this.extent.getCoordinatesInProjection(e)),a}setCommonSource(){if(this.wmsSource)return;const e=this.getTilingOptions(),t=new ol.tilegrid.TileGrid(e),i={url:this.getUrl(),tileGrid:t,params:this.parameters};n["a"].hasSameOrigin(this.getUrl())||(i.crossOrigin="anonymous"),"geographic"===this.tilingSchema&&("1.3.0"===this.version?i.projection="CRS:84":i.projection="EPSG:4326"),this.wmsSource=new ol.source.TileWMS(i)}getUseFeatureInfo(){return this.featureInfo}getGenericFeatureFromClickedObject(e){const t=e.getGeometry(),i=ol.extent.getCenter(t.getExtent()),s=e.getProperties();return delete s[e.getGeometryName()],{layerName:this.name,layerClass:this.className,attributes:Object.assign({},this._genericFeatureProperties,s),longitude:i[0],latitude:i[1],height:0,relativeToGround:!0}}setLayers(e){a(e,[String,[String]]),this.layers=Array.isArray(e)?e:[e],this.parameters.LAYERS=this.layers.join(","),this._updateLayer()}_updateLayer(){this.wmsSource&&(this.wmsSource.updateParams(this.parameters),Object.values(this.specificImpl).forEach(e=>{e.updateLayer()}))}}var mr=dr;ct.WMTS=ct.lastLayerId++;class gr extends Zs{static get className(){return"vcs.vcm.layer.Wmts"}constructor(e){e.layertype=ct.WMTS,e.className=gr.className,e.tilingSchema=e.tilingSchema||"mercator",super(e),this.numberOfLevelZeroTilesX=e.numberOfLevelZeroTilesX?e.numberOfLevelZeroTilesX:1,this.numberOfLevelZeroTilesY=e.numberOfLevelZeroTilesY?e.numberOfLevelZeroTilesY:1,this.layer=e.layer||"",this.style=e.style||"",this.format=e.format||"",this.tileMatrixPrefix=e.tileMatrixPrefix||"",this.tileMatrixSetID=e.tileMatrixSetID||"",this.olOptions=e.ol3Options?e.ol3Options:{},this.matrixIds=e.matrixIds?e.matrixIds:null}}var pr=gr;let yr=null;class _r extends M{static get className(){return"vcs.vcm.util.IconManager"}constructor(){super({className:_r.className}),this.colorLayerMap={},this.layerLegendCanvasMap={},this.baseUrl="./images/icons.json",this.iconMap={0:{stroke:"inner_0.svg"},1:{stroke:"inner_2.svg",fill:"inner_2_fill_shaded.svg",colorizeInner:!0},2:{stroke:"inner_3.svg",fill:"inner_3_fill_white.svg",colorizeOuter:!0},3:{stroke:"inner_4.svg"},4:{stroke:"inner_1.svg",fill:"inner_1_fill_shaded.svg",colorizeInner:!0},5:{stroke:"inner_5.svg",fill:"inner_5_fill_white.svg",colorizeOuter:!0},6:{stroke:"inner_10.svg"},7:{stroke:"inner_9.svg",fill:"inner_9_fill_shaded.svg",colorizeInner:!0},8:{stroke:"inner_8.svg",fill:"inner_8_fill_white.svg",colorizeOuter:!0},9:{stroke:"inner_6.svg"},10:{stroke:"inner_12.svg",fill:"inner_12_fill_shaded.svg",colorizeInner:!0},11:{stroke:"inner_7.svg",fill:"inner_7_fill_white.svg",colorizeOuter:!0},12:{stroke:"inner_11.svg"},13:{stroke:"inner_0.svg",fill:"inner_0_fill_shaded.svg",colorizeInner:!0},14:{stroke:"inner_2.svg",fill:"inner_2_fill_white.svg",colorizeOuter:!0},15:{stroke:"inner_3.svg"},16:{stroke:"inner_4.svg",fill:"inner_4_fill_shaded.svg",colorizeInner:!0},17:{stroke:"inner_1.svg",fill:"inner_1_fill_white.svg",colorizeOuter:!0},18:{stroke:"inner_5.svg"},19:{stroke:"inner_10.svg",fill:"inner_10_fill_shaded.svg",colorizeInner:!0},20:{stroke:"inner_9.svg",fill:"inner_9_fill_white.svg",colorizeOuter:!0},21:{stroke:"inner_8.svg"},22:{stroke:"inner_6.svg",fill:"inner_6_fill_shaded.svg",colorizeInner:!0},23:{stroke:"inner_12.svg",fill:"inner_12_fill_white.svg",colorizeOuter:!0},24:{stroke:"inner_7.svg"},25:{stroke:"inner_11.svg",fill:"inner_11_fill_shaded.svg",colorizeInner:!0},26:{stroke:"inner_0.svg",fill:"inner_0_fill_white.svg",colorizeOuter:!0},27:{stroke:"inner_2.svg"},28:{stroke:"inner_3.svg",fill:"inner_3_fill_shaded.svg",colorizeInner:!0},29:{stroke:"inner_4.svg",fill:"inner_4_fill_white.svg",colorizeOuter:!0},30:{stroke:"inner_1.svg"},31:{stroke:"inner_5.svg",fill:"inner_5_fill_shaded.svg",colorizeInner:!0},32:{stroke:"inner_10.svg",fill:"inner_10_fill_white.svg",colorizeOuter:!0},33:{stroke:"inner_9.svg"},34:{stroke:"inner_8.svg",fill:"inner_8_fill_shaded.svg",colorizeInner:!0},35:{stroke:"inner_6.svg",fill:"inner_6_fill_white.svg",colorizeOuter:!0},36:{stroke:"inner_12.svg"},37:{stroke:"inner_7.svg",fill:"inner_7_fill_shaded.svg",colorizeInner:!0},38:{stroke:"inner_11.svg",fill:"inner_11_fill_white.svg",colorizeOuter:!0},39:{stroke:"inner_last.svg"}},this._svgMap={};const e=this.framework.loadLibraries(["./lib/thirdparty/canvg-1.4/rgbcolor.js","./lib/thirdparty/canvg-1.4/StackBlur.js","./lib/thirdparty/canvg-1.4/canvg.js"]),t=q.a.get(this.baseUrl).then(e=>{return this._svgMap=e.data,!0});this.readyPromise=Promise.all([e,t]),this.dedicatedIconMap={berlinpartner:"outerCircle.svg",sbahn:"SBahn.svg",ubahn:"UBahn.svg",haltestelle:"Haltestelle.svg",top200:"Top200.svg",gewerbeimmobilien:"GewerbeImmobilien-rot.svg"},this.width=40,this.height=44}static getInstance(){return yr||(yr=new _r),yr}getStyleForColor(e,t,i){const s=ol.color.asArray(t);if(!s)return Promise.reject(new Error(`Not a valid color is provided for the layer with name ${e}, no style is provided`));let r;return this.colorLayerMap[t]?-1!==this.colorLayerMap[t].indexOf(e)?r=this.colorLayerMap[t].indexOf(e):(r=this.colorLayerMap[t].length,this.colorLayerMap[t].push(e)):(this.colorLayerMap[t]=[e],r=0),r=r>39?39:r,this.readyPromise.then(()=>{const t=s[0],n=s[1],a=s[2],o=[];return i?(o.push(this.createOutline(t,n,a,r,this._svgMap["outerSquare.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["innerWhiteSquare.svg"],this._svgMap["innerShadedSquare.svg"])),o.push(this.createOutline(t,n,a,r,this._svgMap["legendSquare_outer.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["legendSquare_inner_white.svg"],this._svgMap["legendSquare_inner_shaded.svg"]))):(o.push(this.createOutline(t,n,a,r,this._svgMap["outerCircle.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["innerWhiteCircle.svg"],this._svgMap["innerShadedCircle.svg"])),o.push(this.createOutline(t,n,a,r,this._svgMap["legendCircle_outer.svg"])),o.push(this.createFill(t,n,a,r,this._svgMap["legendCircle_inner_white.svg"],this._svgMap["legendCircle_inner_shaded.svg"]))),o.push(this.createInner(t,n,a,r)),Promise.all(o).then(t=>{const s=t[0],r=t[1],n=t[2],a=t[3],o=t[4],l=document.createElement("canvas");l.width=22,l.height=22;const c=l.getContext("2d");i?(c.drawImage(n,0,0,25,28,0,0,22,22),c.drawImage(a,0,0,25,28,0,0,22,22),c.drawImage(o,8,6,26,26,2.1,2.4,15,15)):(c.drawImage(a,0,0,28,28,0,0,22,22),c.drawImage(n,0,0,28,28,0,0,22,22),c.drawImage(o,8,6,26,26,3.7,2.9,15,15)),this.layerLegendCanvasMap[e]=l;const h=document.createElement("canvas");h.width=this.width,h.height=this.height;const u=h.getContext("2d");return u.drawImage(s,0,0),u.drawImage(r,0,0),i?u.drawImage(o,-.7,-.52):u.drawImage(o,0,0),h.id=e,new ol.style.Style({image:new ol.style.Icon({img:h,imgSize:[this.width,this.height],anchor:[.5,1]})})})})}getStyleForDedicatedIcon(e,t){return this.readyPromise.then(()=>new Promise((i,s)=>{if(t=t.toLowerCase(),this.dedicatedIconMap[t]){const s=document.createElement("canvas");s.width=this.width,s.height=this.height,canvg(s,this._svgMap.dedicatedIcons[this.dedicatedIconMap[t]],{renderCallback:function(){const t=new ol.style.Style({image:new ol.style.Icon({img:s,imgSize:[this.width,this.height],scale:.8})}),r=document.createElement("canvas");r.width=22,r.height=22;const n=r.getContext("2d");n.drawImage(s,0,0,39,44,0,0,22,22),this.layerLegendCanvasMap[e]=r,i(t)}.bind(this)})}else s(new Error("This icon is not known, please check"))}))}getLegendCanvas(e){if(this.layerLegendCanvasMap[e])return Promise.resolve(this.layerLegendCanvasMap[e]);const t=this.framework.getLayerByName(e);return t?t.dedicatedIcon?this.getStyleForDedicatedIcon(t.name,t.dedicatedIcon).then(()=>this.getLegendCanvas(e)):this.getStyleForColor(t.name,t.iconColor,t.useSquareShapeAsOuter).then(()=>this.getLegendCanvas(e)):Promise.reject(new Error(`Could not find layer: ${e}`))}createOutline(e,t,i,s,r){return new Promise((s,n)=>{const a=document.createElement("canvas");a.width=this.width,a.height=this.height;const o=a.getContext("2d");canvg(a,r,{renderCallback:function(){Ie(o,[e,t,i,0],[this.width,this.height]),s(a)}.bind(this)})})}createFill(e,t,i,s,r,n){return new Promise((a,o)=>{const l=this.iconMap[s];if(l.colorizeOuter){const s=[];s.push(new Promise((e,t)=>{const i=document.createElement("canvas");i.width=this.width,i.height=this.height,canvg(i,r,{renderCallback(){e(i)}})})),s.push(new Promise((s,r)=>{const a=document.createElement("canvas");a.width=this.width,a.height=this.height;const o=a.getContext("2d");canvg(a,n,{renderCallback:function(){Ie(o,[e,t,i,0],[this.width,this.height]),s(a)}.bind(this)})})),Promise.all(s).then(e=>{const t=e[0],i=e[1],s=document.createElement("canvas");s.width=this.width,s.height=this.height;const r=s.getContext("2d");t&&r.drawImage(t,0,0),i&&r.drawImage(i,0,0),a(s)})}else{const e=document.createElement("canvas");e.width=this.width,e.height=this.height,canvg(e,r,{renderCallback(){a(e)}})}})}createInner(e,t,i,s){return new Promise((r,n)=>{const a=this.iconMap[s],o=[];o.push(new Promise((s,r)=>{if(a.stroke){const r=document.createElement("canvas");r.width=this.width,r.height=this.height;const n=r.getContext("2d");canvg(r,this._svgMap[a.stroke],{renderCallback:function(){Ie(n,[e,t,i,0],[this.width,this.height]),s(r)}.bind(this)})}else s()})),o.push(new Promise((s,r)=>{if(a.fill){const r=document.createElement("canvas");r.width=this.width,r.height=this.height;const n=r.getContext("2d");canvg(r,this._svgMap[a.fill],{renderCallback:function(){a.colorizeInner&&Ie(n,[e,t,i,0],[this.width,this.height]),s(r)}.bind(this)})}else s()})),Promise.all(o).then(e=>{const t=e[0],i=e[1],s=document.createElement("canvas");s.width=this.width,s.height=this.height;const n=s.getContext("2d");i&&n.drawImage(i,0,0),t&&n.drawImage(t,0,0),r(s)})})}}var fr=_r;ct.WSV=ct.lastLayerId,ct.lastLayerId+=1;class vr extends Ki{static get className(){return"vcs.vcm.layer.Wsv"}constructor(e){e.projection={},e.projection.epsg="EPSG:4326",e.projection.proj4="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ",e.zCoordinateEyeOffset=-100,e.heightAboveGround=10,e.altitudeMode="relativeToGround",e.zIndex=e.zIndex||60,e.className=vr.className,e.layertype=ct.WSV,super(e),this.dedicatedIcon=e.dedicatedIcon||!1,this.iconColor=e.iconColor||!1,this.useSquareShapeAsOuter=!!e.useSquareShape,this.iconManagerInUse=!(!this.dedicatedIcon&&!this.iconColor),this.baseUrl=e.baseurl||"/wsv-live",this.name=e.name,this.logo="adf33bbe08057b9251536c73ff627f512955ffc7.png",this.scaleUnselected=this.iconManagerInUse?.8:.5,this.scaleSelected=this.iconManagerInUse?0:1,e.style&&(e.style.scaleUnselected&&(this.scaleUnselected=e.style.scaleUnselected),e.style.scaleSelected&&(this.scaleSelected=e.style.scaleSelected)),e.wsvProjection||(e.wsvProjection={proj4:"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 +x_0=40000 +y_0=10000 +ellps=bessel +datum=potsdam +units=m +no_defs",epsg:"3068"}),this.wsvProjection=new S(e.wsvProjection),this.noFilterValue=e.noFilterValue?e.noFilterValue:"Keine Angabe",this.filter=e.filter?e.filter:null,this.framework.subscribe(I.LOCALE_CHANGED,this.handleLocaleChanged,this),this.filterAttribute=e.filterAttribute?e.filterAttribute:"tags",this.filterAttributeName=e.filterAttributeName?e.filterAttributeName:null,this.loadedLibraries=this.framework.loadLibraries(["./lib/thirdparty/canvg-1.4/rgbcolor.js","./lib/thirdparty/canvg-1.4/StackBlur.js","./lib/thirdparty/canvg-1.4/canvg.js"]),this._dataFetchedPromise=null}activate(e){return e?this.loadedLibraries.then(this.fetchData.bind(this)).then(()=>{return super.activate(e)}):super.activate(e)}fetchData(){if(!this._dataFetchedPromise){this.framework.getActiveMap().setLayerLoading(this,!0);const e=`${this.baseUrl}/api/${this.framework.getLocale()}/layer/${this.name}.json`;this._dataFetchedPromise=q.a.get(e).then(e=>{const t=e.data;return this.dataFetchedHandler(t)}).catch(e=>{return this.logger.warning(`Could not send request for loading layer content (${e.message})`),Promise.reject(e)}).then(()=>{this.framework.getActiveMap().setLayerLoading(this,!1)})}return this._dataFetchedPromise}handleLocaleChanged(){if(this._dataFetchedPromise){const e=this.active;e&&this.activate(!1),this.removeAllFeatures(),this._dataFetchedPromise=null,e&&this.activate(!0)}}getFilter(){if(this.filter)return this.filter;const e=this.source.getFeatures(),t={};for(let s=0;s<e.length;s++){const i=e[s].get(this.filterAttribute);if(i)if(Array.isArray(i))for(let e=0;e<i.length;e++){const s=i[e];s&&(this.filterAttributeName?t[s[this.filterAttributeName]]=!0:t[s]=!0)}else"string"===typeof i?t[i]=!0:"object"===typeof i&&this.filterAttributeName&&(t[i[this.filterAttributeName]]=!0);else t[this.noFilterValue]=!0}const i=[];for(const s in t)i.push(s);return i}setFilter(e){this.activeFilter=e;const t=this.source.getFeatures();for(let s=0;s<t.length;s++){const r=t[s].get(this.filterAttribute);let n=!1;if(r){if(Array.isArray(r))for(let t=0;t<r.length;t++)if(this.filterAttributeName){if(r[t][this.filterAttributeName]){var i=e.indexOf(r[t][this.filterAttributeName]);if(i>-1){n=!0;break}}}else{i=e.indexOf(r[t]);if(i>-1){n=!0;break}}else if("string"===typeof r){i=e.indexOf(r);if(i>-1){n=!0;break}}else if("object"===typeof r&&this.filterAttributeName){i=e.indexOf(r[this.filterAttributeName]);if(i>-1){n=!0;break}}}else{i=e.indexOf(this.noFilterValue);i>-1&&(n=!0)}n?t[s].setGeometryName("geometry"):t[s].setGeometryName("hidden")}}dataFetchedHandler(e){try{return e?(e.logo&&(this.logo=this.baseUrl+e.logo),e.name&&(this.options.title=e.name),e.category&&(this.options.category=e.category),this._createStyle().then(()=>{const t=e.locations;if(t){const e=[];t.forEach(function(t){const i=this._createLocation(t);i&&e.push(i)},this),this.addFeatures(e)}return this.activeFilter&&this.setFilter(this.activeFilter),!0})):Promise.resolve()}catch(t){return this.logger.warning(`Could not load WSV json: ${t.message}`),Promise.reject()}}_createStyle(){if(this.iconManagerInUse){let e;return e=this.dedicatedIcon?fr.getInstance().getStyleForDedicatedIcon(this.name,this.dedicatedIcon):fr.getInstance().getStyleForColor(this.name,this.iconColor,this.useSquareShapeAsOuter),e.then(e=>{e.getImage().setScale(this.scaleUnselected),this.setStyle(e);const t=e.clone();return t.getImage().setOpacity(0),this.setHighlightStyle(t),!0})}return this.setStyle(new ol.style.Style({image:new ol.style.Icon({src:this.logo,scale:this.scaleUnselected})})),this.setHighlightStyle(new ol.style.Style({image:new ol.style.Icon({src:this.logo,scale:this.scaleSelected})})),Promise.resolve()}_createLocation(e){if(!e.address||!e.address.x||!e.address.y||!e.name||!e.id)return!1;const t="&amp;",i=/&(?!([a-zA-Z0-9]+|#([0-9]+|x[A-Z0-9]+));)/g,s=new ol.Feature;e.id=`${this.name}_${e.id}`,s.setId(e.id),s.setProperties({name:e.name.replace(i,t)});const r=this.wsvProjection.transformTo(this.projection,[e.address.x,e.address.y]),n=new ol.geom.Point(r);if(this.extent.isValid()){const e=n.clone();if(e.transform(ol.proj.get("EPSG:4326"),this.extent.projection.getProjection()),!e.intersectsExtent(this.extent.extent))return!1}return s.setGeometry(n),s.setProperties(e),e.logo&&(s.setProperties({logo:this.baseUrl+e.logo}),e.logosize&&e.logosize.width&&e.logosize.height&&(s.setProperties({width:e.logosize.width}),s.setProperties({height:e.logosize.height}))),e.address&&e.address.city?s.setProperties({city:e.address.city.replace(i,t)}):s.setProperties({city:""}),e.address&&e.address.zip?s.setProperties({zip:e.address.zip}):s.setProperties({zip:""}),e.address&&e.address.street?s.setProperties({street:e.address.street.replace(i,t)}):s.setProperties({street:""}),e.contact&&e.contact.website?s.setProperties({website:e.contact.website}):s.setProperties({website:""}),s.setProperties({placemarkurl:`${this.baseUrl}/${this.framework.getLocale()}/location/${e.id}`}),this.options.title&&s.setProperties({layername:this.options.title}),this.options.category&&s.setProperties({category:this.options.category}),s}}var Lr=vr;const Mr=v.getLogger("vcs.vcm.layer.FeatureStoreChanges");class br{constructor(e){this.layer=e,this._changesListeners={addfeature:null,changefeature:null,removefeature:null},this._addedFeatures=new Set,this._editedFeatures=new Set,this._removedFeatures=new Set,this._convertedFeatures=new Set,this.values={changed:!1}}get active(){return Object.values(this._changesListeners).some(e=>null!==e)}track(){null===this._changesListeners.addfeature&&(this._changesListeners.addfeature=this.layer.source.on("addfeature",this._featureAdded.bind(this))),null===this._changesListeners.changefeature&&(this._changesListeners.changefeature=this.layer.source.on("changefeature",this._featureChanged.bind(this))),null===this._changesListeners.removefeature&&(this._changesListeners.removefeature=this.layer.source.on("removefeature",this._featureRemoved.bind(this)))}getChanges(){return{add:[...this._addedFeatures],edit:[...this._editedFeatures],remove:[...this._removedFeatures]}}commitChanges(e){const t=[];this._addedFeatures.forEach(e=>{const i=Us(e,{writeStyle:!0});t.push({action:"add",feature:i,original:e,success(t){e.setId(t),e[Is]=Ds.DYNAMIC}})}),this._editedFeatures.forEach(e=>{const i=Us(e,{writeStyle:!0});i._id=e.getId(),i.geomety="test",t.push({action:"edit",original:e,feature:i,success(){e[Is]===Ds.STATIC&&(e[Is]=Ds.EDITED)}})}),this._removedFeatures.forEach(e=>{const i=e.getId();t.push({original:e,action:"remove",feature:{_id:i},success(){}})});let i=Promise.resolve();return t.length&&(i=q.a.post(e.toString(),t.map(e=>({action:e.action,feature:e.feature}))).then(e=>{let i=e.data;const s=i.failedActions.map(e=>{let i=e.index,s=e.error;const r=t[i];return Mr.log(`failed action ${r.action}: ${s}`),t[i]=null,this._resetFeature(r.original)});return t.filter(e=>e).forEach(e=>{let t=e.action,s=e.success;"add"===t?s(i.insertedIds.shift()._id):s()}),Promise.all(s)})),i.then(()=>{const e=[];this._convertedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),Promise.all(e)}).then(()=>{this._resetValues()}).catch(e=>{this._resetValues(),Mr.error(e.message)})}reset(){const e=[];return this._addedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),this._editedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),this._removedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),this._convertedFeatures.forEach(t=>{e.push(this._resetFeature(t))}),Promise.all(e).then(()=>{this._resetValues()}).catch(e=>{Mr.error(e),this._resetValues()})}_resetFeature(e){const t=[e.getId()];return e[Is]?e[Is]===Ds.STATIC?(this.layer.removeFeaturesById(t),this.layer.hiddenStaticFeatureIds.delete(e.getId()),this.layer.showObjects(t),Promise.resolve()):this.layer.injectedFetchDynamicFeatureFunc(e.getId()).then(e=>{const i=Bs(e),s=i.features;this.layer.removeFeaturesById(t),this.layer.addFeatures(s)}).catch(e=>{Mr.error("failed to reset feature, giving up",e.message)}):(this.layer.removeFeaturesById(t),Promise.resolve())}_resetValues(){this._addedFeatures.clear(),this._editedFeatures.clear(),this._removedFeatures.clear(),this._convertedFeatures.clear(),this.values.changed=!1}unTrack(){ol.Observable.unByKey(Object.values(this._changesListeners)),this._changesListeners.addfeature=null,this._changesListeners.changefeature=null,this._changesListeners.removefeature=null,this._resetValues()}pauseTracking(e){this._changesListeners[e]&&(ol.Observable.unByKey(this._changesListeners[e]),this._changesListeners[e]=null)}_featureAdded(e){const t=e.feature;t[Is]?t[Is]===Ds.STATIC&&(this._convertedFeatures.add(t),this.values.changed=!0):(this._addedFeatures.add(t),this.values.changed=!0)}_featureChanged(e){const t=e.feature;t[Is]&&(this._convertedFeatures.delete(t),this._editedFeatures.add(t),this.values.changed=!0)}_featureRemoved(e){const t=e.feature;t[Is]?(this._removedFeatures.add(t),this._editedFeatures.delete(t),this._convertedFeatures.delete(t),this.values.changed=!0):this._addedFeatures.delete(t)}removeFeature(e){a(e,ol.Feature),this._featureRemoved({feature:e})}addFeature(e){a(e,ol.Feature),this._featureAdded({feature:e})}editFeature(e){a(e,ol.Feature),this._featureChanged({feature:e})}dispose(){this.unTrack(),this.layer=null}}var wr=br;ct.FEATURESTORE=ct.lastLayerId,ct.lastLayerId+=1;class Tr extends Ki{static get className(){return"vcs.vcm.layer.FeatureStore"}constructor(e){const t=Object.assign({altitudeMode:"clampToGround",layerType:ct.FEATURESTORE,className:Tr.className,projection:S.createMercatorProjection().getConfigObject()},e);if(super(t),this.extent.projection=S.createMercatorProjection(),this.layerId=e.id,this.staticRepresentation=e.staticRepresentation||{},this.hiddenStaticFeatureIds=new Set(e.hiddenStaticFeatureIds||[]),this.changeTracker=new wr(this),this.vcsMeta=e.vcsMeta||{},this.setVcsMeta(this.vcsMeta),this.injectedFetchDynamicFeatureFunc=e.injectedFetchDynamicFeatureFunc,this._staticFeaturesLayer=new nr({cesiumTilesetLayerOptions:{url:this.staticRepresentation.threeDim,screenSpaceError:this.vcsMeta.screenSpaceError?this.vcsMeta.screenSpaceError:4},openlayersTiledLayerOptions:this.staticRepresentation.twoDim?{url:this.staticRepresentation.twoDim}:void 0,name:this.name,style:this.style,genericFeatureProperties:this._genericFeatureProperties}),this._staticFeaturesExtent=null,this._setEditing=null,e.features){const t={type:"FeatureCollection",features:e.features,vcsMeta:e.vcsMeta},i=Bs(t,{targetProjection:S.createMercatorProjection(),dynamicStyle:!0}),s=i.style,r=i.features;s&&(this.defaultStyle=s,this._staticFeaturesLayer.defaultStyle=s,this.setStyle(s)),this.addFeatures(r)}}get altitudeMode(){return this._altitudeMode}set altitudeMode(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.altitudeMode=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get skirt(){return this._skirt}set skirt(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.skirt=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get storeyHeight(){return this._storeyHeight}set storeyHeight(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.storeyHeight=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get classificationType(){return this._classificationType}set classificationType(e){const t=this.changeTracker.active;t&&this.changeTracker.pauseTracking("changefeature"),super.classificationType=e,t&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}get screenSpaceErrorMobile(){return this._staticFeaturesLayer.screenSpaceErrorMobile}get screenSpaceError(){return this._staticFeaturesLayer.screenSpaceError}initialize(){this.initialized||(super.initialize(),this._staticFeaturesLayer.initialize(),this._hideDynamicFeatures())}getVcsMeta(e){const t=super.getVcsMeta(e);return t}synchronizeImplementations(e,t){return super.synchronizeImplementations(e,t).then(()=>{return this._staticFeaturesLayer.synchronizeImplementations(e,t)})}_hideDynamicFeatures(){const e=[];this.hiddenStaticFeatureIds.forEach(t=>{e.push(t)}),this._staticFeaturesLayer.hideObjects(e)}activate(e){return super.activate(e).then(()=>this._staticFeaturesLayer.activate(e)).then(()=>{this._setEditing&&this.setEditing(this._setEditing.symbol,this._setEditing.featureType)}).catch(e=>{this.logger.error(e)})}setStyle(e,t){const i=this.changeTracker.active;i&&this.changeTracker.pauseTracking("changefeature"),super.setStyle(e,t),this._staticFeaturesLayer.setStyle(e,t),i&&(this.changeTracker.track(),this.changeTracker.values.changed=!0)}getExtent(){let e=this.source.getExtent();if(this._staticFeaturesExtent)e=ol.extent.extend(e,this._staticFeaturesExtent);else if(this._staticFeaturesLayer.active){const t=this.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===t.className){const i=this._staticFeaturesLayer.getImplementation(t),s=i.cesium3DTileset.root.boundingVolume.rectangle,r=Cesium.Rectangle.southwest(s),n=Cesium.Rectangle.northeast(s),a=S.wgs84ToMercator([Cesium.Math.toDegrees(r.longitude),Cesium.Math.toDegrees(r.latitude)]),o=S.wgs84ToMercator([Cesium.Math.toDegrees(n.longitude),Cesium.Math.toDegrees(n.latitude)]);this._staticFeaturesExtent=[a[0],a[1],o[0],o[1]],e=ol.extent.extend(e,this._staticFeaturesExtent)}}return this.extent.extent=e,this.extent}setEditing(e,t){const i=this.framework.getMapByType("vcs.vcm.maps.Cesium");if(this._staticFeaturesLayer.setEditing(e,t),i){const s=this._staticFeaturesLayer.getImplementation(i);s.initialized?(null!=t?s.cesium3DTileset[e]=t:delete s.cesium3DTileset[e],this._setEditing=null):this._setEditing={symbol:e,featureType:t}}}hideObjects(e){super.hideObjects(e),this._staticFeaturesLayer.hideObjects(e)}showObjects(e){super.showObjects(e);const t=e.filter(e=>!this.hiddenStaticFeatureIds.has(e));this._staticFeaturesLayer.showObjects(t)}clearHiddenObjects(){super.clearHiddenObjects(),this._staticFeaturesLayer.clearHiddenObjects(),this._hideDynamicFeatures()}highlight(e){super.highlight(e),this._staticFeaturesLayer.highlight(e)}unHighlight(e){super.unHighlight(e),this._staticFeaturesLayer.unHighlight(e)}clearHighlighting(){super.clearHighlighting(),this._staticFeaturesLayer.clearHighlighting()}objectClickedHandler(e,t,i){return e[sr]?this._staticFeaturesLayer.objectClickedHandler(e,t,i||this):e instanceof ol.Feature&&super.objectClickedHandler(e,t,i||this)}getGenericFeatureFromClickedObject(e){if(e instanceof ol.Feature)return super.getGenericFeatureFromClickedObject(e);const t=this._staticFeaturesLayer.getGenericFeatureFromClickedObject(e);return t.layerName=this.name,t.layerClass=this.className,t}determineHighlightStyle(e,t){const i=this.getFeatureById(e);return i||t instanceof ol.Feature?super.determineHighlightStyle(e,t):this._staticFeaturesLayer.determineHighlightStyle(e,t)}setMaximumScreenSpaceError(e){this._staticFeaturesLayer.setMaximumScreenSpaceError(e)}switchStaticFeatureToDynamic(e){return this.hiddenStaticFeatureIds.has(e)?Promise.resolve(this.getFeatureById(e)):this.injectedFetchDynamicFeatureFunc?this.injectedFetchDynamicFeatureFunc(e).then(t=>{const i=Bs(t,{targetProjection:S.createMercatorProjection(),defaultStyle:this.defaultStyle instanceof Je?this.defaultStyle:Ke}),s=i.features;return this._staticFeaturesLayer.hideObjects([e]),this.hiddenStaticFeatureIds.add(e),this.addFeatures(s),s[0]}).catch(e=>{this.logger.error(e.message)}):Promise.reject(new Error("no injected fetching function"))}removeStaticFeature(e){this._staticFeaturesLayer.hideObjects([e]),this.hiddenStaticFeatureIds.add(e);const t=new ol.Feature;t.setId(e),t[Is]=Ds.STATIC,this.changeTracker.removeFeature(t)}dispose(){this.removeAllFeatures(),this._staticFeaturesLayer.dispose(),this.changeTracker.dispose(),super.dispose()}}var Sr=Tr;I.WIDGET_ACTIVATED="WIDGET_ACTIVATED",I.WIDGET_DEACTIVATED="WIDGET_DEACTIVATED",I.WIDGET_STATE_CHANGED="WIDGET_STATE_CHANGED";class Cr extends M{constructor(e){super(e),this.title=e.title?e.title:null,this.supportedMaps=e.supportedMaps?e.supportedMaps:["ALL"],this.initializeKey=null,this.initialized=!1,this.active=!1}initialize(){if(!this.initialized){if("ALL"===this.supportedMaps[0])return!0;const e=this.framework.getActiveMap();return this.isSupported(e)?(this.initializeKey&&this.framework.unsubscribeByKey(this.initializeKey),this.framework.subscribe(I.MAP_ACTIVATED,this.handleMapChangeEvent.bind(this)),!0):(this.initializeKey||(this.initializeKey=this.framework.subscribe(I.MAP_ACTIVATED,this.initialize.bind(this))),!1)}}initializedFinished(){"ALL"!==this.supportedMaps[0]&&this.handleMapChangeEvent(this.framework.getActiveMap())}dispose(){}isActive(){return this.logger.deprecate("isActive","please use the property .active directly"),this.active}activate(){this.active||(this.active=!0,this.framework.publish(I.WIDGET_ACTIVATED,this))}deactivate(){this.active&&(this.active=!1,this.framework.publish(I.WIDGET_DEACTIVATED,this))}handleURLParameter(e){}getLink(e){}isSupported(e){a(e,[oe,String]);const t=e instanceof oe?e.className:e;return"ALL"===this.supportedMaps[0]||-1!==this.supportedMaps.indexOf(t)}getSupportedMaps(){return this.supportedMaps}handleMapChangeEvent(e){this.isSupported(e)?this.framework.publish(I.WIDGET_STATE_CHANGED,this):(this.framework.publish(I.WIDGET_STATE_CHANGED,this),this.deactivate())}isInitialized(){return this.initialized}}var kr=Cr;const Er=v.getLogger("vcs.vcm.widgets.legend.TreeItem");class Ir{constructor(e){this.className=e.className,this.titleObject=e.title,this.infoUrl=e.infoUrl?e.infoUrl:null,this.infoUrlTarget=e.infoUrlTarget?e.infoUrlTarget:null,this.viewpointName=e.viewpointName?e.viewpointName:null,this.level=0,this.visible=!1,this.disabled=!1,this.id=e.name||Object(c["c"])(),this.focus=!1,this.initialized=!1,this.showInLegendIfDisabled=Object(c["e"])(e.showInLegendIfDisabled,!0)}initialize(e){return this.initialized||(this.level=e),!0}isInitialized(){return Er.deprecate("isInitialized","access the property .initialized directly."),this.initialized}activate(e,t){}mapChanged(e){}layerChanged(e){}getViewPoint(){return Er.deprecate("getViewPoint","use goToViewpoint instead or access the .viewpointName property."),this.viewpointName?G.getInstance().getViewPointByName(this.viewpointName):null}gotoViewpoint(){if(this.viewpointName){const e=G.getInstance(),t=e.getViewPointByName(this.viewpointName);t&&e.getActiveMap().gotoViewPoint(t)}}}var Dr=Ir;class Pr extends Dr{constructor(e){if(super(e),this.factory=e.factory,this.startopen=Object(c["e"])(e.startOpen,!1),this.clickable=Object(c["e"])(e.clickable,!0),this.open=this.startopen,this.children=[],this.state="inactive",Array.isArray(e.children)){const t=e.children;for(let e=0;e<t.length;e++){const i=t[e],s=this.factory(i);s&&s instanceof Dr&&this.children.push(s)}if(e.clusterIcons){const i=[],s=e=>{e.children?e.children.forEach(s):i.push({name:e.layerName,title:e.title,parent:{id:this.id,title:this.titleObject}})};if(t.forEach(s),"string"===typeof e.clusterIcons){const t=G.getInstance(),s=t.getLayerByName(e.clusterIcons);s&&s instanceof cr?s.addLayers(i):t.addLayer(new cr({name:e.clusterIcons,clusterLayers:i,activeOnStartup:!0}))}}}}initialize(e){if(!this.initialized){if(!super.initialize(e))return!1;const t=[];this.children.forEach((e,i)=>{e.initialize(this.level+1)||t.push(i)});for(let e=t.length-1;e>-1;e--)this.children.splice(t[e],1)}return!0}setState(){if(this.visible){let e=null;const t=t=>{t.visible&&t.state&&(e?"active"===e||"inactive"===e?e!==t.state&&(e="loading"===t.state?t.state:"indeterminate"):"indeterminate"===e&&"loading"===t.state&&(e=t.state):e=t.state)};this.children.forEach(t),this.state=e}}activate(e,t){this.children.forEach(t=>{t.activate(e,!0)},this),this.setState(),e&&!t&&this.gotoViewpoint()}mapChanged(e){this.children.forEach(t=>{t.mapChanged(e)},this),this.visible=!!this.children.find(e=>e.visible),this.setState()}layerChanged(e){this.children.forEach(t=>{t.layerChanged(e)},this),this.visible=!!this.children.find(e=>e.visible),this.setState()}}var Or=Pr;class Yr extends Or{static get className(){return"vcs.vcm.widgets.legend.ClusterItem"}constructor(e){e.className=Yr.className,super(e),this.startopen=!0,this.clickable=!1,this.open=!0,this.breakAfter=!!e.breakAfter}}var xr=Yr;const Ar=v.getLogger("vcs.vcm.widgets.legend.LayerItem");class jr extends Dr{static get className(){return"vcs.vcm.widgets.legend.LayerItem"}constructor(e){e.className=jr.className,super(e),this.layerName=e.layerName?e.layerName:"",this.availableStyles=e.availableStyles||[],e.styles&&(Ar.deprecate("styles","define styles in the config and add their names as availableStyles, do not define them in the LayerItem config"),e.styles.forEach(e=>{e.name||("string"===typeof e.title?e.name=e.title:e.name=Object(c["c"])()),G.getInstance().addStyle(new it(e)),this.availableStyles.push(e.name)})),this.state="inactive",this.activeStyleName=null,this.hasFeatureListView=!1}initialize(e){if(!this.initialized){if(!super.initialize(e))return!1;const t=G.getInstance().getLayerByName(this.layerName);if(!t)return Ar.warning(`Could not find Layer with name ${this.layerName} Legend LayerItem for layer is not shown`),this.visible=!1,!1;this.activeStyleName=t.style?t.style.name:null}return!0}layerChanged(e){e.name===this.layerName&&this.setState()}mapChanged(e){const t=G.getInstance().getLayerByName(this.layerName);t&&(this.visible=t.isSupported(e),this.setState())}setState(){if(this.visible){const e=G.getInstance().getLayerByName(this.layerName);e&&(e.active?this.state="active":this.state="inactive")}}activate(e,t){if("loading"===this.state)return;const i=G.getInstance().getLayerByName(this.layerName);i&&i.isSupported()&&i.active!==e&&(e&&(this.state="loading"),i.activate(e).then(()=>{this.setState(),e&&!t&&this.gotoViewpoint()}).catch(()=>{this.visible=!1}))}isIconManagerInUse(){const e=G.getInstance().getLayerByName(this.layerName);return!!e&&e.iconManagerInUse}}var Fr=jr;const Nr=v.getLogger("vcs.vcm.widgets.legend.GroupLayerItem");class Hr extends Dr{static get className(){return"vcs.vcm.widgets.legend.GroupLayerItem"}constructor(e){e.className=Hr.className,super(e),this.layerNames=e.layerNames||e.layerName||[],e.layerName&&Nr.deprecate("option.layerName","Use option.layerNames instead"),this.state="inactive"}initialize(e){if(!this.initialized){super.initialize(e);const t=G.getInstance(),i=[],s=this.layerNames.every(e=>{const s=t.getLayerByName(e);return s?(i.push(s),!0):(Nr.warning(`Could not find Layer with name ${e} Legend GroupLayerItem is not shown`),!1)});if(!s)return!1;this.visible=i.some(e=>e.isSupported()),this.state=i.every(e=>e.active||e.activeOnStartup)?"active":"inactive"}return!0}activate(e,t){if(this.setState(),"active"!==this.state&&e||!e){const i=G.getInstance();this.state=e?"loading":"inactive";const s=this.layerNames.map(e=>i.getLayerByName(e)).map(t=>t.activate(e));e&&!t&&this.gotoViewpoint(),Promise.all(s).then(()=>{this.state="indeterminate",this.setState()})}}setState(){const e=G.getInstance(),t=this.layerNames.map(t=>e.getLayerByName(t)).filter(e=>e.isSupported()).map(e=>e.active);("loading"!==this.state||t.every(e=>e))&&(t.every(e=>e)?this.state="active":t.some(e=>e)?this.state="indeterminate":this.state="inactive")}mapChanged(e){const t=G.getInstance();this.visible=this.layerNames.map(e=>t.getLayerByName(e)).some(t=>t.isSupported(e)),this.visible&&"active"===this.state&&this.activate(!0)}layerChanged(e){if(this.visible&&this.layerNames.includes(e.name)){if("active"===this.state||"loading"===this.state)return void this.setState();const e=G.getInstance(),t=this.layerNames.map(t=>e.getLayerByName(t)).every(e=>e.initialized&&!e.active||!e.initialized&&!e.activeOnStartup);t&&this.setState()}}}var Rr=Hr;class zr extends Or{static get className(){return"vcs.vcm.widgets.legend.GroupItem"}constructor(e){e.className=zr.className,super(e)}}var Gr=zr;class Vr extends Dr{static get className(){return"vcs.vcm.widgets.legend.PluginItem"}constructor(e){e.className=Vr.className,super(e),this.name=e.name,this.plugin=e.plugin,this.config=e.config||{},this.visible=!0}}var Br=Vr;class Ur extends Dr{static get className(){return"vcs.vcm.widgets.legend.ViewpointItem"}constructor(e){e.className=Ur.className,super(e),this.layerNames=e.layerNames||[]}initialize(e){if(!this.initialized){if(!super.initialize(e))return!1;this.viewpointName&&(this.visible=!!G.getInstance().getViewPointByName(this.viewpointName))}return!0}activate(e,t){t||e&&(this.gotoViewpoint(),this.layerNames.forEach(e=>{const t=G.getInstance().getLayerByName(e);t&&t.activate(!0)}))}}var Wr=Ur;class qr extends Dr{static get className(){return"vcs.vcm.widgets.legend.PlanningInstanceItem"}constructor(e){e.className=qr.className,super(e),this.planningInstance=e.planningInstance,this.titleObject=this.planningInstance.name,this.visible=!0}}var Jr=qr;const Kr=v.getLogger("vcs.vcm.widgets.legend.PlanningClusterItem");let Zr;class Qr extends xr{static get className(){return"vcs.vcm.widgets.legend.PlanningClusterItem"}constructor(e){if(Zr)return Kr.warning("trying to instanciate PlanningClusterItem more then once!"),Zr;super(e),Zr=this}destroy(){Zr=void 0}}var $r=Qr;function Xr(){return Zr}class en extends Dr{static get className(){return"vcs.vcm.widgets.legend.FlightInstanceItem"}constructor(e){e.className=en.className,super(e),this.flightInstance=e.flightName?G.getInstance().getFlightByName(e.flightName):e.flightInstance,this.titleObject=e.title||this.flightInstance.name,this.allowPlayer=Object(c["e"])(e.allowPlayer,!1),this.visible=!0}mapChanged(e){this.visible=e instanceof Mt}}var tn=en;I.LEGEND_INITIALIZED="LEGEND_INITIALIZED";const sn={[xr.className]:xr,[Fr.className]:Fr,[Rr.className]:Rr,[Gr.className]:Gr,[Br.className]:Br,[Jr.className]:Jr,[Wr.className]:Wr,[tn.className]:tn,[$r.className]:$r},rn=v.getLogger("vcs.vcm.widgets.legend.Legend");function nn(e){if(!e.type)return rn.warning("Need a type to instanciate a Legend Entry"),null;const t=sn[e.type];return t?(e.factory=nn,new t(e)):(rn.warning(`could not find constructor for ${e.type}`),null)}class an extends kr{static get className(){return"vcs.vcm.widgets.legend.Legend"}constructor(e){e.className=an.className,super(e),this.cluster=[],this.level=-1;const t=[];if(Array.isArray(e.children)){const i=e.children;for(let e=0;e<i.length;e++){const s=i[e];if(s.type&&s.type===xr.className){const e=nn(s);e&&e instanceof xr&&this.cluster.push(e)}else t.push(s)}}if(t.length>0){const e=new xr({children:t,factory:nn});this.cluster.push(e)}this.layerTitles={};var i=function e(t){t.children?t.children.forEach(e,this):t.layerName&&(this.layerTitles[t.layerName]=t.titleObject)};this.cluster.forEach(i,this),this.zoomToFirstLayer=!!e.zoomToFirstLayer}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.cluster.forEach(function(e){e.initialize(this.level)},this);const t=this.framework.getActiveMap();this.cluster.forEach(e=>{e.mapChanged(t)},this),this.initialized=!0,this.framework.publish(I.LEGEND_INITIALIZED,this),this.framework.subscribe(I.MAP_ACTIVATED,this.mapChanged.bind(this)),this.framework.subscribe(I.LAYER_CHANGED,this.layerChanged.bind(this)),this.framework.subscribe(I.PLANNINGINSTANCES_CHANGED,this.layerChanged.bind(this,{}))}}handleURLParameter(e){if(this.zoomToFirstLayer&&e.layerToActivate){const i=Array.isArray(e.layerToActivate)?e.layerToActivate:[e.layerToActivate];var t=function e(t){if(t.children){const i=t.children.find(e);return i&&(t.open=!0,t.startopen=!0,(i instanceof Fr||i instanceof Rr)&&(i.level>0?t.focus=!0:i.focus=!0)),i}return t.layerNames?t.visible&&t.layerNames.every(e=>i.includes(e)):t.visible&&t.layerName&&i.includes(t.layerName)};this.cluster.find(t)}}mapChanged(e){this.cluster.forEach(t=>{t.mapChanged(e)},this)}layerChanged(e){this.cluster.forEach(t=>{t.layerChanged(e)},this)}resetLayer(){const e=this.framework.getLayers();for(let t=0;t<e.length;t++)e[t].active!=e[t].activeOnStartup&&e[t].activate(e[t].activeOnStartup)}getLayerTitle(e){return a(e,String),this.layerTitles[e]||null}findTreeItems(e){const t=[];function i(s){for(let r=0;r<s.length;r++)e(s[r])&&t.push(s[r]),s[r]instanceof Or&&i(s[r].children)}return i(this.cluster),t}}var on=an;I.PLANNING_OBJECT_SAVED="PLANNING_OBJECT_SAVED";const ln={GLTF:"gltf",FEATURE_STORE:"featureStore",IMAGE:"image",DRAWING:"drawing",PROCESSING:"processing"},cn={INITIALIZING:"initializing",CONVERTING:"converting",OPTIMIZING:"optimizing",READY:"ready",FAILED:"failed"};class hn{static get className(){return"vcs.vcm.widgets.planning.PlanningObject"}constructor(e){this.name=e.name?e.name:"think of something",this._id=e._id,this.planningInstanceId=e.planningInstanceId,this.type=e.type,this.created=e.created,this.lastUpdated=e.lastUpdated||null,this.allowPicking=e.allowPicking,this.status=e.status,this._onServiceUrl=e.url,this.serviceUrl=e.serviceUrl;const t=this.serviceUrl.clone();t.clearQueryParams(),this.url=e.url?t.extendPath("..",e.url).toString():null,this.description=e.description,this.positionFields=[],this.visible=Object(c["e"])(e.visibility,!0),this.supportedMaps=[],this.supported=!1,this.properties=e.properties||{}}initialize(){const e=G.getInstance().getActiveMap();this.handleMapChange(e)}getDefinition(){return{_id:this._id,planningId:this.planningInstanceId,name:this.name,description:this.description,type:this.type,visibility:this.visible,url:this.getDefinitionUrl()}}handleMapChange(e){this.isSupported(e)}isSupported(e){this.supported=0===this.supportedMaps.length||this.supportedMaps.indexOf(e.className)>-1}save(){const e=this.serviceUrl.clone().extendPath("edit-object");return q.a.post(e.toString(),this.getDefinition()).then(()=>{G.getInstance().publish(I.PLANNING_OBJECT_SAVED)})}delete(){const e=this.serviceUrl.clone().extendPath("delete-object");return q.a.post(e.toString(),{_id:this._id,planningId:this.planningInstanceId})}getDefinitionUrl(){return this._onServiceUrl}load(){}unload(){}hide(){this.visible=!1,this.unload()}show(){this.visible=!0}isPlaced(){return!0}zoomTo(){}destroy(){}getConfigObject(){return{url:this.url,attributes:{name:this.name,description:this.description}}}}var un=hn;class dn extends un{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectGltf"}constructor(e){e.className=dn.className,super(e),this.planningInstanceGltfLayerName=e.planningInstanceGltfLayerName,this.latitude=e.modelMeta.latitude,this.longitude=e.modelMeta.longitude,this.height=null!=e.modelMeta.height?e.modelMeta.height:0,this.heading=e.modelMeta.heading,this.heading=this.heading>180?this.heading-360:this.heading,this.pitch=e.modelMeta.pitch,this.roll=e.modelMeta.roll,this.scale=e.modelMeta.scale,this.positionFields=["longitude","latitude","height","heading","pitch","roll","scale"],this.supportedMaps=["vcs.vcm.maps.Cesium"],this.entityId=null}handleMapChange(e){if(super.handleMapChange(e),this.supported&&!this.entityId){const e=this.getModelLayer();this.entityId=e.addObject(this.getConfigObject())}}getModelLayer(){const e=G.getInstance().getLayerByName(this.planningInstanceGltfLayerName);return e}getDefinition(){const e=super.getDefinition(),t={};return this.positionFields.forEach(e=>{t[e]=this[e]}),e.modelMeta=t,e}resetModelMatrix(){if(this.entityId){const e=this.getModelLayer();e.updateEntityById(this.entityId,this.getConfigObject())}}zoomTo(){this.isPlaced()&&this.getModelLayer().flyToEntity(this.entityId)}hide(){super.hide(),this.entityId&&this.getModelLayer().hideObjects([this.entityId])}show(){super.show(),this.entityId&&this.getModelLayer().showObjects([this.entityId])}setObjectOntoTerrain(){const e=G.getInstance().getLayers(),t=e.find(e=>e instanceof vt&&e.isActive());return _t(t.cesiumTerrainProvider,[[this.longitude,this.latitude]]).then(e=>{this.height=e[0][2]})}isPlaced(){const e=[];return this.positionFields.forEach(t=>{const i=this[t];-1===e.indexOf(i)&&e.push(i)}),!(0===e[0]&&1===e[1]&&2===e.length)}destroy(){this.entityId&&this.getModelLayer().removeObjectById(this.entityId)}getConfigObject(){const e=super.getConfigObject();return e.latitude=this.latitude,e.longitude=this.longitude,e.height=this.height,e.heading=this.heading,e.pitch=this.pitch,e.roll=this.roll,e.scale=this.scale,e.allowPicking=this.allowPicking,e.show=this.visible,e}}var mn=dn;class gn extends un{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectImage"}constructor(e){super(e),this.extent=[-.5,-.5,.5,.5],e.imageMeta.extent&&this._setExtent(e.imageMeta.extent),this.opacity=e.imageMeta.opacity,this.credit=e.imageMeta.credit,this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this.editorId=e.editorId}load(){if(!this.getImageLayer()){const e=new $s({name:this._id,url:this.url,imageExtent:this.extent,opacity:this.opacity,credit:this.credit});G.getInstance().addLayer(e)}this.visible&&this.getImageLayer().activate(!0)}unload(){const e=this.getImageLayer();e&&e.activate(!1)}isPlaced(){return!this.extent.every(e=>.5===Math.abs(e))}getImageLayer(){const e=G.getInstance().getLayerByName(this._id);return e}getDefinition(){const e=super.getDefinition();return e.imageMeta={extent:this.extent,opacity:this.opacity,credit:this.credit},e}zoomTo(){if(this.isPlaced()){const e=G.getInstance().getActiveMap(),t=E.createViewPointFromExtent(this.extent);t.setHeading(0),t.setPitch(-90),t.setRoll(0),e.gotoViewPoint(t)}}show(){super.show();const e=this.getImageLayer();e&&e.activate(!0)}setOpacity(e){a(e,Number),this.opacity=e,this.getImageLayer().setOpacity(e)}setExtent(e,t){a(e,[Number]),a(e.length,4),o(t,S);const i=this._setExtent(e,t);i.isValid()&&this.getImageLayer().setExtent(this.extent)}_setExtent(e,t){let i=t?t.epsg:void 0;if(!i){const t=ol.extent.containsExtent(ge.WGS_84_EXTENT,e);i=t?"EPSG:4326":i}const s=new ge({coordinates:e,epsg:i});return s.isValid()&&s.getCoordinatesInProjection(S.createGeographicProjection(),this.extent),s}destroy(){const e=this.getImageLayer();e&&e.dispose()}getConfigObject(){const e=super.getConfigObject();return e.extent=this.extent,e.credit=this.credit,e.opacity=this.opacity,e}}var pn=gn;class yn extends ie{constructor(e){super(),this._onSelect=[],this._onCesiumSelect=[],this.featureMap=new Map,this.cesiumFeatureMap=new Map,this.state=e,this._defaultActive=Q.CLICK,this._defaultModificationKey=Z.NONE,this.modificationKey=this._defaultModificationKey,this.maintainSelection=!1,this.setActive(!1)}pipe(e){return e.feature&&e.feature[this.state.featureTypeSymbol]&Yi.EDITABLE&&!(e.feature[this.state.featureTypeSymbol]&Yi.EDITING)?(e.key&Z.NONE?this.selectFeature(e.feature):e.key&Z.CTRL&&this.selectionSetClick(e.feature),e.stopPropagation=!(this.state.mode&Oi.PROPAGATEONSELECT)):e.key&Z.NONE&&(!e.feature||!e.feature[this.state.featureTypeSymbol]&&this.state.mode&(Oi.EDIT|Oi.SELECT))&&this.state.selectedFeatures>0&&this.clearSelectionSet(),Promise.resolve(e)}setActive(e){super.setActive(e),this.maintainSelection=!1}hasMultiSelect(){this._defaultModificationKey&Z.CTRL||(this._defaultModificationKey|=Z.CTRL,this.setModification())}selectFeature(e){this.state.mode&Oi.TRANSLATE&&this.featureMap.has(e.getId())||(this.clearSelectionSet(!0),e[sr]?(this.cesiumFeatureMap.set(e.getId(),e),this.state.selectedCesiumFeatures=this.cesiumFeatureMap.size,this.state.selectedFeatures=this.featureMap.size+this.cesiumFeatureMap.size,this._setState(e),this._cesiumCb()):(this.featureMap.set(e.getId(),e),this.state.selectedFeatures=this.featureMap.size+this.cesiumFeatureMap.size,this._setState(e)),this._cb())}_setState(e){if(e){this.state.selectedFeatureId=e.getId(),this.state.layerName=e[gt.vcsLayerNameSymbol];const t=e.getProperty("olcs_classificationType");t&&Fi[t]?this.state.classificationType=Fi[t]:this.state.classificationType=this.state.defaultClassificationType;const i=e.getProperty("olcs_altitudeMode");if(i&&ji[i]){const e=ji[i];this.state.altitudeMode&Ai.ZPLANE&&e&Ai.ABSOLUTE||(this.state.altitudeMode=e)}else this.state.altitudeMode=this.state.defaultAltitudeMode}else this.state.altitudeMode=this.state.defaultAltitudeMode,this.state.classificationType=this.state.defaultClassificationType,this.state.selectedCesiumFeatures=0,this.state.selectedFeatures=0,this.state.selectedFeatureId=null}selectionSetClick(e,t){const i=e.getId(),s=!e[sr],r=s?this.featureMap.delete(i):this.cesiumFeatureMap.delete(i);r||(s?this.featureMap.set(i,e):this.cesiumFeatureMap.set(i,e)),r?r&&i===this.state.selectedFeatureId&&(this.featureMap.size?this._setState(this.featureMap.values().next().value):this.cesiumFeatureMap.size?this._setState(this.cesiumFeatureMap.values().next().value):this._setState()):(s&&1===this.featureMap.size&&!this.cesiumFeatureMap.size||!s&&1===this.cesiumFeatureMap.size&&!this.featureMap.size)&&this._setState(e),this.state.selectedFeatures=this.featureMap.size+this.cesiumFeatureMap.size,this.state.selectedCesiumFeatures=this.cesiumFeatureMap.size,t||(s?this._cb():this._cesiumCb())}clearCesiumSelectionSet(){const e=!!this.cesiumFeatureMap.size;this.cesiumFeatureMap.has(this.state.selectedFeatureId)&&(this.featureMap.size?this._setState(this.featureMap.values().next().value):this._setState()),this.state.selectedCesiumFeatures=0,this.cesiumFeatureMap.clear(),e&&this._cesiumCb()}clearSelectionSet(e){this.featureMap.clear(),this.clearCesiumSelectionSet(),this._setState(),e||this._cb()}onSelect(e){a(e,Function),this._onSelect.push(e)}onCesiumSelect(e){a(e,Function),this._onCesiumSelect.push(e)}_cb(){for(let e=0;e<this._onSelect.length;e++)this._onSelect[e]()}_cesiumCb(){for(let e=0;e<this._onCesiumSelect.length;e++)this._onCesiumSelect[e]()}}var _n=yn;const fn=v.getLogger("vcs.vcm.util.editor.AbstractEditor");class vn{get className(){return"vcs.vcm.util.editor.AbstractEditor"}constructor(e){this.parent=e.parent||null;const t=this.parent?this.parent.scratchLayer:e.scratchLayer;this.scratchLayer=t||new Ki({projection:S.createMercatorProjection().getConfigObject(),altitudeMode:"clampToGround",isDynamic:!0,zCoordinateEyeOffset:-1}),this.interactionChain=new re;const i=this.parent?this.parent.state:e.state;this.state=i||{mode:Oi.NONE,altitudeMode:Ai.CLAMP,defaultAltitudeMode:Ai.CLAMP,allowedGeometries:[],allowedModes:[],onlyAllowTranslation:!1,selectedFeatures:0,selectedCesiumFeatures:0,layerName:null,selectedFeatureId:null,active:!1,featureTypeSymbol:Symbol("featureType"),exclusiveId:Object(c["c"])(),dedicatedFeatureStyle:!1,transformGeometryOnMove:A.getInstance().transformGeometryOnMove,activeMap:null,isFeatureStore:!1,canSwitchToDynamic:!1,classificationType:Fi.terrain,defaultClassificationType:Fi.terrain,isDeclarativeStyle:!1,isLayerStyle:!1},this.isOblique=G.getInstance().getActiveMap()instanceof ui,this._mapChangedSubscriptionKey=G.getInstance().subscribe(I.MAP_ACTIVATED,e=>{this.state.active&&this.handleMapChange(e)}),this.modeChange=new Cesium.Event}activate(){this.isOblique=G.getInstance().getActiveMap()instanceof ui,this.parent||(this.state.active=!0,this.scratchLayer.activate(!0))}deactivate(){this.parent||(this.state.active=!1,this.scratchLayer.activate(!1))}getRootEditor(){let e=this;while(e.parent)e=e.parent;return e}initialize(){this.interactionChain.initialize(),this.handleMapChange(G.getInstance().getActiveMap())}beforeSetMode(e){}setMode(e){this.parent||this.beforeSetMode(e),fn.debug(`AbstractEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),a(e,Number),this.interactionChain.chain.forEach(e=>{e.setActive(!1)}),this.state.mode=e,this.modeChange.raiseEvent(e)}destroy(){null!=this._mapChangedSubscriptionKey&&G.getInstance().unsubscribeByKey(this._mapChangedSubscriptionKey)}handleMapChange(e){this.isOblique=e instanceof ui}}var Ln=vn;class Mn extends ie{constructor(e){super(),this.zPlane=e.zPlane,this.scene=null,this.plane=null,this.ray=new Cesium.Ray,this.cartographic=new Cesium.Cartographic}handleMapChange(e){this.plane=null,this.scene=e instanceof Mt?e.getScene():null}createPlane(e){this.scene&&(this.plane=this.zPlane?zt(e,this.scene):Rt(e,this.scene))}getPosition(e){let t=e.positionOrPixel.slice();if(this.plane){this.ray=this.scene.camera.getPickRay(e.windowPosition,this.ray);const i=Cesium.IntersectionTests.rayPlane(this.ray,this.plane);i&&(this.cartographic=this.scene.globe.ellipsoid.cartesianToCartographic(i,this.cartographic),this.zPlane?t=S.wgs84ToMercator([Cesium.Math.toDegrees(this.cartographic.longitude),Cesium.Math.toDegrees(this.cartographic.latitude),this.cartographic.height]):t[2]=this.cartographic.height)}return t}}var bn=Mn;const wn=new ol.style.Style({});class Tn extends bn{constructor(e,t){super({zPlane:!0}),this.editor=e,this.selectFeatureInteraction=e.parent?e.parent.selectFeatureInteraction:null,this.forceZPlane=!!t,this._defaultActive=Q.DRAGEVENTS,this._defaultModificationKey=Z.ALT,this._lastPosition=null,this._vertex=null,this.setActive()}pipe(e){if(this._lastPosition){const t=this.getPosition(e),i=e.type&(Q.DRAGEND|Q.CLICK);this.editor.translateVertex(t[0]-this._lastPosition[0],t[1]-this._lastPosition[1],t,this._vertex,!(this.editor.state.transformGeometryOnMove||i)),this._lastPosition=t,i&&(this._lastPosition=null,this._vertex.setStyle(this._vertex[We]?this._vertex[We].style:null),this._vertex=null,this.editor.feature.set("olcs_allowPicking",!!(this.editor.state.mode&Oi.EDIT)),this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!0))}else e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.VERTEX&&e.type&(Q.DRAGSTART|Q.CLICK)&&(this.scene&&(this.editor.state.altitudeMode&Ai.ZPLANE||this.forceZPlane&&this.editor.state.altitudeMode&Ai.ABSOLUTE)?(this._lastPosition=e.feature.getGeometry().getCoordinates(),this.createPlane(this._lastPosition)):(this.plane=null,this._lastPosition=this.scene?e.feature.getGeometry().getCoordinates():e.positionOrPixel),this._vertex=e.feature,this._vertex.setStyle(wn),this.editor.feature.set("olcs_allowPicking",!1),this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!1));return Promise.resolve(e)}}var Sn=Tn;class Cn extends bn{constructor(e){super({zPlane:!1}),this.editor=e,this.selectFeatureInteraction=e.parent?e.parent.selectFeatureInteraction:null,this._defaultActive=Q.DRAGEVENTS,this._defaultModificationKey=Z.CTRL,this._lastHeight=null,this._vertex=null,this.setActive()}pipe(e){if(this.scene)if(this._lastHeight){const t=this.getPosition(e),i=e.type&(Q.DRAGEND|Q.CLICK);this.editor.translateVertexHeight(t[2]-this._lastHeight,this._vertex,!(this.editor.state.transformGeometryOnMove||i)),this._lastHeight=t[2],i&&(this._lastHeight=null,this._vertex=null,this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!0))}else if(e.key&Z.CTRL&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.VERTEX&&e.type&(Q.DRAGSTART|Q.CLICK)){const t=e.feature.getGeometry().getCoordinates();this._lastHeight=t[2],this.createPlane(t),this._vertex=e.feature,this.selectFeatureInteraction&&this.selectFeatureInteraction.setActive(!0)}return Promise.resolve(e)}setActive(e){super.setActive("clampToGround"!==this.editor.feature.get("olcs_altitudeMode")&&e)}}var kn=Cn;const En=Symbol("vertexIndex"),In=v.getLogger("vcs.vcm.util.editor.AbstractGeometryEditor");class Dn extends Ln{constructor(e,t){super(e),this.creationActive=!1,this.geometry=e.geometry,this.layer=e.layer,this.feature=e.feature,this.vertices=[],this.onFinish=e.onFinish||this.getRootEditor().setMode.bind(this,Oi.EDIT),this.onRemoved=e.onRemoved||(()=>{}),this._create=null,this._translateVertex=new Sn(this,t),this.interactionChain.addInteraction(this._translateVertex),this._translateVertexHeight=new kn(this),this.interactionChain.addInteraction(this._translateVertexHeight),this.setAltitudeModeToAbsoluteOnClassification=!0}initialize(){super.initialize(),this._createVertices(),this.feature.set("olcs_allowPicking",!1)}_createVertices(){}_createVertex(e,t){const i=this.feature.get("olcs_extrudedHeight")||this.feature.get("olcs_storeyNumber")&&this.feature.get("olcs_storeyHeight")?this.feature.get("olcs_groundLevel"):0;e[2]=i||e[2]||0;const s=new ol.geom.Point(e);this.isOblique&&(s[Ki.alreadyTransformedToImage]=!0);const r=new ol.Feature({geometry:s});r[this.state.featureTypeSymbol]=Yi.VERTEX,null!=t&&(r[En]=t),r[Ki.doNotTransform]=!0;let n=this.feature.get("olcs_altitudeMode")||this.layer.altitudeMode;return this.setAltitudeModeToAbsoluteOnClassification&&this.state.classificationType!==Fi.terrain&&(n="absolute"),r.set("olcs_altitudeMode",n),r}getVertexIndex(e){return this.vertices.findIndex(t=>t.getId()===e.getId())}changeVertex(e,t,i){e.getGeometry().setCoordinates(t),i||this.updateGeometry()}translateVertex(e,t,i,s,r){this.state.altitudeMode&Ai.ZPLANE?s.getGeometry().translate(e,t):(this.isOblique&&(s.getGeometry()[Ki.alreadyTransformedToImage]=!0),s.getGeometry().setCoordinates(i)),r||this.updateGeometry()}updateGeometry(){}pushVertex(e){return null}translateVertexHeight(e,t,i){const s=t.getGeometry(),r=s.getCoordinates();r[2]+=e,s.setCoordinates(r),i||this.updateGeometry()}validate(){return!1}_validateOnFinish(){this.creationActive=!1,this.validate()?this.onFinish():this._removeFeature()}_removeFeature(){if(!this.parent||"vcs.vcm.util.editor.MultiGeometryEditor"!==this.parent.className){const e=G.getInstance().getLayerByName(this.feature[gt.vcsLayerNameSymbol]);e&&e instanceof Ki&&e.removeFeaturesById([this.feature.getId()])}this.onRemoved()}setAltitudeMode(e){let t=this.vertices.length;while(t--)this.vertices[t].set("olcs_altitudeMode",e&Ai.CLAMP?"clampToGround":"absolute");this.state.mode^Oi.CREATE&&this.setMode(this.state.mode)}stopCreation(){if(!this.validate()){const e=G.getInstance().getLayerByName(this.feature[gt.vcsLayerNameSymbol]);e&&e instanceof Ki&&e.removeFeaturesById([this.feature.getId()])}}setMode(e){In.debug(`AbstractGeometryEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`);let t=e;0===this.vertices.length&&(t=Oi.CREATE),super.setMode(t),this.creationActive&&(this.stopCreation(),this.creationActive=!1),t&Oi.CREATE?(this.creationActive=!0,this._create.setActive(!0)):t&Oi.TRANSLATEVERTEX?(this._translateVertex.setModification(Z.NONE),this._translateVertex.setActive(Q.CLICKMOVE),this._translateVertexHeight.setModification(Z.NONE|Z.CTRL),this._translateVertexHeight.setActive(Q.CLICKMOVE)):t&Oi.GEOMETRYMODES&&(this._translateVertex.setActive(),this._translateVertexHeight.setActive())}destroy(){super.destroy(),this._clearVertices(),this.feature.set("olcs_allowPicking",!0)}_clearVertices(){const e=this.vertices.map(e=>e.getId());this.scratchLayer.removeFeaturesById(e),this.vertices.splice(0)}}var Pn=Dn;const On={selectShift:Oi.SELECT|Z.SHIFT,selectAlt:Oi.SELECT|Z.ALT,selectCtrl:Oi.SELECT|Z.CTRL,editShift:Oi.EDIT|Z.SHIFT,editAlt:Oi.EDIT|Z.ALT},Yn={auto:"auto",scaleNESW:"nesw-resize",scaleNWSE:"nwse-resize",rotate:"crosshair",translate:"move",select:"pointer",edit:"pointer",translateVertex:"move",removeVertex:"pointer",insertVertex:"cell",addToSelection:"cell",removeFromSelection:"not-allowed"};class xn extends ie{constructor(e){super(),this._lastFeature=null,this.features=e.features,this.cesiumFeatures=e.cesiumFeatures,this.state=e.state,this.cursorStyle=G.getInstance().getMapContainer().style,this._keyDown={[Z.SHIFT]:!1,[Z.ALT]:!1,[Z.CTRL]:!1},this.modifier=0,this.boundKeyListener=this._keyListener.bind(this),this.eventEmitter=us().eventEmitter,this.hasMultiSelect=!1,this.screenSpaceCameraController=null,this.originalLookEventTypes=[],this.originalTiltEventTypes=[],this._defaultActive=Q.MOVE,this._defaultModificationKey=Z.ALL,this.modificationKey=this._defaultModificationKey,this.setActive(!1)}pipe(e){return e.feature&&e.feature[this.state.featureTypeSymbol]?(this.screenSpaceCameraController&&(e.feature[this.state.featureTypeSymbol]&(Yi.VERTEX|Yi.HEIGHTVERTEX)?(this.screenSpaceCameraController.lookEventTypes=void 0,this.screenSpaceCameraController.tiltEventTypes=void 0):(this.screenSpaceCameraController.lookEventTypes=this.originalLookEventTypes,this.screenSpaceCameraController.tiltEventTypes=this.originalTiltEventTypes)),this.eventEmitter.setActive(!1),this._lastFeature=e.feature,this._evaluate()):(this.eventEmitter.setActive(),this._lastFeature=null,this.reset()),Promise.resolve(e)}setActive(e){super.setActive(e),this.active?(window.addEventListener("keydown",this.boundKeyListener),window.addEventListener("keyup",this.boundKeyListener)):(window.removeEventListener("keydown",this.boundKeyListener),window.removeEventListener("keyup",this.boundKeyListener)),this.cursorStyle.cursor=Yn.auto}reset(){this.cursorStyle.cursor=Yn.auto,this.screenSpaceCameraController&&(this.screenSpaceCameraController.lookEventTypes=this.originalLookEventTypes,this.screenSpaceCameraController.tiltEventTypes=this.originalTiltEventTypes)}handleMapChange(e){e instanceof Mt?(this.screenSpaceCameraController=e.getScene().screenSpaceCameraController,this.screenSpaceCameraController.lookEventTypes&&(this.originalLookEventTypes=Array.isArray(this.screenSpaceCameraController.lookEventTypes)?this.screenSpaceCameraController.lookEventTypes.slice():Object.assign({},this.screenSpaceCameraController.lookEventTypes)),this.screenSpaceCameraController.tiltEventTypes&&(this.originalTiltEventTypes=Array.isArray(this.screenSpaceCameraController.tiltEventTypes)?this.screenSpaceCameraController.tiltEventTypes.slice():Object.assign({},this.screenSpaceCameraController.tiltEventTypes))):this.screenSpaceCameraController=null}_evaluate(){if(this._lastFeature){const e=this.state.mode|this.modifier|this._lastFeature[this.state.featureTypeSymbol];if(e&Yi.VERTEX)return(e&On.selectShift)===On.selectShift||(e&On.selectAlt)===On.selectAlt||e&Oi.SCALE?void(this.cursorStyle.cursor=1===this._lastFeature[En]||3===this._lastFeature[En]?Yn.scaleNWSE:Yn.scaleNESW):(e&On.selectCtrl)===On.selectCtrl||e&Oi.ROTATE?void(this.cursorStyle.cursor=Yn.rotate):(e&On.editShift)===On.editShift&&!this.state.onlyAllowTranslation||e&Oi.REMOVEVERTEX?void(this.cursorStyle.cursor=Yn.removeVertex):(e&On.editAlt)===On.editAlt||e&Oi.TRANSLATEVERTEX?void(this.cursorStyle.cursor=Yn.translateVertex):void(this.cursorStyle.cursor=Yn.auto);if(e&Yi.EDITABLE){const t=this.features.has(this._lastFeature.getId())||this.cesiumFeatures.has(this._lastFeature.getId());return t&&(e&On.selectAlt)===On.selectAlt?void(this.cursorStyle.cursor=Yn.translate):e&Oi.FEATUREMODES&&e&Z.CTRL&&this.hasMultiSelect?void(this.cursorStyle.cursor=t?Yn.removeFromSelection:Yn.addToSelection):e&Oi.GEOMETRYMODES&&e&Z.CTRL&&!t&&this.hasMultiSelect?void(this.cursorStyle.cursor=Yn.addToSelection):e&Oi.TRANSLATE?void(this.cursorStyle.cursor=Yn.translate):e&Oi.EDIT&&t&&this.state.onlyAllowTranslation?void(this.cursorStyle.cursor=Yn.auto):void(this.cursorStyle.cursor=Yn.select)}}this.cursorStyle.cursor=Yn.auto}_keyListener(e){let t=!1,i={};i=Object.assign(i,this._keyDown),this._keyDown[Z.ALT]=e.altKey,this._keyDown[Z.CTRL]=e.ctrlKey,this._keyDown[Z.SHIFT]=e.shiftKey,"Shift"!==e.key&&"Alt"!==e.key||(e.preventDefault(),e.stopPropagation());const s=[Z.ALT,Z.CTRL,Z.SHIFT];for(let r=0;r<3;r++)if(t=i[s[r]]!==this._keyDown[s[r]],t){this.modifier=this._keyDown[s[r]]?s[r]:0,this._evaluate();break}}}var An=xn;const jn=v.getLogger("vcs.vcm.util.editor.AbstractLayerEditor"),Fn={};function Nn(e){return Fn[e]}const Hn=new Je({fill:{color:"#E8514C"}});class Rn extends Ln{get className(){return"vcs.vcm.util.editor.AbstractLayerEditor"}constructor(e){super(e),this.id=Object(c["c"])(),this.convertStaticOnClick=Object(c["e"])(e.convertStaticOnClick,!0),this.defaultMode=Oi.SELECT,this.layers={},this.editingFeature=null,this._listeners=[],this.eventHandler=us(),this._interactionRemover=null,this.parent?(this.parent=this.parent,this.selectFeatureInteraction=this.parent.selectFeatureInteraction,this.features=this.selectFeatureInteraction.featureMap,this.mouseOverInteraction=this.parent.mouseOverInteraction):(this.selectFeatureInteraction=new _n(this.state),this.obliqueImageSubscriptionKey=G.getInstance().subscribe("OBLIQUE_IMAGE_CHANGED",()=>{this.state.active&&this.selectFeatureInteraction.active&&this.selectFeatureInteraction.clearSelectionSet()}),this.interactionChain.addInteraction(this.selectFeatureInteraction),this.features=this.selectFeatureInteraction.featureMap,this.mouseOverInteraction=new An({cesiumFeatures:this.selectFeatureInteraction.cesiumFeatureMap,features:this.features,state:this.state}),this.interactionChain.addInteraction(this.mouseOverInteraction)),Fn[this.id]=this}initialize(){super.initialize(),G.getInstance().addLayer(this.scratchLayer),this.selectFeatureInteraction.onSelect(this.onSelect.bind(this)),this.selectFeatureInteraction.onCesiumSelect(this.onCesiumSelect.bind(this))}onSelect(){}onCesiumSelect(){if(!this.parent&&this.state.isFeatureStore&&this.activeLayer)if(this.convertStaticOnClick&&this.selectFeatureInteraction.cesiumFeatureMap.size)this.switchToDynamic();else{this.activeLayer.clearHighlighting();const e={};this.selectFeatureInteraction.cesiumFeatureMap.forEach((t,i)=>{e[i]=Hn}),this.activeLayer.highlight(e)}}switchToDynamic(){if(this.activeLayer instanceof Sr&&this.activeLayer.injectedFetchDynamicFeatureFunc){const e=[];return this.selectFeatureInteraction.cesiumFeatureMap.forEach((t,i)=>{e.push(this.activeLayer.switchStaticFeatureToDynamic(i))}),this.selectFeatureInteraction.clearCesiumSelectionSet(),Promise.all(e).then(e=>{e.forEach(e=>{this.selectFeatureInteraction.selectionSetClick(e)})})}return Promise.resolve()}setAltitudeMode(e){return this.parent||(0===this.features.size&&(this.state.defaultAltitudeMode=e),this.state.altitudeMode=e,this._setPickingBehaviour()),Promise.resolve()}activate(){if(super.activate(),this._interactionRemover||(this._interactionRemover=this.eventHandler.addExclusiveInteraction(this.interactionChain,this.deactivate.bind(this),void 0,this.state.exclusiveId)),!this.parent){this._setPickingBehaviour();const e=G.getInstance().getActiveMap();this.state.activeMap!==e.className&&this.handleMapChange(e)}}deactivate(){super.deactivate(),this.eventHandler.featureInteraction.setActive(),this.eventHandler.eventEmitter.setActive(),null!=this._interactionRemover&&(this._interactionRemover(),this._interactionRemover=null),this.mouseOverInteraction&&this.mouseOverInteraction.reset()}beforeSetMode(e){super.beforeSetMode(e),this.state.active||(this.parent?jn.warning("Trying to set mode on inactive child, set mode on the parent"):this.activate())}setMode(e){jn.debug(`AbstractLayerEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),super.setMode(e),this.parent||(e&Oi.NONE&&this.selectFeatureInteraction.clearSelectionSet(!0),this._setPickingBehaviour())}_setPickingBehaviour(){if(this.state.mode&Oi.GEOMETRYMODES&&this.features.size?this.eventHandler.featureInteraction.hitTolerance=2:this.eventHandler.featureInteraction.hitTolerance=10,this.state.mode&Oi.CREATE){A.getInstance().deactivateClickBehavior(),this.mouseOverInteraction.setActive(!1),this.mouseOverInteraction.cursorStyle.cursor=Yn.edit,this.selectFeatureInteraction.setActive(!1),this.eventHandler.eventEmitter.setActive(!1);const e=this.state.altitudeMode&Ai.CLAMP&&this.state.classificationType===Fi.terrain;e?(this.eventHandler.featureInteraction.setActive(),this.eventHandler.featureInteraction.pickPosition=Q.NONE):(this.eventHandler.featureInteraction.setActive(Q.CLICKMOVE),this.eventHandler.featureInteraction.pickPosition=Q.CLICKMOVE,this.eventHandler.featureInteraction.pullPickedPosition=.05)}else if(this.state.mode&Oi.NONE)A.getInstance().activateClickBehavior(),this.eventHandler.featureInteraction.setActive(),this.eventHandler.eventEmitter.setActive(),this.eventHandler.featureInteraction.hitTolerance=10,this.mouseOverInteraction.setActive(!1);else{A.getInstance().deactivateClickBehavior(),this.eventHandler.featureInteraction.setActive(Q.ALL),this.mouseOverInteraction.cursorStyle.cursor=Yn.auto,this.selectFeatureInteraction.setActive(),this.mouseOverInteraction.setActive();const e=this.state.altitudeMode&Ai.ABSOLUTE||this.state.altitudeMode&Ai.CLAMP&&this.state.classificationType!==Fi.terrain;this.state.mode&Oi.EDIT&&e?(this.eventHandler.featureInteraction.pickPosition=Q.DRAGEVENTS|Q.CLICK,this.eventHandler.featureInteraction.pullPickedPosition=.05):this.state.mode&Oi.TRANSLATEVERTEX&&e?(this.eventHandler.featureInteraction.pickPosition=Q.CLICKMOVE,this.eventHandler.featureInteraction.pullPickedPosition=.05):this.eventHandler.featureInteraction.pickPosition=0}}addEditingLayer(e){if(a(e,Ki),this.activeLayer=e,!this.parent){e.getFeatures().forEach(e=>{e[this.state.featureTypeSymbol]=Yi.EDITABLE}),this.state.layerName=e.name,this.state.defaultClassificationType=Fi[e.classificationType]||Fi.terrain,this.state.classificationType=this.state.defaultClassificationType,this.state.defaultAltitudeMode="absolute"===e.altitudeMode?Ai.ABSOLUTE:Ai.CLAMP;const t=[];if(t.push(e.source.on("addfeature",e=>{let t=e.feature;t[this.state.featureTypeSymbol]=Yi.EDITABLE})),t.push(e.source.on("removefeature",e=>{let t=e.feature;this.features.has(t.getId())&&this.selectFeatureInteraction.selectionSetClick(t),delete t[this.state.featureTypeSymbol]})),e instanceof Sr){e.setEditing(this.state.featureTypeSymbol,Yi.EDITABLE),this.state.isFeatureStore=!0;const t="vcs.vcm.util.editor.CompositeLayerEditor"===this.getRootEditor().className?!!this.getRootEditor().getFeatureLayerEditor():"vcs.vcm.util.editor.FeatureLayerEditor"===this.getRootEditor().className;this.state.canSwitchToDynamic=!!e.injectedFetchDynamicFeatureFunc&&t}else this.state.isFeatureStore=!1,this.state.canSwitchToDynamic=!1;this.layers[e.name]=t}}removeEditingLayer(e){a(e,Ki),e.getFeatures().forEach(e=>{delete e[this.state.featureTypeSymbol]}),this.activeLayer instanceof Sr&&(this.activeLayer.setEditing(this.state.featureTypeSymbol),this.state.isFeatureStore=!1,this.state.canSwitchToDynamic=!1);const t=this.layers[e.name]||[];t.forEach(e=>{ol.Observable.unByKey(e)}),delete this.layers[e.name],this.activeLayer=null,this.state.layerName=null}handleMapChange(e){this.parent||(this.state.activeMap=e.className,this.selectFeatureInteraction.featureMap.size&&(this.isOblique||e instanceof ui)&&(this.state.mode&Oi.CREATE?this.getRootEditor().setMode(Oi.NONE):this.selectFeatureInteraction.clearSelectionSet())),super.handleMapChange(e)}destroy(){super.destroy(),Object.keys(this.layers).forEach(e=>{const t=G.getInstance().getLayerByName(e);t&&t instanceof Ki&&this.removeEditingLayer(t)}),null!=this.obliqueImageSubscriptionKey&&G.getInstance().unsubscribeByKey(this.obliqueImageSubscriptionKey),delete Fn[this.id]}clearSelectionSet(e){this.selectFeatureInteraction.clearSelectionSet(e)}}var zn=Rn;const Gn=new Je({});Gn.style=new ol.style.Style({fill:new ol.style.Fill({color:"rgba(200, 200, 200, 0.5)"}),stroke:new ol.style.Stroke({color:"rgb(200, 200, 200)",width:2}),image:new ol.style.Circle({fill:new ol.style.Fill({color:"rgba(200, 200, 200, 0.5)"}),stroke:new ol.style.Stroke({color:"rgb(200, 200, 200)",width:2}),radius:5})});const Vn={};class Bn extends un{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectDrawing"}constructor(e){e.className=Bn.className,super(e),this.loaded=null,this.greyed=!1,this.original=null,this.editorId=e.editorId;const t=new Ki({name:this._id,projection:S.createMercatorProjection().getConfigObject(),genericFeatureProperties:{planningName:this.name,planningDescription:this.description}});G.getInstance().addLayer(t),t.getSource().on("addfeature",e=>{let t=e.feature;t.get("title")||t.set("title",this.name,!0),t.get("description")||t.set("description",this.description,!0)})}save(){const e=Nn(this.editorId);return e.state.active&&e.setMode(xi.none),this.original=this._writeToGeoJSON(),super.save()}load(){!this.loaded&&this.url?this.loaded=q.a.get(this.url).then(e=>{let t=e.data;this.original=t,this._setFeaturesFromGeoJSON()}):this.loaded=Promise.resolve(),this.loaded.then(()=>{this.getDrawingLayer()||(G.getInstance().addLayer(new Ki({name:this._id,projection:S.createMercatorProjection().getConfigObject()})),this._setFeaturesFromGeoJSON())}).then(()=>{this.visible&&this.getDrawingLayer().activate(!0)})}unload(){const e=this.getDrawingLayer();e&&this.getDrawingLayer().activate(!1)}_setFeaturesFromGeoJSON(){const e=this.getDrawingLayer(),t=Bs(this.original,{dynamicStyle:!0,readLegacyStyleOptions:!0}),i=t.features,s=t.style;e.addFeatures(i),s&&e.setStyle(s);const r=()=>{const e=i.filter(e=>{return"clampToGround"===e.get("olcs_altitudeMode")&&e.get("olcs_extrudedHeight")&&e.get("olcs_extrudedHeight")>0});e.forEach(e=>{Ut(e).then(()=>{e.set("olcs_altitudeMode","absolute")})})};if("vcs.vcm.maps.Cesium"===G.getInstance().getActiveMap().className)r();else{const e=G.getInstance().subscribe("MAP_ACTIVATED",t=>{"vcs.vcm.maps.Cesium"===t.className&&(r(),G.getInstance().unsubscribeByKey(e))})}}_writeToGeoJSON(){const e=this.getDrawingLayer(),t={asObject:!0,writeStyle:!0,embedIcons:!0};return Ws({features:e.getFeatures(),vcsMeta:e.getVcsMeta(t)},t)}getDrawingLayer(){return G.getInstance().getLayerByName(this._id)}zoomTo(){const e=this.getDrawingLayer();if(e.getFeatures().length>0){const t=e.source.getExtent(),i=S.getTransformer(S.createGeographicProjection(),S.createMercatorProjection());i(t,t,2);const s=E.createViewPointFromExtent(t);G.getInstance().getActiveMap().gotoViewPoint(s)}}greyOut(){const e=this.getDrawingLayer();this.loaded&&e.active&&!this.greyed&&(Vn[this._id]=e.getStyle(),e.setStyle(Gn),this.greyed=!0)}unGrey(){this.greyed&&Vn[this._id]&&(this.getDrawingLayer().setStyle(Vn[this._id]),this.greyed=!1)}show(){super.show(),this.getDrawingLayer().activate(!0)}setDrawing(e){const t=Nn(this.editorId);e?t.addEditingLayer(this.getDrawingLayer()):t.removeEditingLayer(this.getDrawingLayer())}getDefinition(){const e=super.getDefinition();return e.geoJSON=this._writeToGeoJSON(),e}reset(){this.getDrawingLayer().removeAllFeatures(),this._setFeaturesFromGeoJSON()}destroy(){this.getDrawingLayer().removeAllFeatures(),this.getDrawingLayer().dispose()}}var Un=Bn;const Wn=v.getLogger("vcs.vcm.widgets.planning.PlanningObjectProcessing");class qn extends un{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectProcessing"}constructor(e){e.className=qn.className,super(e),this.description=e.stdoutMsgs&&Array.isArray(e.stdoutMsgs)?e.stdoutMsgs.join("\n"):"",this._pollingInterval=null}load(){this._observeStatus()}unload(){clearInterval(this._pollingInterval),this._pollingInterval=null}observeStatus(){Wn.deprecate("observeStatus","Use load to start polling the status & unload to stop."),this._observeStatus()}_observeStatus(){null!=this._pollingInterval&&clearInterval(this._pollingInterval),this._pollingInterval=window.setInterval(()=>{const e=this.serviceUrl.clone().extendPath("get-object-status",this._id);q.a.post(e.toString()).then(e=>{if(this.status=e.data,this.status===cn.FAILED||this.status===cn.READY){const e=G.getInstance().getWidgetByType("vcs.vcm.widgets.Planning").planningInstances.find(e=>e._id===this.planningInstanceId);return e.updatePlanningObject(this).then(()=>{this.destroy()})}return Promise.resolve()}).catch(e=>{if(e.response&&e.response.data&&"notFound"===e.response.data.error){const e=G.getInstance().getWidgetByType("vcs.vcm.widgets.Planning").planningInstances.find(e=>e._id===this.planningInstanceId);e.updatePlanningObjects()}else Wn.error(`Could not update PlanningObject ${this._id}, polling is stopped Error: ${e.toString()}`),this.destroy()})},1e4)}destroy(){clearInterval(this._pollingInterval),this._pollingInterval=null}}var Jn=qn;const Kn=v.getLogger("vcs.vcm.widgets.planning.PlanningObjectFeatureStore");class Zn extends un{static get className(){return"vcs.vcm.widgets.planning.PlanningObjectFeatureStore"}constructor(e){super(e),this.loaded=null,this.featureStoreUrl=this.serviceUrl.clone(),this.featureStoreUrl.extendPath("feature-store"),this.featureStoreUrl.addQueryParams({planningId:this.planningInstanceId,planningObjectId:this._id}),this.layerId=e.layerId,this.editorId=e.editorId,this.trackerValues={},this.terrainUrl=e.terrainUrl,this._balloonTemplate=e.balloonTemplate||"",this._pollingInterval=null}get balloonTemplate(){return this._balloonTemplate}set balloonTemplate(e){this._balloonTemplate=e;const t=G.getInstance().getWidgetByType("vcs.vcm.widgets.BalloonInfo");if(t)if(this._balloonTemplate&&""!==this._balloonTemplate)if(t.layerNamesToBalloonTypes[this.layerId]){const e=t.balloonTypes[t.layerNamesToBalloonTypes[this.layerId]];e.template=this._balloonTemplate}else t.addTypeForLayer(this.layerId,this._balloonTemplate);else delete t.layerNamesToBalloonTypes[this.layerId]}get name(){return this._name}set name(e){this._name=e;const t=this.getLayer();t&&t.addGenericFeatureProperties({planningName:e})}get description(){return this._description}set description(e){this._description=e;const t=this.getLayer();t&&t.addGenericFeatureProperties({planningDescription:e})}getLayer(){return G.getInstance().getLayerByName(this.layerId)}load(){if(this.status===cn.READY){if(!this.loaded){const e=this.featureStoreUrl.clone();e.extendPath("get-layer"),this.loaded=q.a.get(e.toString()).then(e=>{let t=e.data;if(t.staticRepresentation&&t.staticRepresentation.threeDim){let e=`${this.serviceUrl.base}`;if(this.serviceUrl.path.length>1){const t=this.serviceUrl.path.slice(0,this.serviceUrl.path.length-1);e=`${e}/${t.join("/")}`}t.staticRepresentation.threeDim=`${e}/${t.staticRepresentation.threeDim}`;const i=this.featureStoreUrl.clone().extendPath("get-layer-file");i.addQueryParams({asJson:!0,onlyStatic:!0}),t.staticRepresentation.twoDim=i.toString()}t.injectedFetchDynamicFeatureFunc=this.getDynamicFeature.bind(this),t.name=this.layerId;const i=G.getInstance();t.genericFeatureProperties={planningName:this.name,planningDescription:this.description};const s=new Sr(t);if(i.addLayer(s),this._balloonTemplate){const e=i.getWidgetByType("vcs.vcm.widgets.BalloonInfo");e&&e.addTypeForLayer(this.layerId,this._balloonTemplate)}}).catch(e=>{Kn.log(e)})}this.loaded.then(()=>{this.visible&&this.getLayer().activate(!0)})}else this._observeStatus()}unload(){const e=this.getLayer();e&&e.activate(!1),this._pollingInterval&&(clearInterval(this._pollingInterval),this._pollingInterval=null),this._removeModeChangeListener&&(this._removeModeChangeListener(),this._removeModeChangeListener=null)}getDynamicFeature(e){const t=this.featureStoreUrl.clone();return t.extendPath("get-feature",this.planningInstanceId,this._id,e.toString()),q.a.post(t.toString()).then(e=>{let t=e.data;return t})}show(){this.getLayer()?(super.show(),this.getLayer().activate(!0)):Kn.warning("FeatureStoreLayer for PlanningObjectFeatureStore does not exists, check code")}setEditing(e){const t=Nn(this.editorId),i=this.getLayer();this._removeModeChangeListener&&(this._removeModeChangeListener(),this._removeModeChangeListener=null),e?(this._removeModeChangeListener=t.modeChange.addEventListener(e=>{e&Oi.NONE?i.changeTracker.pauseTracking("changefeature"):i.changeTracker.track()}),i.changeTracker.track(),this.trackerValues=i.changeTracker.values,t.addEditingLayer(i),Nn(this.editorId).state.dedicatedFeatureStyle=!1):(i.changeTracker.unTrack(),t.removeEditingLayer(i),Nn(this.editorId).state.dedicatedFeatureStyle=!0)}appendFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(e,Object),a(t,Object),this.terrainUrl&&(t.terrain=t.terrain||this.terrainUrl),e.append("converterOptions",JSON.stringify(t));const i=this.featureStoreUrl.clone();return i.extendPath("append"),q.a.post(i.toString(),e).then(()=>{this.status=cn.CONVERTING,this._observeStatus()})}calculateStatic(){const e=this.featureStoreUrl.clone();e.extendPath("calculate-static");const t=this.terrainUrl?{terrain:this.terrainUrl}:void 0;return q.a.post(e.toString(),t).then(()=>{this.status=cn.OPTIMIZING,this._observeStatus()})}_observeStatus(){null!=this._pollingInterval&&clearInterval(this._pollingInterval),this._pollingInterval=window.setInterval(()=>{const e=this.serviceUrl.clone().extendPath("get-object-status",this._id);q.a.post(e.toString()).then(e=>{if(this.status=e.data,this.status===cn.FAILED)Kn.warning("conversion failed"),clearInterval(this._pollingInterval),this._pollingInterval=null;else if(this.status===cn.READY){G.getInstance().removeLayerByName(this.layerId);const e=G.getInstance().getWidgetByType("vcs.vcm.widgets.Planning").planningInstances.find(e=>e._id===this.planningInstanceId);this.loaded=null,e.loaded&&this.load(),clearInterval(this._pollingInterval),this._pollingInterval=null}}).catch(e=>{Kn.error(e)})},2e4)}getDefinition(){const e=super.getDefinition();return e.balloonTemplate=this._balloonTemplate&&""!==this._balloonTemplate?this._balloonTemplate:void 0,e}save(){const e=this.getLayer(),t=Nn(this.editorId);t.state.active&&t.setMode(Oi.NONE);const i=this.featureStoreUrl.clone();return i.extendPath("bulk"),e.changeTracker.commitChanges(i.toString()).then(()=>this.saveVcsMeta()).then(()=>super.save())}saveVcsMeta(){const e=this.getLayer().getVcsMeta({writeStyle:!0}),t=this.featureStoreUrl.clone();return t.extendPath("edit-meta"),q.a.post(t.toString(),e)}reset(){const e=this.getLayer(),t=Nn(this.editorId);return t.setMode(Oi.NONE),e.changeTracker.reset()}destroy(){const e=this.getLayer();e&&e.dispose(),this._pollingInterval&&(clearInterval(this._pollingInterval),this._pollingInterval=null)}zoomTo(){const e=this.getLayer(),t=e.getExtent();if(t.isValid()){const e=t.getCoordinatesInProjection(S.createGeographicProjection()),i=E.createViewPointFromExtent(e);i.distance=i.distance<4e3?i.distance:4e3,G.getInstance().getActiveMap().gotoViewPoint(i)}}}var Qn=Zn,$n=i(1),Xn=i.n($n),ea="<div class='balloon' id='myBalloon'>\n  <h1 class='balloon-title'><%= obj.title %></h1>\n  <div class='balloon-content'>\n    <%= obj.description %>\n    <hr>\n    <small>\n    <% if (obj.edited) {%>\n      <i><%= obj.edited %></i>\n    <% }%>\n    <%= obj.author %> <%= obj.date %>\n    </small>\n  </div>\n  <div class='balloon-close-col'>\n    <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>\n  </div>\n  <div class='dialog-image-balloon'></div>\n  <div class='balloon-left-edge'></div>\n</div>\n";let ta=null;class ia{static get className(){return"vcs.vcm.util.Login"}constructor(){this.active=!1,this.setupResolve=null,this.setupPromise=new Promise(e=>{this.setupResolve=e}),this.serviceUrl=null,this.scenarioId=null,this.projectId=null,this.currentUser={userSettings:null},this.projectGroups=[],this.projectUsers=[],this.projectSettings={hasMail:!1,selfRegister:!1,userInvite:!1},this.onLogin=[],this.onLogout=[],this.beforeLogout=[],window.addEventListener("beforeunload",()=>{this.logout()})}static getInstance(){return ta||(ta=new ia),ta}handleURLParameter(e){e["reset-token"]?e.enrollment?window.location.hash=`#/login/enroll/${e["reset-token"]}`:window.location.hash=`#/login/reset/${e["reset-token"]}`:e["verify-token"]&&(window.location.hash=`#/login/verify/${e["verify-token"]}`)}registerWidget(e){if(this.active){const t=this.serviceUrl===e.serviceUrl,i=this.projectId===e.projectId,s=this.scenarioId===e.scenarioId;return t&&s&&i?(e.onLogin.forEach(function(e){this.onLogin.push(e)},this),e.onLogout.forEach(function(e){this.onLogout.push(e)},this),e.beforeLogout.forEach(function(e){this.beforeLogout.push(e)},this),Promise.resolve()):Promise.reject(new Error("Login recieved two different configurations"))}return this.serviceUrl=e.serviceUrl,this.url=n["a"].parse(this.serviceUrl),this.url.addQueryParams({version:3.6}),this.projectId=e.projectId,this.scenarioId=e.scenarioId,e.onLogin.forEach(function(e){this.onLogin.push(e)},this),e.onLogout.forEach(function(e){this.onLogout.push(e)},this),e.beforeLogout.forEach(function(e){this.beforeLogout.push(e)},this),this._getProject()}registerHook(e,t){a(e,["onLogin","onLogout","beforeLogout"]),a(t,Function),"onLogin"===e?this.onLogin.push(t):"onLogout"===e?this.onLogout.push(t):"beforeLogout"===e&&this.beforeLogout.push(t)}_getProject(){const e=this.url.clone();return q.a.post(e.extendPath("project","get").toString(),{projectId:this.projectId}).then(this._setProject.bind(this)).catch(()=>{}).then(this.setupResolve)}_setProject(e){return e.data&&e.data._id===this.projectId?(Object.assign(this.projectSettings,e.data),this.active=!0,Promise.resolve()):Promise.reject("Login project was not found or did not match registered project")}login(e,t){if(a(e,String),a(t,String),!this.active)return Promise.reject("Login has not been activated!");const i=ia.sha256(t),s=this.url.clone();return q.a.post(s.extendPath("user","login").toString(),{email:e,password:i,mapId:this.scenarioId}).then(this.setUser.bind(this))}logout(){const e=this.beforeLogout.map(e=>e()).filter(e=>null!=e),t=function(e){return q.a.post(`${this.serviceUrl}/user/logout?access_token=${this.getBearerToken()}`).then(this.clearUser.bind(this)),e?Promise.reject(new Error("logout failed")):Promise.resolve()};return Promise.all(e).then(t.bind(this,!1)).catch(t.bind(this,!0))}register(e,t,i){if(a(e,String),a(t,String),o(i,String),!Object(c["d"])(e))throw new Error("i18n_error_invalidEmail");const s=i?{name:i}:null,r=ia.sha256(t);return q.a.post(`${this.serviceUrl}/user/register`,{email:e,password:r,projectId:this.projectId,profile:s,mapId:this.scenarioId})}invite(e){if(a(e,String),!Object(c["d"])(e))throw new Error("i18n_error_invalidEmail");const t=this.getBearerToken();return q.a.post(`${this.serviceUrl}/user/register`+`?access_token=${t}`,{email:e,projectId:this.projectId,mapId:this.scenarioId})}verifyEmail(e){return a(e,String),q.a.post(`${this.serviceUrl}/user/verify-email`,{token:e})}requestResetPassword(e){return a(e,String),q.a.post(`${this.serviceUrl}/user/request-reset`,{email:e,mapId:this.scenarioId})}resetPassword(e,t){a(e,String),a(t,String);const i=ia.sha256(e);return q.a.post(`${this.serviceUrl}/user/reset-password`,{password:i,token:t}).then(this.setUser.bind(this))}getCurrentUser(){return this.currentUser}getUserById(e){return this.projectUsers.find(t=>t._id===e)}getBearerToken(){return this.currentUser?this.currentUser.token:null}setUser(e){Object.assign(this.currentUser,e.data),this.url.addQueryParams({access_token:this.currentUser.token});const t=this.url.clone(),i=q.a.post(t.extendPath("group","get-shareable").toString(),{projectId:this.projectId}),s=this.url.clone(),r=q.a.post(s.extendPath("user","get").toString(),{userId:this.currentUser.id}),n=this.url.clone(),a=q.a.get(n.extendPath("project-users",this.projectId).toString());return Promise.all([i,r,a]).then(e=>{this.setProjectGroups(e[0]),this.setProfile(e[1]),this._setProjectUsers(e[2]),this.onLogin.forEach(e=>{e()})})}setProjectGroups(e){this.projectGroups.splice(0,this.projectGroups.length),e.data.forEach(function(e){const t={};t.id=e._id,t.name=e.name,this.projectGroups.push(t)},this)}setProfile(e){this.currentUser.userSettings=e.data}_setProjectUsers(e){const t=e.data;t.users&&t.users.forEach(function(e){this.projectUsers.push(e)},this)}clearUser(){Object.keys(this.currentUser).forEach(function(e){"userSettings"===e?this.currentUser[e]=null:delete this.currentUser[e]},this),this.projectGroups.splice(0,this.projectGroups.length),this.onLogout.forEach(e=>{e()}),console.log("logged out",this.currentUser)}searchUser(e){const t=this.url.clone();return q.a.post(t.extendPath("user","search").toString(),{text:e,projectId:this.projectId})}static sha256(e){const t=8,i=0;function s(e,t){const i=(65535&e)+(65535&t),s=(e>>16)+(t>>16)+(i>>16);return s<<16|65535&i}function r(e,t){return e>>>t|e<<32-t}function n(e,t){return e>>>t}function a(e,t,i){return e&t^~e&i}function o(e,t,i){return e&t^e&i^t&i}function l(e){return r(e,2)^r(e,13)^r(e,22)}function c(e){return r(e,6)^r(e,11)^r(e,25)}function h(e){return r(e,7)^r(e,18)^n(e,3)}function u(e){return r(e,17)^r(e,19)^n(e,10)}function d(e,t){const i=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),r=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),n=new Array(64);let d,m,g,p,y,_,f,v,L,M;e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(let b=0;b<e.length;b+=16){d=r[0],m=r[1],g=r[2],p=r[3],y=r[4],_=r[5],f=r[6],v=r[7];for(let t=0;t<64;t++)n[t]=t<16?e[t+b]:s(s(s(u(n[t-2]),n[t-7]),h(n[t-15])),n[t-16]),L=s(s(s(s(v,c(y)),a(y,_,f)),i[t]),n[t]),M=s(l(d),o(d,m,g)),v=f,f=_,_=y,y=s(p,L),p=g,g=m,m=d,d=s(L,M);r[0]=s(d,r[0]),r[1]=s(m,r[1]),r[2]=s(g,r[2]),r[3]=s(p,r[3]),r[4]=s(y,r[4]),r[5]=s(_,r[5]),r[6]=s(f,r[6]),r[7]=s(v,r[7])}return r}function m(e){const i=Array(),s=(1<<t)-1;for(let r=0;r<e.length*t;r+=t)i[r>>5]|=(e.charCodeAt(r/t)&s)<<24-r%32;return i}function g(e){let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);s<128?t+=String.fromCharCode(s):s>127&&s<2048?(t+=String.fromCharCode(s>>6|192),t+=String.fromCharCode(63&s|128)):(t+=String.fromCharCode(s>>12|224),t+=String.fromCharCode(s>>6&63|128),t+=String.fromCharCode(63&s|128))}return t}function p(e){const t=i?"0123456789ABCDEF":"0123456789abcdef";let s="";for(let i=0;i<4*e.length;i++)s+=t.charAt(e[i>>2]>>8*(3-i%4)+4&15)+t.charAt(e[i>>2]>>8*(3-i%4)&15);return s}return e=g(e),p(d(m(e),e.length*t))}}var sa=ia;const ra=v.getLogger("vcs.vcm.widgets.planning.PlanningComment");function na(e){const t=e.properties;let i,s;t.editedBy&&t.editedOn?(i=t.editedBy,s=t.editedOn,t.edited=O.getInstance().getSingleMessage("i18n_planning_comment_edited")):(i=t.createdBy,s=t.createdOn);const r=sa.getInstance().getUserById(i);t.author=r&&r.profile?r.profile.name:"anonymous",t.date=Xn()(s).format("LLL")}function aa(e){const t=Ws({features:[e]},{asObject:!0}),i=t.features[0];return i.id=e.getId(),delete i.properties.selected,i}const oa={DEFAULT:"default",INFO:"info",SUCCESS:"success",WARNING:"warning"};class la{constructor(e,t,i){this.planningId=e,this.url=t.clone(),this.url.addQueryParams({planningId:e}),this.url.extendPath("comment"),this.dataLoaded=!1,this.ready=new Promise(e=>{this._readyResolve=e}),this.permissions=i,this.comments=[];const s=G.getInstance(),r=s.getWidgetByType("vcs.vcm.widgets.BalloonInfo");r&&r.addTypeForLayer(`${this.planningId}_comments`,ea),s.subscribe("LOCALE_CHANGED",this.localeChanged.bind(this)),this.localeChanged(s.getLocale())}getLayer(){const e=G.getInstance();let t=e.getLayerByName(`${this.planningId}_comments`);return t||(t=new Ki({altitudeMode:"absolute",name:`${this.planningId}_comments`,allowPicking:!0,projection:S.createMercatorProjection().getConfigObject(),balloonHeightOffset:1,style:"planningCommentStyle"}),e.addLayer(t)),t}load(){if(!this.dataLoaded){const e=this.getLayer(),t=this.url.clone();t.extendPath("get-comments"),q.a.get(t.toString()).then(t=>{let i=t.data;this.comments.push(...i.features),this.comments.forEach(na);const s=Bs(i),r=s.features;e.addFeatures(r),this.dataLoaded=!0,this._readyResolve()}).catch(e=>{ra.error(e.message),this.dataLoaded=!0,this._readyResolve()})}this.ready.then(()=>{this.getLayer().activate(!0)})}localeChanged(e){if(Xn.a.locale(e),this.dataLoaded){const e=this.getLayer();this.comments.forEach(t=>{na(t);const i=e.getFeatureById(t.id);i&&(t.properties.edited&&i.set("edited",t.properties.edited,!0),i.set("author",t.properties.author,!0),i.set("date",t.properties.date))})}}unLoad(){this.getLayer().activate(!1)}lookAt(e){const t=G.getInstance(),i=this.getLayer(),s=i.getFeatureById(e),r=t.getActiveMap(),n=r.getViewPoint();n.pitch>-45&&(n.pitch=-45),n.distance||(n.distance=2e3),n.setCameraPosition(null),n.setGroundPosition(S.mercatorToWgs84(s.getGeometry().getCoordinates())),n.setAnimate(!0),r.gotoViewPoint(n),t.publish("FEATURE_CLICKED",s.getId(),s,i)}addComment(e){a(e,ol.Feature);const t=aa(e),i=this.url.clone();return i.extendPath("add"),q.a.post(i.toString(),t).then(t=>{let i=t.data;na(i),this.comments.push(i),e.setId(i.id),e.set("author",i.properties.author,!0),e.set("date",i.properties.date)})}editComment(e){a(e,ol.Feature);const t=aa(e),i=this.url.clone();return i.extendPath("edit"),q.a.post(i.toString(),t).then(t=>{let i=t.data;const s=this.comments.findIndex(e=>e.id===i.id);this.comments.splice(s,1,i),na(i),e.set("author",i.properties.author,!0),e.set("date",i.properties.date)})}deleteComment(e){a(e,ol.Feature);const t=aa(e),i=this.url.clone();return i.extendPath("delete"),q.a.post(i.toString(),t).then(()=>{const e=this.comments.findIndex(e=>e.id===t.id);this.comments.splice(e,1),this.getLayer().removeFeaturesById([t.id])})}destroy(){this.comments.splice(0);const e=G.getInstance().getLayerByName(`${this.planningId}_comments`);e&&e.dispose()}}var ca=la;function ha(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=e.viewpoints.map(e=>{e.duration=null!=e.duration?e.duration:null;const t=b(e.cameraPosition.slice(),void 0,3),i=new ol.Feature({geometry:new ol.geom.Point(t)});return i.setProperties(Object.assign({},e)),i}),s={features:i,vcsMeta:{flightOptions:{name:e.name,loop:e.loop,interpolation:e.interpolation}}};return Ws(s,t)}function ua(e){const t=Bs(e),i=t.vcsMeta&&t.vcsMeta.flightOptions?t.vcsMeta.flightOptions:{name:"ImportedFlight"};return i.viewpoints=t.features.map(e=>{const t={name:e.get("name"),distance:e.get("distance"),groundPosition:e.get("groundPosition"),cameraPosition:e.get("cameraPosition"),heading:e.get("heading"),pitch:e.get("pitch"),roll:e.get("roll"),animate:!1,duration:null!=e.get("duration")?e.get("duration"):null};return t}),i}const da={SPLINE:"spline",LINEAR:"linear"};class ma{static get className(){return"vcs.vcm.util.flight.FlightInstance"}constructor(e){this.id=Object(c["c"])(),this.name=e.name,this.viewpoints=e.viewpoints||[],this.multiplier=Object(c["g"])(e.multiplier,1),this.loop=Object(c["e"])(e.loop,!1),this.interpolation=e.interpolation||da.SPLINE,this.changed=new Cesium.Event,this.url=e.url,this._readyPromise=null}get ready(){return this._readyPromise||(this.url?this._readyPromise=q.a.get(this.url).then(e=>{let t=e.data;const i=ua(t);this.assign(i)}):this._readyPromise=Promise.resolve()),this._readyPromise}isValid(){return this.viewpoints.forEach((e,t)=>{e.cameraPosition||this.viewpoints.splice(t,1)}),this.viewpoints.length>=2}assign(e){this.name=e.name,this.viewpoints=e.viewpoints,this.multiplier=e.multiplier,this.loop=e.loop,this.interpolation=e.interpolation,this.changed.raiseEvent()}getConfigObject(){return{name:this.name,multiplier:this.multiplier,loop:this.loop,interpolation:this.interpolation,viewpoints:this.viewpoints.map(e=>Object.assign({},e))}}}var ga=ma;I.PLANNING_INSTANCE_LOADED="PLANNING_INSTANCE_LOADED",I.PLANNING_INSTANCE_UNLOADED="PLANNING_INSTANCE_UNLOADED";const pa=v.getLogger("vcs.vcm.widgets.planning.PlanningInstance"),ya=lt();class _a{static get className(){return"vcs.vcm.widgets.planning.PlanningInstance"}constructor(e){this.maintainLockInterval=null,this._id=e._id,this.name=e.name&&""!==e.name?e.name:`planning: ${e._id}`,this.hiddenObjects=e.hiddenObjects?e.hiddenObjects:[],this.planningObjects=[],this.viewpoints=[],e.viewpoints&&e.viewpoints.length>0?this.viewpoints=e.viewpoints:e.viewpoint&&(e.viewpoint.default=!0,this.viewpoints.push(e.viewpoint)),this.flights=[],e.flights&&e.flights.forEach(e=>{const t=ua(e);this.flights.push(new ga(t))}),this.description=e.description?e.description:null,this.permissions=e.permissions||[],this.owner=e.created,this.lastUpdated=e.lastUpdated||null,this.public=e.public;const t=new Ss({allowPicking:!0,name:`_${this._id}_model`});G.getInstance().addLayer(t),this.layerName=t.name,this.sharedUsers=[],this.mapId=e.mapId,this.url=e.url,this.editorId=e.editorId,this.terrainUrl=e.terrainUrl,e.planningObjects&&e.planningObjects.forEach(e=>{this.addPlanningObject(e)}),this.loaded=!1,this.comments=new ca(this._id,this.url,this.permissions),this.properties=e.properties||{}}load(e){const t=G.getInstance(),i=t.getLayerByName(this.layerName),s=t.getActiveMap();"vcs.vcm.maps.Cesium"===s.className&&(i.initialized||i.initialize(),i.activate(!0)),ya.hideObjects(this.hiddenObjects),this.planningObjects.forEach(e=>{e.handleMapChange(s),e.load()}),e||this.gotoViewpoint(),this.comments.load(),this.loaded=!0,t.publish(I.PLANNING_INSTANCE_LOADED,this)}unLoad(){const e=G.getInstance(),t=e.getLayerByName(this.layerName);t.activate(!1),ya.showObjects(this.hiddenObjects),this.planningObjects.forEach(e=>{e.unload()}),this.comments.unLoad(),this.loaded=!1,e.publish(I.PLANNING_INSTANCE_UNLOADED,this)}handleMapChange(e){if(this.loaded){const t=G.getInstance().getLayerByName(this.layerName);"vcs.vcm.maps.Cesium"===e.className?(t.initialized||t.initialize(),t.activate(!0)):t.isActive()&&t.activate(!1),this.planningObjects.forEach(t=>{t.handleMapChange(e)})}}addPlanningObject(e){let t;return"geojson"===e.type&&(e.type="drawing"),"ready"!==e.status?(t="featureStore"===e.type?new Qn(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId,terrainUrl:this.terrainUrl},e)):new Jn(Object.assign({planningInstanceId:this._id,serviceUrl:this.url},e)),"failed"!==t.status&&this.loaded&&t.load(),this.planningObjects.push(t)):"gltf"===e.type?(t=new mn(Object.assign({planningInstanceId:this._id,planningInstanceGltfLayerName:this.layerName,serviceUrl:this.url},e)),this.planningObjects.push(t)):"drawing"===e.type?(t=new Un(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId},e)),this.loaded&&!t.loaded&&t.load(),this.planningObjects.push(t)):"featureStore"===e.type?(t=new Qn(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId,terrainUrl:this.terrainUrl},e)),this.loaded&&!t.loaded&&t.load(),this.planningObjects.push(t)):"image"===e.type&&(t=new pn(Object.assign({planningInstanceId:this._id,serviceUrl:this.url,editorId:this.editorId},e)),this.loaded&&t.load(),this.planningObjects.push(t)),t.initialize(),t}updatePlanningObject(e){const t=this.url.clone();return q.a.post(t.extendPath("get-id").toString(),{id:this._id}).then(t=>{let i=t.data;const s=this.planningObjects.findIndex(t=>t._id===e._id);this.planningObjects.splice(s,1);const r=i.planningObjects.find(t=>t._id===e._id);this.addPlanningObject(r)})}updatePlanningObjects(){const e=this.url.clone();return q.a.post(e.extendPath("get-id").toString(),{id:this._id}).then(e=>{let t=e.data;this.planningObjects.forEach(e=>{e.destroy()}),this.planningObjects.splice(0),t.planningObjects.forEach(this.addPlanningObject.bind(this))})}deletePlanningObject(e,t){a(e,un),o(t,Function);const i=this.planningObjects.findIndex(t=>t._id===e._id);return this.planningObjects.splice(i,1),e.delete().then(()=>{e.destroy(),t(null)}).catch(i=>{const s=e.getConfigObject();e.destroy(),this.addPlanningObject(s),t(i)})}lock(){const e=this.url.clone();return q.a.post(e.extendPath("lock").toString(),{_id:this._id}).then(()=>{this.maintainLockInterval||(this.maintainLockInterval=setInterval(this.maintainLock.bind(this),1e5))})}maintainLock(){this.lock().catch(()=>{this.unlock()})}unlock(){this.maintainLockInterval&&clearInterval(this.maintainLockInterval),this.maintainLockInterval=null;const e=this.url.clone();return q.a.post(e.extendPath("unlock").toString(),{_id:this._id})}save(){const e={_id:this._id,mapId:this.mapId,name:this.name,description:this.description,viewpoint:void 0,viewpoints:this.viewpoints,flights:this.flights.map(e=>ha(e,{asObject:!0})),hiddenObjects:this.hiddenObjects},t=this.url.clone();return q.a.post(t.extendPath("update").toString(),e)}getPlanningObjectDefinitions(){return Object.values(this.planningObjects).map(e=>e.getDefinition())}addHiddenObject(e){return a(e,String),!this.hiddenObjects.includes(e)&&(ya.hideObjects([e]),this.hiddenObjects.push(e),!0)}removeHiddenObject(e){if(a(e,[String,Number]),this.hiddenObjects.includes(e)){ya.showObjects([e]);const t=this.hiddenObjects.indexOf(e);return this.hiddenObjects.splice(t,1),!0}return!1}destroy(){for(let t=0;t<this.planningObjects.length;t++)this.planningObjects[t].destroy();this.loaded&&this.unLoad(),this.comments.destroy();const e=G.getInstance().getLayerByName(this.layerName);return e.dispose(),this.layerName="",this.maintainLockInterval?this.unlock():Promise.resolve()}gotoViewpoint(e){let t=e;if(null==t&&(t=this.viewpoints.findIndex(e=>e.default),t=-1===t?0:t),this.viewpoints[t]){const e=new E(this.viewpoints[t]),i=G.getInstance();i.getActiveMap().gotoViewPoint(e)}}sharePlanning(e,t,i){a(e,String),a(t,String),o(i,[String]);const s={actorId:t,doc:{_id:e}};i&&(s.permissions=i);const r=this.url.clone().extendPath("share");return q.a.post(r.toString(),s).then(this.getSharedUsers.bind(this))}getSharedUsers(){const e=this.url.clone().extendPath("shared-users");return q.a.post(e.toString(),{_id:this._id}).then(e=>{this.sharedUsers=e.data})}publishPlanning(){const e=this.url.clone().extendPath("publish");return q.a.post(e.toString(),{_id:this._id,public:!this.public}).then(()=>{this.public=!this.public})}userHasPermission(e){return a(e,String),this.permissions.indexOf(e)>-1}isLocked(){return null!==this.maintainLockInterval}uploadNewModel(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(e,Object),a(t,{percentage:[Number,String,null]}),a(i,Object);const s={};t&&(s.onUploadProgress=e=>{t.percentage=Math.round(100*e.loaded/e.total)}),this.terrainUrl&&(i.terrain=i.terrain||this.terrainUrl),e.append("converterOptions",JSON.stringify(i));const r=this.url.clone().extendPath("upload");return r.addQueryParams({planning_id:this._id}),q.a.post(r.toString(),e,s).then(e=>{let t=e.data,i=null;return t.planningObjects.forEach(e=>{const t=this.planningObjects.find(t=>t._id===e._id);t||(i=this.addPlanningObject(e))}),i})}createFeatureStoreObject(){const e=this.url.clone().extendPath("feature-store","create");return e.addQueryParams({planningId:this._id}),q.a.post(e.toString()).then(e=>{let t=e.data;return this.addPlanningObject(t)})}uploadNewDrawing(){pa.deprecate("uploadNewDrawing","Drawings are deprecated on the virtualcityPLANNER, use createFeatureStoreObject instead");const e={type:"FeatureCollection",features:[]},t=this.url.clone().extendPath("add-drawing");return q.a.post(t.toString(),{planningId:this._id,geoJSON:e}).then(e=>{let t=e.data,i=null;return t.planningObjects.forEach(e=>{const t=this.planningObjects.find(t=>t._id===e._id);t||(i=this.addPlanningObject(e))}),i})}}var fa=_a;class va extends bn{constructor(e){super({zPlane:!0}),this.editor=e,this._lastPosition=null,this._firstPosition=null,this._translationOptions={},this._defaultActive=Q.DRAGEVENTS,this._defaultModificationKey=Z.ALT,this.setActive()}pipe(e){if(this._lastPosition){const t=this.getPosition(e),i=t[0]-this._lastPosition[0],s=t[1]-this._lastPosition[1];e.type&(Q.CLICK|Q.DRAGEND)?(this._translationOptions.dxTotal=t[0]-this._firstPosition[0],this._translationOptions.dyTotal=t[1]-this._firstPosition[1],this._translationOptions.isMoving=!1,this._translationOptions.toTransform=this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.GEOMETRY,this.editor.translate(this.editor.state.transformGeometryOnMove?i:this._translationOptions.dxTotal,this.editor.state.transformGeometryOnMove?s:this._translationOptions.dyTotal,this._translationOptions),this.editor.selectFeatureInteraction.setActive(!0),this._lastPosition=null,this._firstPosition=null):e.type&(Q.DRAG|Q.MOVE)?(this.editor.translate(i,s,this._translationOptions),this._lastPosition=t):this._lastPosition=null}else e.type&(Q.DRAGSTART|Q.CLICK)&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.EDITABLE&&this.editor.features.has(e.feature.getId())&&(this.scene?(this.createPlane(e.positionOrPixel),this._lastPosition=this.getPosition(e),this._firstPosition=this.getPosition(e)):(this._lastPosition=e.positionOrPixel,this._firstPosition=e.positionOrPixel),this.editor.selectFeatureInteraction.setActive(!1),this._translationOptions={toTransform:this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.VERTEX,isMoving:!0});return Promise.resolve(e)}}var La=va;class Ma extends bn{constructor(e){super({zPlane:!0}),this.editor=e,this._defaultActive=Q.DRAGEVENTS,this._defaultModificationKey=Z.SHIFT|Z.ALT,this._lastPosition=null,this._firstPosition=null,this.setActive(),this._scaleOptions={}}pipe(e){if(this._lastPosition){const t=this.getPosition(e),i=t[0]-this._lastPosition[0],s=t[1]-this._lastPosition[1];e.type&(Q.CLICK|Q.DRAGEND)?(this._scaleOptions.dxTotal=t[0]-this._firstPosition[0],this._scaleOptions.dyTotal=t[1]-this._firstPosition[1],this._scaleOptions.isMoving=!1,this._scaleOptions.toTransform=this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.GEOMETRY,this.editor.scale(this.editor.state.transformGeometryOnMove?i:this._scaleOptions.dxTotal,this.editor.state.transformGeometryOnMove?s:this._scaleOptions.dyTotal,this._scaleOptions),this.editor.selectFeatureInteraction.setActive(!0),this._lastPosition=null,this._firstPosition=null):(this._lastPosition=t,this.editor.scale(i,s,this._scaleOptions))}else if(e.type&(Q.DRAGSTART|Q.CLICK)&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.VERTEX){const t=e.feature.getGeometry().getCoordinates()[2]?e.feature.getGeometry().getCoordinates():e.positionOrPixel;this.editor.selectFeatureInteraction.setActive(!1),this._scaleOptions={maintainAspectRatio:!!(e.key&Z.SHIFT),vertex:e.feature,toTransform:this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.VERTEX,isMoving:!0},this._lastPosition=t,this._firstPosition=t,this.scene&&this.createPlane(this._lastPosition)}return Promise.resolve(e)}}var ba=Ma;function wa(e,t,i){const s=e.x*t.y-e.y*t.x;return s>0?i:-1*i}class Ta extends bn{constructor(e){super({zPlane:!0}),this.editor=e,this._defaultActive=Q.DRAGEVENTS,this._defaultModificationKey=Z.CTRL,this._lastPosition=new Cesium.Cartesian2,this._firstPosition=new Cesium.Cartesian2,this._newPosition=new Cesium.Cartesian2,this._scratchCenter=new Cesium.Cartesian2,this._rotationOptions={},this._rotating=!1,this.setActive()}pipe(e){if(this._rotating){const t=this.getPosition(e);let i;this._newPosition=Cesium.Cartesian2.fromElements(t[0],t[1],this._newPosition),this._newPosition=Cesium.Cartesian2.subtract(this._scratchCenter,this._newPosition,this._newPosition),e.type&(Q.DRAGEND|Q.CLICK)?(this._rotationOptions.angleTotal=wa(this._firstPosition,this._newPosition,Cesium.Cartesian2.angleBetween(this._firstPosition,this._newPosition)),this._rotationOptions.isMoving=!1,this._rotationOptions.toTransform=this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.GEOMETRY,i=this.editor.state.transformGeometryOnMove?wa(this._lastPosition,this._newPosition,Cesium.Cartesian2.angleBetween(this._lastPosition,this._newPosition)):this._rotationOptions.angleTotal,this.editor.selectFeatureInteraction.setActive(!0),this._rotating=!1):i=wa(this._lastPosition,this._newPosition,Cesium.Cartesian2.angleBetween(this._lastPosition,this._newPosition)),this.editor.rotate(i,this._rotationOptions),this._lastPosition=this._newPosition.clone(this._lastPosition)}else if(e.type&(Q.DRAGSTART|Q.CLICK)&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.VERTEX){const t=e.feature.getGeometry().getCoordinates()[2]?e.feature.getGeometry().getCoordinates():e.positionOrPixel;this.scene&&this.createPlane(t),this.editor.selectFeatureInteraction.setActive(!1),this._scratchCenter=Cesium.Cartesian2.fromArray(ol.extent.getCenter(this.editor.extent),0,this._scratchCenter),this._firstPosition=Cesium.Cartesian2.fromArray(t,0,this._firstPosition),this._firstPosition=Cesium.Cartesian2.subtract(this._scratchCenter,this._firstPosition,this._firstPosition),this._lastPosition=this._firstPosition.clone(this._lastPosition),this._rotationOptions={toTransform:this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.VERTEX,isMoving:!0},this._rotating=!0}return Promise.resolve(e)}}var Sa=Ta;class Ca extends bn{constructor(e){super({zPlane:!1}),this.editor=e,this._defaultActive=Q.DRAGEVENTS,this._defaultModificationKey=Z.ALT|Z.SHIFT,this._lastHeight=null,this._firstHeight=null,this._isExtrusion=!1,this._heightOptions={},this.setActive()}pipe(e){if(this.scene)if(null!==this._lastHeight){const t=this.getPosition(e);let i;e.type&(Q.CLICK|Q.DRAGEND)?(this._heightOptions.heightTotal=t[2]-this._firstHeight,this._heightOptions.isMoving=!1,this.editor.state.transformGeometryOnMove?i=t[2]-this._lastHeight:(this._heightOptions.toTransform=Oa.GEOMETRY,i=this._heightOptions.heightTotal),this._lastHeight=null,this._firstHeight=null):(i=t[2]-this._lastHeight,this._lastHeight=t[2]),this._isExtrusion?this.editor.extrude(i,t[2],this._heightOptions):this.editor.translateHeight(i,t[2],this._heightOptions)}else if(e.type&(Q.DRAGSTART|Q.CLICK)&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.HEIGHTVERTEX){const t=e.feature.getGeometry().getCoordinates();this._lastHeight=t[2]||e.positionOrPixel[2],this._firstHeight=this._lastHeight,this._isExtrusion=!!(e.key&Z.SHIFT),this._heightOptions={toTransform:this.editor.state.transformGeometryOnMove?Oa.BOTH:Oa.VERTEX,isMoving:!0},this.createPlane(t)}return Promise.resolve(e)}}var ka=Ca,Ea=i(444),Ia=i.n(Ea),Da=i(445),Pa=i.n(Da);const Oa={VERTEX:1,GEOMETRY:2,BOTH:0};Oa.BOTH=Oa.VERTEX|Oa.GEOMETRY;const Ya=Symbol("isTransformation"),xa=Symbol("isEmpty"),Aa=v.getLogger("vcs.vcm.util.editor.FeatureLayerEditor"),ja=new ol.style.Icon({src:Ia.a,anchor:[.5,.8],scale:.6}),Fa=new ol.style.Style({image:ja}),Na={olcs_altitudeMode:"altitudeMode",olcs_skirt:"skirt",olcs_storeyHeight:"storeyHeight"};class Ha extends zn{get className(){return"vcs.vcm.util.editor.FeatureLayerEditor"}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),this.translateInteraction=new La(this),this.interactionChain.addInteraction(this.translateInteraction),this.scaleTransformation=new ba(this),this.interactionChain.addInteraction(this.scaleTransformation),this.rotationTransformation=new Sa(this),this.interactionChain.addInteraction(this.rotationTransformation),this.heightTransformation=new ka(this),this.interactionChain.addInteraction(this.heightTransformation),this.selectFeatureInteraction.hasMultiSelect(),this.mouseOverInteraction.hasMultiSelect=!0,(null==e.allowSelectMode||e.allowSelectMode)&&this.state.allowedModes.push(Object.keys(xi).find(e=>xi[e]===Oi.SELECT)),this._scratchCenter=new Cesium.Cartesian2,this.flippedY=!1,this.flippedX=!1,this.heights={min:0,max:0,clamped:!0},this.extent=ol.extent.createEmpty(),this.geometry=this._createExtent(),this.feature=new ol.Feature({geometry:this.geometry}),this.feature[Ya]=!0,this.feature[Ki.doNotTransform]=!0,this.feature.set("olcs_altitudeMode",this.heights.clamped?"clampToGround":"absolute"),this.feature.setId("_transformationFeature"),this.vertices=[],this.style=new ol.style.Style({stroke:new ol.style.Stroke({color:"#444444",width:2}),image:new ol.style.Icon({src:Pa.a,scale:.45})})}onSelect(){this.state.mode&Oi.FEATUREMODES&&this.state.active?this.recalculateExtent():this._clearGeometriesFromLayer()}_createExtent(){let e=ol.extent.createEmpty(),t=-1/0,i=1/0,s=!0;this.features.forEach(r=>{const n=this.isOblique?r[Ki.obliqueGeometry]:r.getGeometry();e=ol.extent.extend(e,n.getExtent());const a=r.get("olcs_altitudeMode");if(("clampToGround"===a||null==a&&"clampToGround"===this.activeLayer.altitudeMode)&&null==r.get("olcs_groundLevel"))i=i>0?0:i;else{s=!1;const e=Vt(r,this.activeLayer.storeyHeight);t=e.max>t?e.max:t,i=e.min<i?e.min:i}}),this.extent=e,this.heights.max=t===-1/0?0:t,this.heights.min=i===1/0?0:i,this.heights.clamped=s;const r=ol.extent.getSize(this.extent);return 0===r[0]&&0===r[1]&&(this.extent=ol.extent.buffer(this.extent,10,this.extent)),this._createExtentGeom()}_createExtentGeom(){function e(e,t){const i=[[0,1],[0,3],[2,3],[2,1],[0,1]],s=new Array(5);for(let r=0;r<5;r++)s[r]=[e[i[r][0]],e[i[r][1]],t];return new ol.geom.LineString(s)}let t;if(ol.extent.isEmpty(this.extent)){const i=[0,0,1,1];t=new ol.geom.MultiLineString([e(i,this.heights.min).getCoordinates()]),t[xa]=!0}else{const i=e(this.extent,this.heights.max),s=i.getCoordinates();t=new ol.geom.MultiLineString([s]),t.appendLineString(e(this.extent,this.heights.min));for(let e=0;e<4;e++){const i=s[e].slice(0);i[2]=this.heights.min,t.appendLineString(new ol.geom.LineString([s[e],i]))}}return this.isOblique&&(t[Ki.alreadyTransformedToImage]=!0),t}_createVertex(e,t){e[2]=e[2]||0;const i=new ol.geom.Point(e);this.isOblique&&(i[Ki.alreadyTransformedToImage]=!0);const s=new ol.Feature({geometry:i});return s[this.state.featureTypeSymbol]=Yi.VERTEX,s[En]=t,s[Ki.doNotTransform]=!0,s}_createVertices(){if(this.geometry[xa])return;const e=this.geometry.getCoordinates()[0];for(let r=0;r<4;r++){const t=e[r];this.vertices.push(this._createVertex(t,r))}const t=ol.extent.getCenter(this.extent);t[2]=this.heights.max;const i=this._createVertex(t,4);i[this.state.featureTypeSymbol]=Yi.HEIGHTVERTEX,i.setStyle(Fa),this.vertices.push(i);const s=this.heights.clamped?"clampToGround":"absolute";this.vertices.forEach((e,t)=>{e.set("olcs_altitudeMode",s,!0),t<4&&e.setStyle(this.style)},this),this.feature.set("olcs_altitudeMode",s),this.scratchLayer.addFeatures([...this.vertices,this.feature])}setMode(e){Aa.debug(`FeatureLayerEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),super.setMode(e),this.state.mode&Oi.FEATUREMODES?this.recalculateExtent():this.state.mode&Oi.FEATUREMODES||this._clearGeometriesFromLayer(),e&Oi.SELECT?(this.translateInteraction.setActive(),this.scaleTransformation.setActive(),this.rotationTransformation.setActive(),this.heightTransformation.setActive()):e&Oi.SCALE?(this.scaleTransformation.setModification(Z.NONE|Z.SHIFT),this.scaleTransformation.setActive(Q.CLICKMOVE)):e&Oi.TRANSLATE?(this.translateInteraction.setModification(Z.NONE),this.translateInteraction.setActive(Q.CLICKMOVE)):e&Oi.ROTATE&&(this.rotationTransformation.setModification(Z.NONE),this.rotationTransformation.setActive(Q.CLICKMOVE))}setAltitudeMode(e){const t=[];for(const s of this.features.values())if(e&(Ai.ABSOLUTE|Ai.ZPLANE)&&"absolute"!==s.get("olcs_altitudeMode")){const e=Ut(s).then(()=>{s.set("olcs_altitudeMode","absolute")});t.push(e)}else e&Ai.CLAMP&&"clampToGround"!==s.get("olcs_altitudeMode")&&(Wt(s),t.push(Promise.resolve()));const i=Promise.all(t);return i.then(()=>{t.length&&this.recalculateExtent()})}translate(e,t,i){const s=i&&i.toTransform?i.toTransform:Oa.BOTH;if(this.extent=[this.extent[0]+e,this.extent[1]+t,this.extent[2]+e,this.extent[3]+t],s&Oa.VERTEX)for(let r=this.vertices.length-1;r>=0;r--)this.vertices[r].getGeometry().translate(e,t);s&Oa.GEOMETRY&&(this.feature.getGeometry().translate(e,t),this.features.forEach(i=>{this.isOblique?i[Ki.obliqueGeometry].translate(e,t):i.getGeometry().translate(e,t)}))}translateHeight(e,t,i){this.state.altitudeMode&Ai.CLAMP&&(this.state.altitudeMode=Ai.ABSOLUTE);const s=i&&i.toTransform?i.toTransform:Oa.BOTH;let r=!1;if(s&Oa.GEOMETRY&&(this.features.forEach(i=>{const s=i.get("olcs_altitudeMode");r=r||"clampToGround"===s||!s&&"clampToGround"===this.activeLayer.altitudeMode,i.set("olcs_altitudeMode","absolute",!0);const n=i.get("olcs_groundLevel");i.unset("olcs_groundLevel");const a=n&&(i.get("olcs_extrudedHeight")||i.get("olcs_storeyNumber")&&i.get("olcs_storeyHeight"));Bt(i.getGeometry(),e,a?n+e:t,a)}),Bt(this.geometry,e,t)),s&Oa.VERTEX){let i=this.vertices.length;while(i--)this.vertices[i].set("olcs_altitudeMode","absolute",!0),Bt(this.vertices[i].getGeometry(),e,t)}this.heights.min+=e,this.heights.max+=e,r&&this.recalculateExtent(),this.heights.clamped=!1}extrude(e,t,i){const s=i||{};this.state.altitudeMode&Ai.CLAMP&&(this.state.altitudeMode=Ai.ABSOLUTE);const r=s.toTransform||Oa.BOTH,n=[];if(r&Oa.GEOMETRY)this.features.forEach(i=>{let r=i.get("olcs_extrudedHeight");const a=i.get("olcs_altitudeMode"),o="absolute"===a||"absolute"===this.activeLayer.altitudeMode&&null==a||null!=i.get("olcs_groundLevel");if(!o){i.set("olcs_altitudeMode","absolute",!0);const e=Ut(i);n.push(e)}if(null==r)s.setHeight?i.set("olcs_extrudedHeight",t):i.set("olcs_extrudedHeight",e);else{if(Array.isArray(r)){let i=r.length;if(s.setHeight)while(i--)r[i]=t;else while(i--)r[i]+=e}else null!=r&&(s.setHeight?r=t:r+=e);i.set("olcs_extrudedHeight",r)}}),this.recalculateExtent();else if(r&Oa.VERTEX){let i=this.vertices.length;while(i--)this.vertices[i].set("olcs_altitudeMode","absolute",!0),Bt(this.vertices[i].getGeometry(),e,t)}return n.length?Promise.all(n).then(()=>{this.recalculateExtent()}):Promise.resolve()}placeOnTerrain(){const e=[];return this.features.forEach(t=>{e.push(Ut(t))}),e.length?Promise.all(e).then(()=>{this.recalculateExtent()}):Promise.resolve()}setProperty(e,t,i){this.features.forEach(s=>{s.set(e,t,i)}),0===this.features.size&&Na[e]&&(this.activeLayer[Na[e]]=t),!i&&this.features.size&&this.recalculateExtent()}unsetProperty(e,t){this.features.forEach(i=>{i.unset(e,t)}),0===this.features.size&&Na[e]&&(this.activeLayer[Na[e]]=void 0),!t&&this.features.size&&this.recalculateExtent()}scale(e,t,i){const s=i||{},r=s.toTransform||Oa.BOTH,n=s.vertex||this.vertices[2],a=n[En],o=n.getGeometry(),l=ol.extent.getSize(this.extent);let c=t;if(s.maintainAspectRatio){const t=l[1]/l[0];c=e*t,c=1===a||3===a?-c:c}const h=[{dx:1,dy:3,across:2,flipY:!1,flipX:!1},{dx:0,dy:2,across:3,flipY:!0,flipX:!1},{dx:3,dy:1,across:0,flipY:!0,flipX:!0},{dx:2,dy:0,across:1,flipY:!1,flipX:!0}],u=h[a];if(r&Oa.VERTEX&&(o.translate(e,c),this.vertices[u.dx].getGeometry().translate(e,0),this.vertices[u.dy].getGeometry().translate(0,c),this.vertices[4].getGeometry().translate(e/2,c/2)),r&Oa.GEOMETRY){const e=this.vertices[u.across].getGeometry().getCoordinates(),t=o.getCoordinates(),i=e[1]-t[1]>0===u.flipY,r=e[0]-t[0]>0===u.flipX,n=[];for(let s=0;s<4;s++)n[s]=this.vertices[s].getGeometry().getCoordinates();const a=ol.extent.boundingExtent(n),c=ol.extent.getSize(a);let h=c[0]/l[0],d=c[1]/l[1];this.flippedY!==i&&(this.flippedY=i,d*=-1),this.flippedX!==r&&(this.flippedX=r,h*=-1),this.features.forEach(t=>{const i=this.isOblique?t[Ki.obliqueGeometry]:t.getGeometry(),r=i.get("_vcsGeomType");!r||"bbox"!==r&&"rectangle"!==r||s.maintainAspectRatio||i.unset("_vcsGeomType",!0),i.scale(h,d,e)}),this.extent=a,this.feature.getGeometry().scale(h,d,e)}}rotate(e,t){const i=t||{},s=i.toTransform||Oa.BOTH,r=ol.extent.getCenter(this.extent);if(s&Oa.VERTEX)for(let n=this.vertices.length-1;n>=0;n--)this.vertices[n].getGeometry().rotate(e,r);s&Oa.GEOMETRY&&(this.feature.getGeometry().rotate(e,r),this.features.forEach(t=>{const i=this.isOblique?t[Ki.obliqueGeometry]:t.getGeometry();"bbox"===i.get("_vcsGeomType")&&i.set("_vcsGeomType","rectangle",!0),i.rotate(e,r)})),i.isMoving||this.recalculateExtent()}_clearGeometriesFromLayer(){let e=this.vertices.length;const t=new Array(e+1);t[e]=this.feature.getId();while(e--)t[e]=this.vertices[e].getId();this.vertices.splice(0),this.scratchLayer.removeFeaturesById(t)}recalculateExtent(){if(this.state.mode&Oi.FEATUREMODES){const e=this._createExtent();if(this._clearGeometriesFromLayer(),e[xa])return;this.geometry=e,this.feature.set("olcs_altitudeMode",this.heights.clamped?"clampToGround":"absolute",!0),this.feature.setGeometry(e),this.flippedY=!1,this.flippedX=!1,this.feature.setStyle(this.style),this._createVertices()}}handleMapChange(e){e instanceof Mt?Fa.setImage(ja):Fa.setImage(null),5===this.vertices.length&&this.vertices[4].changed(),super.handleMapChange(e)}}var Ra=Ha;const za=new ol.style.Style({});class Ga extends bn{constructor(e,t,i){super({zPlane:!0}),this.editor=e,this.finished=!0,this.onFinish=t,this._lastVertex=null,this.maxVertices=i,this._lastPosition=null,this._defaultActive=Q.CLICKMOVE,this.setActive(!1)}pipe(e){if(this.finished)return Promise.resolve(e);let t;return e.type&Q.MOVE?(t=this.getPosition(e),this.editor.vertices.length<this.maxVertices?this.editor.changeVertex(this._lastVertex,t,!this.editor.state.transformGeometryOnMove):this.editor.translateVertex(t[0]-this._lastPosition[0],t[1]-this._lastPosition[1],t,this._lastVertex,!this.editor.state.transformGeometryOnMove),this._lastPosition=t):e.type&Q.CLICK&&(this.editor.vertices.length<this.maxVertices?(1!==this.editor.vertices.length||!this.scene||this.editor.state.altitudeMode&Ai.CLAMP||this.createPlane(e.positionOrPixel),t=this.getPosition(e),this._lastVertex.setStyle(null),this.editor.changeVertex(this._lastVertex,t),this._lastVertex=this.editor.pushVertex(t),this._lastVertex.setStyle(za),this._lastPosition=t):(t=this.getPosition(e),this.editor.translateVertex(t[0]-this._lastPosition[0],t[1]-this._lastPosition[1],t,this._lastVertex,!1),this._lastVertex.setStyle(null),this.editor.state.transformGeometryOnMove||this.editor.updateGeometry(),this._lastVertex&&this._lastVertex.setStyle(null),this.onFinish(),this.setActive(!1))),Promise.resolve(e)}setActive(e){let t=e;e&&0===this.editor.vertices.length?(this.finished=!1,this._lastVertex=this.editor.pushVertex([0,0,0]),this._lastVertex.setStyle(za)):(t=!1,this.finished=!0),super.setActive(t)}}var Va=Ga;class Ba extends Pn{constructor(e){const t=e.geometry,i=t.getLinearRing(0);e.geometry=i,super(e,!0),this._create=new Va(this,this._validateOnFinish.bind(this),e.isBBox?2:3),this.interactionChain.addInteraction(this._create),this.polygon=t,this.geometry=this.geometry,this._setupGeometry(t),this.isBBox=e.isBBox||!1,this._scratchCartesian1=new Cesium.Cartesian2,this._scratchCartesian2=new Cesium.Cartesian2,this.setAltitudeModeToAbsoluteOnClassification=!1}_createVertices(){const e=this.geometry.getCoordinates();for(let t=0;t<e.length;t++)this.vertices.push(this._createVertex(e[t],t));this.scratchLayer.addFeatures(this.vertices)}pushVertex(e){if(4===this.vertices.length)return this._create.setActive(!1),this.vertices[3];if(this.isBBox&&1===this.vertices.length){const t=[1,2,0].map(t=>{const i=e.slice();2===t?(i[0]+=1e-4,i[1]+=1e-4):i[t]+=1e-4;const s=this._createVertex(i);return this.vertices.push(s),s});return this.scratchLayer.addFeatures(t),this.vertices[0]}if(this.vertices.length<2){const t=this._createVertex(e),i=this.geometry.getCoordinates();return i.push(e),this.geometry.setCoordinates(i),this.vertices.push(t),this.scratchLayer.addFeatures([t]),t}const t=Cesium.Matrix2.fromArray([0,1,-1,0]),i=this.vertices[0].getGeometry().getCoordinates(),s=this.vertices[1].getGeometry().getCoordinates();this._scratchCartesian1=Cesium.Cartesian2.fromElements(i[0]-s[0],i[1]-s[1],this._scratchCartesian1),this._scratchCartesian2=Cesium.Matrix2.multiplyByVector(t,this._scratchCartesian1,this._scratchCartesian2),this._scratchCartesian2=Cesium.Cartesian2.normalize(this._scratchCartesian2,this._scratchCartesian2),this._scratchCartesian2=Cesium.Cartesian2.multiplyByScalar(this._scratchCartesian2,1e-4,this._scratchCartesian2);const r=[this._scratchCartesian2.x+i[0],this._scratchCartesian2.y+i[1],i[2]],n=this._createVertex([r[0]-this._scratchCartesian1.x,r[1]-this._scratchCartesian1.y,i[2]]),a=this._createVertex(r);return this.vertices.push(n),this.vertices.push(a),this.scratchLayer.addFeatures([n,a]),this.updateGeometry(),n}updateGeometry(){this.isOblique&&(this.geometry[Ki.imageGeometryChanged]=!0),this.geometry.setCoordinates(this.vertices.map(e=>{return this.isOblique?e[Ki.obliqueGeometry].getCoordinates():e.getGeometry().getCoordinates()}),"XYZ")}_setupGeometry(e){this.polygon=e,this.geometry=e.getLinearRing(0),this.listener=this.geometry.on("change",()=>{this.polygon.setCoordinates([this.geometry.getCoordinates()],"XYZ")})}translateVertex(e,t,i,s,r){const n=this.isOblique?s[Ki.obliqueGeometry]:s.getGeometry();this.isOblique&&(n[Ki.alreadyTransformedToImage]=!0),n.translate(e,t);const a=n.getCoordinates(),o={0:[3,1,2],1:[2,0,3],2:[1,3,0],3:[0,2,1]},l=o[this.getVertexIndex(s)],c=this.isOblique?this.vertices[l[2]][Ki.obliqueGeometry]:this.vertices[l[2]].getGeometry(),h=c.getCoordinates(),u=Ft(h,a);if(u<1e-4)return void n.setCoordinates([h[0]+1e-4,h[1]+1e-4,i[2]]);const d=this.isOblique?this.vertices[l[0]][Ki.obliqueGeometry]:this.vertices[l[0]].getGeometry(),m=this.isOblique?this.vertices[l[1]][Ki.obliqueGeometry]:this.vertices[l[1]].getGeometry();this.isOblique&&(d[Ki.alreadyTransformedToImage]=!0,m[Ki.alreadyTransformedToImage]=!0),d.setCoordinates(At(h,d.getCoordinates(),a)),m.setCoordinates(At(h,m.getCoordinates(),a)),r||this.updateGeometry()}translateVertexHeight(e,t,i){let s=this.vertices.length;while(s--)super.translateVertexHeight(e,this.vertices[s],!0);i||this.updateGeometry()}validate(){return!this.creationActive&&4===this.vertices.length}destroy(){super.destroy(),ol.Observable.unByKey(this.listener)}setExtent(e,t){a(e,[Number]),a(e.length,4);const i=ol.geom.Polygon.fromExtent(e).getLinearRing(0).getCoordinates();js(i);const s=t||(this.vertices.length?this.vertices[0].getGeometry().getCoordinates()[2]:0);this.geometry.setCoordinates(i.map(e=>{return e[2]=s,e})),this._clearVertices(),this._createVertices()}}var Ua=Ba;const Wa=new ol.style.Style({});function qa(){}class Ja extends ie{constructor(e,t){super(),this.editor=e,this.finished=!0,this.onFinish=t||qa,this._defaultActive=Q.CLICKMOVE,this.setActive(!1)}pipe(e){return this.finished?Promise.resolve(e):(e.type&Q.MOVE&&this.editor.changeVertex(this._lastVertex,e.positionOrPixel,!this.editor.state.transformGeometryOnMove),e.type&Q.CLICK&&(this.editor.changeVertex(this._lastVertex,e.positionOrPixel),this._lastVertex.setStyle(null),this.editor.feature.setStyle(this._featureStyle),this.onFinish(),this.setActive(!1)),Promise.resolve(e))}setActive(e){e&&0===this.editor.vertices.length?(this.finished=!1,this._lastVertex=this.editor.pushVertex([0,0,0]),this._lastVertex.setStyle(Wa),this._featureStyle=this.editor.feature.getStyle(),this.editor.feature.setStyle(Wa)):this.finished=!0,super.setActive(!this.finished&&e)}}var Ka=Ja;class Za extends ie{constructor(e){super(),this.editor=e,this._defaultActive=Q.CLICK,this._defaultModificationKey=Z.SHIFT,this.setActive()}pipe(e){return!this.editor.state.onlyAllowTranslation&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.VERTEX&&this.editor.removeVertex(e.feature),Promise.resolve(e)}}var Qa=Za;const $a=[/\+/,/-/,/\*/,new RegExp("\\/")];class Xa extends M{static get className(){return"vcs.vcm.util.Balloon"}constructor(e){e.className=Xa.className,super(e),this.balloonContent=e.balloonContent,this.template=e.template,this.attributes=e.attributes,this.layerName=e.layerName,this.longitude=e.longitude,this.latitude=e.latitude,this.height=e.height||0,this.relativeToGround=e.relativeToGround,this.minTop=e.minTop||"0",this.viewerTopOffset=0,this.minLeft=e.minLeft||"0",this.containerId=e.containerId||"balloonContainer",this.balloonWidget=e.balloonWidget,this.balloonId=Object(c["c"])(),this.initialized=!1,this.initializedFor=null,this.cartographic=new Cesium.Cartographic,this.cartesian3=null,this.mercatorCoordinates=null,this.obliqueCoordinates=null,this.obliqueImageChangedSubscriptionKey=this.framework.subscribe(I.OBLIQUE_IMAGE_CHANGED,this.obliqueChangedListener.bind(this))}initialize(){const e=this.framework.getActiveMap();e instanceof Mt?this.initializeForCesium():e instanceof _i?this.initializeForOpenlayers():e instanceof ui&&this.initializeForOblique()}setPosition(e){if("cesium"===this.initializedFor)S.mercatorToWgs84(e,!0),this.relativeToGround?(this.cartographic.longitude=Cesium.Math.toRadians(e[0]),this.cartographic.latitude=Cesium.Math.toRadians(e[1])):this.cartesian3=Cesium.Cartesian3.fromDegrees(e[0],e[1],e[2],this.cesiumScene.globe.ellipsoid,this.cartesian3);else if("openlayers"===this.initializedFor)this.mercatorCoordinates.splice(0,3,e[0],e[1],e[2]);else if("oblique"===this.initializedFor){const t=this.framework.getActiveMap();if(t instanceof ui)return Object(bt["f"])(t.activeLayer.currentImage,[e[0],e[1],e[2]],{dataProjection:ol.proj.get("EPSG:3857")}).then(e=>{let t=e.coords;this.obliqueCoordinates.splice(0,2,t[0],t[1])})}return Promise.resolve()}obliqueChangedListener(){this.close()}getDomNodes(){let e;if(this.balloonContent)e=this.balloonContent;else try{e=or()(this.template)(this.attributes)}catch(i){return this.logger.warning(`Could not render the template for layer: ${this.layerName}. Please verify that the balloon template is correct`),null}const t=document.createElement("div");if(t.setAttribute("id",this.balloonId),e instanceof HTMLElement?t.appendChild(e):t.innerHTML=e,!t.children.length){const i=document.createElement("div");i.innerHTML=e,t.appendChild(i)}for(let s=0;s<t.children.length;s++){O.getInstance().translateAll(t.children[s]);const e=t.children[s];e.style.top="-1000px",e.style.left="-1000px"}return t}initializeForCesium(){if(!this.initialized){const e=this.initializeBalloon();if(this.cesiumMap=this.framework.getActiveMap(),this.cesiumScene=this.cesiumMap.getScene(),!this.cartesian3||this.relativeToGround&&Cesium.Cartographic.equals(this.cartographic,Cesium.Cartographic.ZERO)){if(null==this.longitude||null==this.latitude)return void this.logger.error("Cannot instatiate balloon without defined cartesian3 or longitude latitude");this.relativeToGround&&Cesium.Cartographic.equals(this.cartographic,Cesium.Cartographic.ZERO)?(this.cartographic=Cesium.Cartographic.fromDegrees(this.longitude,this.latitude,this.height,this.cartographic),this.cartographic.height=this.cesiumScene.globe.getHeight(this.cartographic)+this.height,this.cartesian3=Cesium.Cartographic.toCartesian(this.cartographic)):this.cartesian3=Cesium.Cartesian3.fromDegrees(this.longitude,this.latitude,this.height)}this.cesiumPostRenderBind=this.cesiumPostRenderHandler.bind(this,e.minTop,e.minLeft),this.cesiumScene.postRender.addEventListener(this.cesiumPostRenderBind),this.initialized=!0,this.initializedFor="cesium"}}cesiumPostRenderHandler(e,t){this.relativeToGround&&(this.cartographic.height=this.cesiumScene.globe.getHeight(this.cartographic)+this.height,this.cartesian3=Cesium.Cartographic.toCartesian(this.cartographic,this.cesiumScene.globe.ellipsoid,this.cartesian3));const i=Cesium.SceneTransforms.wgs84ToWindowCoordinates(this.cesiumScene,this.cartesian3);i&&i.x&&i.y&&(this.poiLocationWindowCoordsx=i.x,this.poiLocationWindowCoordsy=i.y,this.setBalloonPosition(e,t))}initializeForOpenlayers(){if(!this.initialized){const e=this.initializeBalloon();this.olMap=this.framework.getActiveMap().ol3map,this.mercatorCoordinates||(this.mercatorCoordinates=S.wgs84ToMercator([this.longitude,this.latitude,this.height])),this.openlayersUnsubscribeKey=this.olMap.on("postrender",this.olPostRenderHandler.bind(this,this.mercatorCoordinates,e.minTop,e.minLeft)),this.initialized=!0,this.initializedFor="openlayers",this.olMap.dispatchEvent("postrender")}}setBalloonPosition(e,t){const i=document.getElementById(this.balloonId);if(i&&i.children[0]){const s=i.children[0];s.style.top=`${this.poiLocationWindowCoordsy-e}px`,s.style.left=`${this.poiLocationWindowCoordsx-t}px`}}olPostRenderHandler(e,t,i){const s=this.olMap.getPixelFromCoordinate(e);if(s){const e=this.olMap.get("vcs_scale")||1;this.poiLocationWindowCoordsx=s[0]/e,this.poiLocationWindowCoordsy=s[1]/e,this.setBalloonPosition(t,i)}}initializeBalloon(){const e=this.getDomNodes();if(!e)return null;const t=document.getElementById(this.containerId);t.appendChild(e);const i=Xa.computeOffset(e,this.minTop)-this.viewerTopOffset,s=Xa.computeOffset(e,this.minLeft),r=document.getElementById(this.balloonId).getElementsByClassName("close-balloon");if(r)for(let n=0;n<r.length;n++)r[n].addEventListener("click",this.closeBalloonClicked.bind(this));return{minTop:i,minLeft:s}}initializeForOblique(){if(!this.initialized){const e=this.initializeBalloon(),t=this.framework.getActiveMap();this.olMap=t.olMap;let i=Promise.resolve();this.obliqueCoordinates||(i=Object(bt["f"])(t.activeLayer.currentImage,[this.longitude,this.latitude,this.relativeToGround?0:this.height],{dataProjection:ol.proj.get("EPSG:4326")}).then(e=>{let t=e.coords;this.obliqueCoordinates=t})),i.then(()=>{this.obliqueUnsubscribeKey=this.olMap.on("postrender",this.olPostRenderHandler.bind(this,this.obliqueCoordinates,e.minTop,e.minLeft)),this.initializedFor="oblique",this.initialized=!0,this.olMap.dispatchEvent("postrender")})}}close(){const e=document.getElementById(this.balloonId);e&&(e.parentNode.removeChild(e),"cesium"===this.initializedFor?this.cesiumScene.postRender.removeEventListener(this.cesiumPostRenderBind):"openlayers"===this.initializedFor?ol.Observable.unByKey(this.openlayersUnsubscribeKey):"oblique"===this.initializedFor&&ol.Observable.unByKey(this.obliqueUnsubscribeKey)),this.obliqueImageChangedSubscriptionKey&&this.framework.unsubscribeByKey(this.obliqueImageChangedSubscriptionKey),this.initialized=!1}closeBalloonClicked(){const e=A.getInstance();e&&this.balloonWidget?e.clearCurrentItem():this.close()}show(e){document.getElementById(this.balloonId).style.display=e?"block":"none"}static computeOffset(e,t){if("number"===typeof t)return t;const i=e.children[0],s=i.offsetHeight,r=i.offsetWidth;function n(e){return/\d+/.test(e)?Number(e.match(/\d+/)[0]):/balloonHeight/.test(e)?s:/balloonWidth/.test(e)?r:0}function a(e,t){return e.reduce((e,i)=>{switch(!0){case t.test("+"):return e+i;case t.test("-"):return e-i;case t.test("*"):return e*i;case t.test("/"):return e/i;default:return e+i}})}const o=$a.find(e=>e.test(t));let l;if(o){const e=t.split(o),i=e.map(n);l=a(i,o)}else l=n(t);return Number(l)}getLink(e){const t=`${this.longitude.toFixed(8)},${this.latitude.toFixed(8)},${this.height.toFixed(2)}`,i={slLayer:this.layerName,slPos:t,slR2G:this.relativeToGround,slAt:JSON.stringify(this.attributes)};e.addQueryParams(i)}}var eo=Xa;class to extends ie{constructor(e){super(),this._defaultActive=Q.CLICK,this.editor=e,this.setActive()}pipe(e){return e.feature&&e.feature[this.editor.state.featureTypeSymbol]&(Yi.EDITING|Yi.VERTEX)&&this.editor.editLabel(),Promise.resolve(e)}}var io=to;const so=v.getLogger("vcs.vcm.util.editor.PointGeometryEditor");class ro extends Pn{constructor(e){super(e),this._create=new Ka(this,this._checkLabel.bind(this)),this.interactionChain.addInteraction(this._create),this.geometry=this.geometry,this.feature[this.state.featureTypeSymbol]|=Yi.VERTEX,this._removeVertex=new Qa(this),this.interactionChain.addInteraction(this._removeVertex),this.isLabel="Label"===this.geometry.get("_vcsGeomType"),this._selectLabel=null,this.isLabel&&(this._selectLabel=new io(this),this.interactionChain.addInteraction(this._selectLabel)),this._balloon=null,this._textArea=null}_createVertices(){const e=this.geometry.getCoordinates();if(!e.every(e=>0===e)){const t=this._createVertex(e);this.vertices.push(t),this.scratchLayer.addFeatures([t])}}pushVertex(e){if(this.vertices.length)return this.state.mode&Oi.CREATE&&this.onFinish(),this.vertices[0];const t=this._createVertex(e);return this.vertices.push(t),this.geometry.setCoordinates(e),this.scratchLayer.addFeatures([t]),t}_checkLabel(){!this._balloon&&this.isLabel&&1===this.vertices.length?this.editLabel():super._validateOnFinish()}_validateOnFinish(){this.creationActive=!!this.isLabel&&!this._hasLabel(),this.validate()?this.onFinish():this._removeFeature()}addLabel(){this._selectLabel||(this._selectLabel=new io(this),this.interactionChain.addInteraction(this._selectLabel)),this.isLabel=!0,this.geometry.set("_vcsGeomType","Label",!0),this.feature[We]||(this.feature[We]=this.parent.activeLayer.style.clone(),this.feature.setStyle(this.feature[We].style),this.feature.changed()),this.editLabel()}editLabel(){this._setBalloon(this.feature[We].label)}_setBalloon(e){this._textArea||(this._textArea=document.createElement("textarea"),this._textArea.rows=1,this._textArea.cols=100,this._textArea.classList.add("balloon"),this._textArea.addEventListener("keydown",this._labelKeyDown.bind(this))),e&&(this._textArea.value=e);const t={balloonContent:this._textArea};if(!this.isOblique){var i=S.mercatorToWgs84(this.geometry.getCoordinates()),s=Object(le["a"])(i,3);t.longitude=s[0],t.latitude=s[1],t.height=s[2]}this._balloon=new eo(t),this.isOblique&&(this._balloon.obliqueCoordinates=this.geometry.getCoordinates()),this._balloon.initialize(),this._textArea.focus()}stopEditingLabel(e){this._balloon&&(e&&this._textArea&&(this.feature[We].label=this._textArea.value,this.feature.changed()),this._balloon.close(),this._balloon=null,this._textArea=null,this.state.mode&Oi.CREATE?this._validateOnFinish():this.validate()||this.stopCreation())}translateVertex(e,t,i,s,r){super.translateVertex(e,t,i,this.vertices[0],r)}translateVertexHeight(e,t,i){super.translateVertexHeight(e,this.vertices[0],i)}_labelKeyDown(e){e.stopPropagation(),"Escape"===e.key?this.stopEditingLabel():"Enter"===e.key&&this.stopEditingLabel(!0)}removeVertex(e){this.scratchLayer.removeFeaturesById([e.getId()]),this._removeFeature()}_hasLabel(){const e=this.feature[We]?this.feature[We].label:null;return e&&e.length}stopCreation(){super.stopCreation(),this.validate()&&this.isLabel&&(this._hasLabel()||this.geometry.unset("_vcsGeomType",!0))}validate(){return!this.creationActive&&!this.geometry.getCoordinates().every(e=>0===e)}updateGeometry(){const e=this.vertices[0].getGeometry().getCoordinates();this.geometry.setCoordinates(e,"XYZ"),this._balloon&&(this.isOblique?this._balloon.obliqueCoordinates.splice(0,2,e[0],e[1]):this._balloon.setPosition(e))}setPosition(e){a(e,[Number]),a(e.length,3),this.vertices.length?(this.vertices[0].getGeometry().setCoordinates(e),this.updateGeometry()):this.pushVertex(e),this.creationActive&&this._validateOnFinish()}setMode(e){so.debug(`PointGeometryEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),super.setMode(e),this.state.mode&Oi.EDIT?(this._selectLabel&&this._selectLabel.setActive(),this._removeVertex.setActive()):this.state.mode&Oi.REMOVEVERTEX&&(this._removeVertex.setActive(!0),this._removeVertex.setModification(Z.NONE))}handleMapChange(e){this._balloon&&(this._balloon.close(),this._setBalloon())}destroy(){this._balloon&&(this._balloon.close(),this._balloon=null,this._textArea=null),this.feature[this.state.featureTypeSymbol]^=Yi.VERTEX,super.destroy()}}var no=ro;function ao(){}const oo=new ol.style.Style({});class lo extends ie{constructor(e,t){super(),this.editor=e,this.finished=!0,this._lastVertex=null,this.onFinish=t||ao,this._defaultActive=Q.CLICK|Q.DBLCLICK|Q.MOVE,this.setActive(!1)}pipe(e){return this.finished?Promise.resolve(e):(e.type&Q.MOVE&&this.editor.changeVertex(this._lastVertex,e.positionOrPixel,!this.editor.state.transformGeometryOnMove),e.type&Q.CLICK&&(this.editor.changeVertex(this._lastVertex,e.positionOrPixel),this._lastVertex.setStyle(null),this._lastVertex=this.editor.reverse?this.editor.unshiftVertex(e.positionOrPixel):this.editor.pushVertex(e.positionOrPixel),this._lastVertex.setStyle(oo)),e.type&Q.DBLCLICK&&(this.editor.removeVertex(this._lastVertex),this.editor.reverse=!1,this.onFinish(),this.setActive(!1)),Promise.resolve(e))}setActive(e){if(e){let e;this.finished=!1,this.editor.vertices.length>0?(e=this.editor.reverse?this.editor.vertices[0]:this.editor.vertices.slice(-1)[0],e=e.getGeometry().getCoordinates()):e=[0,0,0],this._lastVertex=this.editor.reverse?this.editor.unshiftVertex(e):this.editor.pushVertex(e),this._lastVertex.setStyle(oo)}else this.finished=!0;super.setActive(e)}}var co=lo;class ho extends ie{constructor(e,t){super(),this.editor=e,this.callback=t,this.timeOut=null,this.clickDuration=us().clickDuration,this._defaultActive=Q.CLICK|Q.DBLCLICK,this.setActive()}pipe(e){if(!this.editor.state.onlyAllowTranslation){if(e.type&Q.DBLCLICK)return this.editor.reverse=!1,clearTimeout(this.timeOut),Promise.resolve(e);if(e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.VERTEX){const t=this.editor.getVertexIndex(e.feature);0===t?(this.editor.reverse=!0,this.doCallback()):t===this.editor.vertices.length-1&&this.doCallback()}}return Promise.resolve(e)}doCallback(){this.timeOut=setTimeout(this.callback,this.clickDuration)}}var uo=ho;class mo extends ie{constructor(e){super(),this.editor=e,this._defaultActive=Q.CLICK,this.setActive()}pipe(e){return!this.editor.state.onlyAllowTranslation&&e.feature&&e.feature[this.editor.state.featureTypeSymbol]&Yi.EDITING&&this.editor.insertVertex(e.positionOrPixel),Promise.resolve(e)}}var go=mo;const po=v.getLogger("vcs.vcm.util.editor.LineGeometryEditor");class yo extends Pn{constructor(e){super(e),this._create=new co(this,this._validateOnFinish.bind(this)),this.interactionChain.addInteraction(this._create),this.geometry=this.geometry,this.reverse=!1,this._lastVertex=new uo(this,()=>{this.getRootEditor().setMode(Oi.CREATE)}),this.interactionChain.addInteraction(this._lastVertex),this._insertVertex=new go(this),this.interactionChain.addInteraction(this._insertVertex),this._removeVertex=new Qa(this),this.interactionChain.addInteraction(this._removeVertex)}_createVertices(){const e=this.geometry.getCoordinates();for(let t=0;t<e.length;t++)this.vertices.push(this._createVertex(e[t]));this.scratchLayer.addFeatures(this.vertices)}updateGeometry(){this.isOblique&&(this.geometry[Ki.imageGeometryChanged]=!0),this.geometry.setCoordinates(this.vertices.map(e=>{return this.isOblique?e[Ki.obliqueGeometry].getCoordinates():e.getGeometry().getCoordinates()}),"XYZ")}pushVertex(e){const t=this._createVertex(e);this.vertices.push(t),this.scratchLayer.addFeatures([t]);const i=this.geometry.getCoordinates();return i.push(e),this.geometry.setCoordinates(i),t}insertVertex(e){const t=this.geometry.getCoordinates(),i=this.geometry.getClosestPoint(e);this.geometry instanceof ol.geom.LinearRing&&t.push(t[0]);const s="clampToGround"===this.feature.get("olcs_altitudeMode")?jt(i,e):Ft(i,e);if(s<5){const s=t.length-1;let r=0;for(r;r<s;r++){const e="clampToGround"===this.feature.get("olcs_altitudeMode")?Ht(t[r],t[r+1],i):Nt(t[r],t[r+1],i);if(e)break}const n=this._createVertex(e);return this.vertices.splice(r+1,0,n),this.scratchLayer.addFeatures([n]),this.updateGeometry(),n}return null}unshiftVertex(e){const t=this._createVertex(e);this.vertices.unshift(t),this.scratchLayer.addFeatures([t]);const i=this.geometry.getCoordinates();return i.unshift(e),this.geometry.setCoordinates(i),t}removeVertex(e){const t=this.getVertexIndex(e);if(t>-1){const i=this.geometry.getCoordinates();i.splice(t,1),this.geometry.setCoordinates(i),this.vertices.splice(t,1),this.scratchLayer.removeFeaturesById([e.getId()])}}stopCreation(){if(super.stopCreation(),this.creationActive&&this.validate()){const e=this.reverse?this.vertices[0]:this.vertices[this.vertices.length-1];this.removeVertex(e)}}setMode(e){po.debug(`LineGeometryEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),super.setMode(e),this.feature.set("olcs_allowPicking",!!(e&Oi.EDIT)),this.state.mode&Oi.EDIT?(this._lastVertex.setActive(),this._insertVertex.setActive(),this._removeVertex.setActive()):this.state.mode&Oi.REMOVEVERTEX&&(this._removeVertex.setActive(!0),this._removeVertex.setModification(Z.NONE))}validate(){let e=1;return this.creationActive&&(e+=1),"LinearRing"===this.geometry.getType()&&(e+=1),this.geometry.getCoordinates().length>e}}var _o=yo;const fo=new ol.Sphere(6378137);class vo extends Pn{constructor(e){super(e),this._create=new Va(this,this._validateOnFinish.bind(this),2),this.interactionChain.addInteraction(this._create),this.geometry=this.geometry,this.radius=null;const t=this.feature.get("olcs.circle_type");t&&"sphere"===t||(this._translateVertex.forceZPlane=!0),this.setAltitudeModeToAbsoluteOnClassification=!1}initialize(){const e=this.geometry.getCenter();e[2]=e[2]||0;const t=this.geometry.getRadius();this.geometry.setCenterAndRadius(e,t,"XYZ"),super.initialize()}_createVertices(){const e=this.geometry.getFirstCoordinate();if(!e.every(e=>0===e)){this.vertices.push(this._createVertex(e,0));const t=this.geometry.getLastCoordinate();t.length&&this.vertices.push(this._createVertex(t,1)),this.scratchLayer.addFeatures(this.vertices)}}updateGeometry(){2===this.vertices.length&&this.geometry.setCoordinates([this.vertices[0].getGeometry().getCoordinates(),this.vertices[1].getGeometry().getCoordinates()])}pushVertex(e){if(this.vertices.length<2){let t=!1;const i=this.vertices.length;1===i&&(this.geometry.setCenter(this.vertices[0].getGeometry().getCoordinates()),this.radius&&(this.geometry.setRadius(this.radius),e[0]+=this.radius,this.radius=null,t=!0));const s=this._createVertex(e,i);return this.vertices.push(s),this.scratchLayer.addFeatures([s]),t&&this.stopCreation(),s}return this.vertices[1]}validate(){return!this.creationActive}translateVertex(e,t,i,s,r){if(0===s[En])super.translateVertex(e,t,i,s,!0),r||(this.geometry.setCenter(s.getGeometry().getCoordinates()),this.vertices[1].getGeometry().setCoordinates(this.geometry.getLastCoordinate()));else{const n=this.feature.get("olcs.circle_type");let a;if(n&&"sphere"===n?(a=Ft,super.translateVertex(e,t,i,s,!0)):(a=jt,s.getGeometry().translate(e,t)),!r){const e=this.vertices[0].getGeometry().getCoordinates(),t=s.getGeometry().getCoordinates(),i=a(e,t);this.geometry.setRadius(i)}}}translateVertexHeight(e,t,i){let s=2;while(s--){const t=this.vertices[s].getGeometry(),i=t.getCoordinates();i[2]+=e,t.setCoordinates(i)}i||this.geometry.setCenter(this.vertices[0].getGeometry().getCoordinates())}setPosition(e){a(e,[Number]),a(e.length,3),this.geometry.setCenter(e),this._clearVertices(),this._createVertices()}setRadius(e){a(e,Number);const t=this.geometry.getCenter(),i=fo.offset(S.mercatorToWgs84(t),e,Math.PI/2);i[2]=t[2],this.geometry.setCoordinates([t,S.wgs84ToMercator(i,!0)]),this.vertices.length>1?(this.vertices[1].getGeometry().setCoordinates(this.geometry.getLastCoordinate()),this.creationActive&&this._validateOnFinish()):this.radius=Math.abs(i[0]-t[0])}}var Lo=vo;class Mo extends ie{constructor(e,t,i,s){super(),this.geometry=e,this.cb=t,this.isEditingGeometry=i,this.featureTypeSymbol=s,this._defaultActive=Q.CLICK,this.setActive()}pipe(e){if(e.feature&&e.feature[this.featureTypeSymbol]&Yi.EDITING&&this.geometry[this.isEditingGeometry]){const t=kt(this.geometry);if(0===t.length)return this.cb(0),Promise.resolve(e);let i=1/0,s=0;for(let r=0;r<t.length;r++){const n=t[r].getClosestPoint(e.positionOrPixel),a=Ft(n,e.positionOrPixel);a<i&&(s=r,i=a)}this.cb(s)}return Promise.resolve(e)}}var bo=Mo;const wo={MultiPolygon:"Polygon",MultiPoint:"Point",MultiLineString:"LineString",Polygon:"LinearRing"},To=v.getLogger("vcs.vcm.util.editor.MultiGeometryEditor"),So=Symbol("isEditingGeometry");class Co extends Ln{get className(){return"vcs.vcm.util.editor.MultiGeometryEditor"}constructor(e){super(e),this.geometry=e.geometry,this.feature=e.feature,this.layer=e.layer,this.editors=[],this.listeners=[],this.isEditingGeometry=Symbol("isEditingGeometry"),this._selectGeometryInteraction=new bo(this.geometry,this.activateEditor.bind(this),So,this.state.featureTypeSymbol),this.interactionChain.addInteraction(this._selectGeometryInteraction),this._finishAction=e.onFinish||this.setMode.bind(this,Oi.EDIT),this.onRemoved=e.onRemoved||(()=>{}),this.activateEditorIndex=null,this._setupGeometries(),this.geometry[So]=!0}_setupGeometries(){const e=kt(this.geometry);e.forEach(this.addGeometry,this)}addGeometry(e){const t=e||Eo[wo[this.geometry.getType()]](),i=Io({parent:this,geometry:t,layer:this.layer,feature:this.feature,onFinish:this._finishAction,onRemoved:this._geometryRemoved.bind(this,this.editors.length)}),s=this.editors.push(i)-1;this.listeners.push(t.on("change",()=>{const e=this.geometry.getCoordinates();e[s]=t.getCoordinates(),this.geometry.setCoordinates(e,"XYZ")})),e||(Et(this.geometry,t),this.state.mode=Oi.CREATE,this.activateEditor(s))}_geometryRemoved(e,t){if(e||"Polygon"!==this.geometry.getType()){const i=this.geometry.getCoordinates();if(i.splice(e,1),!i.length)return void this._removeFeature(t);this.geometry.setCoordinates(i,"XYZ"),this.destroy(),this.editors=[],this.listeners=[],this._setupGeometries()}else this._removeFeature(t)}_removeFeature(e){const t=this.parent&&this.parent.className===this.className;if(!t){const e=G.getInstance().getLayerByName(this.state.layerName);e.removeFeaturesById([this.feature.getId()])}e&&!t||this.onRemoved()}setAltitudeMode(e){null!=this.activateEditorIndex&&this.editors[this.activateEditorIndex].setAltitudeMode(e)}activateEditor(e){if(this.activateEditorIndex===e)return;if(null!==this.activateEditorIndex){const e=this.editors[this.activateEditorIndex];e.destroy(),e.geometry[So]=!1,this.interactionChain.removeInteraction(e.interactionChain)}this.activateEditorIndex=e,this._selectGeometryInteraction.setActive(!1);const t=this.editors[e];t.initialize(),t.geometry[So]=!0,this.interactionChain.addInteraction(t.interactionChain),this.setMode(this.state.mode)}setMode(e){To.debug(`MultiGeometryEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`);const t=kt(this.geometry,null===this.activateEditorIndex?0:this.activateEditorIndex);if(!t)return void this.addGeometry();let i=e;const s=t.getExtent();if((ol.extent.isEmpty(s)||s.every(e=>0===e))&&(i=Oi.CREATE),super.setMode(i),i^Oi.CREATE&&this._selectGeometryInteraction.setActive(),null===this.activateEditorIndex)this.activateEditor(0);else{const e=this.editors[this.activateEditorIndex];e.interactionChain.setActive(!0),e.setMode(i)}}stopCreation(){null!==this.activateEditorIndex&&(this.editors[this.activateEditorIndex].validate()?this.editors[this.activateEditorIndex].stopCreation():this._geometryRemoved(this.activateEditorIndex,!0))}validate(){return this.editors.some(e=>e.validate())}destroy(){super.destroy(),ol.Observable.unByKey(this.listeners);for(let e=0;e<this.editors.length;e++)this.editors[e].destroy();this.activateEditorIndex=null}}var ko=Co;const Eo={Point(){const e=new ol.geom.Point([0,0,0],"XYZ");return e[Ki.alreadyTransformedToMercator]=!0,e},Label(){const e=new ol.geom.Point([0,0,0],"XYZ");return e[Ki.alreadyTransformedToMercator]=!0,e.set("_vcsGeomType","Label"),e},Circle(){const e=new ol.geom.Circle([0,0,0],20,"XYZ");return e[Ki.alreadyTransformedToMercator]=!0,e},LineString(){return new ol.geom.LineString([],"XYZ")},LinearRing(){return new ol.geom.LinearRing([],"XYZ")},Polygon(){return new ol.geom.Polygon([[]],"XYZ")},BBox(){const e=new ol.geom.Polygon([[]],"XYZ");return e.set("_vcsGeomType","bbox"),e},Rectangle(){const e=new ol.geom.Polygon([[]],"XYZ");return e.set("_vcsGeomType","rectangle"),e},MultiLineString(){return new ol.geom.MultiLineString([[]],"XYZ")},MultiPolygon(){return new ol.geom.MultiPolygon([[[]]],"XYZ")},MultiPoint(){const e=new ol.geom.MultiPoint([[0,0,0]],"XYZ");return e[Ki.alreadyTransformedToMercator]=!0,e}};function Io(e){const t=e.geometry;if(t instanceof ol.geom.Polygon){const i=t.get("_vcsGeomType");return i&&"rectangle"===i?new Ua(e):i&&"bbox"===i?new Ua(Object.assign(e,{isBBox:!0})):new ko(Object.assign(e,{geomType:"LinearRing"}))}if(t instanceof ol.geom.Circle)return new Lo(e);if(t instanceof ol.geom.Point)return new no(e);const i=["LineString","Polygon","Point"],s=i.find(e=>t instanceof ol.geom[`Multi${e}`]);return s?new ko(Object.assign(e,{geomType:s})):new _o(e)}var Do=i(446),Po=i.n(Do);const Oo=v.getLogger("vcs.vcm.util.editor.GeometryLayerEditor");class Yo extends zn{get className(){return"vcs.vcm.util.editor.GeometryLayerEditor"}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e),this.state.allowedGeometries=e.allowedGeometries||["Point","LineString","Polygon","BBox","Circle","Rectangle","Label"],this.lastFeatureType=null,(null==e.allowEditMode||e.allowEditMode)&&this.state.allowedModes.push(Object.keys(xi).find(e=>xi[e]===Oi.EDIT)),this.geometryEditor=null,this.defaultMode=xi[e.defaultMode]||Oi.CREATE,this.scratchLayer.setStyle(new ol.style.Style({image:new ol.style.Icon({src:Po.a,scale:.45})})),this.state.dedicatedFeatureStyle=e.dedicatedFeatureStyle}deactivate(){super.deactivate(),this.isOblique&&(G.getInstance().getActiveMap().switchEnabled=!0)}beforeSetMode(e){super.beforeSetMode(e),e&Oi.GEOMETRYMODES||this.clearGeometryEditor()}setMode(e){if(Oo.debug(`GeometryLayerEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),super.setMode(e),this.isOblique&&(G.getInstance().getActiveMap().switchEnabled=!(e&Oi.GEOMETRYMODES)||0===this.features.size),e&Oi.GEOMETRYMODES)if(this.geometryEditor)this.geometryEditor.validate()?(this.geometryEditor.setMode(e),this.geometryEditor.interactionChain.setActive(!0)):this.clearGeometryEditor();else if(this.features.size){const t=this.features.values().next().value;if(this.features.size>1)return void this.selectFeatureInteraction.selectFeature(t);this.editingFeature=t,this.editingFeature[this.state.featureTypeSymbol]|=Yi.EDITING,this.geometryEditor=Io({parent:this,layer:this.activeLayer,geometry:this.isOblique?this.editingFeature[Ki.obliqueGeometry]:this.editingFeature.getGeometry(),feature:this.editingFeature,onFinish:this._onCreationFinish.bind(this),onRemoved:this._onCreationFinish.bind(this)}),this.geometryEditor.initialize(),this.geometryEditor.setMode(e),this.interactionChain.addInteraction(this.geometryEditor.interactionChain)}}setAltitudeMode(e){return e&this.state.altitudeMode?Promise.resolve():super.setAltitudeMode(e).then(()=>{this.geometryEditor&&this.geometryEditor.setAltitudeMode(e)})}createFeature(e,t,i){a(e,Object.keys(Eo)),o(t,[String,Number]);const s=i||Eo[e](),r=new ol.Feature({geometry:s});if(r[this.state.featureTypeSymbol]=Yi.EDITABLE,this.state.altitudeMode!==this.state.defaultAltitudeMode){const e=this.state.altitudeMode!==Ai.CLAMP&&G.getInstance().getActiveMap()instanceof Mt?"absolute":"clampToGround";r.set("olcs_altitudeMode",e)}else this.state.defaultAltitudeMode!==Ai.ABSOLUTE||G.getInstance().getActiveMap()instanceof Mt||r.set("olcs_altitudeMode","clampToGround");if(this.state.classificationType!==this.state.defaultClassificationType&&r.set("olcs_classificationType",Ni[this.state.classificationType]),t&&r.setId(t),this.lastFeatureType=e,this.state.layerName){const i=G.getInstance().getLayerByName(this.state.layerName);if(i&&i instanceof Ki&&(t&&i.removeFeaturesById([t]),this.isOblique&&(s[Ki.alreadyTransformedToImage]=!0),i.addFeatures([r]),this.state.dedicatedFeatureStyle||"Label"===e)){const e=i.defaultStyle instanceof Je?i.defaultStyle:Ke;r[We]=e.clone(new Je({name:r.getId().toString()})),r.setStyle(r[We].style)}}return r}setModeAndSelectFeature(e,t){this.getRootEditor().beforeSetMode(e),this.state.mode=e,this.selectFeatureInteraction.selectFeature(t)}clearGeometryEditor(){if(this.editingFeature&&(this.editingFeature[this.state.featureTypeSymbol]^=Yi.EDITING,this.editingFeature=null),this.geometryEditor){const e=this.geometryEditor.feature.getId();this.features.has(e)&&!this.geometryEditor.validate()&&this.selectFeatureInteraction.clearSelectionSet(!0),this.geometryEditor.stopCreation(),this.interactionChain.removeInteraction(this.geometryEditor.interactionChain),this.geometryEditor.destroy(),this.geometryEditor=null}}onSelect(){if(this.clearGeometryEditor(),this.state.active){let e=this.state.mode;this.state.mode&Oi.GEOMETRYMODES&&this.features.size>1&&this.parent?(e=Oi.SELECT,this.getRootEditor().setMode(e)):e&Oi.CREATE&&0===this.features.size?this._onCreationFinish():e&Oi.GEOMETRYMODES&&this.getRootEditor().setMode(e)}}_onCreationFinish(){if(this.state.mode===Oi.CREATE&&this.defaultMode===Oi.CREATE){const e=this.createFeature(this.lastFeatureType);this.setModeAndSelectFeature(this.state.mode,e)}else this.getRootEditor().setMode(this.defaultMode)}convertEditingFeatureToPolygon(){if(this.editingFeature&&1===this.features.size){const e=this.isOblique?this.editingFeature[Ki.obliqueGeometry]:this.editingFeature.getGeometry(),t=qt(e);this.isOblique&&(t[Ki.alreadyTransformedToImage]=!0),this.editingFeature.setGeometry(t);const i=this.editingFeature;this.selectFeatureInteraction.clearSelectionSet(!0),this.selectFeatureInteraction.selectFeature(i)}}setEditingFeatureTypeProperty(e,t){this.editingFeature&&1===this.features.size&&(this.editingFeature.set(e,t),this.selectFeatureInteraction.clearSelectionSet(!0),this.selectFeatureInteraction.selectFeature(this.editingFeature))}handleMapChange(e){super.handleMapChange(e)}}var xo=Yo;const Ao=window.localStorage,jo=v.getLogger("vcs.vcm.util.storage");function Fo(){if(!Ao)return!1;try{const t="__storage_test__";return Ao.setItem(t,t),Ao.removeItem(t),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==Ao.length}}class No{constructor(e){this.namespace=e}setItem(e,t){Fo()?Ao.setItem(`${this.namespace}.${e}`,t):jo.warning("storage unavailable or full")}getItem(e){return Ao?Ao.getItem(`${this.namespace}.${e}`):null}removeItem(e){Ao&&Ao.removeItem(`${this.namespace}.${e}`)}}var Ho=No;const Ro=v.getLogger("vcs.vcm.util.editor.StyleLayerEditor"),zo=new Ho("StyleLayerEditor");class Go extends zn{get className(){return"vcs.vcm.util.editor.StyleLayerEditor"}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super(e),this.icons=e.icons||[],this.customIcons=[],this.allowCustomIcons=e.allowCustomIcons||!1,this.storeCustomIcons=e.storeCustomIcons||!1,this.currentStyleOptions={text:null,fill:null,stroke:null,image:null},this.currentStyleItem=Ke.clone(),!e.noDefaultIcons){const e=G.getInstance().libraryBasePath;this._fetchIcons(`${e}images/editor/defaultIconsCategory.json`)}e.iconLibraries&&e.iconLibraries.forEach(this._fetchIcons.bind(this)),this.allowCustomIcons&&this.storeCustomIcons&&Fo()&&this._fetchCustomIcons(),this._syncOptions(Ke.getOptions())}_fetchIcons(e){return q.a.get(e).then(t=>{let i=t.data;const s=e.replace(/\/?[^\/]+$/,"");Array.isArray(i)?i.forEach(e=>{if("string"===typeof e){const t=/^data/.test(e)?e:`${s}/${e}`;this.icons.push({src:t})}else e.src=`${s}/${e.src}`,this.icons.push(e)}):Ro.error(`could not load icon library, content of ${e} is not a JSONArray`)})}_fetchCustomIcons(){const e=zo.getItem("customIconIndex");e&&JSON.parse(e).forEach(e=>{const t=zo.getItem(`${e}`);t&&this.customIcons.push({src:t})})}readIconFromFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.allowCustomIcons?new Promise((i,s)=>{const r=new FileReader;r.onloadend=()=>{const e=r.result;if(this.customIcons.push(Object.assign(t,{src:e})),this.storeCustomIcons&&Fo()){const t=JSON.parse(zo.getItem("customIconIndex")||"[]"),i=Object(c["c"])();t.push(i),zo.setItem("customIconIndex",JSON.stringify(t)),zo.setItem(`${i}`,e)}i()},r.onerror=s,r.readAsDataURL(e)}):(Ro.warning("custom icons are not supported at this time"),Promise.resolve())}deleteCustomIcon(e){if(this.storeCustomIcons){const t=JSON.parse(zo.getItem("customIconIndex")||"[]"),i=t.filter(t=>{const i=zo.getItem(t);return i!==e||(zo.removeItem(t),!1)});zo.setItem("customIconIndex",JSON.stringify(i))}const t=this.customIcons.findIndex(t=>t.src===e);t>-1&&this.customIcons.splice(t,1)}addEditingLayer(e){super.addEditingLayer(e),this.onSelect()}setMode(){this.onSelect()}onSelect(){if(this.activeLayer){this.state.isDeclarativeStyle=!1;let e=this.activeLayer.style;if(e instanceof it&&(this.state.isDeclarativeStyle=!0,e=null),!this.state.isDeclarativeStyle&&this.features.size){const t=this.features.get(this.state.selectedFeatureId);e=t[We]||e}this.state.isLayerStyle=this.activeLayer.style===e,e?this.currentStyleItem&&this.currentStyleItem===e||(this.currentStyleItem=e,this._syncOptions(e.getOptions())):(this.currentStyleOptions.text=null,this.currentStyleOptions.fill=null,this.currentStyleOptions.stroke=null,this.currentStyleOptions.image=null,this.currentStyleItem=null)}}setLayerStyle(e){this.activeLayer.setStyle(e||this.activeLayer.defaultStyle),this.onSelect()}_syncOptions(e){e.fill?(this.currentStyleOptions.fill?this.currentStyleOptions.fill.color=e.fill.color:(e.fill.pattern||(e.fill.pattern=null),this.currentStyleOptions.fill=e.fill),e.fill.pattern&&this.currentStyleOptions.fill.pattern?Object.assign(this.currentStyleOptions.fill.pattern,e.fill.pattern):this.currentStyleOptions.fill.pattern={type:0,color:[0,0,0,1],width:1,size:10}):this.currentStyleOptions.fill=null,this.currentStyleOptions.stroke=e.stroke||null,e.text?(this.currentStyleOptions.text=e.text,this.currentStyleOptions.text.font=ke(e.text.font||"18px sans-serif")):this.currentStyleOptions.text=null,e.image?(this.currentStyleOptions.image=e.image,this.currentStyleOptions.image.currentImage=e.image.radius?this.currentStyleItem.image.getImage(1).toDataURL():e.image.src):this.currentStyleOptions.image=null}addDedicatedStyleFromCurrentStyle(){if(!this.state.isDeclarativeStyle&&this.features.size){let e;this.features.forEach(t=>{const i=this.currentStyleItem.clone(new Je({id:t.getId()}));e||(e=i),t[We]=i,t.setStyle(t[We].style),t.changed()}),this.currentStyleItem=e,this.state.isLayerStyle=!1}}cloneCurrentStyleOntoLayer(){const e=this.currentStyleItem.clone();this.activeLayer.setStyle(e),this.currentStyleItem=e}updateFont(e){this.currentStyleItem.text||(this.currentStyleItem.text=new ol.style.Text);const t=Ee(e);this.currentStyleItem.text.setFont(t),this.currentStyleOptions.text||(this.currentStyleOptions.text={}),this.currentStyleOptions.text.font?Object.assign(this.currentStyleOptions.text.font,e):this.currentStyleOptions.text.font=e}setImage(e){let t;const i=Object.assign({},e);t=i.radius?Re(i):new ol.style.Icon(i),this.currentStyleItem.image=t;const s=this.currentStyleItem.getOptions({image:!0});s.image?(this.currentStyleOptions.image=s.image,this.currentStyleOptions.image.currentImage=this.currentStyleOptions.image.src||this.currentStyleItem.image.getImage(1).toDataURL()):this.currentStyleOptions.image=null}updateStyle(e){this.features.size&&this.currentStyleItem&&this.features.forEach(e=>{if(!e[We]||e[We].name!==this.currentStyleItem.name){const t=e[We];t?this.currentStyleItem.clone(t):e[We]=this.currentStyleItem.clone(new Je({id:e.getId()})),e.setStyle(e[We].style)}e.changed()}),e&&this._syncOptions(this.currentStyleItem.getOptions())}updateStyleSection(e,t){a(e,["fill","stroke","text","image"]),this.features.size&&this.currentStyleItem&&this.features.forEach(i=>{i[We]||(i[We]=this.activeLayer.style.clone(new Je({id:i.getId()})),i.setStyle(i[We].style)),i[We].name!==this.currentStyleItem.name&&("fill"===e?(i[We].fillColor=this.currentStyleItem.fillColor.slice(),i[We].pattern=this.currentStyleItem.pattern?Object.assign({},this.currentStyleItem.pattern):void 0):i[We][e]=this.currentStyleItem[e].clone()),t||i.changed()})}}var Vo=Go;const Bo=v.getLogger("vcs.vcm.util.editor.CompositeLayerEditor");class Uo extends zn{get className(){return"vcs.vcm.util.editor.CompositeLayerEditor"}constructor(e){if(super(e),this.children=[],e.featureLayerEditor&&this.children.push(new Ra(Object.assign(e.featureLayerEditor,{parent:this}))),e.geometryLayerEditor){const t=Object.assign(e.geometryLayerEditor,{parent:this});t.dedicatedFeatureStyle=!(null!=t.dedicatedFeatureStyle||!e.styleLayerEditor),this.children.push(new xo(t))}e.styleLayerEditor&&this.children.push(new Vo(Object.assign(e.styleLayerEditor,{parent:this})))}getFeatureLayerEditor(){return this.children.find(e=>{return e instanceof Ra})}getGeometryLayerEditor(){return this.children.find(e=>{return e instanceof xo})}getStyleLayerEditor(){return this.children.find(e=>{return e instanceof Vo})}initialize(){this.interactionChain.initialize(),this.children.forEach(e=>{e.initialize()}),this.selectFeatureInteraction.onCesiumSelect(this.onCesiumSelect.bind(this))}activate(){this.children.forEach(e=>{e.activate()}),super.activate()}deactivate(){super.deactivate(),this.children.forEach(e=>{e.deactivate()})}beforeSetMode(e){super.beforeSetMode(),this.children.forEach(t=>{t.beforeSetMode(e)})}setMode(e){Bo.debug(`CompositeLayerEditor ${e} ${Object.keys(Oi).find(t=>Oi[t]===e)}`),super.setMode(e),this.children.forEach(t=>{t.setMode(e)})}setAltitudeMode(e){let t=Promise.resolve();return this.children.forEach(i=>{t=t.then(()=>i.setAltitudeMode(e))}),t.then(()=>super.setAltitudeMode(e))}addEditingLayer(e){super.addEditingLayer(e),this.children.forEach(t=>{t.addEditingLayer(e)})}destroy(){super.destroy(),this.children.forEach(e=>{e.destroy()})}}var Wo=Uo,qo="<div class='balloon' id='myBalloon'>\n  <h1 class='balloon-title'><%= obj.planningName %></h1>\n  <div class='balloon-content'>\n    <%= obj.planningDescription %>\n  </div>\n  <div class='balloon-close-col'>\n    <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>\n  </div>\n  <div class='dialog-image-balloon'></div>\n  <div class='balloon-left-edge'></div>\n</div>\n",Jo="<div class='balloon' id='myBalloon'>\n  <div class='balloon-content'>\n    <h1 class='balloon-title'> Available Attributes </h1>\n    <% for (var key in obj) { %>\n    <% if (obj[key] instanceof Object){%>\n    <% for (var key2 in obj[key]) { %>\n    <p class='balloon-text'><span class='balloon-street'> <%=key%>.<%=key2%> : <%=obj[key][key2]%></span><br></p>\n    <% } %>\n    <% } else{ %>\n    <p class='balloon-text'><span class='balloon-street'> <strong> <%=key%> </strong> : <%=obj[key]%></span><br></p>\n    <% } %>\n    <% } %>\n  </div>\n  <div class='balloon-close-col'>\n    <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>\n  </div>\n  <div class='dialog-image-balloon'></div>\n  <div class='balloon-left-edge'></div>\n</div>\n";const Ko=[{title:{de:"Leerer Balloon",en:"Empty Balloon"},template:""},{title:{de:"Ebenen Name & Beschreibung",en:"Layer Name & Description"},template:qo.trim()},{title:{de:"Alle Attribute",en:"All Properties"},template:Jo.trim()}];var Zo=Ko;I.PLANNINGINSTANCES_CHANGED="PLANNINGINSTANCES_CHANGED";class Qo extends kr{static get className(){return"vcs.vcm.widgets.Planning"}constructor(e){e.className=Qo.className,super(e),this.serviceUrl=e.serviceUrl||"https://planning.virtualcityplanner.de",this.scenarioId=e.scenarioId,this.projectId=e.projectId,this.useLocalCRS=Object(c["e"])(e.useLocalCRS,!1),this.showInLegend=Object(c["e"])(e.showInLegend,!0),this.legendTitle=e.legendTitle||{en:"Plannings",de:"Planungen",pl:"Planowanie"},this.loginManager=sa.getInstance(),this.url=n["a"].parse(this.serviceUrl),this.url.extendPath("planning"),this.loginManager.registerWidget({onLogin:[this.fetchUserPlannings.bind(this),this.fetchUserCreate.bind(this)],onLogout:[this.fetchUserPlannings.bind(this)],beforeLogout:[this.clear.bind(this),this.setUserMayCreate.bind(this,{data:!1})],serviceUrl:this.serviceUrl,projectId:this.projectId,scenarioId:this.scenarioId}).then(()=>{this.url=this.loginManager.url.clone(),this.url.extendPath("planning"),this.url.queryParams=this.loginManager.url.queryParams}).catch(e=>{this.logger.warning(e.message),this.logger.warning("could not initialize planning, missing login url")}),this.planningInstances=[],this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this._linkedPlannings=[],this.activePlanningInstance=null,this.userMayCreate={permission:!1},this.fetching=null,this.legendCluster=new xr({title:this.legendTitle}),this.commentIcons=this._setupCommentStyle(e.commentIcons),this.terrainUrl=e.terrainUrl||null,this.useDefaultTerrain=Object(c["e"])(e.useDefaultTerrain,!0),this.allowBalloonEditor=Object(c["e"])(e.allowBalloonEditor,!1),this.predefinedBalloons=Zo,Array.isArray(e.predefinedBalloons)&&this.predefinedBalloons.push(...e.predefinedBalloons),this.showStyleSelector=Object(c["e"])(e.showStyleSelector,!1)}_setupCommentStyle(e){if(this.framework.getStyleByName("planningCommentStyle"))return{};const t=this.framework.libraryBasePath,i=e||{[oa.DEFAULT]:`${t}images/editor/icon-bubble.png`,[oa.WARNING]:`${t}images/editor/icon-bubble-red.png`,[oa.INFO]:`${t}images/editor/icon-bubble-blue.png`,[oa.SUCCESS]:`${t}images/editor/icon-bubble-green.png`},s={pointSize:{conditions:[["${selected}===true","1.5"],["true","1"]]}};if("string"===typeof i)s.image=`"${i}"`;else{const e=Object.values(oa),r=[];Object.entries(i).forEach(t=>{let i=Object(le["a"])(t,2),s=i[0],n=i[1];e.includes(s)&&s!==oa.DEFAULT&&r.push([`\${commentType} === "${s}"`,`"${n}"`])}),i[oa.DEFAULT]=i[oa.DEFAULT]||`${t}images/editor/icon-bubble.png`,r.push(["true",`"${i[oa.DEFAULT]}"`]),s.image={conditions:r},e.forEach(e=>{i[e]||(i[e]=i[oa.DEFAULT])})}const r=new it({name:"planningCommentStyle",declarativeStyle:s});return r.cesiumStyle.ready?(this.framework.addStyle(r),"string"===typeof i?{}:i):(this.logger.warning("could not setup custom comment style, using default"),this._setupCommentStyle())}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;if(this.layerEditor=new Wo({geometryLayerEditor:{},featureLayerEditor:{},styleLayerEditor:{allowCustomIcons:!0}}),this.layerEditor.initialize(),this.commentsLayerEditor=new Wo({geometryLayerEditor:{allowedGeometries:["Point"],defaultMode:"edit"},styleLayerEditor:{}}),this.useDefaultTerrain&&!this.terrainUrl){const e=this.framework.getLayers().find(e=>e.activeOnStartup&&e instanceof vt);this.terrainUrl=e?e.url:null}if(this.terrainUrl&&!/https?:/.test(this.terrainUrl)){const e=n["a"].parse(window.location.href);e.queryParams={},e.hashPath=[],/^\//.test(this.terrainUrl)?(e.path=[],this.terrainUrl=`${e.toString()}${this.terrainUrl}`):this.terrainUrl=`${e.toString().replace(/\/$/,"")}/${this.terrainUrl.replace(/^\.\//,"")}`}if(this.fetchUserPlannings(),this.showInLegend&&(this.legendCluster=Xr(),!this.legendCluster)){this.legendCluster=new xr({title:this.legendTitle});const e=this.framework.getWidgetByType("vcs.vcm.widgets.legend.Legend");e&&e.cluster.push(this.legendCluster)}this.initialized=!0,this.initializedFinished()}return!0}handleMapChangeEvent(e){super.handleMapChangeEvent(e),-1===this.supportedMaps.indexOf(e.className)?this.legendCluster.visible=!1:this.legendCluster.visible=!0,this.planningInstances.forEach(t=>{t.handleMapChange(e)})}fetchUserCreate(){const e=this.url.clone();q.a.post(e.extendPath("permission").toString(),{mapId:this.scenarioId}).then(this.setUserMayCreate.bind(this))}setUserMayCreate(e){null!==e.data&&(this.userMayCreate.permission=e.data)}fetchUserPlannings(){const e=this.url.clone();this.fetching=q.a.post(e.extendPath("list").toString(),{mapId:this.scenarioId}).then(this.setPlannings.bind(this)).catch(e=>{this.logger.error(e)})}setPlannings(e){this.clear().then(()=>{const t=e.data;t.forEach(this.createPlanningInstance,this),this._linkedPlannings=[],this.fetching=null,this.framework.publish(I.PLANNINGINSTANCES_CHANGED,this.planningInstances)})}setActivePlanning(e){if(a(e,fa),this.activePlanningInstance){if(this.activePlanningInstance._id===e._id)return;this.activePlanningInstance.maintainLockInterval&&this.activePlanningInstance.unlock(),this.activePlanningInstance.unLoad()}this.activePlanningInstance=e,this.activePlanningInstance&&this.activePlanningInstance.load()}deactivateActivePlanning(){this.activePlanningInstance&&(this.activePlanningInstance.maintainLockInterval&&this.activePlanningInstance.unlock(),this.activePlanningInstance.unLoad()),this.activePlanningInstance=null}createPlanningInstance(e){e.url=this.url;const t=new fa(Object.assign(e,{editorId:this.layerEditor.id,commentsEditorId:this.commentsLayerEditor.id,terrainUrl:this.terrainUrl}));return this._linkedPlannings.indexOf(e._id)>-1&&e.public&&t.load(),this.planningInstances.push(t),this.legendCluster.children.push(new Jr({planningInstance:t})),this.legendCluster.visible=!0,t}addPlanningInstance(e,t,i){a(e,String),o(t,String),o(i,Object);const s={name:e,description:t,mapId:this.scenarioId};i&&(s.properties=i);const r=this.url.clone();return q.a.post(r.extendPath("add").toString(),s).then(e=>{let t=e.data;const i=this.createPlanningInstance(t);return this.framework.publish(I.PLANNINGINSTANCES_CHANGED,this.planningInstances),i}).catch(e=>{this.logger.warning(e.response.data)})}deletePlanning(e){a(e,fa);const t=this.url.clone();return q.a.post(t.extendPath("remove").toString(),{_id:e._id}).then(()=>{const t=this.planningInstances.findIndex(t=>t._id===e._id);this.planningInstances.splice(t,1),this.activePlanningInstance&&this.activePlanningInstance._id===e._id&&(this.activePlanningInstance=null);const i=this.legendCluster.children.findIndex(t=>t instanceof Jr&&t.planningInstance._id===e._id);return this.legendCluster.children.splice(i,1),e.destroy(),this.framework.publish(I.PLANNINGINSTANCES_CHANGED,this.planningInstances),e._id})}clear(){const e=this.planningInstances.map(e=>e.destroy().then(()=>Promise.resolve()).catch(()=>{return this.logger.error(`could not unlock planning instance${e.name}`),Promise.resolve()}));return Promise.all(e).then(()=>{return this.planningInstances.splice(0),this.activePlanningInstance=null,this.legendCluster.children.splice(0),this.legendCluster.visible=!1,Promise.resolve()})}getConfigObject(){return{useLocalCRS:this.useLocalCRS}}handleURLParameter(e){e.plannings&&Array.isArray(e.plannings)&&this.framework.subscribeOnce("PLANNINGINSTANCES_CHANGED",()=>{this.planningInstances.filter(t=>e.plannings.includes(t._id)).forEach(e=>{e.load()})})}getLink(e){const t=this.planningInstances.filter(e=>e.public&&e.loaded).map(e=>e._id);e.queryParams.plannings&&delete e.queryParams.plannings,t.length>0&&e.addQueryParams({plannings:JSON.stringify(t)})}}var $o=Qo;class Xo{constructor(e,t,i){this.id=e,this.symbol=t,this.openlayersFilter=i}getId(){return this.id}getOpenlayersFilter(){return this.openlayersFilter}}const el={EQUAL_TO:new Xo("EQUAL_TO"," = ",ol.format.filter.EqualTo),NOT_EQUAL_TO:new Xo("NOT_EQUAL_TO"," != ",ol.format.filter.NotEqualTo),LESS_THAN:new Xo("LESS_THAN"," < ",ol.format.filter.LessThan),GREATER_THAN:new Xo("GREATER_THAN"," > ",ol.format.filter.GreaterThan),LESS_THAN_OR_EQUAL_TO:new Xo("LESS_THAN_OR_EQUAL_TO"," <= ",ol.format.filter.LessThanOrEqualTo),GREATER_THAN_OR_EQUAL_TO:new Xo("GREATER_THAN_OR_EQUAL_TO"," >= ",ol.format.filter.GreaterThanOrEqualTo),LIKE:new Xo("LIKE","like",ol.format.filter.IsLike),BETWEEN:new Xo("BETWEEN","between",ol.format.filter.IsBetween),BBOX:new Xo("BBOX","bbox",ol.format.filter.Bbox),INTERSECTS:new Xo("INTERSECTS","intersects",ol.format.filter.Intersects),DWITHIN:new Xo("DWITHIN","distance within",ol.format.filter.DWithin),WITHIN:new Xo("WITHIN","within",ol.format.filter.Within),AND:new Xo("AND","and",ol.format.filter.and),OR:new Xo("OR","or",ol.format.filter.or)};var tl=Xo;const il={GEOMETRY:0,ATTRIBUTE:1,GENERICATTRIBUTE:2,GENERICDATEATTRIBUTE:3,DATEATTRIBUTE:4,DATEYEARATTRIBUTE:5,FILTER:6};class sl{constructor(e,t,i,s,r,n){this.id=e,this.type=i,this.allowedComparisons=[],this.prefix=n,this.valueReference=s||`${n}:${this.id}`;for(let a=0;a<r.length;a++){const e=r[a];t.hasOwnProperty(e)&&this.allowedComparisons.push(t[e])}}getPrefix(){return this.prefix}getId(){return this.id}getType(){return this.type}getAllowedComparisons(){return this.allowedComparisons}getValueReference(){return this.valueReference}}const rl={Filter:{[el.AND.id]:el.AND,[el.OR.id]:el.OR},Geometry:{[el.BBOX.id]:el.BBOX,[el.INTERSECTS.id]:el.INTERSECTS,[el.DWITHIN.id]:el.DWITHIN,[el.WITHIN.id]:el.WITHIN},StringAttribute:{[el.EQUAL_TO.id]:el.EQUAL_TO,[el.NOT_EQUAL_TO.id]:el.NOT_EQUAL_TO,[el.LIKE.id]:el.LIKE},BooleanAttribute:{[el.EQUAL_TO.id]:el.EQUAL_TO,[el.NOT_EQUAL_TO.id]:el.NOT_EQUAL_TO},DateAttribute:{[el.EQUAL_TO.id]:el.EQUAL_TO,[el.NOT_EQUAL_TO.id]:el.NOT_EQUAL_TO,[el.LESS_THAN.id]:el.LESS_THAN,[el.GREATER_THAN.id]:el.GREATER_THAN,[el.LESS_THAN_OR_EQUAL_TO.id]:el.LESS_THAN_OR_EQUAL_TO,[el.GREATER_THAN_OR_EQUAL_TO.id]:el.GREATER_THAN_OR_EQUAL_TO,[el.BETWEEN.id]:el.BETWEEN},NumberAttribute:{[el.EQUAL_TO.id]:el.EQUAL_TO,[el.NOT_EQUAL_TO.id]:el.NOT_EQUAL_TO,[el.LESS_THAN.id]:el.LESS_THAN,[el.GREATER_THAN.id]:el.GREATER_THAN,[el.LESS_THAN_OR_EQUAL_TO.id]:el.LESS_THAN_OR_EQUAL_TO,[el.GREATER_THAN_OR_EQUAL_TO.id]:el.GREATER_THAN_OR_EQUAL_TO,[el.BETWEEN.id]:el.BETWEEN}};class nl extends sl{constructor(e,t){super("boundedBy",rl.Geometry,il.GEOMETRY,"gml:boundedBy",e,"gml")}}class al extends sl{constructor(e){super("id",rl.StringAttribute,il.ATTRIBUTE,"@gml:id",e,"gml")}}class ll extends sl{constructor(e){super("name",rl.StringAttribute,il.ATTRIBUTE,"gml:name",e,"gml")}}class cl extends sl{constructor(e){super("description",rl.StringAttribute,il.ATTRIBUTE,"gml:description",e,"gml")}}class hl extends sl{constructor(e){super("lineage",rl.StringAttribute,il.ATTRIBUTE,"citydb:lineage",e,"citydb")}}class ul extends sl{constructor(e){super("updatingPerson",rl.StringAttribute,il.ATTRIBUTE,"citydb:updatingPerson",e,"citydb")}}class dl extends sl{constructor(e){super("lastModificationDate",rl.DateAttribute,il.DATEATTRIBUTE,"citydb:lastModificationDate",e,"citydb")}}class ml extends sl{constructor(e){super("reasonForUpdate",rl.DateAttribute,il.DATEATTRIBUTE,"citydb:lastModificationDate",e,"citydb")}}class gl extends sl{constructor(e){super("creationDate",rl.DateAttribute,il.DATEATTRIBUTE,"core:creationDate",e,"core")}}class pl extends sl{constructor(e){super("terminationDate",rl.DateAttribute,il.DATEATTRIBUTE,"core:terminationDate",e,"core")}}class yl extends sl{constructor(e){super("relativeToTerrain",rl.StringAttribute,il.ATTRIBUTE,"core:relativeToTerrain",e,"core")}}class _l extends sl{constructor(e){super("relativeToWater",rl.StringAttribute,il.ATTRIBUTE,"core:relativeToWater",e,"core")}}class fl extends sl{constructor(e){super("externalReferenceInformationSystem",rl.StringAttribute,il.ATTRIBUTE,"core:externalReference/core:informationSystem",e,"core")}}class vl extends sl{constructor(e){super("externalReferenceName",rl.StringAttribute,il.ATTRIBUTE,"core:externalReference/core:externalObject/core:name",e,"core")}}class Ll extends sl{constructor(e){super("externalReferenceUri",rl.StringAttribute,il.ATTRIBUTE,"core:externalReference/core:externalObject/core:uri",e,"core")}}class Ml extends sl{constructor(e){super("stringAttribute",rl.StringAttribute,il.GENERICATTRIBUTE,'gen:stringAttribute[@gen:name="token"]/gen:value',e,"gen")}}class bl extends sl{constructor(e){super("doubleAttribute",rl.NumberAttribute,il.GENERICATTRIBUTE,'gen:doubleAttribute[@gen:name="token"]/gen:value',e,"gen")}}class wl extends sl{constructor(e){super("intAttribute",rl.NumberAttribute,il.GENERICATTRIBUTE,'gen:intAttribute[@gen:name="token"]/gen:value',e,"gen")}}class Tl extends sl{constructor(e){super("uriAttribute",rl.StringAttribute,il.GENERICATTRIBUTE,'gen:uriAttribute[@gen:name="token"]/gen:value',e,"gen")}}class Sl extends sl{constructor(e){super("dateAttribute",rl.DateAttribute,il.GENERICDATEATTRIBUTE,'gen:dateAttribute[@gen:name="token"]/gen:value',e,"gen")}}class Cl extends sl{constructor(e){super("measureAttribute",rl.NumberAttribute,il.GENERICATTRIBUTE,'gen:measureAttribute[@gen:name="token"]/gen:value',e,"gen")}}class kl extends sl{constructor(e,t){super("class",rl.StringAttribute,il.ATTRIBUTE,null,e,t)}}class El extends sl{constructor(e,t){super("function",rl.StringAttribute,il.ATTRIBUTE,null,e,t)}}class Il extends sl{constructor(e,t){super("usage",rl.StringAttribute,il.ATTRIBUTE,null,e,t)}}class Dl extends sl{constructor(e,t){super("yearOfConstruction",rl.DateAttribute,il.DATEYEARATTRIBUTE,null,e,t)}}class Pl extends sl{constructor(e,t){super("yearOfDemolition",rl.DateAttribute,il.DATEYEARATTRIBUTE,null,e,t)}}class Ol extends sl{constructor(e,t){super("roofType",rl.StringAttribute,il.ATTRIBUTE,null,e,t)}}class Yl extends sl{constructor(e,t){super("measuredHeight",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class xl extends sl{constructor(e,t){super("storeysAboveGround",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class Al extends sl{constructor(e,t){super("storeysBelowGround",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class jl extends sl{constructor(e,t){super("storeyHeightsAboveGround",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class Fl extends sl{constructor(e,t){super("storeyHeightsBelowGround",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class Nl extends sl{constructor(e){super("street",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:street",e,"citydb")}}class Hl extends sl{constructor(e){super("houseNumber",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:houseNumber",e,"citydb")}}class Rl extends sl{constructor(e){super("poBox",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:poBox",e,"citydb")}}class zl extends sl{constructor(e){super("zipCode",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:zipCode",e,"citydb")}}class Gl extends sl{constructor(e){super("city",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:city",e,"citydb")}}class Vl extends sl{constructor(e){super("state",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:state",e,"citydb")}}class Bl extends sl{constructor(e){super("country",rl.StringAttribute,il.ATTRIBUTE,"bldg:Building/bldg:address/core:Address/citydb:country",e,"citydb")}}class Ul extends sl{constructor(e,t){super("isMovable",rl.BooleanAttribute,il.ATTRIBUTE,null,e,t)}}class Wl extends sl{constructor(e,t){super("species",rl.StringAttribute,il.ATTRIBUTE,null,e,t)}}class ql extends sl{constructor(e,t){super("height",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class Jl extends sl{constructor(e,t){super("trunkDiameter",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class Kl extends sl{constructor(e,t){super("crownDiameter",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}class Zl extends sl{constructor(e,t){super("averageHeight",rl.NumberAttribute,il.ATTRIBUTE,null,e,t)}}var Ql=sl;const $l={gml:"http://www.opengis.net/gml",core:"http://www.opengis.net/citygml/2.0",citydb:"http://www.3dcitydb.org/citygml-ade/3.0",tran:"http://www.opengis.net/citygml/transportation/2.0",wtr:"http://www.opengis.net/citygml/waterbody/2.0",grp:"http://www.opengis.net/citygml/cityobjectgroup/2.0",luse:"http://www.opengis.net/citygml/landuse/2.0",frn:"http://www.opengis.net/citygml/cityfurniture/2.0",app:"http://www.opengis.net/citygml/appearance/2.0",tex:"http://www.opengis.net/citygml/texturedsurface/2.0",bldg:"http://www.opengis.net/citygml/building/2.0",xal:"urn:oasis:names:tc:ciq:xsdschema:xAL:2.0",dem:"http://www.opengis.net/citygml/relief/2.0",veg:"http://www.opengis.net/citygml/vegetation/2.0",gen:"http://www.opengis.net/citygml/generics/2.0",brid:"http://www.opengis.net/citygml/bridge/2.0",tun:"http://www.opengis.net/citygml/tunnel/2.0"},Xl=["_CityObject","Building","CityFurniture","GenericCityObject","SolitaryVegetationObject","Bridge","Tunnel","CityObjectGroup","LandUse","TransportationComplex","Railway","Road","Square","Track","PlantCover","WaterBody"],ec=["id","name","creationDate","terminationDate","relativeToTerrain","relativeToWater","externalReferenceInformationSystem","externalReferenceName","externalReferenceUri","stringAttribute","doubleAttribute","intAttribute","uriAttribute","dateAttribute","measureAttribute","class","function","usage","yearOfConstruction","yearOfDemolition","roofType","measuredHeight","storeysAboveGround","storeysBelowGround","storeyHeightsAboveGround","storeyHeightsBelowGround","street","houseNumber","poBox","zipCode","city","state","country","isMovable","species","height","trunkDiameter","crownDiameter","averageHeight","lineage","updatingPerson","lastModificationDate","reasonForUpdate"],tc=["id","name","relativeToTerrain","relativeToWater","externalReferenceInformationSystem","externalReferenceName","externalReferenceUri","class","function","usage","roofType","measuredHeight","storeysAboveGround","storeysBelowGround","storeyHeightsAboveGround","storeyHeightsBelowGround","street","houseNumber","poBox","zipCode","city","state","country","isMovable","species","height","trunkDiameter","crownDiameter","averageHeight","lineage","updatingPerson"],ic=["stringAttribute","doubleAttribute","intAttribute","uriAttribute","measureAttribute"],sc=["creationDate","terminationDate","lastModificationDate","reasonForUpdate"],rc=["yearOfConstruction","yearOfDemolition"],nc=["genericDateAttribute"];class ac{constructor(e,t,i,s,r){this.featureType=e,this.featureNs=$l[t],this.featurePrefix=t,this.allowedProperties=[];for(let n=0;n<s.length;n++){const e=s[n];if(i.hasOwnProperty(e)){const s=new i[e](r,t);this.allowedProperties.push(s)}}}getFeatureType(){return this.featureType}getFeatureNs(){return this.featureNs}getFeaturePrefix(){return this.featurePrefix}getAllowedProperties(){return this.allowedProperties}}const oc={boundedBy:nl,id:al,name:ll,description:cl,lineage:hl,updatingPerson:ul,lastModificationDate:dl,reasonForUpdate:ml,creationDate:gl,terminationDate:pl,relativeToTerrain:yl,relativeToWater:_l,externalReferenceInformationSystem:fl,externalReferenceName:vl,externalReferenceUri:Ll,stringAttribute:Ml,doubleAttribute:bl,intAttribute:wl,uriAttribute:Tl,dateAttribute:Sl,measureAttribute:Cl};class lc extends ac{static get properties(){return Object.assign({},oc)}constructor(e,t){super("_CityObject","core",lc.properties,e,t)}}class cc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il})}constructor(e,t){super("GenericCityObject","gen",cc.properties,e,t)}}class hc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il,yearOfConstruction:Dl,yearOfDemolition:Pl,roofType:Ol,measuredHeight:Yl,storeysAboveGround:xl,storeysBelowGround:Al,storeyHeightsAboveGround:jl,storeyHeightsBelowGround:Fl,street:Nl,houseNumber:Hl,poBox:Rl,zipCode:zl,city:Gl,state:Vl,country:Bl})}constructor(e,t){super("Building","bldg",hc.properties,e,t)}}class uc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il,yearOfConstruction:Dl,yearOfDemolition:Pl,isMovable:Ul})}constructor(e,t){super("Bridge","brid",uc.properties,e,t)}}class dc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il,yearOfConstruction:Dl,yearOfDemolition:Pl})}constructor(e,t){super("Tunnel","tun",dc.properties,e,t)}}class mc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il})}constructor(e,t){super("CityFurniture","frn",mc.properties,e,t)}}class gc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il})}constructor(e,t){super("CityObjectGroup","grp",gc.properties,e,t)}}class pc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il})}constructor(e,t){super("LandUse","luse",pc.properties,e,t)}}class yc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il})}constructor(e,t){super("TransportationComplex","tran",yc.properties,e,t)}}class _c extends ac{constructor(e,t){super("Railway","tran",yc.properties,e,t)}}class fc extends ac{constructor(e,t){super("Road","tran",yc.properties,e,t)}}class vc extends ac{constructor(e,t){super("Square","tran",yc.properties,e,t)}}class Lc extends ac{constructor(e,t){super("Track","tran",yc.properties,e,t)}}class Mc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il,species:Wl,height:ql,trunkDiameter:Jl,crownDiameter:Kl})}constructor(e,t){super("SolitaryVegetationObject","veg",Mc.properties,e,t)}}class bc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il,averageHeight:Zl})}constructor(e,t){super("PlantCover","veg",bc.properties,e,t)}}class wc extends ac{static get properties(){const e=Object.assign({},oc);return Object.assign(e,{class:kl,function:El,usage:Il})}constructor(e,t){super("WaterBody","wtr",wc.properties,e,t)}}function Tc(e,t,i){const s={_CityObject:lc,GenericCityObject:cc,Building:hc,Bridge:uc,Tunnel:dc,CityFurniture:mc,CityObjectGroup:gc,LandUse:pc,TransportationComplex:yc,Railway:_c,Road:fc,Track:Lc,Square:vc,SolitaryVegetationObject:Mc,PlantCover:bc,WaterBody:wc};return e.map(e=>new s[e](t,i))}class Sc{constructor(e){this.type=e.type,this.id=e.id,this.comparison=e.comparison||null,this.fixedComparison=e.comparison&&e.isPreset,this.property=e.property||null,this.isPreset=e.isPreset||!1}getFilter(){a(this.comparison,tl),a(this.property,Ql);const e=this.property.getAllowedComparisons().findIndex(e=>e.getId()===this.comparison.getId());if(-1===e)throw new Error(`Comparison ${this.comparison.getId()} not allowed for ${this.property.getId()}`);return null}destroy(){}}var Cc=Sc;const kc=new Ql("filter",rl.Filter,il.FILTER,null,Object.keys(rl.Filter),"");class Ec extends Cc{constructor(e){e.type="combination",e.property=kc,e.comparison=kc.getAllowedComparisons()[0],super(e),this.filters=e.filters||[],this.level=e.level||0;const t=!e.isPreset&&"all";this.allowAdditional=e.allowAdditional||t}getFilter(){super.getFilter();const e=this.comparison.getOpenlayersFilter();if(0===this.filters.length)throw new Error("Cannot process empty filter");if(1===this.filters.length)return this.filters[0].getFilter();const t=this.filters.map(e=>e.getFilter());return e(...t)}removeChild(e){const t=this.filters.findIndex(t=>t.id===e.id);this.filters.splice(t,1)}hasChild(e){return this.filters.some(t=>t&&t.id===e.id)}}var Ic=Ec;function Dc(e){const t=S.mercatorToWgs84(e,!0);return[t[1],t[0]]}function Pc(e){const t=e.clone();if(t instanceof ol.geom.Polygon){const e=t.getCoordinates().map(e=>{return e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]||e.push(e[0].slice()),e.map(Dc)});t.setCoordinates(e,"XY")}else if(t instanceof ol.geom.Point){const e=t.getCoordinates();t.setCoordinates(Dc(e),"XY")}else if(t instanceof ol.geom.LineString){const e=t.getCoordinates().map(Dc);t.setCoordinates(e,"XY")}return t}class Oc extends Cc{constructor(e){e.type="geometry";const t=e.allowedComparisons||Object.keys(rl.Geometry).map(e=>rl.Geometry[e].getId());e.property=new Ql("geometry",rl.Geometry,il.GEOMETRY,"gml:boundedBy",t,"gml"),super(e),this.distance=null,this.editorId=e.editorId}getFilter(){super.getFilter();const e=this.comparison.getOpenlayersFilter(),t=G.getInstance().getLayerByName("_queryWidgetGeometryFilterLayer"),i=t.getFeatureById(this.id);if(!i)throw new Error("cannot find drawing for filter");const s=i.getGeometry();if(!s)throw new Error("cannot find drawing for filter");const r=s.clone(),n=r.getCoordinates();Gt(r,n).forEach(e=>{const t=e.slice();e[1]=t[0],e[0]=t[1]}),r.setCoordinates(n);const a=Pc(s);if(!e)throw new Error("Comparison is not defined");if("DWITHIN"===this.comparison.getId()){if(!this.distance)throw new Error("DWITHIN filter requires a distance");return new e(this.property.getValueReference(),a,this.distance,"m","urn:ogc:def:crs:EPSG::4326")}return"BBOX"===this.comparison.getId()?new e(this.property.getValueReference(),s.getExtent(),"urn:ogc:def:crs:EPSG::4326"):new e(this.property.getValueReference(),a,"urn:ogc:def:crs:EPSG::4326")}destroy(){const e=G.getInstance().getLayerByName("_queryWidgetGeometryFilterLayer");e.removeFeaturesById([this.id])}}var Yc=Oc;class xc extends Cc{constructor(e){e.type="property",super(e),this.value=e.value||null,this.fixedValue=e.value&&e.isPreset,this.genericAttributeName=e.genericAttributeName||null}getFilter(){super.getFilter();let e=this.property.getValueReference();this.genericAttributeName&&(e=e.replace("token",this.genericAttributeName));const t=this.comparison.getOpenlayersFilter();return"BETWEEN"===this.comparison.id?(a(this.value,Array),this.value.sort(),this.value[0]instanceof Date?new t(e,this.value[0].toISOString(),this.value[1].toISOString()):new t(e,this.value[0],this.value[1])):this.value instanceof Date?new t(e,this.value.toISOString()):new t(e,this.value)}}var Ac=xc;class jc extends M{static get className(){return"vcs.vcm.widgets.wfs.WFSObject"}constructor(e){e.className=jc.className,super(e),this.url=e.url,this.projection=new S(e.projection),this.maxFeatures=e.maxFeatures||1e4,this.runningRequest=null}getFeatures(e,t){if(!this.url||""===this.url)return Promise.reject();this.cancelRequest();const i=(new ol.format.WFS2).writeGetFeature({featureNS:e.getFeatureNs(),featurePrefix:e.getFeaturePrefix(),featureTypes:[e.getFeatureType()],propertyNames:["gml:boundedBy"],filter:t,outputFormat:"application/gml+xml; version=3.1",count:this.maxFeatures,allNs:$l});function s(e){let t;return t=window.ActiveXObject?e.xml:(new XMLSerializer).serializeToString(e),t}let r=s(i);return r=r.replace(/__--__/g,":"),this.runningRequest=q.a.CancelToken.source(),q.a.post(this.url,r,{cancelToken:this.runningRequest.token}).then(this.handleResponse.bind(this)).catch(e=>{const t=e.response;return t&&t.data?Promise.reject(new Error(t.data)):Promise.reject(e)})}handleResponse(e){const t=e.data,i=this.framework.getProjection().getProjection();return(new ol.format.WFS2).readFeatures(t,{dataProjection:i})}cancelRequest(){this.runningRequest&&this.runningRequest.cancel(),this.runningRequest=null}}const Fc=["EQUAL_TO","NOT_EQUAL_TO","LESS_THAN","GREATER_THAN","LESS_THAN_OR_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LIKE"],Nc=["BETWEEN"],Hc=["EQUAL_TO","NOT_EQUAL_TO","LESS_THAN","GREATER_THAN","LESS_THAN_OR_EQUAL_TO","GREATER_THAN_OR_EQUAL_TO","LIKE","BETWEEN"],Rc=["INTERSECTS","WITHIN","DWITHIN"];var zc=jc;class Gc extends kr{static get className(){return"vcs.vcm.widgets.Query"}constructor(e){e.className=Gc.className,super(e),this.allFeatureTypes=e.allFeatureTypes||Xl,this.allProperties=e.allProperties||ec,this.allLogicalRelations=e.allLogicalRelations||Hc,this.allSpatialFilters=e.allSpatialFilters||Rc,this.freeQueriesOption="false"!==String(e.freeQueries).toLowerCase(),this.predefinedQueries=e.predefinedQueries||[],this.featureTypes=Tc(this.allFeatureTypes,this.allProperties,this.allLogicalRelations),this.wfs=new zc(e.wfs?e.wfs:{}),this._filters=[],this._defaultMaxLevel=Object(c["h"])(e.maximumLevel,1),this.maximumLevel=this._defaultMaxLevel,this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this.activeQuery={type:null,featureType:null,filter:null,runningRequest:null},this.foundFeatures=[]}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.geometryFilterLayer=new Ki({name:"_queryWidgetGeometryFilterLayer",projection:S.createMercatorProjection(),altitudeMode:"clampToGround"}),this.framework.addLayer(this.geometryFilterLayer),this.geometryLayerEditor=new xo({allowedGeometries:["Point","LineString","BBox","Polygon"],defaultMode:"edit"}),this.geometryLayerEditor.initialize(),this.geometryLayerEditor.addEditingLayer(this.geometryFilterLayer),this.initialized=!0,this.initializedFinished()}return!0}getAllowedProperties(e){a(e,String);const t=this.featureTypes.find(t=>t.getFeatureType()===e);return t?t.getAllowedProperties():[]}setPreset(e){if(a(e,[Object,String]),this.activeQuery.filter&&this.removeFilter(this.activeQuery.filter),this.activeQuery.filter=null,this.activeQuery.featureType=null,this.maximumLevel=this._defaultMaxLevel,"_free"===e)return void(this.activeQuery.type="_free");e=e,this.activeQuery.type=e.name;const t=JSON.parse(JSON.stringify(e));if(this.activeQuery.featureType=t.featureType,t.property){const e=this.getAllowedProperties(this.activeQuery.featureType).find(e=>e.getId()===t.property);let i=null;t.valueInput?i=t.valueInput:t.dateInput?i=new Date(t.dateInput.year,t.dateInput.month,t.dateInput.date):t.dateInputLower&&(i=[new Date(t.dateInputLower.year,t.dateInputLower.month,t.dateInputLower.date),new Date(t.dateInputUpper.year,t.dateInputUpper.month,t.dateInputUpper.date)]);let s=null;if(t.comparison){const e=Object.keys(el).find(e=>el[e].id===t.comparison);s=el[e]}t.allowAdditional||(this.maximumLevel=0),Number.isFinite(t.maximumLevel)&&(this.maximumLevel=t.maximumLevel),this.addFilter({type:"property",property:e,comparison:s,value:i,isPreset:!0,genericAttributeName:t.genericAttributeName,allowAdditional:t.allowAdditional})}}_createFilter(e){let t;return e.id=Object(c["c"])(),t="geometry"===e.type?new Yc(Object.assign(e,{allowedComparisons:this.allSpatialFilters,editorId:this.geometryLayerEditor.id})):"property"===e.type?new Ac(e):new Ic(e),this._filters.push(t),t}addFilter(e){if(a(e,{type:["geometry","property","combination"]}),this.activeQuery.filter)return this.addFilterToCombination(this.activeQuery.filter,e);"combination"===e.type&&(e.level=1);const t=this._createFilter(e);return this.activeQuery.filter=this._createFilter({type:"combination",filters:[t],isPreset:e.isPreset,allowAdditional:e.allowAdditional}),t.id}removeFilter(e){a(e,Cc);const t=this._filters.find(t=>{return t instanceof Ic&&t.hasChild(e)});if(!t)return this.activeQuery.filter=null,this._filters.forEach(e=>{e.destroy()}),void this._filters.splice(0);e instanceof Ic&&e.filters.forEach(e=>{this.removeFilter(e)}),t.removeChild(e),0===t.filters.length&&this.removeFilter(t);const i=this._filters.findIndex(t=>t.id===e.id);e.destroy(),this._filters.splice(i,1)}addFilterToCombination(e,t){if(a(t,{type:["geometry","property","combination"]}),a(e,Ic),"combination"===t.type){if(e.level===this.maximumLevel)throw new Error("Maximum complexity reached, cannot add another level of depth");t.level=e.level+1}const i=this._createFilter(t);return e.filters.push(i),i.id}sendRequest(){this.foundFeatures.splice(0);const e=this.featureTypes.find(e=>e.featureType===this.activeQuery.featureType),t=this.activeQuery.filter.getFilter();if(!e||!t)throw new Error("Could not find active featureType");return this.wfs.getFeatures(e,t).then(this._handleResult.bind(this))}cancelRequest(){this.wfs.cancelRequest()}_handleResult(e){e.forEach(e=>{this.foundFeatures.push(e)})}addToSelectionSet(e){o(e,Boolean);const t=this.framework.getSelectBehavior();e&&t.clearSelectionSet();const i=this.foundFeatures.map(e=>e.id);t.addToSelectionSet(i)}zoomToFeatures(){if(this.foundFeatures.length>0){let e=ol.extent.createEmpty();this.foundFeatures.forEach(t=>{t.children&&t.children.forEach(t=>{"_3"===t.type&&(e=ol.extent.extend(e,t.attributes.extent))})});const t=ol.proj.getTransform(this.framework.getProjection().getProjection(),ol.proj.get("EPSG:4326"));e=ol.extent.applyTransform(e,t);const i=E.createViewPointFromExtent(e);this.framework.getActiveMap().gotoViewPoint(i)}}zoomToFeature(e){let t=ol.extent.createEmpty();e.children&&e.children.forEach(e=>{"_3"===e.type&&(t=ol.extent.extend(t,e.attributes.extent))});const i=ol.proj.getTransform(this.framework.getProjection().getProjection(),ol.proj.get("EPSG:4326"));t=ol.extent.applyTransform(t,i);const s=E.createViewPointFromExtent(t);this.framework.getActiveMap().gotoViewPoint(s)}clear(){const e=this.framework.getSelectBehavior();e.clearSelectionSet(),this.foundFeatures.splice(0)}getConfigObject(){const e=super.getConfigObject();return e.allFeatureTypes=this.allFeatureTypes,e.allProperties=this.allProperties,e.allLogicalRelations=this.allLogicalRelations,e.allSpatialFilters=this.allSpatialFilters,e.freeQueries=this.freeQueriesOption,e.predefinedQueries=this.predefinedQueries,e.maximumLevel=this.maximumLevel,e.wfs={maxFeatures:this.wfs.maxFeatures},e}}var Vc=Gc;class Bc extends M{constructor(e){super(e),this.middleware=e.middleware||[]}initialize(){}search(e,t,i){}}var Uc=Bc;const Wc=v.getLogger("vcs.vcm.widgets.search.Nominatim");class qc extends Uc{static get className(){return"vcs.vcm.widgets.search.Nominatim"}constructor(e){e.className=qc.className,super(e);const t=e.url||"https://nominatim.openstreetmap.org/search";this.url=n["a"].parse(t),this.city=e.city||null,this.state=e.state||null,this.countrycode=e.countrycode||"de",this.extent=e.extent?new ge(e.extent):null,this.limit=e.limit||20}search(e,t,i){const s=this.url.clone(),r={q:e,countrycodes:this.countrycode,format:"json",polygon_geojson:1,addressdetails:1,limit:this.limit};this.city&&(r.q+=`,${this.city}`),this.state&&(r.q+=`,${this.state}`),this.extent&&(r.viewbox=this.extent.getCoordinatesInProjection(S.createGeographicProjection()).join(","),r.bounded=1),s.addQueryParams(r),q.a.get(s.toString()).then(e=>{const t=qc.handleSearchResults(e);i(t)}).catch(()=>{Wc.error("got an error from the server"),i([])})}static handleSearchResults(e){let t=e.data;return t.map(e=>{return e.point=[Number(e.lon),Number(e.lat)],e.geojson?e.type="geojson":e.type="point",e})}getConfigObject(){const e=super.getConfigObject();return Object.assign({},e,{url:this.url.toString(),city:this.city,state:this.state,countrycode:this.countrycode,extent:this.extent?this.extent.getConfigObject():null,limit:this.limit})}}var Jc=qc;function Kc(e,t,i,s,r,n,a){try{var o=e[n](a),l=o.value}catch(c){return void i(c)}o.done?t(l):Promise.resolve(l).then(s,r)}function Zc(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function a(e){Kc(n,s,r,a,o,"next",e)}function o(e){Kc(n,s,r,a,o,"throw",e)}a(void 0)})}}const Qc=new Je({fill:{color:[85,110,255,.4]},stroke:{color:[0,0,0,1],width:1.25},image:{fill:{color:[255,255,255,1]},stroke:{color:[0,0,0,1],width:1},radius:5}});class $c extends kr{static get className(){return"vcs.vcm.widgets.Locator"}constructor(e){e.className=$c.className,super(e),this.vectorLayer=new Ki({name:"_locatorVector",altitudeMode:"clampToGround",classificationType:e.classificationType||"both",allowPicking:!1,heightAboveGround:2,projection:{epsg:"EPSG:4326"},style:e.style?Qc.assign(new Je(e.style)):Qc}),this.tracker=null,this.flatError=0,this.zoomDistance=e.zoomDistance?e.zoomDistance:1e3,this.locatorExtrusion=!1!==e.extrusion&&Object(c["h"])(e.extrusion,80),this.values={locatorVisibility:!1},this._pickingTerrain=!1}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;const t=$c.testForApi();if(!t)return this.logger.warning("Locator Widget is not supported"),!1;this.framework.addLayer(this.vectorLayer),this.locatorPoint=new ol.Feature({geometry:new ol.geom.Point([0,0,0],"XYZ"),heading:!1}),this.locatorExtrusion&&this.locatorPoint.set("olcs_extrudedHeight",this.locatorExtrusion),this.errorCircle=new ol.Feature({geometry:new ol.geom.Circle([0,0],5e3)}),this.vectorLayer.addFeatures([this.locatorPoint,this.errorCircle]),this.framework.subscribe("MAP_ACTIVATED",e=>{"vcs.vcm.maps.Cesium"===e.className&&this.tracker&&this._placeLocatorOnTerrain()}),this.initialized=!0,this.initializedFinished()}return!0}locatorClicked(){if(null===this.tracker)this.tracker=navigator.geolocation.watchPosition(this.trackLocator.bind(this),this.handleError.bind(this));else if(this.locatorInsideView())this.toggleVisibility(),navigator.geolocation.clearWatch(this.tracker),this.tracker=null;else{const e=this.locatorPoint.getGeometry().getCoordinates(),t=S.mercatorToWgs84(e);this.goToLocator(null,{coords:{longitude:t[0],latitude:t[1]}})}}toggleVisibility(){this.values.locatorVisibility=!this.values.locatorVisibility,this.values.locatorVisibility?this.vectorLayer.activate(!0):this.vectorLayer.activate(!1)}static getLocation(){return new Promise((e,t)=>{navigator.geolocation.getCurrentPosition(e,t)})}goToLocator(e,t){const i=this.framework.getActiveMap().getViewPoint();i.setAnimate(!0),i.setCameraPosition(null),i.setGroundPosition([t.coords.longitude,t.coords.latitude]),null!=e&&i.setDistance(e),this.framework.getActiveMap().gotoViewPoint(i,1,0)}trackLocator(e){var t=this;return Zc(function*(){if(t._pickingTerrain)return;const i=e=>{const i=ol.geom.Polygon.circular(new ol.Sphere(6378137),e,t.flatError,128);i.applyTransform((e,t,i)=>{const s=e.length;for(let r=0;r<s;r+=i){const i=[e[r],e[r+1]];S.wgs84ToMercator(i,!0),t[r]=i[0],t[r+1]=i[1]}return t}),t.errorCircle.setGeometry(i)},s=[e.coords.longitude,e.coords.latitude],r=e.coords.heading;null!=r?t.locatorPoint.set("heading",r):t.locatorPoint.set("heading",!1);const n=t.locatorPoint.getGeometry().getCoordinates(),a=S.mercatorToWgs84(n);0!==Math.abs(a[0]-s[0])||0!==Math.abs(a[1]-s[1])?(t.locatorPoint.getGeometry().setCoordinates(S.wgs84ToMercator(s)),yield t._placeLocatorOnTerrain(),t.flatError=e.coords.accuracy,i(s)):0!==Math.abs(t.flatError-e.coords.accuracy)&&(t.flatError=e.coords.accuracy,i(s)),t.values.locatorVisibility||(t.goToLocator(t.zoomDistance,e),t.toggleVisibility())})()}_placeLocatorOnTerrain(){var e=this;return Zc(function*(){const t=e.framework.getActiveMap();if("vcs.vcm.maps.Cesium"===t.className){const i=e.locatorPoint.getGeometry().getCoordinates();e._pickingTerrain=!0,yield t.getHeightFromTerrain([i]),e.locatorPoint.getGeometry().setCoordinates(i),e._pickingTerrain=!1}})()}locatorInsideView(){const e=this.locatorPoint.getGeometry().getCoordinates(),t=S.mercatorToWgs84(e);return this.framework.getActiveMap().pointIsVisible(t)}handleError(e){switch(this.values.locatorVisibility&&this.toggleVisibility(),e.code){case 1:alert("Der Zugriff auf Ihre Position wurde verweigert.");break;case 2:alert("Ihre momentane Position konnte leider nicht erfasst werden.");break;case 3:alert("Wärend dem ermitteln Ihrer Position wurde die Verbindung verloren");break;default:alert("Ihre Position kann leider nicht erfasst werden");break}this.logger.warning("Geolocation could not be verified")}setStyle(e){this.logger.deprecate("setStyle","use the config or set the style via the .vectorLayer property"),this.vectorLayer.setStyle(e);const t=this.vectorLayer.getFeatures();let i;for(let s=0;s<t.length;s++)i=t[s],i.setStyle(e)}static testForApi(){const e=location,t=e.hostname,i=e.protocol,s=!!navigator.geolocation&&!G.getInstance().isIE11;return"localhost"===t||"127.0.0.1"===t?s:"https:"===i&&s}getConfigObject(){const e=super.getConfigObject();return e.zoomDistance=this.zoomDistance,e.style=this.vectorLayer.style.getOptions({fill:!0,stroke:!0,image:!0}),e.locatorExtrusion=this.locatorExtrusion,e.classificationType=this.vectorLayer.classificationType,e}isVisible(){return this.logger.deprecate("isVisible","access values.locatorVisibility directly"),this.values.locatorVisibility}getValuesObject(){return this.logger.deprecate("isVisible","access values directly"),this.values}}var Xc=$c;class eh extends Uc{static get className(){return"vcs.vcm.widgets.search.Elasticsearch"}constructor(e){e.className=eh.className,super(e),this.sortByType=e.sortByType||!1,this.location={},this.resultSize=e.resultSize}search(e,t,i){this.initSearchQuery(e,t).then(s=>{const r=or()(JSON.stringify(s.query)),n=Object.assign(s.values,{userInput:e});let a=r(n);this.middleware.forEach(e=>{a=e.addToQuery(a)});const o=t.endpoints.find(function(e){return e.searchImpl===this.className},this),l=O.getInstance().getLocaleAwareString(o.url);q.a.post(l,a).then(this.handleSearch.bind(this,i)).catch(this.handleSearch.bind(this,i))})}handleSearch(e,t){if(t instanceof Error)return void e([]);const i=t.data;let s=[];this.middleware.forEach(e=>{e.handleResult(i)});try{if(i.hits.hits.length>0){const e=i.hits.hits;s=e.map(e=>Object.assign(e._source,{type:e._type}))}}catch(r){}e(s)}parseSearchQuery(e,t){let i;const s={},r=t.hasOwnProperty("filter"),n=t.hasOwnProperty("function")||t.decayByLocation,a=t.hasOwnProperty("rescore");if(t.hasOwnProperty("values")&&Object.assign(s,this.makeTemplateValues(e,t.values)),r&&n){if(t.hasOwnProperty("function")&&t.decayByLocation){var o=this.getDecayByLocation();l=t.functions.concat(o)}else l=t.hasOwnProperty("function")?t.function:this.getDecayByLocation();i={query:{filtered:{query:{function_score:{query:t.query,functions:l}},filter:t.filter}}}}else if(r)i={query:{filtered:{query:t.query,filter:t.filter}}};else if(n){var l;if(t.hasOwnProperty("function")&&t.decayByLocation){o=this.getDecayByLocation();l=t.functions.concat(o)}else l=t.hasOwnProperty("function")?t.function:this.getDecayByLocation();i={query:{function_score:{query:t.query,functions:l}}}}else i={query:t.query};return a&&(i.rescore=t.rescore),this.resultSize&&(i.size=this.resultSize),{query:i,values:s}}initSearchQuery(e,t){var i=this;return Zc(function*(){if(t.decayByLocation){const e=i.location.coords&&Date.now()-i.location.setAt>3e5,t=!i.location.coords&&Xc.testForApi();if(e||t)try{const e=yield Xc.getLocation();i.location={coords:{lat:e.coords.latitude,lon:e.coords.longitude},setAt:Date.now()}}catch(s){i.logger.warning(s.message)}}return i.parseSearchQuery(e,t)})()}getDecayByLocation(){let e;return e=this.location.hasOwnProperty("coords")?[{gauss:{geoLocation:{origin:this.location.coords,offset:"1km",scale:"2km"}}}]:[],e}makeTemplateValues(e,t){const i={};return Object.values(t).forEach(t=>{const s=new RegExp(t.regex);let r=e.match(s)[0];t.hasOwnProperty("replace")&&(r=r.replace(new RegExp(t.replace.regex,"g"),t.replace.value)),i[t.name]=r.trim()}),i}}var th=eh;class ih extends Jc{static get className(){return"vcs.vcm.widgets.search.VirtualcityLocationService"}constructor(e){e.url&&(e.url=null),super(e)}}var sh=ih;class rh{constructor(e){}initialize(){}addToQuery(e){return e}addFilter(e,t){const i=JSON.parse(e);if(i.query.hasOwnProperty("filtered")){const e=i.query.filtered.filter;if(e.hasOwnProperty("bool")){const i=e.bool;if(i.hasOwnProperty("must")){const e=i.must;if(Array.isArray(e))e.push(t);else{const s={};Object.assign(s,e),i.must=[s,t]}}else i.must=t}else{const s={};Object.assign(s,e);const r={bool:{must:[s,t]}};i.query.filtered.filter=r}return JSON.stringify(i)}const s={query:{filtered:{query:i.query,filter:t}}};return JSON.stringify(s)}handleResult(e){}clear(){}}var nh=rh;class ah extends nh{static get className(){return"vcs.vcm.widgets.search.middleware.Tags"}constructor(e){super(e),this.className=ah.className,this.tags=[],this.activeTags=[],this.doHandle=!0,this.tagOrder=e.tagOrder?e.tagOrder:[],this.combineTagsWithOr=!!e.combineTagsWithOr,this.isActive=!1}addToQuery(e){const t=this._addTagAggregation(e);return this._filterByTags(t)}_addTagAggregation(e){const t=JSON.parse(e);return t.aggregations?t.aggregations.tagCount={terms:{field:"tags"}}:t.aggregations={tagCount:{terms:{field:"tags"}}},JSON.stringify(t)}_filterByTags(e){if(0===this.activeTags.length)return e;let t={};if(1===this.activeTags.length)t.term={tags:this.activeTags[0].key};else{const e=this.activeTags.map(e=>({term:{tags:e.key}}));t=this.combineTagsWithOr?{or:e}:{and:e}}return this.addFilter(e,t)}handleResult(e){if(this.doHandle)if(e.aggregations&&e.aggregations.tagCount){const t=e.aggregations.tagCount.buckets;if(t.length){const e=this.sortTags(t),i=e.filter(function(e){return this.activeTags.find(t=>t.key===e.key)},this);this.clear(),e.forEach(function(e){this.tags.push(e)},this),i.forEach(function(e){this.activeTags.push(e)},this)}else this.clear()}else this.clear()}setHandle(e){this.doHandle=e}sortTags(e){return e=this.tagOrder.length>0?e.sort((e,t)=>{let i=this.tagOrder.indexOf(e.key),s=this.tagOrder.indexOf(t.key);return i=i>-1?i:this.tagOrder.length+1,s=s>-1?s:this.tagOrder.length+1,i-s}):e.sort((e,t)=>e.key.toLocaleString()<t.key.toLocaleString()?-1:1),e}clear(){this.tags.splice(0,this.tags.length),this.activeTags.splice(0,this.activeTags.length),this.isActive=!1}}var oh=ah;class lh extends nh{static get className(){return"vcs.vcm.widgets.search.middleware.Near"}constructor(e){super(e),this.className=lh.className,this.fillColor=e.fillColor?e.fillColor:"rgba(85,110,255,0.4)",this.searchCenterIcon=e.searchCenterIcon?e.searchCenterIcon:null,this.pointId=null,this.cirleId=null,this.searchCenter=[0,0],this.searchDistance=500,this.isActive=!1,this.title=null}initialize(){const e=G.getInstance(),t=new Ki({projection:{epsg:4326},altitudeMode:"clampToGround",allowPicking:!1,name:`_${Object(c["c"])()}`});let i;e.addLayer(t),this.layerName=t.name,i=null!==this.searchCenterIcon?new ol.style.Icon({src:this.searchCenterIcon,scale:.5}):new ol.style.Circle({fill:new ol.style.Fill({color:"#000"}),stroke:new ol.style.Stroke({color:"rgba(1,1,1,0.0)",width:0}),radius:5}),t.setStyle(new ol.style.Style({image:i,fill:new ol.style.Fill({color:this.fillColor}),stroke:new ol.style.Stroke({width:0,color:"rgba(1,1,1,0.0)"})}));const s=new ol.Feature({geometry:new ol.geom.Point([0,0])}),r=new ol.Feature({geometry:new ol.geom.Circle([0,0]),radius:2e5}),n=t.addFeatures([s,r]);this.pointId=n[0],this.circleId=n[1]}addToQuery(e){if(this.isActive){const t={geo_distance:{distance:this.searchDistance,geoLocation:this.searchCenter}};return this.addFilter(e,t)}return e}activate(e,t){this.searchCenter=e,t||(t=`${String(Math.round(100*e[1])/100)}N ${String(Math.round(100*e[0])/100)}E`),this.title=t,this.showLayer();const i=G.getInstance(),s=i.getActiveMap(),r=s.getViewPoint();r.setAnimate(!0);const n=r.getGroundPosition(),a=this.searchCenter.slice();n&&n[2]&&(a[2]=n[2]);const o=r.getPitch();(!o||o>-20)&&r.setPitch(-20),r.setGroundPosition(a),r.setDistance(2e3),r.setCameraPosition(null),s.gotoViewPoint(r),this.isActive=!0}setDistance(e){let t=Number(/^[0-9]+/.exec(e)[0]);const i=/\D+$/.exec(e);i&&"m"!==i[0]&&(t*=1e3),this.searchDistance=t,this.isActive&&this.showLayer()}getDistance(){return this.searchDistance}showLayer(){const e=G.getInstance().getLayerByName(this.layerName);this.searchCenter&&(e.updateGeometryOfFeature(this.pointId,new ol.geom.Point(this.searchCenter)),e.updateGeometryOfFeature(this.circleId,ol.geom.Polygon.circular(new ol.Sphere(6378137),this.searchCenter,this.searchDistance,128)),e.activate(!0))}hideLayer(){if(this.layerName){const e=G.getInstance().getLayerByName(this.layerName);e.activate(!1)}}clear(){this.hideLayer(),this.isActive=!1,this.title=null}}var ch=lh;const hh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA3CAYAAACo29JGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo2RUM4Mzk3QUJERDQxMUU1QjJEN0FDNDY2NkM0MTA0RiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3Nzc1MkM2NkRCQTExMUU1QUUwQjhGQjIwQjM0ODRBNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3Nzc1MkM2NURCQTExMUU1QUUwQjhGQjIwQjM0ODRBNyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2NjMwYzU0NC03NmE3LWEzNGMtOWQ0OC1jNGU5OTZkMGIxYWMiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpkYmYzYzlmNi1kYmEwLTExZTUtYjFiYi1iMWYzNDcxM2ZjNzQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4hNWn9AAAJk0lEQVR42txafWwUxxV/t3t3Pp8/LtgEG0zBJC20caJijN1CpSYEWqXBFqJNaRAUsI0cJFQI1P2DSoVgKtqmSexQsJQmjogaF5IUU1onsdoGqNQUCjU2Ul1RigOJC8R8nO2zfT77dm/7ZvXGGfbWt3t3Nm4z0mN9y87O++3vzZv33owTxr85UCQUma4S3XMIz2gkERKVrtp4KuIcR0BOEheJW7gnghRBKSQjKGESfk+bbHCyACQVxYOSQve5OARgInOcKVWQYZQQypAAWE3miyfSJAFQGl05U7LAnplpmpmkyBhnkgEcFIBGJhocNz8GJoOAeeiem1hzJfjRNAI5TGAU+nsApZ9AxmWupkpoWnR/h8MhkfLpBMxLgDwkMn928+bNs1esWDF/zpw5n8vKyvqM1+u91+l0pqKkKYoyiDIUDAZv+v3+rsuXL//72LFj7QcOHPhQGE4l8wwR0CABZECHUb+IiX6JgcOOMrHlQ8kkkCnEnA5q9erVOdu2bXusoKDgUQQzPV7aEOz1jo6O47W1tS2HDh3qFkAOEoNMAih9jEXUUbUCB2OB40ImxwDNQnkQpQjlqyhfY1JeXr6+s7Pzj5FIRNHGobH3sPex9/IxaLwiGn8W6eM06Bkfc/g1nMTOFDLFFHqxnJeX5z569OiTRUVF35EkyTXeiyWCDLe2tr65cuXKQ1evXh0hFgPEIDPRHsYq6qrEzRyZGwOSj/IQSgnKUvYlKyoqNvT29l7S7kJj47DxiMGlpMdDpJf+ocdiLparTycT4MCWsQHq6+t3hMPhQe0uNjYejvtDArhMADiL9JTi8aDME84kGy/mwBobG/eoqhrWJqGxcdn4AoPFpN9M0tdhFmEYm4u84j3kIRn1Ul1d3fzKyspdOL+cMAmNLUXoiRfj0tLR0tLSTXoqxJpqttDLJuaYRsDSyIm40ObzampqnpVl2QOT2BjAhQsXLr5+/fr7586dGxCAaUJsqpl5Swd5w2yULA6OeUVcf+p8Pt9n4/J2ff0Q/N0fIPTn0zDS3gFq9y2IBPpBykgHOfdecM8vAM/DXwbviq+DlJkRF8i+vr5LyOLT5EX7aS30o9wmb6oZwXHvOE1gTz5z5sy64uLitfGA6nvhJeh/qRG0oZA1G6keyHhqLfi2V4Hksw/y7NmzjSUlJa8Rc70E8CYt8qrRLFMIEA+tUnAhnbFp06YdFKFYtsE3fw83nqiC0IlTOBsUe1ric8Onz8HAa2+Bc0YOuAvm2eo2ffr0L3R1dZ1sb28fFAJxHo8qInMOYi2HXCtbtCWM+3bk5+cvsbEwQs+u5yHwYkPS8yrz6UqY8sz32QSzfPbKlSsnMH79CQHrodizm0w1IgseMkNgzbNu3boZGzZs2OqwsfT37q6FQN0r4+I0hk+34T8j4HlkkeWz6AfykYDj58+fHyBT5OkSYy/CFU+luXYPiRu9UUVhYeGTlqb4VjPc2viDMVJhGdK++Th4y5aB64G5IE/NAvWWH8L/vAjB5vdg8MjbqI55Ljr1lZ9D2rdLLQG2tbW9sWDBggYC1UtygwXXPIFkjOWSSTJP6cAo/Vepqak5sV6s3rwN14q+oTsRY/MsWQzZL+wC532zxp5uH3wEt7fvxjn61+gQCZ3LjL+/C/K07JjghoaGbmAWspbmnZ9M82NmmjxLdgkZtGPLli2zrYDpLvln9abA0tc/ATlNL8cEphOL/59z5Jf686Ze99l6S+ZQz2lMXyJJxCHxKpVbuAmlpaVftOPyB15vMmes9hl6tZ0qjKw/z/oZG3u/2cczNtR3vuA7RvFw5pxCQQfQA821TC5xgTauYw6XE7Kf36krHF+ZSdb7sf53OGF8PxvHqrGMX1irZV5xE8HxKhVg/DbT6oWhk6ei7nm/9Tg475+dWBkO+7H+dsYxNkFfSajzjIITq1SAE9Ryvo3840I0uOVLk1oGvKXLbI0T1c/rnSaAG622SQbE+m9WzLF6oXq1O+qe3ehirOZ+YK6tcaJYdzq9QjDiEME5Yjw8tkPpH4h231N8SYEz6282jgW40atkVgdUFCVoqUhGerQiPX3J1U1M+kvpaTbCU2VIqH2OXrlZRoTgU3x4bAeXFz0tRzDySKaZ9Zdn5toBFzTZYNEkwy5LhGqIlobufvDz0ctD85+SAmfW32wck5pnt0BSxAhOEZnz+/3/sXqh5+HowDZ45B09pEqkKZ0f6v3tjGNsgr7cAhmeiAiO77QAK3Fbul/MoFmieceiG1b0WBHUODdmMGXyV+/R+xsTWTaOVRP0VYXsICIWV/huCzQ3N7dbOhQMbNPXrIxedDEIvr1tN6uq2gOGH8K/vQaGjr8fHaPi++1k54K+YRFPrKzgdRaUxtTrBmYFCycwKzj7Dsg5Uy2zgszMzO+iU+EJa7+YFYhbR6PsXbhw4YSlx8R0JIvFkmbhGSp8rWQ53KqshuBvWyB86QpEegP6lf1m9699qdQUmB5SPfcjS2BcTwSmCawN8yoYj1QV2i7iNQh3XV3duwcPHlxllYmzhDLccRH6al+Onko4hwZ/87YucZUatlZC2qoyO2V/jenJk3gCFTLWUCQyzcRrKDufg8C+V5OvoWypgCk11XZrKCcxI9hrVUPRhGQvhcC6A4HAB2VlZcstq1+oSOqjXwEXRvahv5wBLTScUOiV/Ys9kPm9clvA2C5QdXX1j9va2hiQIDEWIGBhu3XL9cXFxWsmtm65Bnzbn4q3bvnrkpKSg7HqlnYrzi/6fL77E6o4Yz42WnHGIFivOKOj0CvOjyxKtOLcWVBQsNWq4gwmewWMvftQWOqu76Bu3LixPBwOD2j/A43pwfSBT3Zc55O+mWDYyjLOJR6C8TqEXpdgmw7Z2dn/QjNYQhv/k9LYlvL+/ft37t279yJ5xAGaa33EoBoLnBGgi36nsG2jefPmdbFtpMkAyIAdPnz4p1VVVX8j/foFJ9JLUQlYgQMhU+D1FfY7pamp6aPc3NyLhYWFiyZiH3zsCE0NNjQ01JSXl5+ijy0C66G/7e0df1r2xJM9zbC6qKho1QSdZlBaW1vfmJDTDJ/6cyifBCBxnSBa6vV6c+NlCrOQj3E9fW88TxBNyNkvVrtnJW7h7FeO0+n0sCoVq3eghFhpgJ/9YvnYvn37rM5+8QNuyZ39ihUtwZ2n9tIJ8P/PqT07cS6Yn7d0CbX6eM5bKkI+xk8lBOEun7c0Wyd5JsHNM5GTsuJ+NjfHYZikk7JmTIqMJXvGWU2EqYkCZ3xnvKfTuXmO6+n0/wowALmncfsG1yHoAAAAAElFTkSuQmCC";var uh=hh;class dh{constructor(e){this.className=e.className,this.title=e.title?e.title:null,this.description=e.description?e.description:null,this.initialized=!1}initialize(){return!0}isInitialized(){return this.initialized}handleClickEvent(e){}destroy(){this.initialized=!1}getClassName(){return this.className}}var mh=dh;class gh extends mh{static get className(){return"vcs.vcm.widgets.search.FeatureItem"}constructor(e){e.className=gh.className,super(e),this.pointWGS84=e.pointWGS84||null,this.geometry=e.geometry||null,this.balloonContent=e.balloonContent||null,this.result=e.result||{},this.layerName=e.layerName,this.icon=e.icon||uh,this.clearLayerOnClick=null==e.clearLayerOnClick||e.clearLayerOnClick,this._featureId=null,this.zoomDistance="number"===typeof e.zoomDistance?e.zoomDistance:2e3,this.initialize()}initialize(){const e=G.getInstance();if(super.initialize(),!this.initialized){if(!this.pointWGS84&&!this.geometry)return console.log("you need to specify a geometry or a point"),!1;if(!this.pointWGS84){const e=(new ol.format.GeoJSON).readFeature(this.geometry);if(!e)return!1;this.pointWGS84=ol.extent.getCenter(e.getGeometry().getExtent())}const t=this.layerName&&e.getLayerByName(this.layerName)instanceof Ki;if(!t)return console.log(`could not find the result layer vector layer: ${this.layerName}`),!1;this.initialized=!0}return!0}handleClickEvent(){if(this.initialized){const e=G.getInstance(),t=e.getActiveMap(),i=t.getViewPoint();i.setAnimate(!0);const s=i.getGroundPosition(),r=this.pointWGS84.slice();s&&s[2]&&(r[2]=s[2]),i.setGroundPosition(r),i.setDistance(this.zoomDistance),i.setCameraPosition(null);const n=i.getPitch();(!n||n>-20)&&i.setPitch(-20);const a=e.getLayerByName(this.layerName),o=this.getFeature();this.clearLayerOnClick&&a.removeAllFeatures(),a.addFeatures([o]),a.activate(!0),t.gotoViewPoint(i);const l=A.getInstance();l.getCurrentItem()&&l.getCurrentItem().id===o.getId()||l.setCurrentItem(o.getId(),o,a)}}getFeature(){if(this.initialized){const e=G.getInstance();if(null!=this._featureId){const t=e.getLayerByName(this.layerName),i=t.getFeatureById(this._featureId);if(i)return i}let t;if(this.geometry){const e=new ol.format.GeoJSON;t=e.readGeometry(this.geometry)}else t=new ol.geom.Point(this.pointWGS84);const i=new ol.Feature(Object.assign({},{geometry:t},this.result));return this._featureId=Object(c["c"])(),i.setId(this._featureId),this.balloonContent&&i.set("balloonContent",this.balloonContent),i}return null}getCoords(){return this.pointWGS84}destroy(){if(super.destroy(),null!=this._featureId){const e=G.getInstance(),t=e.getLayerByName(this.layerName);t.removeFeaturesById([this._featureId])}this._featureId=null}}var ph=gh;class yh extends mh{static get className(){return"vcs.vcm.widgets.search.LayerItem"}constructor(e){e.className=yh.className,super(e),this.slug=e.slug,this.initialize()}initialize(){if(super.initialize(),!this.initialized){if(!this.slug)return console.log("Could not find layer for LayerItem"),!1;const e=G.getInstance().getLayerByName(this.slug);if(!e)return console.log("Could not find layer for LayerItem"),!1;this.initialized=!0}return!0}isActive(){return G.getInstance().getLayerByName(this.slug).isActive()}handleClickEvent(e){if(this.initialized){const t=G.getInstance().getLayerByName(this.slug);if(t){const i=t.isActive();t.activate(!i).then(e)}}}}var _h=yh;const fh={[Jc.className]:Jc,[th.className]:th,[sh.className]:sh};class vh extends kr{static get className(){return"vcs.vcm.widgets.search.Search"}constructor(e){e.className=vh.className,super(e),this.autocomplete=!!e.autocomplete,this.autocompleteRequest=e.autocompleteRequest?e.autocompleteRequest:null,this.fullAddressRequest=e.fullAddressRequest?e.fullAddressRequest:null,this.extendedSearches=e.extendedSearches?e.extendedSearches:[],this.middleware=[],this.extendedSearches.forEach(function(t){if("string"===typeof t)"searchTags"===t?this.middleware.push(new oh(e)):"searchNear"===t&&this.middleware.push(new ch(e));else{let e;"vcs.vcm.widgets.search.middleware.Near"===t.type?e=new ch(t):"vcs.vcm.widgets.search.middleware.Tags"===t.type&&(e=new oh(t)),e&&e instanceof nh&&this.middleware.push(e)}},this),this.searchImplementations=[];const t=e.searchImplementations?e.searchImplementations:[];if(t)for(let i=0;i<t.length;i++){t[i].middleware=this.middleware;const e=fh[t[i].type];if(!e){this.logger.warning(`could not find search implementation with type ${t[i].type}`);continue}const s=new e(t[i]);s&&s instanceof Uc&&(s.searchWidget=this,this.searchImplementations.push(s))}this.searchQueries=e.searchQueries?e.searchQueries:[{endpoints:[{searchImpl:"vcs.vcm.widgets.search.Nominatim"}],regex:".*"}],this.searchQueries.reverse(),this.searchResultItems=e.searchResultItems?e.searchResultItems:{address:{zoomTo:!0,pointType:!0,geomProperty:"geometry",title:"",description:"<%= obj.fulladdress %>",balloonContent:["   <div class='balloon-content'>","       <p class='balloon-text'><span class='balloon-street'> <%= obj.fulladdress %></span><br></p>","   </div>"]},point:{pointType:!0,geomProperty:"point",title:"<%= obj.display_name %>",description:"<%= obj.licence %>",balloonContent:["   <h1 class='balloon-title'><%= obj.display_name %></h1>","   <div class='balloon-content'>","       <p class='balloon-text'><%= obj.licence %></p>","   </div>"]},geojson:{zoomTo:!0,pointType:!1,geomProperty:"geojson",pointProperty:"point",title:"<%= obj.display_name %>",description:"<%= obj.licence %>",balloonContent:["   <h1 class='balloon-title'><%= obj.display_name %></h1>","   <div class='balloon-content'>","       <p class='balloon-text'><%= obj.licence %></p>","   </div>"]}},Object.values(this.searchResultItems).forEach(e=>{Object.keys(e).forEach(t=>{if(["title","description","balloonContent"].indexOf(t)>-1){const i=e[t],s=Array.isArray(i)?i.join("\n"):i;e[t]=or()(s)}})}),this.resultIcon=e.resultIcon||uh,this.currentResults=[],this.justSearched=!1,this.resultLayer=new Ki({projection:{epsg:4326},name:"_searchResultVector",zCoordinateEyeOffset:-100,heightAboveGround:10,altitudeMode:"clampToGround"}),this.showAllResults=!!e.showAllResults,this.showSearchResultToolbar=!!e.showSearchResultToolbar}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.searchImplementations.forEach(e=>{e.initialize()}),this.middleware.forEach(e=>{e.initialize()}),this.framework.addLayer(this.resultLayer),this.resultLayer.setStyle(new ol.style.Style({image:new ol.style.Icon({src:this.resultIcon,scale:.5}),fill:new ol.style.Fill({color:"rgba(168,192,43,0.6)"}),stroke:new ol.style.Stroke({color:"#a8c02b",width:1.25})})),this.resultLayer.setHighlightStyle(new ol.style.Style({image:new ol.style.Icon({src:this.resultIcon,scale:.8}),fill:new ol.style.Fill({color:"rgba(168, 192, 43, 1)"}),stroke:new ol.style.Stroke({color:"#a8c02b",width:2})})),this.initialized=!0;const t=this.framework.getWidgetByType("vcs.vcm.widgets.BalloonInfo");t&&!t.hasTypeForLayerName("_searchResultVector")&&t.addTypeForLayer("_searchResultVector",["<div class='balloon' id='myBalloon'>","    <%= balloonContent %>","   <div class='balloon-close-col'>","       <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>","   </div>","   <div class='dialog-image-balloon'></div>","   <div class='balloon-left-edge'></div>","</div>"],"balloonHeight + 30","70"),this.initializedFinished()}}search(e){return this.clearSearch(),new Promise(t=>{const i=this._handleSearchResults.bind(this,t);this._handleSearch(e,i)})}_handleSearch(e,t,i){let s;if(this.runningRequest&&this.runningRequest.cancel(),this.justSearched=!0,Number.isFinite(i)){if(!(i<this.searchQueries.length-1))return void t([]);s=this.searchQueries.slice(i+1).findIndex(t=>{const i=new RegExp(t.regex);return i.test(e)}),s=s+i+1}else s=this.searchQueries.findIndex(t=>{const i=new RegExp(t.regex);return i.test(e)});const r=this.searchQueries[s],n=this.searchImplementations.filter(e=>{const t=r.endpoints.findIndex(t=>t.searchImpl===e.className);return t>-1});if(0===n.length)return void t([]);const a=this.searchCascade.bind(this,e,r.cascade,s,t);n.forEach(t=>{t.search(e,r,a)})}searchCascade(e,t,i,s,r){0===r.length&&t?this._handleSearch(e,s,i):s(r)}_handleSearchResults(e,t){const i=this._getResultItems(t),s=i.map(function(e){return!!(e.isInitialized()&&(this.currentResults.push(e),this.showAllResults&&e instanceof ph))&&e.getFeature()},this).filter(e=>e);this.showAllResults&&(this.resultLayer.addFeatures(s),this.resultLayer.activate(!0)),e()}_getResultItems(e){let t;if(0===e.length)return[];const i=[];return e.forEach(function(e){const s=this.searchResultItems[e.type];if(!s&&!t)throw new Error("Got undefined result type");let r;if(t)r=e;else if(s.geomProperty){let t,i;if(s.pointType)i=e[s.geomProperty],t=!1;else{t=e[s.geomProperty];const r=new ol.format.GeoJSON,n=r.readGeometry(t);i=s.pointProperty&&e[s.pointProperty]?e[s.pointProperty]:ol.extent.getCenter(n.getExtent())}s.geomProperty&&e[s.geomProperty]&&delete e[s.geomProperty],s.pointProperty&&e[s.pointProperty]&&delete e[s.pointProperty],e.zoomTo=s.zoomTo,r=new ph({geometry:t,result:e,balloonContent:s.balloonContent(e),title:s.title(e),pointWGS84:i,description:s.description(e),layerName:"_searchResultVector",clearLayerOnClick:!this.showAllResults,icon:this.resultIcon,zoomDistance:s.zoomTo})}else"layer"===e.type&&(r=new _h({slug:e.slug,title:s.title(e),description:s.description(e)}));i.push(r)},this),i}clearSearch(){this.runningRequest&&this.runningRequest.cancel(),this.resultLayer.removeAllFeatures(),this.currentResults.splice(0,this.currentResults.length),this.resultLayer.activate(!1)}getAutocomplete(e,t){const i=JSON.parse(JSON.stringify(this.autocompleteRequest)),s=new RegExp(/\b[0-9]+/g),r=new RegExp(/\b[0-9]{5}\b/);if(s.test(e)&&null!==this.fullAddressRequest){const t=e.match(s);1===t.length&&r.test(e)||(i.query=Object.assign(i.query,this.fullAddressRequest))}const n=or()(JSON.stringify(i.query));this.runningRequest&&this.runningRequest.cancel();const a=O.getInstance().getLocaleAwareString(i.endPoint);return this.runningRequest=q.a.CancelToken.source(),new Promise((i,s)=>{q.a.post(a,n({query:e}),{cancelToken:this.runningRequest.token}).then(e=>{let s=e.data;s=s.suggest||s;let r=[];if(this.justSearched)return t&&(i(r),t(r)),void(this.justSearched=!1);s.fullAddressSuggest&&s.fullAddressSuggest[0].options.length>0&&s.fullAddressSuggest[0].options.forEach(e=>{r.push(e.text)}),0===r.length&&s.nameSuggest[0].options.length>0&&s.nameSuggest[0].options.forEach(e=>{r.push(e.text)}),r=r.filter((e,t,i)=>i.indexOf(e)===t),t&&t(r),i(r)}).catch(e=>{t&&t([]),i([])}).then(()=>{this.runningRequest=null})})}getResultLayer(){return this.resultLayer}getConfigObject(){const e=super.getConfigObject();return e.autocomplete=this.autocomplete,e.autocompleteRequest=this.autocompleteRequest,e.resultIcon=this.resultIcon!==uh?this.resultIcon:null,e.searchImplementations=[],e.extendedSearches=this.extendedSearches,e.showSearchResultToolbar=this.showSearchResultToolbar,e.searchImplementations.push(new Jc({}).getConfigObject()),e}}var Lh=vh;class Mh extends ie{constructor(e,t){super(),this.cb=t,this.scratchLayer=e,this._defaultActive=Q.CLICK,this.coordinates=[],this.setActive()}pipe(e){if(!e.position.every(e=>0===e)){const t=e.position.slice();e.feature||2===this.coordinates.length||(t[2]+=1.6),this.coordinates.push(t),2===this.coordinates.length?(this.scratchLayer.addFeatures([new ol.Feature({geometry:new ol.geom.Point(t)}),new ol.Feature({geometry:new ol.geom.LineString(this.coordinates)})]),this.setActive(!1),this.cb(this.coordinates)):this.scratchLayer.addFeatures([new ol.Feature({geometry:new ol.geom.Point(t)})])}return Promise.resolve(e)}}var bh=Mh;let wh,Th,Sh;class Ch extends kr{static get className(){return"vcs.vcm.widgets.AdvancedWalkMode"}constructor(e){e.className=Ch.className,super(e),this.navigationControls=null,this.color=e.color||"#A8C02B",this.featureLayer=new Ki({projection:{epsg:3857},name:"_advancedWalkMode",altitudeMode:"none"}),this.supportedMaps=["vcs.vcm.maps.Cesium"],this._removeInteraction=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0,this.initializedFinished();const t=new ol.style.Fill({color:this.color}),i=new ol.style.Stroke({color:this.color,width:2});this.featureLayer.setStyle(new ol.style.Style({image:new ol.style.Circle({fill:t,stroke:i,radius:5}),fill:t,stroke:i}))}return!0}isSupported(e){return!(!this.navigationControls&&this.framework.isInitialized()&&(this.navigationControls=this.framework.getWidgetByType("vcs.vcm.widgets.NavigationControls"),!this.navigationControls))&&super.isSupported(e)}activate(){this.featureLayer.activate(!0),this.navigationControls.navigationMode.values.walkmode&&this.navigationControls.navigationMode.activateOverviewMode(),this.active&&this.deactivate();const e=new bh(this.featureLayer,this.calculateViewPoint.bind(this));this._removeInteraction=us().addExclusiveInteraction(e,this.deactivate.bind(this)),super.activate()}deactivate(){this._removeInteraction&&this._removeInteraction(),this.featureLayer.getSource().clear(),this.featureLayer.activate(!1),super.deactivate()}calculateViewPoint(e){const t=e.map(e=>S.mercatorToWgs84(e)),i=Object(le["a"])(t,2),s=i[0],r=i[1];let n,a={};s[2]>r[2]?(a=s.slice(),a[2]=r[2]):(a=r.slice(),a[2]=s[2]),wh=Cesium.Cartesian3.fromDegrees(...s,Cesium.Ellipsoid.WGS84,wh),Th=Cesium.Cartesian3.fromDegrees(...r,Cesium.Ellipsoid.WGS84,Th),Sh=Cesium.Cartesian3.fromDegrees(...a,Cesium.Ellipsoid.WGS84,Sh),Th=Cesium.Cartesian3.subtract(Th,wh,new Cesium.Cartesian3),Sh=Cesium.Cartesian3.subtract(Sh,wh,new Cesium.Cartesian3),Cesium.Cartesian3.normalize(Th,Th),Cesium.Cartesian3.normalize(Sh,Sh),n=s[2]>r[2]?Cesium.Math.toDegrees(Math.acos(Cesium.Cartesian3.dot(Th,Sh)))-90:Cesium.Math.toDegrees(Math.acos(Cesium.Cartesian3.dot(Th,Sh)));const o={groundPosition:s,distance:0,animate:!0,heading:Tt(s,r),pitch:n},l=new E(o);this.navigationControls.navigationMode.activateFirstPersonMode(l,null,null,null,!0),setTimeout(this.deactivate.bind(this),1e3)}}var kh=Ch;class Eh extends kr{static get className(){return"vcs.vcm.widgets.BalloonInfo"}constructor(e){e.className=Eh.className,super(e),e.balloonTypes||(e.balloonTypes=[{template:["<div class='balloon' id='myBalloon'>","   <h1 class='balloon-title'><%= obj.title %></h1>","   <div class='balloon-content'>","       <%= obj.description %>","   </div>","   <div class='balloon-close-col'>","       <button class='close-balloon'><i class='fa fa-times fa-lg'></i></button>","   </div>","   <div class='dialog-image-balloon'></div>","   <div class='balloon-left-edge'></div>","</div>"],minTop:"balloonHeight + 70",minLeft:"70",layerTypes:["vcs.vcm.layer.Vector"],layerNames:[]}]),this.balloonTypes=[],this.layerNamesToBalloonTypes={},this.layerTypesToBalloonTypes={},e.balloonTypes.forEach(function(e,t){let i=e.template;"string"!==typeof e.template&&(i=e.template.join("\n")),this.balloonTypes.push({template:i,minTop:e.minTop?e.minTop:0,minLeft:e.minLeft?e.minLeft:0,layerNames:e.layerNames?e.layerNames:[],layerTypes:e.layerTypes?e.layerTypes:[]}),e.layerTypes&&e.layerTypes.forEach(function(e){this.layerTypesToBalloonTypes[e]=t},this),e.layerNames&&e.layerNames.forEach(function(e){this.layerNamesToBalloonTypes[e]=t},this)},this),this.balloon=null,this.excludedLayerNames=e.excludedLayerNames||[]}createBalloonForGenericFeature(e){this.clearBalloon();const t=e.layerName,i=e.layerClass;let s,r;if(this.excludedLayerNames.includes(t))return;if(null!=this.layerNamesToBalloonTypes[t])s=this.balloonTypes[this.layerNamesToBalloonTypes[t]];else{if(null==this.layerTypesToBalloonTypes[i])return;s=this.balloonTypes[this.layerTypesToBalloonTypes[i]]}const n=e.attributes||e,a={};Object.keys(n).forEach(e=>{/^olcs_/.test(e)||(a[e]=n[e])});try{r=or()(s.template)(a)}catch(l){return void this.logger.warning(`Could not render the template for layer: ${t}. Please verify that the balloon template is correct`)}const o=Object.assign(e,{balloonWidget:this,minTop:s.minTop,minLeft:s.minLeft,balloonContent:r});this.balloon=new eo(o),this.balloon.initialize()}clearBalloon(){this.balloon&&(this.balloon.close(),this.balloon=null)}hasTypeForLayerName(e){return a(e,String),null!=this.layerNamesToBalloonTypes[e]}addTypeForLayer(e,t,i,s){Array.isArray(t)&&(t=t.join("")),a(e,String),a(t,String),o(s,String),o(i,String);const r={layerTypes:[],layerNames:[e],template:t,minTop:i||"balloonHeight + 30",minLeft:s||"70"},n=this.balloonTypes.length;this.balloonTypes.push(r),this.layerNamesToBalloonTypes[e]=n}getLink(e){this.balloon&&this.balloon.getLink(e)}dispose(){this.clearBalloon()}getBalloon(){return this.balloon}getConfigObject(){const e=super.getConfigObject();return e.balloonTypes=this.balloonTypes,e.balloonTypes.forEach(e=>{e.template&&(e.template=e.template.split("\n"))}),e.excludedLayerNames=this.excludedLayerNames,e}}var Ih=Eh;class Dh extends kr{static get className(){return"vcs.vcm.widgets.Copyright"}constructor(e){e.className=Dh.className,super(e),this.data={},this.headerLogoBox=e.headerLogoBox||null,Array.isArray(this.headerLogoBox)&&(this.headerLogoBox=this.headerLogoBox.join("\n")),this.headerTitle=e.headerTitle||null,Array.isArray(this.headerTitle)&&(this.headerTitle=this.headerTitle.join("\n")),this.footerLogoBox=e.footerLogoBox||null,Array.isArray(this.footerLogoBox)&&(this.footerLogoBox=this.footerLogoBox.join("\n")),this.showOverflow=!!e.showOverflow,this.layerItems=[],this.uiOptions={headerLogoBox:this.headerLogoBox,headerTitle:this.headerTitle,footerLogoBox:this.footerLogoBox}}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.updateLayers(),this.framework.subscribe(I.MAP_ACTIVATED,this.updateLayers.bind(this)),this.framework.subscribe(I.LAYER_CHANGED,this.layerChanged.bind(this)),this.initialized=!0,this.initializedFinished()}}updateLayers(){const e=this.framework.getLayers(),t=this.framework.getActiveMap();t&&(this.layerItems.splice(0),e.forEach(function(e){if(e.isSupported(t)&&e.isActive()){const t=this.createLayerItem(e);t&&this.layerItems.push(t)}},this))}layerChanged(e){const t=this.layerItems.findIndex(t=>t.layerName===e.name);if(e.isActive()){if(-1===t){const t=this.createLayerItem(e);t&&this.layerItems.push(t)}}else t>-1&&this.layerItems.splice(t,1)}createLayerItem(e){const t=e.options.copyright;if(t&&t.provider&&""!==t.provider){t.layerName=e.name;let i="";return e.options.category&&(i+=`${e.options.category} - `),e.options.title?i+=e.options.title:i+=e.name,t.title=i,t}return null}handleURLParameter(e){const t=e.headerTitle;null!=t&&(this.uiOptions.headerTitle=t)}getLink(e){this.headerTitle!==this.uiOptions.headerTitle&&e.addQueryParams({headerTitle:this.uiOptions.headerTitle})}}var Ph=Dh;class Oh extends kr{static get className(){return"vcs.vcm.widgets.CreateLink"}constructor(e){e.className=Oh.className,super(e)}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;this.initializedFinished()}}}var Yh=Oh;const xh={AMBIENT_OCCLUSION:"ambientOcclusion",BLOOM:"bloom",BLACK_AND_WHITE:"blackAndWhite",BLUR:"blur",BRIGHTNESS:"brightness",DEPTH_OF_FIELD:"depthOfField",EDGE_DETECTION:"edgeDetection",LENS_FLARE:"lensFlare",NIGHT_VISION:"nightVision",SILHOUTTE:"silhouette"};class Ah{constructor(e,t){this._enabled=e.enabled,this.uniforms={},Object.keys(t).forEach(i=>{"color"===t[i].type?Object.defineProperty(this.uniforms,i,{get(){const t=e.uniforms[i].toBytes();return t[3]/=255,t},set(t){e.uniforms[i]=Cesium.Color.fromBytes(t[0],t[1],t[2],255*t[3],e.uniforms[i])}}):this.uniforms[i]=e.uniforms[i]}),this.uniformTypes=t,this.update=this._update.bind(this,e),this.setEnabled=this._setEnabled.bind(this,e)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.setEnabled()}_setEnabled(e){e.enabled=this._enabled}_update(e){Object.keys(this.uniforms).forEach(t=>{e.uniforms[t]=this.uniforms[t]})}static isSupported(e){return!0}}var jh=Ah;class Fh extends jh{static get type(){return xh.AMBIENT_OCCLUSION}constructor(e){super(e,{intensity:{type:"number"},bias:{type:"number"},lengthCap:{type:"number"},stepSize:{type:"number",step:.2},frustumLength:{type:"number",step:10},ambientOcclusionOnly:{type:"boolean"}}),this.uniforms.lengthCap=3,this.update()}static isSupported(e){return Cesium.PostProcessStageLibrary.isAmbientOcclusionSupported(e)}}var Nh=Fh;class Hh extends jh{static get type(){return xh.BLOOM}constructor(e){super(e,{contrast:{type:"number",step:2},brightness:{type:"number"},delta:{type:"number"},sigma:{type:"number"},stepSize:{type:"number"},glowOnly:{type:"boolean"}})}}var Rh=Hh;class zh extends jh{static get type(){return xh.BLACK_AND_WHITE}constructor(e){super(e,{gradations:{type:"number",step:1}})}static createStage(){return Cesium.PostProcessStageLibrary.createBlackAndWhiteStage()}}var Gh=zh;class Vh extends jh{static get type(){return xh.BLUR}constructor(e){super(e,{delta:{type:"number"},sigma:{type:"number"},stepSize:{type:"number"}})}static createStage(){return Cesium.PostProcessStageLibrary.createBlurStage()}}var Bh=Vh;class Uh extends jh{static get type(){return xh.BRIGHTNESS}constructor(e){super(e,{brightness:{type:"number"}})}static createStage(){return Cesium.PostProcessStageLibrary.createBrightnessStage()}}var Wh=Uh;class qh extends jh{static get type(){return xh.DEPTH_OF_FIELD}constructor(e){super(e,{focalDistance:{type:"number",step:1},delta:{type:"number"},sigma:{type:"number"},stepSize:{type:"number"}})}static isSupported(e){return Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(e)}static createStage(){return Cesium.PostProcessStageLibrary.createDepthOfFieldStage()}}var Jh=qh;class Kh extends jh{static get type(){return xh.LENS_FLARE}constructor(e){super(e,{intensity:{type:"number"},distortion:{type:"number",step:1},ghostDispersal:{type:"number"},haloWidth:{type:"number"},earthRadius:{type:"number",step:1e3}})}static createStage(){return Cesium.PostProcessStageLibrary.createLensFlarStage()}}var Zh=Kh;class Qh extends jh{static get type(){return xh.NIGHT_VISION}constructor(e){super(e,{})}static createStage(){return Cesium.PostProcessStageLibrary.createNightVisionStage()}}var $h=Qh;class Xh extends jh{static get type(){return xh.SILHOUTTE}constructor(e){super(e,{color:{type:"color"},length:{type:"number"}})}static isSupported(e){return Cesium.PostProcessStageLibrary.isSilhouetteSupported(e)}static createStage(){return Cesium.PostProcessStageLibrary.createSilhouetteStage()}}var eu=Xh;const tu={[Nh.type]:Nh,[Rh.type]:Rh,[Gh.type]:Gh,[Bh.type]:Bh,[Wh.type]:Wh,[Jh.type]:Jh,[Zh.type]:Zh,[$h.type]:$h,[eu.type]:eu},iu=v.getLogger("vcs.vcm.widets.DisplayQuality");class su extends kr{static get className(){return"vcs.vcm.widgets.DisplayQuality"}constructor(e){e.className=su.className,super(e),this.defaultQualityLevel=e.defaultQualityLevel||"medium",this.defaultMobileQualityLevel=e.defaultMobileQualityLevel||"low",this.viewModel=null;const t={},i=e.low||{};t.low=su.createViewModel({sse:4,fxaa:!1,fog:{enabled:!0,density:9e-4,screenSpaceErrorFactor:6},resolutionScale:.9,layerSSEFactor:2},i);const s=e.medium||{};t.medium=su.createViewModel({sse:2.333,fxaa:!1,fog:{enabled:!0,density:5e-4,screenSpaceErrorFactor:4},resolutionScale:1,layerSSEFactor:1.1},s);const r=e.high||{};t.high=su.createViewModel({sse:4/3,fxaa:!0,fog:{enabled:!1,density:0,screenSpaceErrorFactor:0},resolutionScale:1,layerSSEFactor:.5},r),this.viewModelSettings=t,this.showAdvancedSettings=e.showAdvancedSettings||!1,this.sseLayerTypes=["vcs.vcm.layer.cesium.AbstractCesiumTilesetLayer","vcs.vcm.layer.TiledLayer","vcs.vcm.layer.FeatureStore"],this.supportedMaps=["vcs.vcm.maps.Cesium"],this.cesiumMap=null,this.layers=[],this.activePreset={preset:null},this.postProcessStages={};const n=e.allowedPostRenderStages||[Nh.type,Rh.type,Gh.type,Bh.type,Wh.type,Jh.type,$h.type,eu.type];n.forEach(e=>{this.postProcessStages[e]=null})}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.cesiumMap=this.framework.getMapByType("vcs.vcm.maps.Cesium");const t=this.cesiumMap.getScene(),i=t.postProcessStages;Object.keys(this.postProcessStages).forEach(e=>{tu[e]&&tu[e].isSupported(this.cesiumMap.getScene())?i[e]&&(this.postProcessStages[e]=new tu[e](i[e])):delete this.postProcessStages[e]}),this.viewModel={sse:t.globe.maximumScreenSpaceError,fxaa:i.fxaa.enabled,fog:t.fog,resolutionScale:1},this.initializeLayers(),this.framework.subscribe(I.LAYER_ACTIVATED,this.layerActivated,this),this.framework.isMobile()?this.setPreset(this.defaultMobileQualityLevel):this.setPreset(this.defaultQualityLevel),this.initialized=!0,this.initializedFinished()}return!0}addPostProcessingStage(e){this.postProcessStages[e]&&iu.warning("trying to add existing stage");const t=tu[e],i=this.cesiumMap.getScene();if(t&&t.isSupported(i)){const s=t.createStage();i.postProcessStages.add(s),this.postProcessStages[e]=new t(s)}else iu.error(`could not find ${e} or ${e} is not supported`)}static createViewModel(e,t){const i=new Cesium.Fog,s=Object.assign(e.fog,"object"===typeof t.fog?t.fog:{});i.enabled=!!s.enabled,i.density=Number(s.density),i.screenSpaceErrorFactor=Number(s.screenSpaceErrorFactor);const r=Object.assign(e,t);return{sse:Number(r.sse),fxaa:!!r.fxaa,fog:i,resolutionScale:Number(r.resolutionScale),layerSSEFactor:Number(r.layerSSEFactor)}}initializeLayers(){this.framework.getLayers().filter(e=>e instanceof ps||e instanceof nr||e instanceof Sr).forEach(e=>{const t=this.framework.isMobile()?e.screenSpaceErrorMobile:e.screenSpaceError;this.layers.push({layerName:e.name,sse:t,defaultSse:t})})}layerActivated(e){const t=this.layers.find(t=>t.layerName===e.name);t&&this.setLayerQuality(e.name)}setQuality(e){if(o(e,Boolean),e||(this.activePreset.preset=null),this.cesiumMap.isInitialized()&&this.viewModel){const e=this.cesiumMap.getViewer();e.scene.globe.maximumScreenSpaceError=this.viewModel.sse,e.scene.postProcessStages.fxaa.enabled=this.viewModel.fxaa,e.resolutionScale=this.viewModel.resolutionScale,e.scene.fog.enabled=this.viewModel.fog.enabled,e.scene.fog.density=this.viewModel.fog.density,e.scene.fog.screenSpaceErrorFactor=this.viewModel.fog.screenSpaceErrorFactor}}setPreset(e){a(e,["high","medium","low"]),this.activePreset.preset=e;const t={};"high"===e?Object.assign(t,this.viewModelSettings.high):"medium"===e?Object.assign(t,this.viewModelSettings.medium):Object.assign(t,this.viewModelSettings.low),Object.assign(this.viewModel,t),this.layers.forEach(e=>{e.sse=e.defaultSse*t.layerSSEFactor,this.setLayerQuality(e.layerName)}),this.setQuality(!0)}setLayerQuality(e){a(e,String);const t=this.framework.getLayerByName(e);if(t&&t.isActive()){const i=this.layers.find(t=>t.layerName===e);i&&t.setMaximumScreenSpaceError(i.sse)}}getConfigObject(){const e=super.getConfigObject();return e.low=this.viewModelSettings.low,e.medium=this.viewModelSettings.medium,e.high=this.viewModelSettings.high,e.defaultQualityLevel=this.defaultQualityLevel,e.showAdvancedSettings=this.showAdvancedSettings,e.allowedPostRenderStages=this.options.allowedPostRenderStages||[Nh.type,Rh.type,Gh.type,Bh.type,Wh.type,Jh.type,$h.type,eu.type],e}}var ru=su;const nu=new Je({image:{fill:{color:[255,255,255,.4]},stroke:{color:[0,0,0,1],width:1},radius:5},stroke:{color:"#3399CC",width:2},fill:{color:[255,255,255,.4]},text:{font:"bold 18px sans-serif",textBaseline:"bottom",offsetY:-15,offsetX:0,stroke:{color:"#FFFAF0",width:2}}});class au extends kr{static get className(){return"vcs.vcm.widgets.Drawing"}constructor(e){e.className=au.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers","vcs.vcm.maps.Oblique"],this.allowedGeometries=e.allowedGeometries||["Point","LineString","Polygon","BBox","Circle","Rectangle","Label"],this.allowEditMode=Object(c["e"])(e.allowEditMode,!0),this.allowSelectMode=Object(c["e"])(e.allowSelectMode,!0),this.defaultMode=null!=xi[e.defaultMode]?e.defaultMode:"create",this.editorOptions={hideAltitudeMode:Object(c["e"])(e.hideAltitudeMode,!1),simpleStyleUi:Object(c["e"])(e.simpleStyleUi,!1),hideExport:Object(c["e"])(e.hideExport,!1),hideHelp:Object(c["e"])(e.hideHelp,!1),showFeatureEditorUiInEditMode:!this.allowSelectMode&&this.allowEditMode},("select"===this.defaultMode&&!this.allowSelectMode||"edit"===this.defaultMode&&!this.allowEditMode)&&(this.defaultMode="create"),this.editingLayer=null}activate(){super.activate()}deactivate(){super.deactivate(),this.layerEditor.deactivate()}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0;const t=nu.clone();this.options.style&&t.assign(new Je(this.options.style)),this.editingLayer=new Ki({altitudeMode:"clampToGround",projection:S.createMercatorProjection(),style:t,isDynamic:!0}),this.framework.addLayer(this.editingLayer),this.editingLayer.activate(!0),this.layerEditor=new Wo({geometryLayerEditor:{allowEditMode:this.allowEditMode,defaultMode:this.defaultMode,allowedGeometries:this.allowedGeometries},featureLayerEditor:{allowSelectMode:this.allowSelectMode},styleLayerEditor:{}}),this.layerEditor.initialize(),this.layerEditor.addEditingLayer(this.editingLayer),this.initializedFinished()}return!0}getConfigObject(){const e=nu.clone();return this.options.style&&e.assign(new Je(this.options.style)),{allowedGeometries:this.allowedGeometries,allowSelectMode:this.allowSelectMode,allowEditMode:this.allowEditMode,defaultMode:this.defaultMode,simpleStyleUi:this.editorOptions.simpleStyleUi,hideHelp:this.editorOptions.hideHelp,hideExport:this.editorOptions.hideExport,hideAltitudeMode:this.editorOptions.hideAltitudeMode,style:e.getOptions()}}}var ou=au;class lu extends kr{static get className(){return"vcs.vcm.widgets.Export"}constructor(e){e.className=lu.className,super(e),this.showFreeFormCrsInput=Object(c["e"])(e.showFreeFormCrsInput,!1),this.dataProjection=e.dataProjection?new S(e.dataProjection):this.framework.projection;const t=this.dataProjection?this.dataProjection.epsg:"";this.coordinateSystem=e.coordinateSystem||t,this.heightMode=e.heightMode||"absolute",this.formatOptions=e.formats||["2D Shape","3D Shape - PolygonZ","3D Shape - Multipatch","CityGML","KMZ","DXF","DWG","3DS","ESRI FGDB","SketchUp","OBJ","3DPDF","VRML","FMEAR"],this.formatsWithTextures=["CityGML","3DS","SketchUp","OBJ","3DPDF","VRML","FMEAR"],this.lodOptions=e.lod||["LoD1","LoD2","LoD3","LoD4","haLoD"],this.citygmlclassesOptions=e.citygmlclasses||["26","7","16","5","21","85","64","45","43","46","8","9","4"],this.appearanceThemesOptions=e.appearanceThemes||["rgbTexture"],this.maxArea=Object(c["h"])(e.maxarea,2e6),this.useTokenSecurity=null==e.useTokenSecurity||e.useTokenSecurity,this.serverUrl=e.serverUrl||"http://fmeserver/fmedatadownload/Repository/workbench.fmw",this.securityToken=e.securityToken&&""!==e.securityToken?e.securityToken:null,this.tokenUrl=e.tokenUrl||"http://fmeserver/fmetoken/service/generate.json",this.token=null,this.fmeuser=e.fmeuser?e.fmeuser:"publicuser",this.fmepassword=e.fmepassword?e.fmepassword:"publicuser";const i=Ke.clone();e.style&&i.assign(new Je(e.style)),this._layerOptions={projection:S.createMercatorProjection(),name:"_exportLayer",classificationType:e.classificationType||"both",altitudeMode:"clampToGround",style:i},this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"],this.singleFeatureId=Object(c["c"])()}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.geometryLayer=new Ki(this._layerOptions),this.framework.addLayer(this.geometryLayer),this.layerEditor=new xo({allowedGeometries:["Polygon","BBox"],defaultMode:"edit"}),this.layerEditor.initialize(),this.layerEditor.addEditingLayer(this.geometryLayer),this.fmeAuthenticate().then(e=>{let t=e.data;if(t)try{this.token=t.serviceResponse.token}catch(i){return Promise.reject(i)}return this.initialized=!0,this.initializedFinished(),Promise.resolve()}).catch(e=>{this.logger.warning(`Could not authentificate FME : ${e}`)})}return!0}fmeAuthenticate(){if(this.useTokenSecurity&&null==this.securityToken){this.logger.deprecate("user/password","Use a security token. Future versions of the vcMAP may no longer support this.");const e=`${this.tokenUrl}?user=${this.fmeuser}&password=${this.fmepassword}&expiration=1&timeunit=day`;return q.a.get(e)}return null!=this.securityToken?(this.token=this.securityToken,Promise.resolve()):Promise.reject(new Error("Missing security token"))}prepareRequestAndSend(e,t,i){if(this.useTokenSecurity&&!this.token&&!i)throw new Error("i18n_export_authentification_error");if(!e.cityGmlClasses||0===e.cityGmlClasses.length)throw new Error("i18n_export_themclass_error");const s={COORD_SYS:e.crs||(Array.isArray(this.coordinateSystem)?this.coordinateSystem[0]:this.coordinateSystem),HEIGHT_MODE:this.heightMode,TOKEN:i||this.token,OPT_SERVICEMODE:"async"};if(s.EXPORT_FORMAT=e.format,s.THEM_CLASS=e.cityGmlClasses.map(e=>e.value),s.TEXTURE=e.texture?"Yes":"No",s.APP_THEME=e.appearance||"none",s.LOD_SELECTION=e.level,e.useFeatureGeometry){s.SELECTION="Polygon";const e=this.geometryLayer.getFeatureById(this.singleFeatureId);if(!e)throw new Error("i18n_export_geometry_error");let t=e.getGeometry();if(!t||"Polygon"!==t.getType())throw new Error("i18n_export_geometry_error");if(null!=this.maxArea){const e=t.getArea();if(e>this.maxArea)throw new Error("i18n_export_maxArea_error")}t=t.clone(),t.transform(S.createMercatorProjection().proj,this.dataProjection.proj);const i=t.getCoordinates()[0];s.POLYGON=i.map(e=>{const t=Object(le["a"])(e,2),i=t[0],s=t[1];return`${i},${s}`}).join(";")}else{const e=this.framework.getSelectBehavior();if(e.getSizeOfSelectionSet()<=0)throw new Error("i18n_export_feature_error");s.SELECTION="Einzelobjekte",s.GMLID=e.getSelectionSet()}if(!Object(c["d"])(e.email))throw new Error("i18n_export_email_error");s.OPT_REQUESTEREMAIL=e.email;const r=Object.keys(s).map(e=>`${e}=${encodeURIComponent(s[e])}`).join("&"),n=t||this.serverUrl;return q.a.post(n,r,{headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}})}getFormatOptions(){return this.logger.deprecate("getFormatOptions","use .formatOptions instead"),this.formatOptions}getLodOptions(){return this.logger.deprecate("getFormatOptions","use .lodOptions instead"),this.lodOptions}getCitygmlClassOptions(){const e={26:"Building",7:"SolitaryVegetationObjects",5:"GenericCityObject",21:"CityFurniture",16:"ReliefFeature",85:"Tunnel",64:"Bridge",45:"Road",43:"Track",46:"Square",8:"Plant Cover",9:"WaterBody",4:"LandUse"},t={85:!0,64:!0,45:!0,43:!0,46:!0,8:!0,9:!0,4:!0};return this.citygmlclassesOptions.map(i=>({value:i,title:e[i],citygmlOnly:t[i]}))}getTexturedFormats(){return this.logger.deprecate("getFormatOptions","use .formatsWithTextures instead"),this.formatsWithTextures}getAppearanceThemes(){return this.logger.deprecate("getFormatOptions","use .appearanceThemesOptions instead"),this.appearanceThemesOptions}deactivate(){this.active&&(super.deactivate(),this.framework.getSelectBehavior().deactivateClickBehavior())}getConfigObject(){const e=super.getConfigObject();return e.formats=this.formatOptions,e.coordinateSystem=this.coordinateSystem,e.heightMode=this.heightMode,e.lod=this.lodOptions,e.citygmlclasses=this.citygmlclassesOptions,e.appearanceThemes=this.appearanceThemesOptions,e.maxarea=this.maxArea,e.useTokenSecurity=this.useTokenSecurity,e.serverUrl=this.serverUrl,e.tokenUrl=this.tokenUrl,e.fmeuser=this.fmeuser,e.fmepassword=this.fmepassword,e.serverUrl=this.serverUrl,e}}var cu=lu;class hu extends kr{static get className(){return"vcs.vcm.widgets.FeatureList"}constructor(e){e.className=hu.className,super(e),this.layers=new Set,this._setLayers(e.layerTypes,e.layers,e.excludedLayers),this.headerTemplate=e.headerTemplate?this._makeHeaderTemplate(e.headerTemplate):null,this.itemTemplate=e.itemTemplate||null,this.itemTemplate||(this.itemTemplate=["<div class='ui-listview-list-column-2 ui-listview-list-data-cell'>","<span class='ui-listview-list-data-cell-value'><%= data.feature.properties.name %>","<% if(data.feature.properties.website){ %>","<br><a href='<%= data.feature.properties.website %>' target='_blank'><%= data.feature.properties.website %></a>","<% } %>","</span>","</div>","<div class='ui-listview-list-column-3 ui-listview-list-data-cell'>","<span class='ui-listview-list-data-cell-value'><%= data.feature.properties.street %><br><%= data.feature.properties.zip %> <%= data.feature.properties.city %></span>","</div>"]),Array.isArray(this.itemTemplate)&&(this.itemTemplate=this.itemTemplate.join("")),this.layerTemplateMap={},Array.isArray(e.layerTemplates)&&e.layerTemplates.forEach(this._setLayerTemplates,this),this.queryProperties=e.queryProperties||["name"],this.values={currentHeader:this.headerTemplate,query:!0}}initialize(){if(!this.initialized){const t=super.initialize();if(!t)return;var e=function e(t){t.children?t.children.forEach(e,this):this.layers.has(t.layerName)&&(t.hasFeatureListView=!0)};const i=this.framework.getWidgetsByType(on.className)[0];i&&i.cluster.forEach(e,this),this.initialized=!0,this.initializedFinished()}}_setLayers(e,t,i){e&&this.framework.getLayers().filter(t=>e.includes(t.className)&&!/^_/.test(t.name)).forEach(function(e){this.layers.add(e.name)},this),t&&t.forEach(function(e){this.layers.add(e)},this),i&&i.forEach(function(e){this.layers.delete(e)},this)}_setLayerTemplates(e){const t=e.layers;let i=e.itemTemplate;const s=e.headerTemplate;i=Array.isArray(i)?i.join(""):i;const r={item:i,header:s?this._makeHeaderTemplate(s):this.headerTemplate,queryProperties:e.queryProperties||this.queryProperties};t.filter(function(e){return this.layers.has(e)},this).forEach(function(e){this.layerTemplateMap[e]=r},this)}_makeHeaderTemplate(e){return Array.isArray(e)?e.join(""):("object"===typeof e&&(e=e,Object.keys(e).forEach(t=>{e[t]=Array.isArray(e[t])?e[t].join(""):e[t]})),e)}getItems(e){if(!this.layers.has(e))return this.logger.warning(`Could not render listview for layer ${e}. Please check your configuration.`),null;const t=this.framework.getLayerByName(e),i=t.getFeatures(),s=this.layerTemplateMap[e]?this.layerTemplateMap[e]:{item:this.itemTemplate,header:this.headerTemplate,queryProperties:this.queryProperties};this.values.currentHeader=s.header,this.values.query=!!s.queryProperties.length;const r=i.map(e=>{const t=e.getProperties();return delete t[e.getGeometryName()],{id:e.getId(),properties:t,query:s.queryProperties.reduce(function(t,i){var s=e.get(i);return null!=s?t+" "+s.toString():t},"")}});return r.map((e,t)=>({template:or()(s.item)({data:{featureCount:t+1,feature:e}}),id:e.id,query:e.query}))}}var uu=hu;const du={DISTANCE:"distance",AREA:"area",VERTICAL_HEIGHT:"verticalHeight",OBLIQUE_HEIGHT:"obliqueHeight",OBLIQUE_DISTANCE:"obliqueDistance",POINT:"point",CARTESIAN_DISTANCE:"cartesianDistance",CARTESIAN_AREA:"cartesianArea"};class mu{static get measurementType(){return du.DISTANCE}constructor(e){this.parent=e.parent,this.decimalPlaces=this.parent.decimalPlaces,this.map=G.getInstance().getActiveMap(),this.featureIds=[],this.forceMove=null!=e.forceMove?e.forceMove:null,this.values={type:e.type,isValid:!1}}_createFeature(e){if(this.feature=this.parent.geometryEditor.createFeature(e.geometryType),e.isAbsolute?this.feature.set("olcs_altitudeMode","absolute",!0):this.feature.set("olcs_altitudeMode","clampToGround",!0),e.startPosition){const t=this.feature.getGeometry();t instanceof ol.geom.LineString?t.setCoordinates([e.startPosition]):t instanceof ol.geom.Polygon?t.setCoordinates([[e.startPosition]]):t instanceof ol.geom.Point&&t.setCoordinates(e.startPosition)}e.addFeatureStyle&&(this.feature[We]=this.parent.featureLayer.style.clone(),this.feature.setStyle(this.feature[We].style)),this.map instanceof ui?(this.feature[Ki.obliqueGeometry].on("change",this.geometryChangedCallback.bind(this)),this.feature[Ki.doNotTransform]=!0):this.feature.getGeometry().on("change",this.geometryChangedCallback.bind(this));let t=Oi.CREATE;e.startPosition&&"Point"===e.geometryType&&(this.feature.getGeometry().changed(),t=Oi.EDIT),this.parent.geometryEditor.setModeAndSelectFeature(t,this.feature),this.id=this.feature.getId().toString(),this.featureIds.push(this.id)}geometryChangedCallback(e){}getValue(e,t){let i=Math.abs(e);const s=t?2:1;let r=t?"m²":"m";const n=1e3**s;return i>n*(t?1:10)&&(i/=n,r=`k${r}`),`${i.toFixed(this.decimalPlaces)} ${r}`}addLabel(){const e=Eo.Point(),t=new ol.Feature({geometry:e});return this.map instanceof ui&&(e[Ki.alreadyTransformedToImage]=!0,t[Ki.doNotTransform]=!0),t.setStyle(new ol.style.Style({text:this.parent.featureLayer.style.text.clone()})),this.parent.featureLayer.addFeatures([t]),t[this.parent.geometryEditor.state.featureTypeSymbol]=0,this.featureIds.push(t.getId()),t}destroy(){this.parent.featureLayer.removeFeaturesById(this.featureIds)}static setTextOnLabel(e,t){e.getStyle().getText().setText(t)}}var gu=mu;const pu=new ol.Sphere(6378137);class yu extends gu{static get measurementType(){return du.DISTANCE}constructor(e){e.type=e.type||yu.measurementType,super(e),this.segmentDistance=[],this.values.distance="0",this.values.estimate=!1,this.label=this.addLabel(),this._createFeature({geometryType:"LineString",startPosition:e.startPosition})}geometryChangedCallback(e){const t=e.target.getCoordinates(),i=t.length;if(i>1&&(t[0][0]!==t[1][0]||t[0][1]!==t[1][1])){this.values.isValid=this.values.isValid||i>2,this.label.getGeometry().setCoordinates(t[i-1]);let e,s=Promise.resolve([]);if(this.map instanceof ui){e=new Array(i);const r=t.map((t,i)=>{return Object(bt["e"])(this.map.activeLayer.currentImage,t,{dataProjection:ol.proj.get("EPSG:4326")}).then(t=>{e[i]=t.coords,this.values.estimate=t.estimate})});s=Promise.all(r)}else{for(let e=0;e<i;e++)S.mercatorToWgs84(t[e],!0);e=t}return s.then(()=>{const t=this.calculateDistance(e);this.setValueAndLabel(t)})}return this.values.isValid&&this.parent.removeMeasurement(this),null}calculateDistance(e){const t=e.length;this.segmentDistance=new Array(t-1);let i=0;for(let s=1;s<t;s++)this.segmentDistance[s-1]=pu.haversineDistance(e[s-1],e[s]),i+=this.segmentDistance[s-1];return i}setValueAndLabel(e){this.values.distance=this.getValue(e),gu.setTextOnLabel(this.label,this.values.distance),this.label.changed()}}var _u=yu;class fu extends gu{static get measurementType(){return du.AREA}constructor(e){e.type=fu.measurementType,super(e),this.values.area="0",this.values.circumference="0",this.label=this.addLabel(),this._createFeature({geometryType:"Polygon",startPosition:e.startPosition})}geometryChangedCallback(e){const t=e.target,i=t.getCoordinates()[0],s=i.length;let r=0;if(s>2){this.values.isValid=this.values.isValid||s>3;for(let e=0;e<s;e++)S.mercatorToWgs84(i[e],!0),e&&(r+=pu.haversineDistance(i[e-1],i[e])),e===s-1&&(r+=pu.haversineDistance(i[e],i[0]));this.values.area=this.getValue(pu.geodesicArea(i),!0),this.values.circumference=this.getValue(r),gu.setTextOnLabel(this.label,this.values.area),this.label.setGeometry(t.getInteriorPoint())}else this.values.isValid&&this.parent.removeMeasurement(this)}}var vu=fu;let Lu=new Cesium.Cartographic,Mu=new Cesium.Cartesian3;const bu=[{key:"height",indices:[0,1]},{key:"horizontal",indices:[1,2]},{key:"distance",indices:[0,2]}],wu={horizontal:0,height:0,distance:0};class Tu extends gu{static get measurementType(){return du.VERTICAL_HEIGHT}constructor(e){e.type=Tu.measurementType,super(e),this.triangleFeature=new ol.Feature({geometry:Eo.LineString(),olcs_altitudeMode:"absolute"}),this.parent.featureLayer.addFeatures([this.triangleFeature]),this.triangleFeature[this.parent.geometryEditor.state.featureTypeSymbol]=0,this.featureIds.push(this.triangleFeature.getId()),this.cartesians=[new Cesium.Cartesian3,new Cesium.Cartesian3,new Cesium.Cartesian3],this.labels={height:this.addLabel(),horizontal:this.addLabel(),distance:this.addLabel()},this.values.height="0",this.values.horizontal="0",this.values.distance="0",this.values.alpha="0",this.values.beta="0",Object.values(this.labels).forEach(e=>{e.set("olcs_altitudeMode","absolute")}),this._createFeature({geometryType:"LineString",isAbsolute:!0,startPosition:e.startPosition})}geometryChangedCallback(e){const t=e.target,i=t.getCoordinates();if(!this.values.isValid&&i.length>2&&(this.values.isValid=!0),this.values.isValid){if(this.parent.geometryEditor.state.mode===Oi.CREATE&&this.parent.geometryEditor.setMode(Oi.EDIT),i.length<2)return void this.parent.removeMeasurement(this);const e=i[0][2]<i[1][2]?0:1,t=i[e].slice();t[2]=i[e?0:1][2];const s=[i[e],t,i[e?0:1]];this.triangleFeature.getGeometry().setCoordinates(s);for(let i=0;i<3;i++)S.mercatorToWgs84(s[i],!0),Cesium.Cartesian3.fromDegrees(s[i][0],s[i][1],s[i][2],void 0,this.cartesians[i]);for(let i=0;i<3;i++){const e=bu[i],t=e.key,s=e.indices,r=Cesium.Cartesian3.distance(this.cartesians[s[0]],this.cartesians[s[1]]);Mu=Cesium.Cartesian3.lerp(this.cartesians[s[0]],this.cartesians[s[1]],.5,Mu),Lu=Cesium.Cartographic.fromCartesian(Mu,void 0,Lu),wu[t]=r,this.values[t]=this.getValue(r),gu.setTextOnLabel(this.labels[t],this.values[t]),this.labels[t].getGeometry().setCoordinates(S.wgs84ToMercator([Cesium.Math.toDegrees(Lu.longitude),Cesium.Math.toDegrees(Lu.latitude),Lu.height]))}const r=Cesium.Math.toDegrees(Math.asin(wu.horizontal/wu.distance)),n=90-r;this.values.alpha=`${r.toFixed(this.decimalPlaces)}°`,this.values.beta=`${n.toFixed(this.decimalPlaces)}°`}}}var Su=Tu;class Cu extends gu{static get measurementType(){return du.POINT}constructor(e){e.type=Cu.measurementType,super(e),this.values.x="0",this.values.y="0",this.values.z="0",this.values.estimate=!1,this.transformer=S.getTransformer(G.getInstance().getProjection(),S.createMercatorProjection()),this.map instanceof Mt?this._callback=this.setCoords.bind(this,!0):this.map instanceof _i?(this._callback=this.setCoords.bind(this,!1),delete this.values.z):this.map instanceof ui&&(this._callback=this.setFromObliqueCoords.bind(this)),this.geometryCreated=!!e.startPosition,this._createFeature({geometryType:"Point",isAbsolute:!0,addFeatureStyle:!0,startPosition:e.startPosition})}geometryChangedCallback(e){if(this._callback&&this.geometryCreated){const t=e.target.getCoordinates();this.values.isValid=!0,this._callback(t)}else this.geometryCreated=!0}setCoords(e,t){this.transformer(t,t,3),this.values.x=t[0].toFixed(this.decimalPlaces),this.values.y=t[1].toFixed(this.decimalPlaces);let i=`${this.values.x}, ${this.values.y}`;if(e){const e=this.getValue(t[2]);this.values.z=e,i=`${i}, ${e}`}this.feature[We].label=`(${i})`,this.feature.changed()}setFromObliqueCoords(e){return Object(bt["e"])(this.map.activeLayer.currentImage,e,{dataProjection:S.createMercatorProjection().getProjection()}).then(e=>{this.values.estimate=e.estimate,this.setCoords(!e.estimate,e.coords)})}}var ku=Cu;class Eu extends gu{static get measurementType(){return du.OBLIQUE_HEIGHT}constructor(e){e.type=Eu.measurementType,e.forceMove=!0,super(e),this.values.height="0",this.values.estimate=!1,this.map=this.map,this.startUndistorted=null,this.startDistorted=null,this.liftedUndistorted=null,this.measureVecGround=new Cesium.Cartesian3,this.measureVecOrientation=new Cesium.Cartesian3,this.set=!1,this.onHold=!1,this.selfCall=!1,this.label=this.addLabel(),this._createFeature({geometryType:"LineString",startPosition:e.startPosition})}geometryChangedCallback(e){if(this.selfCall)return void(this.selfCall=!1);if(this.onHold)return;const t=e.target.getCoordinates();if(this.values.isValid){if(this.parent.geometryEditor.state.mode===Oi.CREATE)return void this.parent.geometryEditor.setMode(Oi.EDIT);if(t.length<2)return void this.parent.removeMeasurement(this)}const i=this.map.activeLayer,s=i.currentImage.camera;if(this.set||2!==t.length){if(this.set){3!==t.length||this.values.isValid||(this.parent.geometryEditor.setMode(Oi.EDIT),this.values.isValid=!0);const e=s.radialDistortionCoordinate(t[1],!0),i=[[e[0],e[1]],[e[0]+1,e[1]]],r=Object(bt["b"])(i,[this.startUndistorted,this.liftedUndistorted]),n=[r.x,r.y],a=s.radialDistortionCoordinate(n,!1),o=new Cesium.Cartesian3(n[0],n[1],0);let l=Cesium.Cartesian3.subtract(o,this.measureVecGround,new Cesium.Cartesian3);l=Cesium.Cartesian3.normalize(l,l);const c=Cesium.Cartesian3.dot(this.measureVecOrientation,l);let h;if(this.selfCall=!0,c<0||Number.isNaN(c))this.values.height=this.getValue(0),h=[this.startDistorted,this.startDistorted];else{const e=this.findVertical3DPositionRegardingPixel(n,this.startPointRealWorld);this.values.height=this.getValue(Ft(this.startPointRealWorld,e)),h=[this.startDistorted,a]}gu.setTextOnLabel(this.label,this.values.height),this.label.getGeometry().setCoordinates(h[1]),this.feature.getGeometry().setCoordinates(h),this.parent.geometryEditor.geometryEditor.vertices[0].getGeometry().setCoordinates(h[0]),this.parent.geometryEditor.geometryEditor.vertices[1].getGeometry().setCoordinates(h[1])}}else this.onHold=!0,this.startUndistorted=s.radialDistortionCoordinate(t[0],!0),this.startDistorted=t[0].slice(),this.measureVecGround=Cesium.Cartesian3.fromElements(this.startUndistorted[0],this.startUndistorted[1],0,this.measureVecGround),Object(bt["e"])(i.currentImage,t[0]).then(e=>{this.startPointRealWorld=e.coords,this.values.estimate=e.estimate;const t=e.coords.slice();return t[2]+=10,Object(bt["f"])(i.currentImage,t)}).then(e=>{this.liftedUndistorted=s.radialDistortionCoordinate(e.coords,!0);const t=Cesium.Cartesian3.fromElements(this.liftedUndistorted[0],this.liftedUndistorted[1],0);this.onHold=!1,this.set=!0,this.measureVecOrientation=Cesium.Cartesian3.subtract(t,this.measureVecGround,this.measureVecOrientation),this.measureVecOrientation=Cesium.Cartesian3.normalize(this.measureVecOrientation,this.measureVecOrientation),this.selfCall=!0,this.feature.getGeometry().setCoordinates([this.startDistorted,this.startDistorted])})}findVertical3DPositionRegardingPixel(e,t){const i=this.map.getCurrentImage();let s=new Cesium.Cartesian3(e[0],i.size[1]-e[1],1);s=Cesium.Matrix3.multiplyByVector(i.pToRealworld,s,s);let r=new Cesium.Cartesian3(0,0,1),n=Cesium.Cartesian3.cross(r,s,new Cesium.Cartesian3),a=Cesium.Cartesian3.fromArray(t);const o=Cesium.Cartesian3.subtract(i.projectionCenter,a,new Cesium.Cartesian3);let l=Cesium.Matrix3.fromRowMajorArray([r.x,s.x,n.x,r.y,s.y,n.y,r.z,s.z,n.z]);l=Cesium.Matrix3.inverse(l,l);const c=Cesium.Matrix3.multiplyByVector(l,o,new Cesium.Cartesian3);return n=Cesium.Cartesian3.multiplyByScalar(n,c.z,n),r=Cesium.Cartesian3.multiplyByScalar(r,c.x,r),r=Cesium.Cartesian3.add(r,n,r),a=Cesium.Cartesian3.add(a,r,a),[a.x,a.y,a.z]}}var Iu=Eu;class Du extends _u{static get measurementType(){return du.OBLIQUE_DISTANCE}constructor(e){e.type=Du.measurementType,super(e)}}var Pu=Du;let Ou=new Cesium.Cartesian3,Yu=new Cesium.Cartesian3;class xu extends gu{static get measurementType(){return du.CARTESIAN_DISTANCE}constructor(e){e.type=xu.measurementType,super(e),this.segmentDistance=[],this.values.distance="0",this.label=this.addLabel(),this.label.set("olcs_altitudeMode","absolute"),this._createFeature({geometryType:"LineString",startPosition:e.startPosition,isAbsolute:!0})}geometryChangedCallback(e){const t=e.target.getCoordinates(),i=t.length;if(i>1&&(t[0][0]!==t[1][0]||t[0][1]!==t[1][1])){this.values.isValid=this.values.isValid||i>2,this.label.getGeometry().setCoordinates(t[i-1]),this.segmentDistance=new Array(i-1);let e=0;S.mercatorToWgs84(t[0],!0),Ou=Cesium.Cartesian3.fromDegrees(t[0][0],t[0][1],t[0][2],void 0,Ou);for(let s=1;s<i;s++)S.mercatorToWgs84(t[s],!0),Yu=Cesium.Cartesian3.fromDegrees(t[s][0],t[s][1],t[s][2],void 0,Yu),this.segmentDistance[s-1]=Cesium.Cartesian3.distance(Ou,Yu),e+=this.segmentDistance[s-1],Ou=Yu.clone(Ou);this.values.distance=this.getValue(e),gu.setTextOnLabel(this.label,this.values.distance),this.label.changed()}else this.values.isValid&&this.parent.removeMeasurement(this)}}var Au=xu;let ju=new Cesium.Cartesian3,Fu=new Cesium.Cartesian3;class Nu extends gu{static get measurementType(){return du.CARTESIAN_AREA}constructor(e){e.type=Nu.measurementType,e.forceMove=!1,super(e),this.values.area="0",this.values.circumference="0",this.label=this.addLabel(),this.label.set("olcs_altitudeMode","absolute"),this.label.set("olcs_zCoordinateEyeOffset",-10),this._createFeature({geometryType:"Polygon",startPosition:e.startPosition,isAbsolute:!0})}geometryChangedCallback(e){const t=e.target,i=t.getCoordinates()[0],s=i.length;let r=0;if(this.values.isValid&&i.length<3)this.parent.removeMeasurement(this);else if(s>3||this.values.isValid){this.values.isValid=!0;const e=new Array(s),n=new Array(s);let a=i[0][2],o=0;for(let t=0;t<s;t++)a=i[t][2]>a?i[t][2]:a,S.mercatorToWgs84(i[t],!0),e[t]=Cesium.Cartesian3.fromDegrees(i[t][0],i[t][1],i[t][2]),n[t]=Cesium.Cartesian2.fromCartesian3(e[t]),t&&(o+=Cesium.Cartesian3.distance(e[t-1],e[t]));o+=Cesium.Cartesian3.distance(e[s-1],e[0]);const l=Cesium.PolygonPipeline.triangulate(n),c=l.length;for(let t=0;t<c;t+=3){const i=l[t],s=l[t+1],n=l[t+2];ju=Cesium.Cartesian3.subtract(e[i],e[s],ju),Fu=Cesium.Cartesian3.subtract(e[i],e[n],Fu),ju=Cesium.Cartesian3.cross(ju,Fu,ju),r+=Cesium.Cartesian3.magnitude(ju)/2}this.values.area=this.getValue(r,!0),this.values.circumference=this.getValue(o),gu.setTextOnLabel(this.label,this.values.area);const h=t.getInteriorPoint().getCoordinates();h[2]=a,this.label.getGeometry().setCoordinates(h)}}}var Hu=Nu;const Ru={[_u.measurementType]:_u,[vu.measurementType]:vu,[Su.measurementType]:Su,[ku.measurementType]:ku,[Iu.measurementType]:Iu,[Pu.measurementType]:Pu,[Au.measurementType]:Au,[Hu.measurementType]:Hu},zu=["distance","cartesianDistance","cartesianArea","area","point","verticalHeight","obliqueDistance","obliqueHeight"],Gu=new Je({image:{fill:{color:[244,67,54,.8]},stroke:{color:[0,0,0,1],width:1},radius:5},stroke:{color:[244,67,54,1],width:3},fill:{color:[244,67,54,.8]},text:{font:"bold 18px sans-serif",textBaseline:"bottom",offsetY:-15,offsetX:0,stroke:{color:"#FFFAF0",width:2}}});class Vu extends kr{static get className(){return"vcs.vcm.widgets.Measurement"}constructor(e){e.className=e.className||Vu.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium","vcs.vcm.maps.Openlayers"];const t=Gu.clone();e.style&&t.assign(new Je(e.style)),this.featureLayer=new Ki({style:t,altitudeMode:"clampToGround",zCoordinateEyeOffset:-20}),this.geometryEditor=null,this.decimalPlaces=null!=e.decimalPlaces?e.decimalPlaces:1,this.allowedMeasurements=e.allowedMeasurements||zu,(this.allowedMeasurements.includes("obliqueDistance")||this.allowedMeasurements.includes("obliqueHeight"))&&this.supportedMaps.push("vcs.vcm.maps.Oblique"),this.supportedMeasurements=[],this.useCartesianIn3D=null!=e.useCartesianIn3D&&e.useCartesianIn3D,this.measurements=new Map,this._defaultTransformOnMove=A.getInstance().transformGeometryOnMove,this._transformOnMove=this._defaultTransformOnMove,this.obliqueListener=null,this.state=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.geometryEditor=new xo({allowedGeometries:["LineString","Polygon","Point"],defaultMode:"edit",dedicatedFeatureStyle:!1}),this.state={activeMeasurementId:null,editorState:this.geometryEditor.state,measurementsSize:0},this.framework.addLayer(this.featureLayer),this.handleMapChangeEvent(this.framework.getActiveMap()),this.geometryEditor.initialize(),this.geometryEditor.addEditingLayer(this.featureLayer),this._transformOnMove=A.getInstance().transformGeometryOnMove,this.geometryEditor.selectFeatureInteraction.onSelect(this.onSelect.bind(this)),this.initialized=!0}return!0}handleMapChangeEvent(e){super.handleMapChangeEvent(e),this.active&&this.geometryEditor.setMode(Oi.NONE),this.supportedMeasurements.splice(0),this._transformOnMove=this._defaultTransformOnMove,this.clearMeasurements(),e instanceof _i?(this.supportedMeasurements.push(_u.measurementType),this.supportedMeasurements.push(ku.measurementType),this.supportedMeasurements.push(vu.measurementType)):e instanceof Mt?(this.supportedMeasurements.push(Au.measurementType),this.supportedMeasurements.push(ku.measurementType),this.supportedMeasurements.push(Hu.measurementType),this.supportedMeasurements.push(Su.measurementType),this.useCartesianIn3D||(this.supportedMeasurements.push(_u.measurementType),this.supportedMeasurements.push(vu.measurementType))):e instanceof ui&&(this._transformOnMove=!1,this.obliqueListener||(this.obliqueListener=this.framework.subscribe("OBLIQUE_IMAGE_CHANGED",this.obliqueImageChangeHandler.bind(this))),this.supportedMeasurements.push(Pu.measurementType),this.supportedMeasurements.push(ku.measurementType),this.supportedMeasurements.push(Iu.measurementType))}checkObliqueMeasurementIsSupported(e,t){if(e.camera&&!this.supportedMeasurements.includes(t))this.supportedMeasurements.push(t);else if(!e.camera&&this.supportedMeasurements.includes(t)){const e=this.supportedMeasurements.indexOf(t);this.supportedMeasurements.splice(e,1)}}obliqueImageChangeHandler(e,t){this.checkObliqueMeasurementIsSupported(t,Iu.measurementType),this.checkObliqueMeasurementIsSupported(t,Pu.measurementType),this.clearMeasurements()}activate(){return super.activate(),this.geometryEditor.activate(),this.featureLayer.activate(!0)}deactivate(){super.deactivate(),this.geometryEditor.deactivate()}createMeasurement(e,t){if(this.state.activeMeasurementId){const e=this.measurements.get(this.state.activeMeasurementId);e.values.isValid||this.removeMeasurement(e)}const i=Ru[e],s=new i({parent:this,startPosition:t,defaultTransformOnMove:this._transformOnMove});this.measurements.set(s.id,s),this.state.activeMeasurementId=s.id,this.state.measurementsSize=this.measurements.size,this._setTransformOnMove(s)}_setTransformOnMove(e){this.geometryEditor.state.transformGeometryOnMove=e&&null!==e.forceMove?e.forceMove:this._transformOnMove,this.geometryEditor.state.onlyAllowTranslation=e&&(e.values.type===Su.measurementType||e.values.type===Iu.measurementType)}removeMeasurement(e){e.destroy(),this.state.activeMeasurementId===e.id&&(this.state.activeMeasurementId=null),this.measurements.delete(e.id),this.state.measurementsSize=this.measurements.size}clearMeasurements(){this.measurements.forEach(e=>{e.destroy()}),this.measurements.clear(),this.state.measurementsSize=this.measurements.size,this.activeMeasurement=null,this.state.activeMeasurementId=null}onSelect(){if(this.geometryEditor.features.size){this.state.activeMeasurementId=this.geometryEditor.state.selectedFeatureId;const e=this.measurements.get(this.state.activeMeasurementId);this._setTransformOnMove(e)}else this.state.activeMeasurementId=null}getConfigObject(){const e=super.getConfigObject();return e.style=this.featureLayer.style.getOptions(),e.decimalPlaces=this.decimalPlaces,this.allowedMeasurements!==zu&&(e.allowedMeasurements=this.allowedMeasurements),e}}var Bu=Vu;class Uu extends Bu{static get className(){return"vcs.vcm.widgets.SingleMeasurement"}constructor(e){e.className=Uu.className,e.allowedMeasurements=e.allowedMeasurements||["distance","cartesianDistance","verticalHeight","obliqueHeight"],super(e),this.state=this.state,this.mapClickListener=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.state=this.state,this.state.activeSingleMeasurementType=null}return!0}createMeasurement(e,t){this.clearMeasurements(),super.createMeasurement(e,t),this.state.activeSingleMeasurementType=e,this.mapClickListener&&this.framework.unsubscribeByKey(this.mapClickListener),this.mapClickListener=this.framework.subscribeOnce("CLICKED",t=>{if(this.active){const i=this.framework.getActiveMap()instanceof ui?t.obliqueParameters.pixel:S.wgs84ToMercator([t.longitude,t.latitude,t.height]);this.createMeasurement(e,i)}})}deactivate(){super.deactivate(),this.mapClickListener&&(this.framework.unsubscribeByKey(this.mapClickListener),this.mapClickListener=null),this.featureLayer.activate(!1),this.clearMeasurements()}}var Wu=Uu;const qu={north:"moveForward",south:"moveBackward",west:"moveLeft",east:"moveRight",increaseFOV:"increaseFOV",decreaseFOV:"decreaseFOV",up:"moveUp",down:"moveDown",tiltUp:"tiltUp",tiltDown:"tiltDown",rotateEast:"rotateEast",rotateWest:"rotateWest"};class Ju extends kr{static get className(){return"vcs.vcm.widgets.NavigationControls"}static get navigationModeFlags(){return qu}constructor(e){e.className=Ju.className,super(e),this.zoomFactor=Object(c["g"])(e.zoomFactor,2),this.moveFactor=Object(c["g"])(e.moveFactor,1.5),this.tiltFactor=Object(c["g"])(e.tiltFactor,10),this.walkModeMoveFactor=Object(c["g"])(e.walkModeMoveFactor,1),this.animationDuration=Object(c["g"])(e.animationDuration,.5),this.animation=null==e.animation||e.animation,this.showZoomButtons=null==e.showZoomButtons||e.showZoomButtons,this.showTiltButtons=null==e.showTiltButtons||e.showTiltButtons,this.showCompass=null==e.showCompass||e.showCompass,this.showHomeButton=null==e.showHomeButton||e.showHomeButton,this.pedestrianMode=null==e.pedestrianMode||e.pedestrianMode,this.pedestrianModeReferenceHeight=Object(c["g"])(e.pedestrianModeReferenceHeight,1.6),this.obliqueMoveImage=null==e.obliqueMoveImage||e.obliqueMoveImage,this.obliqueMoveImageDirectionDeviation=Object(c["g"])(e.obliqueMoveImageDirectionDeviation,Math.PI/4),this.rotationPerFrame=Object(c["g"])(e.rotationPerFrame,.5),this.timePerRotation=Object(c["g"])(e.timePerRotation,20),!e.timePerRotation&&e.rotationPerFrame&&(this.timePerRotation=6/this.rotationPerFrame),this.initializedForCesium=!1,this.initializedForOpenlayers=!1,this.initializedForOblique=!1,this.rotationActive=!1,this.tapedTwice=!1,this.navigationMode=ue.getInstance(),this.navigationMode.setOptions({referenceHeight:this.pedestrianModeReferenceHeight,moveFactor:this.walkModeMoveFactor}),this.mapClickListenerKey=null,this.values={heading:0,walkmode:!1,rotation:!1,pedestrianMode:this.pedestrianMode,referenceHeight:this.pedestrianModeReferenceHeight,active:!1},this.navigationMode.setValues(this.values),this._navigationModeFlags=Ju.navigationModeFlags,this._obliqueMoving=!1}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return;document.addEventListener("keydown",this.keyDownListener.bind(this),!1),document.addEventListener("keyup",this.keyUpListener.bind(this),!1),this.mapChangedHandler(this.framework.getActiveMap()),this.framework.subscribe(I.MAP_ACTIVATED,this.mapChangedHandler.bind(this)),this.initialized=!0}}keyDownListener(e){if(!Object(c["b"])(e))switch(e.keyCode){case 38:this.moveButtonPressed("north");break;case 40:this.moveButtonPressed("south");break;case 37:this.moveButtonPressed("west");break;case 39:this.moveButtonPressed("east");break;case 107:this.zoomButtonPressed("zoomIn");break;case 109:this.zoomButtonPressed("zoomOut");break;case 33:this.tiltButtonPressed("tiltUp");break;case 34:this.tiltButtonPressed("tiltDown");break;case 36:this.rotateButtonPressed("rotateEast");break;case 35:this.rotateButtonPressed("rotateWest");break;default:break}}keyUpListener(e){if(!Object(c["b"])(e))switch(e.keyCode){case 38:this.moveButtonUp("north");break;case 40:this.moveButtonUp("south");break;case 37:this.moveButtonUp("west");break;case 39:this.moveButtonUp("east");break;case 107:this.fovButtonUp("zoomIn");break;case 109:this.fovButtonUp("zoomOut");break;case 33:this.tiltButtonUp("tiltUp");break;case 34:this.tiltButtonUp("tiltDown");break;case 36:this.rotateButtonUp("rotateEast");break;case 35:this.rotateButtonUp("rotateWest");break;default:break}}mapChangedHandler(e){e.isInitialized()&&(e instanceof Mt?this.activateForCesium():e instanceof _i?this.activateForOpenlayers():e instanceof ui&&this.activateForOblique())}activateForCesium(){if(!this.initializedForCesium){const e=this.framework.getActiveMap();this.cesiumViewer=e.getCesiumWidget(),this.cesiumScene=this.cesiumViewer.scene,this.cesiumCamera=this.cesiumScene.camera,this.cesiumPostRenderBind=this.postRenderHandlerCesium.bind(this),this.cesiumScene.postRender.addEventListener(this.cesiumPostRenderBind),this.initializedForCesium=!0}}postRenderHandlerCesium(){const e=Cesium.Math.toDegrees(this.cesiumCamera.heading);(!this.values.heading||this.values.heading<e-.5||this.values.heading>e+.5)&&(this.values.heading=e)}activateForOpenlayers(){this.initializedForOpenlayers||(this.ol3MapObject=this.framework.getActiveMap(),this.ol3Map=this.ol3MapObject.getOl3Map(),this.ol3Map.on("postrender",this.postRenderHandlerOpenlayers.bind(this)),this.initializedForOpenlayers=!0)}postRenderHandlerOpenlayers(){const e=this.framework.getActiveMap();if(e){const t=e.getViewPoint(!1);t&&(this.values.heading=t.getHeading())}}activateForOblique(){this.initializedForOblique||(this.framework.subscribe(I.OBLIQUE_IMAGE_CHANGED,this.obliqueImageChange,this),this.initializedForOblique=!0);const e=this.framework.getActiveMap(),t=e.activeLayer;t&&t.currentImage&&this.obliqueImageChange(t)}obliqueImageChange(e,t){const i=t||e.currentImage,s={[h["a"].NORTH]:0,[h["a"].EAST]:90,[h["a"].SOUTH]:180,[h["a"].WEST]:270};this.values.heading=i.viewDirectionAngle?90-Cesium.Math.toDegrees(i.viewDirectionAngle):s[i.viewDirection]}computeNewGroundPosition(e,t){const i=t.getGroundPosition(),s=this.calculateBearing(e,t.getHeading()),r=t.getDistance()/this.moveFactor,n=wt([i[0],i[1]],r,s);return n[2]=i[2],n}calculateBearing(e,t){let i;return i="north"===e?t:"east"===e?t+90:"south"===e?t+180:"west"===e?t+270:t,i%=360,i}computeNewCameraPosition(e,t){const i=t.getCameraPosition(),s=this.calculateBearing(e,t.getHeading()),r=2e3/this.moveFactor,n=wt([i[0],i[1]],r,s);return n[2]=i[2],n}moveButtonPressed(e){if(this.navigationMode.isActive())this.navigationMode.setFlag(this._navigationModeFlags[e],!0);else{const t=this.framework.getActiveMap();if(this.obliqueMoveImage&&t instanceof ui){if(this._obliqueMoving||!t.activeLayer)return;const i=t.activeLayer.currentDirection;this._obliqueMoving=!0,t.getViewPoint(null,!0).then(t=>{const s=t.getHeading(),r=this.calculateBearing(e,s);return i.getImageIdInDirection(2*Math.PI-(r*Math.PI/180-Math.PI/2),this.obliqueMoveImageDirectionDeviation)}).then(e=>{return e?i.setImageOnMap(e):e}).catch(e=>{this.logger.warning(e.message)}).then(()=>{this._obliqueMoving=!1})}else t.getViewPoint(null,!0).then(i=>{i.getGroundPosition()?(i.setGroundPosition(this.computeNewGroundPosition(e,i)),i.setCameraPosition(null)):(i.setCameraPosition(this.computeNewCameraPosition(e,i)),i.setGroundPosition(null)),i.setAnimate(this.animation),t.gotoViewPoint(i,this.animationDuration,0)})}}moveButtonUp(e){this.navigationMode.isActive()&&this.navigationMode.setFlag(this._navigationModeFlags[e],!1)}compassPointerClicked(e){this.navigationMode.isActive()?this.navigationMode.setHeading(e):this.framework.getActiveMap().getViewPoint(!0,!0).then(t=>{t.setHeading(e),t.setAnimate(!0),t.setRoll(0),t.getGroundPosition()&&t.setCameraPosition(null),this.framework.getActiveMap().gotoViewPoint(t,1,0)})}compassPointerDown(){const e=this.framework.getActiveMap().getViewPoint();e.setAnimate(!1),e.getGroundPosition()&&e.setCameraPosition(null),this.compassPointerPressedViewpoint=e}compassPointerDragged(e){this.navigationMode.isActive()?this.navigationMode.setHeading(e):this.compassPointerPressedViewpoint&&(this.compassPointerPressedViewpoint.setHeading(e),this.framework.getActiveMap().gotoViewPoint(this.compassPointerPressedViewpoint,1,0))}fovButtonPressed(e){this.navigationMode.isActive()&&this.navigationMode.setFlag(this._navigationModeFlags[e],!0)}fovButtonUp(e){this.navigationMode.isActive()&&this.navigationMode.setFlag(this._navigationModeFlags[e],!1)}zoomButtonPressed(e){this.navigationMode.isActive()||this.framework.getActiveMap().getViewPoint(null,!0).then(t=>{"zoomIn"===e?t.setDistance(t.getDistance()/this.zoomFactor):t.setDistance(t.getDistance()*this.zoomFactor),t.setAnimate(this.animation),t.setCameraPosition(null),this.framework.getActiveMap().gotoViewPoint(t,this.animationDuration,0)})}tiltButtonPressed(e){if(this.navigationMode.isActive())this.navigationMode.setFlag(this._navigationModeFlags[e],!0);else if(this.framework.getActiveMap()instanceof Mt){const t=this.framework.getActiveMap().getViewPoint(),i=t.getPitch();let s=i;if(s="tiltUp"===e?i-this.tiltFactor:i+this.tiltFactor,s>-10&&(s=-10),s<-90&&(s=-90),t.setPitch(s),t.setAnimate(this.animation),!t.getGroundPosition())return;t.setCameraPosition(null),this.framework.getActiveMap().gotoViewPoint(t,this.animationDuration,0)}}tiltButtonUp(e){this.navigationMode.isActive()&&this.navigationMode.setFlag(this._navigationModeFlags[e],!1)}rotateButtonPressed(e){if(this.navigationMode.isActive())this.navigationMode.setFlag(this._navigationModeFlags[e],!0);else{const t=this.framework.getActiveMap();if(t instanceof Mt||t instanceof _i&&!t.fixedNorthOrientation){const t=this.framework.getActiveMap().getViewPoint(),i=t.getHeading();let s=i;if("rotateEast"===e?s+=10:s-=10,t.setHeading(s),t.setAnimate(this.animation),!t.getGroundPosition())return;t.setCameraPosition(null),this.framework.getActiveMap().gotoViewPoint(t,this.animationDuration,0)}}}rotateButtonUp(e){this.navigationMode.isActive()&&this.navigationMode.setFlag(this._navigationModeFlags[e],!1)}rotateCenterClicked(){const e=this.framework.getActiveMap();e instanceof Mt&&(this.rotationActive?this.navigationMode.isActive()?(this.navigationMode.setFlag("rotation",!1),this.rotationActive=!1,this.values.rotation=!1):this.rotateAroundCenterPosition(e,!1):this.navigationMode.isActive()?(this.navigationMode.setFlag("rotation",!0),this.rotationActive=!0,this.values.rotation=!0):this.rotateAroundCenterPosition(e,!0))}rotateAroundCenterPosition(e,t){const i=e.getCesiumWidget(),s=i.scene;if(t!==this.rotationActive)if(t){const e=this.framework.getActiveMap().getViewPoint();e.getGroundPosition()&&(this.rotationActive=!0,this.values.rotation=!0,e.setCameraPosition(null),this.cesiumRotateCenterBind=this.rotateCenter.bind(this,e),s.postRender.addEventListener(this.cesiumRotateCenterBind))}else this.cesiumRotateCenterBind&&(s.postRender.removeEventListener(this.cesiumRotateCenterBind),this.cesiumRotateCenterBind=null,this.rotationActive=!1,this.values.rotation=!1)}rotateCenter(e){let t=this.timeLastTick?this.cesiumViewer.clock.currentTime.secondsOfDay-this.timeLastTick.secondsOfDay:1/60;(t<=0||t>1)&&(t=1/60);const i=t/(1/60);this.timeLastTick=this.cesiumViewer.clock.currentTime;const s=360/(60*this.timePerRotation/i);e.setHeading(e.getHeading()+s),this.framework.getActiveMap().gotoViewPoint(e,this.animationDuration,0)}getConfigObject(){const e=super.getConfigObject();return e.zoomFactor=this.zoomFactor,e.moveFactor=this.moveFactor,e.tiltFactor=this.tiltFactor,e.animationDuration=this.animationDuration,e.animation=this.animation,e.showZoomButtons=this.showZoomButtons,e.showTiltButtons=this.showTiltButtons,e.showHomeButton=this.showHomeButton,e.pedestrianMode=this.pedestrianMode,e.pedestrianModeReferenceHeight=this.pedestrianModeReferenceHeight,e.showCompass=this.showCompass,e.rotationPerFrame=this.rotationPerFrame,e.walkModeMoveFactor=this.walkModeMoveFactor,e}dispose(){document.removeEventListener("keyup",this.keyUpListener.bind(this),!1),document.removeEventListener("keydown",this.keyDownListener.bind(this),!1)}getValuesObject(){return this.values}mapClicked(e){if(e&&e.longitude&&e.latitude&&e.height){const t=[e.longitude,e.latitude,e.height];t[2]+=Number.parseFloat(this.values.referenceHeight);const i=this.framework.getActiveMap().getViewPoint();i.setAnimate(!0),i.setGroundPosition(t),i.setCameraPosition(null),i.setDistance(0),i.setPitch(0),i.setRoll(0),this.navigationMode.activateFirstPersonMode(i),this.framework.getMapContainer().style.cursor="auto",this.mapClickListenerKey=null}}activateNavigationMode(e){if(e)if(null==this.mapClickListenerKey){function t(e){const t=encodeURIComponent(e).replace(/%20/g," ").replace(/%3D/g,"=").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%22/g,"'");return`data:image/svg+xml,${t}`}const e='<svg width="24" height="24" viewBox="0 0 93.646 93.646" xmlns="http://www.w3.org/2000/svg"><path d="M67.971,49.778l-9.378-10.345c-0.584-0.644-1.121-1.971-1.148-2.841L57.1,25.858v-0.311c0-1.654-1.346-3-3-3h-9.18h-3.648\n\t\tc-1.478,0-3.127,1.047-3.756,2.384l-12.358,26.25c-0.342,0.728-0.376,1.541-0.096,2.292c0.28,0.75,0.84,1.342,1.575,1.666\n\t\tl1.821,0.803c0.388,0.171,0.802,0.258,1.231,0.258h0c1.177,0,2.273-0.669,2.794-1.704l5.789-11.517v11.576\n\t\tc-0.024,0.067-0.059,0.128-0.081,0.196l-9.783,30.638c-0.407,1.276-0.283,2.619,0.35,3.781s1.693,1.994,2.987,2.343l0.654,0.177\n\t\tc0.428,0.116,0.872,0.175,1.318,0.175c2.251,0,4.296-1.481,4.974-3.603l9.141-28.628l3.242,7.941\n\t\tc0.791,1.937,1.645,5.329,1.865,7.409l1.551,14.621c0.249,2.341,2.1,4.04,4.402,4.04c0.377,0,0.76-0.046,1.137-0.137l0.659-0.16\n\t\tc2.624-0.635,4.478-3.331,4.133-6.008l-2.297-17.828c-0.292-2.265-1.269-5.812-2.178-7.907l-3.102-7.144\n\t\tc-0.04-0.093-0.097-0.177-0.143-0.267v-4.841l5.59,5.836c0.556,0.581,1.3,0.901,2.094,0.901c0.803,0,1.553-0.326,2.111-0.918\n\t\tl1.034-1.098C69.036,52.899,69.055,50.973,67.971,49.778z"/>\n\t<path d="M48.52,20.005c5.516,0,10.003-4.487,10.003-10.003C58.523,4.487,54.036,0,48.52,0c-5.515,0-10.001,4.487-10.001,10.002\n\t\tC38.518,15.518,43.005,20.005,48.52,20.005z"/></svg>';this.framework.getMapContainer().style.cursor=`url("${t(e)}"), pointer`,this.mapClickListenerKey=this.framework.subscribeOnceExclusive("MAP_CLICKED",this.mapClicked.bind(this),"walkMode",this.activateNavigationMode.bind(this,!0))}else this.framework.unsubscribeByKey(this.mapClickListenerKey),this.mapClickListenerKey=null,this.framework.getMapContainer().style.cursor="auto";else this.navigationMode.activateOverviewMode()}setReferenceHeight(e){this.values.referenceHeight=e}}var Ku=Ju;class Zu extends kr{static get className(){return"vcs.vcm.widgets.OverviewMap"}constructor(e){e.className=Zu.className,super(e),this.initialized=!1,this.mapContainerId=e.containerId||"vcm_overviewmap_container";let t=e.cameraIcon;t&&""!==t||(t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA8CAYAAADxJz2MAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDphMzhlODgyYy00ZGYzLTZkNGMtYWZhYy1hYTkwOTI3MjRiYjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEYxRkE1MDlENjRDMTFFNTlGRjhFMzM3RTA3MDJFMDciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEYxRkE1MDhENjRDMTFFNTlGRjhFMzM3RTA3MDJFMDciIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OGJiODg5ODItZGM0Zi0xNjQyLWEyZDYtODJkZTcxMGNhNjkwIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzY5MTdhNjAtZDYzYy0xMWU1LThjNTgtYTMwNjE0MWQwNTkyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Fn8KKQAABwVJREFUeNrsW0toHVUYPufOvb2madNaa2NS3682BTcKiQqx4qO0i7gKpHFhoCBoG8SVC124ExcW02yCiFCQ4iLgIhWJCE2pYI1J1VitNFhTIz5STdI2D2tucsf/N9/YcTKvM+fMbYT54eu9nTvnzMx3/veZSNu2RSbJJZdRkBGYEZgRmBGYSUZgRmBGYEZgJslkTUZBoEjXpxcsxTz9U0OYIfxFsAi2a5DtOjnpxU09RNS9SEPXiXN8kbCWUCWhgZsIf+Am3WYdh0BpkFipeG3v2LhjdM4pgyPmbMI5aT1hHeECIV+BVVXRLJ17kR6LSnqOl8AbCZNsue4BWzAB/1B0TapLpEyJmDTcR9SCL4C8K4Tf+Jh3wK2EecIsoWDIFE1qSxoExvV9JcQLttAxfC7lPSdNgMQlqKpUuJht6MZ15gsao7OgElxw0NhAGMXvzJHtNzGzfBPILBj2dyY00ZT2qURdJmsr4TxcnCNW0CR1IPJ3RGk74YWTPITU0BTTGYLj92pB3E/e38MusAP5zsUQTayELxIKrkRX04SP39sEDfxGdRLWvPsIUyAyl1LkTMPkpAErYNKugyUOgUzlC20mbIfq5lN4gDiBREfTdYjka9cTRlBkJL7AnZjo54C6OY2bNz2n6mKUEDTOEX7Qzaf4wg+AvMkYzYc0nLkp7Y6zUCVY3gxMV5ggkIPITkw6j6aDCZMySYYJTV9CSVtF+Bi+P1TyEb/brlX5itCI77kKpy3SIKEyQlFY+47HIc+PQOnJ+dzH2ZGOI6iMeVIb1crBpCbqdleky+/dRvgyLGhEERj1nse3SCq3olIpKnYyZMqEJFkIJ1m+hfAL4YyCRVlJzJCDSAs6ErMuf5im9kmFVphqX3ARNS4r0/sgU8ZQpshKJCo/fAor5m46mCidTJmxVLBCrv17YbpOV76cxITjCl9omPAgCuxCism0aZ8oPfkem+4JPJP0IU6C1EWTBLJ8Dad7ByqVotDrLqdR74ZdawFFwhgyDG8skB5XYayD4hbeCniGcJkw55MfphkM4vq+oPZUDSznHfhz6dN1klGmbGLn7GaQ+CNuLFfhiJpEg3mhbye87WpRxQ0cxglkeYjwuLja6r4W3ZW448pwOx8STuo+eN4QgSeRG25Hsl1IITdUMeOg30og77SHPD/ti/R/JjXQWYwXQN6kYvsrKtE1USpyFN2CWv6gx7eFER9KoGXQzPmGfiU8BqdsY/4kyAHu716EjfOex89QTdhIeAtNESNi+UQdHbmI6qQZ3/OuPMrvwXIRsGIej1oMlnsJ7xG+03i+FRzlfXKfuBMFqfanhHsI9/s0HUxFXZXx7PfuJnxuImjoNhPiyhHcNKc4F3w0PY2A4pcLLuIe2CreNfBcdhIfmETYH35P2IXccAmLlcRs44zxmrLTr6xBo+B1wrSG2WoFEWW/ALkMP/gEPi2NQBDlD60A4jll6UGLqhBQ50ZJLsQyZVoa6AjnhLyvynsqU3gIGUKIqrYF/WYjaHxEOKrpnuw02lmqfvYN1M0TCZJ31Y4L+716dFdeEjFb8ybSGFOmLH384Rn0D8vi6iZ9TlMDpc8xgVyPF+tVwqWUePv3WS2DjtWvm+HIJfjBXfiuQlTOExjCxhYQdd8UAa9iGPb3tkkCo87hDeo65IeTrgohqZ+zfPwed1g+EMut+TRK1xX1cSV8oFs7eb+1C4FlIqB/aAv1Xb4y/N55wosJC4DUfWBUqSdjnMf+j3f2Wlz+0PLxa+7PMDh+rwaL83LCOjdxZWQp1MEyomOSi6k1F2HCj4rltroISEOEy8zd//cGEvZ71xMOieUXgVQty5mzrKOBJt4yUDGNczC5HWgvOWSUQQhr0w3ooFThmFNTL7mIZeEdwgGUj0nbYXZCLRWWpk/TiWCfEZ4Uy2+9z2G+WhBWPHDgwK6urq5txWJx8/Dw8ATGrANmMReP5a3VV0KsJKhZauSFJ1lhAr1j7kJQYb+1trW19ZG2traNp06dkvv37y/39vbKwcFBMT09faWurq6qvb3d3rNnzxHkeX+CzOfE8qt3sTaBTEvSPza0E46RPqbMOdv6lpaWnYcPH97Q2NgoSqWS6OvrkwMDA3J+fl6SFlZNTU2J5uZmMTMz87SLvIMgz5m/7NGu1LOMfIUWKuxBjhFaScNK1dXVcm5uTpw9e5axYszs7Kyora2VII1fvz1ucIGveSmnI8fIbB9uaGiob2pqWlMoFMTIyMh/COzo6LBZOzs7Ow8NDQ1xo+DZtOvc/5twRD5KBJ2wbXtkdHS03NPT8w/4Ox1boMDyCbor21bLTctVRmItkuGqffv2Lezdu/d5STI+Pj7V3d1NSjnC25GvieUud0ZgiHC93LR7927enBL9/f2seYOEL1bbjf4twAD8sqEzJ5yLRwAAAABJRU5ErkJggg=="),this.imageStyle=new ol.style.Icon({src:t,anchor:e.anchorPosition||[.5,.5]}),this.singleVectorObliqueResolutionFactor=Object(c["h"])(e.singleVectorObliqueResolutionFactor,2),this.activeOnStartup=e.activeOnStartup||!1,this.showOnlyActiveObliqueTile=!1;let i={fill:{color:"rgba(255,255,255,0.1)"},stroke:{color:"#a8c02b",width:1}},s={fill:{color:"rgba(255,255,255,0.8)"},stroke:{color:"#a8c02b",width:3}};null!=e.oblique&&(this.showOnlyActiveObliqueTile=e.oblique.showOnlyActiveTile||!1,i=e.oblique.unselectedStyle||i,s=e.oblique.selectedStyle||s),this.unselectedObliqueTileStyle=new ol.style.Style({fill:i.fill?new ol.style.Fill(i.fill):null,stroke:i.stroke?new ol.style.Stroke(i.stroke):null}),this.selectedObliqueTileStyle=new ol.style.Style({fill:s.fill?new ol.style.Fill(s.fill):null,stroke:s.stroke?new ol.style.Stroke(s.stroke):null}),this.featureSet=!1,this.layerName=e.layerName||null,this.selectInteraction=null,this.layer=null,this.vectorSource=new ol.source.Vector({}),this.overviewMap=null,this.activeListener=null,this.oblique=!1,this.values={active:!1},this.initialized=!1,this._cachedViewPoint=null,this.minimumHeight=Object(c["h"])(e.minimumHeight,150)}initialize(){if(!this.initialized){const t=super.initialize();if(!t||!this.layerName)return!1;this.layer=this.framework.getLayerByName(this.layerName);try{a(this.layer,[ir,mr,pr,er])}catch(e){return!1}this.mapActivatedSubscribeKey=this.framework.subscribe(I.MAP_ACTIVATED,this.resetOverviewWidget.bind(this)),this.initialized=!0,this.initializedFinished()}return!0}resetOverviewWidget(){this.values.active&&(this.deactivate(),this.activate())}createMap(){const e=this.layer.getImplementationObject(_i.className),t=e.getOLLayer(),i=new ol.layer.Vector({source:this.vectorSource});return this.overviewMap=new ol.Map({target:this.mapContainerId,layers:[t,i],controls:[],interactions:[],renderer:"canvas"}),t.setVisible(!0),this.overviewMap.setSize([320,190]),new Promise(e=>{this.overviewMap.once("postrender",e)})}updateSize(){this.overviewMap&&(this.overviewMap.updateSize(),this.oblique||this.addCameraFeature())}activate(){this.values.active=!0;const e=this.overviewMap?Promise.resolve():this.createMap();e.then(()=>{super.activate(),this.overviewMap.once("postcompose",this.updateSize,this);const e=this.framework.getActiveMap();e instanceof Mt?this.initializeForCesium(e):e instanceof _i?this.initializeForOpenlayers(e):e instanceof ui&&this.initializeForOblique(e)})}deactivate(){this.activeListener&&(this.activeListener(),this.activeListener=null),super.deactivate(),this.values.active=!1,this.vectorSource.clear(),this.featureSet=!1}initializeForCesium(e){if(e.isInitialized()){const t=e.getCesiumWidget(),i=t.scene;this.addCameraFeature(),this.activeListener=i.postRender.addEventListener(this.addCameraFeature,this)}}initializeForOpenlayers(e){const t=e.getOl3Map();this.addCameraFeature();const i=t.on("postrender",this.addCameraFeature,this);this.activeListener=()=>{ol.Observable.unByKey(i)}}initializeForOblique(e){this.vectorSource.clear();const t=[];t.push(new ol.interaction.DragPan),t.push(new ol.interaction.MouseWheelZoom),t.push(new ol.interaction.PinchZoom),t.push(new ol.interaction.DragZoom),this.selectInteraction=new ol.interaction.Select({style:this.selectedObliqueTileStyle}),t.push(this.selectInteraction),t.forEach(e=>{this.overviewMap.addInteraction(e)});const i=this.overviewMap.on("singleclick",e=>{if(this.overviewMap.hasFeatureAtPixel(e.pixel)){let t=0;this.overviewMap.forEachFeatureAtPixel(e.pixel,e=>{if(t>=1)return;const i=e.getId();this.obliqueDirection.setImageOnMap(i),t+=1})}else e.stopPropagation()});e.activeLayer&&(this.obliqueDirectionChange(e.activeLayer),this.obliqueImageChange(e.activeLayer));const s=[];s.push(this.framework.subscribe(I.LAYER_ACTIVATED,this.obliqueLayerActivated,this)),s.push(this.framework.subscribe(I.LAYER_DEACTIVATED,this.obliqueLayerDeactivated,this)),s.push(this.framework.subscribe(I.OBLIQUE_DIRECTION_CHANGED,this.obliqueDirectionChange,this)),s.push(this.framework.subscribe(I.OBLIQUE_IMAGE_CHANGED,this.obliqueImageChange,this)),this.activeListener=()=>{this.obliqueDirection&&this.overviewMap.removeLayer(this.obliqueDirection.footPrintsLayer),t.forEach(e=>{this.overviewMap.removeInteraction(e)}),s.forEach(e=>{this.framework.unsubscribeByKey(e)}),ol.Observable.unByKey(i),this.oblique=!1},this.oblique=!0}obliqueLayerDeactivated(e){e instanceof ci&&(this.selectInteraction.getFeatures().clear(),this.obliqueDirection&&this.overviewMap.removeLayer(this.obliqueDirection.footPrintsLayer))}obliqueLayerActivated(e){e instanceof ci&&(this.obliqueDirectionChange(e),this.obliqueImageChange(e))}obliqueDirectionChange(e,t){if(this.obliqueDirection&&this.overviewMap.removeLayer(this.obliqueDirection.footPrintsLayer),this.obliqueDirection=t||e.currentDirection,this.obliqueDirection){const e=this.obliqueDirection.footPrintsLayer;this.showOnlyActiveObliqueTile?e.setStyle(e=>{const t=this.obliqueDirection.currentImage;return t&&!e.getId()===t.name?this.unselectedObliqueTileStyle:null}):e.setStyle(this.unselectedObliqueTileStyle),this.overviewMap.addLayer(e)}}obliqueImageChange(e,t){if(!this.obliqueDirection)return;const i=t||e.currentImage,s=this.selectInteraction.getFeatures();s.clear();const r=this.obliqueDirection.footPrintsLayer.getSource().getFeatureById(i.name);if(r){this.selectInteraction.getFeatures().push(r),this.overviewMap.getView().fit(r.getGeometry().getExtent());const e=this.overviewMap.getView().getResolution();this.overviewMap.getView().setResolution(e*this.singleVectorObliqueResolutionFactor)}}_detectChange(e,t,i){let s=!0;if(this.featureSet&&this._cachedViewPoint){const r=this._cachedViewPoint.position.some((t,i)=>e[i]!==t);s=r||this._cachedViewPoint.heading!==t||this._cachedViewPoint.distance!==i}return s&&(this._cachedViewPoint={position:e,heading:t,distance:i}),s}addCameraFeature(){const e=this.framework.getActiveMap().getViewPoint();if(!e||!e.isValid())return;const t=e.getGroundPosition(),i=e.getCameraPosition()||t,s=e.getHeading();let r=e.getDistance();!i[2]||r&&r<4*i[2]||(r=4*i[2]);const n=!this._detectChange(i,s,r);if(n)return;const a=ue.getInstance();if(a.values.walkmode&&(r=a.referenceHeight),r=r>this.minimumHeight?r:this.minimumHeight,null==s||null==r)return;let o;if(this.featureSet)o=this.vectorSource.getFeatureById("cameraFeature");else{const e=new ol.geom.Point([i[0],i[1]]);o=new ol.Feature({geometry:e}),o.setId("cameraFeature"),o.setStyle(new ol.style.Style({image:this.imageStyle})),this.vectorSource.addFeature(o),this.featureSet=!0}o.getGeometry().setCoordinates(S.wgs84ToMercator(i));const l=e.getHeading(),c=Cesium.Math.toRadians(l);this.imageStyle.setRotation(c),e.setHeading(0),e.setCameraPosition(i),e.setGroundPosition(null),e.setDistance(4*r),_i.prototype.gotoViewPoint.call({ol3map:this.overviewMap},e)}getConfigObject(){const e=super.getConfigObject();return e.layerName=this.layerName,e.iconStyleObject={src:this.imageStyle.getSrc(),anchor:this.imageStyle.getAnchor()},e.minimumHeight=this.minimumHeight,e}dispose(){this.deactivate(),this.framework.unsubscribeByKey(this.mapActivatedSubscribeKey)}}var Qu=Zu,$u=i(438),Xu=i.n($u);function ed(e,t){return!e.active||e.cesium3DTileset.tilesLoaded?Promise.resolve():new Promise(i=>{let s;const r=e.cesium3DTileset.allTilesLoaded.addEventListener(()=>{s&&clearTimeout(s),r(),i()});null!=t&&(s=setTimeout(()=>{r(),i()},t))})}function td(e,t){return e.tilesLoaded?Promise.resolve():new Promise(i=>{let s;const r=e.tileLoadProgressEvent.addEventListener(e=>{e<1&&(s&&clearTimeout(s),r(),i())});null!=t&&(s=setTimeout(()=>{r(),i()},t))})}function id(e){return new Promise(t=>{const i=e.getLayers().getArray().filter(e=>e instanceof ol.layer.Tile&&e.getVisible()).map(e=>e.getSource()),s=i.length,r=new Array(3*s);let n,a=-1,o=0,l=null;function c(){o+=1}function h(){a+=1,l&&(clearTimeout(l),l=null),o<=a&&(l=setTimeout(()=>{ol.Observable.unByKey(r),t(n)},500))}e.once("postcompose",e=>{if(n=e.context.canvas,0===s)setTimeout(()=>{t(n)},500);else{for(let e=0;e<s;e++)r[e]=i[e].on("tileloadstart",c),r[e+1]=i[e].on("tileloadend",h),r[e+2]=i[e].on("tileloaderror",h);h()}}),e.renderSync()})}var sd=i(447),rd=i.n(sd);function nd(e,t){const i=document.createElement("a");i.download=t,i.href=e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function ad(e,t){window.navigator.msSaveBlob?window.navigator.msSaveOrOpenBlob(e,t):nd(URL.createObjectURL(e),t)}function od(e,t){window.navigator.msSaveBlob?ad(new Blob([e]),t):nd(`data:text/plain;charset=utf-8, ${encodeURIComponent(e)}`,t)}function ld(e,t,i){null!=e.toBlob?e.toBlob(e=>{ad(e,t)},i):window.navigator.msSaveBlob&&ad(e.msToBlob(),t)}const cd={LANDSCAPE:"landscape",PORTRAIT:"portrait",BOTH:"both"},hd=v.getLogger("vcs.vcm.widgets.PDFCreator"),ud=16777216,dd=4194304;function md(e){let t=e;if(Array.isArray(t)){if(4===t.length)return t;if(2===t.length)return[t[0],t[1],t[0],t[1]];t=t[0]}const i=Object(c["h"])(t,40);return new Array(4).fill(i)}class gd extends kr{static get className(){return"vcs.vcm.widgets.PDFCreator"}constructor(e){e.className=gd.className,super(e),this.libraryPromise=null,this.formatList=e.formatList||["A5","A4","A3","A2"],this.orientationMode=Object(c["f"])(e.orientationMode,cd,cd.BOTH);let t=this.orientationMode;t===cd.BOTH&&(t=Object(c["f"])(e.defaultOrientation,cd,cd.PORTRAIT)),t===cd.BOTH&&(t=cd.PORTRAIT),this.defaultOrientation=t,this.title=e.title||null,this.titleImage=e.titleImage||null,this.copyrightText=e.copyrightText||null,this.showTitle=Object(c["e"])(e.showTitle,!0),this.showTitleImage=Object(c["e"])(e.showTitleImage,!0),this.showCopyright=Object(c["e"])(e.showCopyright,!0),this.showComment=Object(c["e"])(e.showComment,!1),this.showTitleInput=Object(c["e"])(e.showTitleInput,!1),this.showBalloons=Object(c["e"])(e.showBalloons,!0),this.showNorthPoint=Object(c["e"])(e.showNorthPoint,!0),this.showHeaderLine=Object(c["e"])(e.showHeaderLine,!0),this.showScreenshotDownload=Object(c["e"])(e.showScreenshotDownload,!1),this.coordinateProjection=e.projection?new S(e.projection):this.framework.projection,this.imageMimetype=e.imageMimetype||"image/png",this.headerText=e.headerText||null,this.subText=e.subText||null,this.aspectRatio={landscape:Object(c["g"])(e.aspectRatioLandscape,2.22222),portrait:Object(c["g"])(e.aspectRatioPortrait,2.22222)},this.titleImageRatio=Object(c["g"])(e.titleImageRatio,.125),this.pageMargins=md(e.pageMargins),this.defaultRenderingWidth={portrait:Object(c["h"])(e.renderingWidthPortrait,1920),landscape:Object(c["h"])(e.renderingWidthLandscape,1920)},this.warningPixelCount=Object(c["h"])(e.warningPixelCount,this.getPixelCount("A4","landscape",300)),this.headerLineColor=e.headerLineColor||null,this.headerLine={table:{widths:["*"],heights:[.1],body:[[{text:"",fillColor:this.headerLineColor,border:[!1,!1,!1,!1]}]]},layout:"noBorders"},this.footer=e.footer||{},this.header=e.header||{},this.info=e.info||{},this.styles={header:{fontSize:9,bold:!0,margin:[0,0,2,0]},subheader:{bold:!0,fontSize:8,margin:[0,10,0,2]},copyright:{fontSize:6,italics:!0,alignment:"right",padding:[10,10,10,10],margin:[0,-7,1.5,0],color:"#000000",background:"#eeeeee"},tableHeader:{bold:!0,fontSize:8,color:"black"},subheaderText:{fontSize:8}},e.styles&&"object"===typeof e.styles&&Object.assign(this.styles,e.styles),this.northPointImage=e.northPointImage||rd.a,this.loadedTimeout=Object(c["h"])(e.loadedTimeout,3e4),this.floatPrecision=Object(c["h"])(e.floatPrecision,2),this._cancelled=!1,this._reset=()=>{}}createTemplate(e,t,i,s,r){if(!Xu.a[e])return hd.warning("Incorrect format"),{};const n=this.getImagePixel(e,t),a={pageSize:e,pageOrientation:t,content:[],images:{},pageMargins:this.pageMargins,info:this.info},o=this.copyrightText||gd.getCopyrightText();if(i.copyright=o,this.headerText){const e=gd.getJSONFromInput(this.headerText,i);Array.isArray(e)?a.content.push(...e):"object"!==typeof e&&"string"!==typeof e||a.content.push(e)}else{const e={columns:[]},t=this.title||s;e.columns.push({width:"*",text:this.showTitle?`\n${t}`:"",style:"header"}),this.showTitleImage&&e.columns.push({width:n[1]*this.titleImageRatio*2+40,image:"titleImage",alignment:"right",margin:[0,0,0,4],fit:[n[1]*this.titleImageRatio*2,n[1]*this.titleImageRatio]}),a.content.push(e)}if(this.showHeaderLine){if(!this.headerLineColor){const e=gd.getHeaderBottomColorFromElements();this.headerLine.table.body[0][0].fillColor=e}a.content.push(this.headerLine)}if(a.content.push({image:"screenshot",fit:n}),this.showNorthPoint){const e=n[1]*this.titleImageRatio;a.content.push({image:"northPoint",width:e,absolutePosition:{x:this.pageMargins[0]+n[0]-10-e,y:this.pageMargins[1]+20+e}})}if(this.showCopyright&&o&&a.content.push({text:o,style:"copyright"}),a.content.push("\n"),this.subText){const e=this.subText,t=gd.getJSONFromInput(e,i);Array.isArray(t)?a.content.push(...t):"object"!==typeof t&&"string"!==typeof t||a.content.push(t)}return a.images={},this.showTitleImage&&(this.titleImage||r)&&(a.images.titleImage=this.titleImage||r),a.styles=this.styles,a.header=gd.getJSONFromInput(this.header,i),a.footer=gd.getJSONFromInput(this.footer,i),a}static removeMapSpecificContent(e){const t=G.getInstance().getActiveMap();Object(c["a"])(e,e=>{e&&(e.oblique||e.cesium||e.openlayers)&&(t instanceof ui&&!e.oblique?e.text="":t instanceof Mt&&!e.cesium?e.text="":t instanceof _i&&!e.openlayers&&(e.text=""))})}static getJSONFromInput(e,t){let i=e;const s=G.getInstance().getLocale();null!=i[s]&&(i=i[s]);let r=i;if("string"===typeof r)try{r=JSON.parse(i)}catch(a){hd.warning(a.message)}null!=r[s]&&(r=r[s]);let n=JSON.stringify(r);n=gd.replaceTokensInString(n,t);try{r=JSON.parse(n)}catch(a){hd.warning(a.message),r=[]}return gd.removeMapSpecificContent(r),r}static replaceTokensInString(e,t){let i=e;const s=i.match(/\$\{(.*?)\}/g);return s&&Array.isArray(s)&&s.forEach(e=>{const s=e.substring(2,e.length-1),r=s.split(".");let n=t;for(let t=0;t<r.length;t++)n=n&&n[r[t]]?n[r[t]]:"";n=`${n}`.replace(/\n/g,"\\n"),i=i.replace(new RegExp(`\\$\\{${s}\\}`,"g"),n)}),i}static viewpointToFixed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const i={heading:e.heading.toFixed(t),pitch:e.pitch.toFixed(t),roll:e.roll.toFixed(t)};return null!=e.distance&&(i.distance=e.distance.toFixed(t)),e.cameraPosition&&(i.cameraPosition=e.cameraPosition.map(e=>e.toFixed(t))),e.groundPosition&&(i.groundPosition=e.groundPosition.map(e=>e.toFixed(t))),i}collectAdditionalInformation(e){const t=G.getInstance().getActiveMap(),i=new Date;if(e.date=`${i.getUTCDate()}.${i.getUTCMonth()+1}.${i.getUTCFullYear()}`,t){t instanceof ui&&(e.obliqueImage=t.getCurrentImage());const i=t.getViewPoint(!0,!0);return i.then(t=>{const i=S.createGeographicProjection(),s=t.clone();return s.groundPosition=s.groundPosition?this.coordinateProjection.transformFrom(i,s.groundPosition):s.groundPosition,s.cameraPosition=s.cameraPosition?this.coordinateProjection.transformFrom(i,s.cameraPosition):s.cameraPosition,e.projection=this.coordinateProjection,e.viewpoint=gd.viewpointToFixed(t,this.floatPrecision),e.transformedViewpoint=gd.viewpointToFixed(s,this.floatPrecision),e})}return Promise.resolve(e)}static getHeaderBottomColorFromElements(){const e=document.getElementsByTagName("header"),t=e.length>0?e[0]:null;if(t){const e=window.getComputedStyle(t);if(e){const t=e.getPropertyValue("border-bottom-color");if(t){const e=be(t);return Se(e)}}}return"#a8c02b"}getTitleImage(){if(this.titleImage)return Promise.resolve(this.titleImage);const e=document.getElementsByClassName("logo-box"),t=e.length>0?e[0]:null;return t?(0===t.clientHeight&&(t.style.height="5.5rem"),window.html2canvas(t,{scale:3}).then(e=>{return e.toDataURL()})):Promise.reject(new Error("Could get Image DOM"))}getTitle(){if(this.title)return Promise.resolve(this.title);const e=document.getElementsByClassName("vcm_copyright_headerTitle"),t=e.length>0?e[0]:null;return t?Promise.resolve(t.textContent):Promise.reject(new Error("Could get Title from DOM"))}rotateNorthArrow(e){return this.showNorthPoint?new Promise((t,i)=>{const s=this.northPointImage,r=document.createElement("canvas"),n=68,a=68;r.width=n,r.height=a;const o=r.getContext("2d"),l=new Image;l.onload=()=>{o.translate(n/2,a/2),o.rotate(-Cesium.Math.toRadians(e)),o.translate(-n/2,-a/2),o.drawImage(l,0,0),t(r.toDataURL())},l.onerror=()=>{i(new Error("could not load northArrow"))},l.src=s}):Promise.resolve("")}getPixelCount(e,t,i){const s=this.defaultRenderingWidth[t],r=this.getImageWidth(e,t),n=r/s,a=n*i/72;return s*a*(s/this.aspectRatio[t]*a)}getScale(e,t,i){const s=this.defaultRenderingWidth[t],r=this.getImageWidth(e,t),n=r/s,a=n*i/72,o=s*a*(s/this.aspectRatio[t]*a),l=G.getInstance().isIE11?dd:ud;if(o>l){const e=Math.sqrt(l/o);return Math.round(a*e*100)/100}return Math.round(100*a)/100}getImageWidth(e,t){const i=Xu.a[e],s="portrait"===t?i[0]:i[1],r=s-this.pageMargins[0]-this.pageMargins[2];return r}static getCopyrightText(){const e=G.getInstance().getWidgetByType("vcs.vcm.widgets.Copyright");let t="";if(e){const i=e.layerItems,s={};i.forEach(e=>{const t=s[e.provider];if(t){const i=t.years.indexOf(e.year);-1===i&&(t.years.every(t=>Number(t)<Number(e.years))&&(t.url=e.url),t.years.push(e.year))}else s[e.provider]={years:[e.year],url:e.url}});let r=!0;return Object.keys(s).forEach(e=>{r?r=!1:t+=" | ",t+="© ",t+=e,t+=" ",t+=s[e].years.join(", ")}),t}return""}getImagePixel(e,t){const i=this.getImageWidth(e,t);return[i,i/this.aspectRatio[t]]}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0,this.initializedFinished()}return!0}_cancelCheck(){if(this._cancelled)throw new Error("cancelled")}cancelRunning(){this._cancelled=!0,this._reset(),this._reset=()=>{}}createPDF(e,t,i,s){var r=this;return Zc(function*(){const n=yield r._renderImage(e,t,i),a=n.toDataURL();return r.makePDF(a,e,t,s)})()}createImage(e,t,i){var s=this;return Zc(function*(){const r=yield s._renderImage(e,t,i);return ld(r,"screenshot.png",s.imageMimetype),!0})()}_renderImage(e,t,i){var s=this;return Zc(function*(){a(e,String),a(t,["landscape","portrait"]),a(i,Number),s._cancelled=!1,s.libraryPromise||(s.libraryPromise=s.framework.loadLibraries(["lib/vcm_pdf_thirdparty.js"])),yield s.libraryPromise,s._cancelCheck();let r=document.createElement("canvas");const n=s.defaultRenderingWidth[t],o=s.getScale(e,t,i),l=[n,n/s.aspectRatio[t]];r.width=l[0]*o,r.height=l[1]*o;const c=s.framework.getActiveMap();try{if(c instanceof Mt)s._reset=gd.prepareCesiumMap(c,l,o),r=yield s.getImageFromCesium(c,r);else{if(!(c instanceof _i||c instanceof ui))throw new Error("wrong Map");s._reset=gd.prepareOlMap(c,l,o),r=yield s.getImageFromOpenlayers(c,r)}s._cancelCheck(),r=yield s.copyBalloon(r,l,o),s._cancelCheck()}finally{s._reset(),s._reset=()=>{}}return r})()}static prepareCesiumMap(e,t,i){const s=e.getCesiumWidget(),r=s.resolutionScale;return gd.prepareMapForRender(e,t),s.resolutionScale=i,function(){s.resolutionScale=r,gd.prepareMapForRender(e)}}static prepareOlMap(e,t,i){gd.prepareMapForRender(e,t);const s=Object(le["a"])(t,2),r=s[0],n=s[1],a=e.getolMap(),o=a.getSize(),l=a.getView().calculateExtent(o),c=[r*i,n*i];return a.setSize(c),a.getView().fit(l,{size:c,constrainResolution:!1}),a.set("vcs_scale",i,!0),function(){gd.prepareMapForRender(e),a.setSize(o),a.getView().fit(l,{size:o,constrainResolution:!1}),a.unset("vcs_scale",!0),a.renderSync()}}copyBalloon(e,t,i){var s=this;return Zc(function*(){const r=document.getElementById("balloonContainer"),n=Object(le["a"])(t,2),a=n[0],o=n[1];if(s.showBalloons&&r){const t=yield window.html2canvas(r,{width:a,height:o,scale:i,backgroundColor:null}),s=e.getContext("2d"),n=s.getImageData(0,0,a*i,o*i),l=t.getContext("2d").getImageData(0,0,a*i,o*i);let c=!1;for(let e=0;e<n.data.length;e+=4)0!==l.data[e+3]&&(c=!0,n.data[e]=l.data[e],n.data[e+1]=l.data[e+1],n.data[e+2]=l.data[e+2],n.data[e+3]=l.data[e+3]);c&&s.putImageData(n,0,0)}return e})()}static prepareMapForRender(e,t){let i,s;if(t){var r=Object(le["a"])(t,2);i=r[0],s=r[1],i=`${i}px`,s=`${s}px`}else i="auto",s="auto";e.mapElement.style.width=i,e.mapElement.style.height=s,e.disableMovement(!!t)}getImageFromCesium(e,t){var i=this;return Zc(function*(){const s=e.getCesiumWidget();s.render();const r=G.getInstance().getLayers().map(t=>{if(t.active){if(t instanceof ps)return ed(t,i.loadedTimeout);if(t instanceof nr)return ed(t.getImplementation(e),i.loadedTimeout)}return!1}).filter(e=>e);return r.push(td(s.scene.globe,i.loadedTimeout)),yield Promise.all(r),i._cancelCheck(),new Promise((e,r)=>{const n=s.scene.postRender.addEventListener(()=>{if(n(),i._cancelled)r(new Error("cancelled"));else{const i=t.getContext("2d");i.drawImage(s.scene.canvas,0,0),e(t)}})})})()}getImageFromOpenlayers(e,t){const i=e.getolMap();return id(i).then(e=>{this._cancelCheck();const i=t.getContext("2d");return i.drawImage(e,0,0),t})}makePDF(e,t,i,s){var r=this;return Zc(function*(){const n=G.getInstance().getActiveMap().getViewPoint(!1,!1),a=n.getHeading(),o=yield r.getTitle(),l=yield r.getTitleImage(),c=yield r.rotateNorthArrow(a),h=yield r.collectAdditionalInformation(s),u=s.title||o;h.title=u;const d=r.createTemplate(t,i,h,u,l);return d.images.screenshot=e,r.showNorthPoint&&(d.images.northPoint=c),r._cancelCheck(),new Promise(e=>{window.pdfMake.createPdf(d).download("map.pdf",e)})})()}}var pd=gd;class yd extends ie{constructor(e,t,i,s){super(),this.position=e,this.positionDecimalPlaces=i,this.targetTransform="EPSG:3857"!==t.epsg?S.getTransformer(t,S.createMercatorProjection()):null,this._defaultActive=s?Q.CLICK|Q.MOVE:Q.CLICK,this.setActive()}pipe(e){if(!e.position.every(e=>0===e)){let t=e.position;this.targetTransform&&(t=this.targetTransform(e.position,t.slice(),3));let i=3;while(i--)this.position[i]=t[i].toFixed(this.positionDecimalPlaces)}return Promise.resolve(e)}}var _d=yd;class fd extends kr{static get className(){return"vcs.vcm.widgets.PositionDisplay"}constructor(e){e.className=fd.className,super(e),this.position={0:null,1:null,2:null},this.template=e.template||null,this.obliqueImage={name:null,direction:null},this.interaction=new _d(this.position,new S(e.projection),Object(c["h"])(e.positionDecimalPlaces,2),!!e.onMove)}initialize(){return this.initialized||(this.framework.subscribe(I.OBLIQUE_DIRECTION_CHANGED,this.obliqueImageChanged,this),this.framework.subscribe(I.OBLIQUE_IMAGE_CHANGED,this.obliqueImageChanged,this),this.framework.subscribe(I.LAYER_ACTIVATED,this.obliqueImageChanged,this),this.initialized=!0,us().addPersistentInteraction(this.interaction),this.initializedFinished()),!0}obliqueImageChanged(e){if(e instanceof ci){const t=e.currentImage;this.obliqueImage.name=t.name,this.obliqueImage.direction=Object(h["b"])(t.viewDirection)}}getConfigObject(){const e=super.getConfigObject();return e.positionDecimalPlaces=this.interaction.positionDecimalPlaces,e.template=this.template,e.projection=this.options.projection,e}}var vd=fd;class Ld extends kr{static get className(){return"vcs.vcm.widgets.Shadow"}constructor(e){e.className=Ld.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.currentTime=new Date,this.timezone=e.timezone||null,this.activateShadowsOnStartup=!!e.activateShadowsOnStartup,this.values={active:this.active,date:this.currentTime.getTime()}}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.handleMapChangeEvent(this.framework.getActiveMap()),this.activateShadowsOnStartup&&this.toggleShadow(),this.initialized=!0}return!0}activate(){super.activate(),this.map.getScene().shadowMap.enabled=!0,this.setCurrentTimeToMap(),this.values.active=this.active}deactivate(){super.deactivate(),this.map.getScene().shadowMap.enabled=!1,this.map.setDay(this.map.defaultJDate),this.values.active=this.active}handleURLParameter(e){e.shadowTime&&(this.setDate(new Date(e.shadowTime)),this.activate())}getLink(e){this.values.active&&e.addQueryParams({shadowTime:this.currentTime.getTime()})}toggleShadow(){this.map.getScene().shadowMap.enabled?this.deactivate():this.activate()}setMinutesOfDay(e){a(e,Number),this.currentTime.setHours(Math.floor(e/60)),this.currentTime.setMinutes(e%60),this.setDate(this.currentTime)}setDayOfYear(e){a(e,Number);const t=new Date(this.currentTime.getFullYear(),0,e);this.currentTime.setMonth(t.getMonth()),this.currentTime.setDate(t.getDate()),this.setDate(this.currentTime)}setDate(e){a(e,Date),this.currentTime=e,this.values.date=this.currentTime.getTime(),this.setCurrentTimeToMap()}setCurrentTimeToMap(){const e=Cesium.JulianDate.fromDate(this.currentTime);this.map.setDay(e)}handleMapChangeEvent(e){super.handleMapChangeEvent(e),e instanceof Mt&&(this.map=e)}getConfigObject(){const e=super.getConfigObject();return e.activateShadowsOnStartup=this.activateShadowsOnStartup,e.timezone=this.timezone,e}}var Md=Ld;class bd extends ie{constructor(e){super(),this.cb=e,this._defaultActive=Q.CLICKMOVE,this.paused=!1,this.coordinate=null,this.setActive()}pipe(e){return e.type&Q.MOVE?e.position.every(e=>0===e)||this.cb(e.position):e.type&Q.CLICK&&(this.paused?e.feature&&e.feature.id&&"transparentTerrainBox"===e.feature.id._id&&(this.paused=!1,this.setActive(Q.CLICKMOVE)):(this.paused=!0,this.setActive(Q.CLICK))),Promise.resolve(e)}}var wd=bd,Td=i(448),Sd=i.n(Td);let Cd=new Cesium.Matrix4;class kd extends kr{static get className(){return"vcs.vcm.widgets.TransparentTerrainMode"}constructor(e){let t;e.className=kd.className,super(e),this.boxSize=e.boxSize?Cesium.Cartesian3.fromArray(e.boxSize):new Cesium.Cartesian3(100,100,50),this.boxSize.z=-Math.abs(this.boxSize.z),this.layerNames=e.layerNames||[],this.featureLayer=new Ms({name:"_transparentTerrain"}),this.position=new Cesium.Cartesian3,this.scene=null,this.cesium3DTilesetCollection=new Map,this.supportedMaps=["vcs.vcm.maps.Cesium"],this._removeInteraction=null,t=e.color?"string"===typeof e.color?Cesium.Color.fromCssColorString(e.color):Cesium.Color.fromBytes(...e.color):new Cesium.ImageMaterialProperty({image:Sd.a,repeat:new Cesium.Cartesian2(Math.ceil(this.boxSize.x/20),Math.ceil(this.boxSize.y/20))}),this.material=t}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.scene=this.framework.getActiveMap().getScene(),this.framework.addLayer(this.featureLayer),this.initialized=!0}return!0}initClippingPlanes(){this.box=new Cesium.Entity({id:"transparentTerrainBox",position:new Cesium.CallbackProperty(()=>{return this.position},!1),box:new Cesium.BoxGraphics({dimensions:this.boxSize,material:this.material})}),this.featureLayer.addEntity(this.box),Cd=this.box.computeModelMatrix(Cesium.JulianDate.now());const e=this.boxSize.x/2,t=this.boxSize.y/2,i=Math.abs(this.boxSize.z);this.scene.globe.clippingPlanes=kd.createClippingPlane(e,t,i),this.cesium3DTilesetCollection.size>0&&this.cesium3DTilesetCollection.forEach(s=>{s.clippingPlanes=kd.createClippingPlane(e,t,i)})}static createClippingPlane(e,t,i){return new Cesium.ClippingPlaneCollection({modelMatrix:Cd,planes:[new Cesium.ClippingPlane(new Cesium.Cartesian3(1,0,0),-e),new Cesium.ClippingPlane(new Cesium.Cartesian3(-1,0,0),-e),new Cesium.ClippingPlane(new Cesium.Cartesian3(0,1,0),-t),new Cesium.ClippingPlane(new Cesium.Cartesian3(0,-1,0),-t),new Cesium.ClippingPlane(new Cesium.Cartesian3(0,0,-1),-i)],edgeWidth:1,edgeColor:Cesium.Color.WHITE,enabled:!0})}activate(){this.featureLayer.activate(!0),this.active&&this.deactivate(),super.activate(),this.framework.getLayers().filter(e=>e.isActive()&&e instanceof ps).forEach(this.setTilesets.bind(this));const e=this.scene.camera.positionCartographic.clone();e.height=0,this.position=Cesium.Cartographic.toCartesian(e,this.scene.globe.ellipsoid,this.position),this.initClippingPlanes();const t=new wd(this.translatePosition.bind(this));this._removeInteraction=us().addExclusiveInteraction(t,this.deactivate.bind(this)),this.subscribeKey=this.framework.subscribe(I.LAYER_ACTIVATED,this.setTilesets.bind(this)),A.getInstance().activateClickBehavior()}deactivate(){this.active&&(super.deactivate(),this._removeInteraction&&this._removeInteraction(),this.featureLayer.activate(!1),this.destroyClippingPlanes(),this.framework.unsubscribeByKey(this.subscribeKey),this.subscribeKey=null)}setTilesets(e){if(this.layerNames.includes(e.name)&&e instanceof ps&&!this.cesium3DTilesetCollection.has(e.name)&&e.cesium3DTileset){this.cesium3DTilesetCollection.set(e.name,e.cesium3DTileset);const t=this.boxSize.x/2,i=this.boxSize.y/2,s=Math.abs(this.boxSize.z);e.cesium3DTileset.clippingPlanes=kd.createClippingPlane(t,i,s)}}destroyClippingPlanes(){this.featureLayer.getEntities().removeAll(),this.scene.globe.clippingPlanes&&(this.scene.globe.clippingPlanes.removeAll(),this.scene.globe.clippingPlanes.enabled=!1,this.scene.globe.clippingPlanes=null),this.cesium3DTilesetCollection.size>0&&this.cesium3DTilesetCollection.forEach(e=>{e.clippingPlanes&&(e.clippingPlanes.removeAll(),e.clippingPlanes.enabled=!1,e.clippingPlanes=null)})}translatePosition(e){const t=S.mercatorToWgs84(e),i=Object(le["a"])(t,3),s=i[0],r=i[1],n=i[2];this.position=Cesium.Cartesian3.fromDegrees(s,r,n+this.boxSize.z/2,Cesium.Ellipsoid.WGS84,this.position),this.scene.globe.clippingPlanes.modelMatrix=Cesium.Matrix4.setTranslation(Cd,this.position,Cd),this.cesium3DTilesetCollection.size>0&&this.cesium3DTilesetCollection.forEach(e=>{e.clippingPlanes.modelMatrix=Cesium.Matrix4.multiply(Cesium.Matrix4.inverse(e._initialClippingPlanesOriginMatrix,e.clippingPlanes.modelMatrix),Cd,e.clippingPlanes.modelMatrix)})}}var Ed=kd;class Id extends kr{static get className(){return"vcs.vcm.widgets.Flight"}constructor(e){e.className=Id.className,super(e),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.flightInstances=this.framework.getFlights()}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.initialized=!0,this.initializedFinished()}return!0}addFlight(e){this.flightInstances.push(e)}deleteFlight(e){const t=this.flightInstances.indexOf(e);this.flightInstances.splice(t,1)}}var Dd=Id;class Pd extends ie{constructor(e){super(),this.featureTypeSymbol=e.featureTypeSymbol,this.cb=e.cb,this._defaultActive=Q.DRAGSTART|Q.DRAGEND,this._defaultModificationKey=Z.ALT,this.setActive(!1)}pipe(e){return e.type&Q.DRAGSTART&&e.feature&&e.feature[this.featureTypeSymbol]&Yi.VERTEX?this._feature=!0:e.type&Q.DRAGEND&&this._feature&&(this._feature=!1,this.cb()),Promise.resolve(e)}}var Od=Pd;const Yd=new Cesium.Cartesian3,xd=new Cesium.Cartesian3,Ad=new Cesium.Cartesian3,jd=new Cesium.Cartographic,Fd=new Cesium.Cartographic,Nd=new Cesium.Cartographic,Hd=new Map,Rd=new Je({image:{fill:{color:[168,192,43,.8]},stroke:{color:[0,0,0,1],width:1},radius:5},stroke:{color:[168,192,43,1],width:3},fill:{color:[168,192,43,.8]},text:{font:"bold 18px sans-serif",textBaseline:"bottom",offsetY:-15,offsetX:0,stroke:{color:"#FFFAF0",width:2}}});class zd extends kr{static get className(){return"vcs.vcm.widgets.heightProfile.HeightProfile"}constructor(e){e.className=zd.className,super(e),e.style&&Rd.assign(new Je(e.style)),this.supportedMaps=["vcs.vcm.maps.Cesium"],this.maxNrOfPoints=Object(c["h"])(e.maxNrOfPoints,5e4),this.maxCombinedMemoryUsage=Object(c["h"])(e.maxCombinedMemoryUsage,1024),this._cancelled=!1,this._geometryChangedCB=null;const t=Object(c["g"])(e.defaultResolution,2);this.values={profilePoints:[],progress:0,running:!1,includeObjects:!0,resolution:t},this.allowSmallExport=Object(c["e"])(e.allowSmallExport,!0),this._cachedProfile=null}initialize(){if(!this.initialized){const e=super.initialize();if(!e)return!1;this.featureLayer=new Ki({projection:{epsg:3857},name:"_profile",style:Rd,altitudeMode:"clampToGround",classificationType:"both"}),this.framework.addLayer(this.featureLayer),this.geometryEditor=new xo({allowedGeometries:["LineString"],defaultMode:"edit",dedicatedFeatureStyle:!1}),this.geometryEditor.initialize(),this.geometryEditor.addEditingLayer(this.featureLayer),this.geometryEditor.selectFeatureInteraction.onSelect(this._onSelect.bind(this)),this.geometryEditor.state.onlyAllowTranslation=!0,this.vertexChangedInteraction=new Od({cb:this.calculateProfile.bind(this),featureTypeSymbol:this.geometryEditor.state.featureTypeSymbol}),this.initialized=!0,this.initializedFinished()}return!0}activate(){super.activate(),this.geometryEditor.activate(),this._cachedProfile&&this.geometryEditor.setMode(Oi.EDIT),this.featureLayer.activate(!0);const e=this.framework.getLayers().filter(e=>e.active&&(e instanceof ps||e instanceof nr));e.length>0&&e.forEach(t=>{let i;if(t instanceof nr){const e=t.getImplementation(this.framework.getActiveMap());i=e.cesium3DTileset}else i=t.cesium3DTileset;Hd.set(i,i.maximumMemoryUsage),i.maximumMemoryUsage=this.maxCombinedMemoryUsage/e.length})}deactivate(){super.deactivate(),this.cancel(),this._geometryChangedCB&&ol.Observable.unByKey(this._geometryChangedCB),this.geometryEditor.state.active&&(this.geometryEditor.interactionChain.removeInteraction(this.vertexChangedInteraction),this.vertexChangedInteraction.setActive(!1),this.geometryEditor.setMode(Oi.NONE),this.geometryEditor.deactivate()),this.featureLayer.activate(!1),Hd.forEach((e,t)=>{t.maximumMemoryUsage=e})}cancel(){this._cancelled=!0,this._reset(),this._cachedProfile&&this.feature&&this.feature.getGeometry().setCoordinates(this._cachedProfile)}_reset(){this.values.running=!1,this.values.progress=0,this._cachedProfile||this.featureLayer.removeAllFeatures()}_onSelect(){this.geometryEditor.features.size?(this.geometryEditor.interactionChain.chain.includes(this.vertexChangedInteraction)||this.geometryEditor.interactionChain.addInteraction(this.vertexChangedInteraction),this.values.running?this.geometryEditor.selectFeatureInteraction.clearSelectionSet():this.vertexChangedInteraction.setActive()):(this.geometryEditor.interactionChain.removeInteraction(this.vertexChangedInteraction),this.vertexChangedInteraction.setActive(!1))}newProfile(){this._reset(),this.feature=this.geometryEditor.createFeature("LineString","_profileLine"),this.feature.set("olcs_classificationType","both"),this._geometryChangedCB=this.feature.getGeometry().on("change",this.geometryChangedCallback.bind(this)),this.geometryEditor.setModeAndSelectFeature(Oi.CREATE,this.feature)}geometryChangedCallback(e){const t=e.target.getCoordinates(),i=t.length;i>2&&(this.geometryEditor.setMode(Oi.EDIT),ol.Observable.unByKey(this._geometryChangedCB),this._geometryChangedCB=null,this.calculateProfile())}calculateProfile(){var e=this;return Zc(function*(){e._cancelled=!1,e.geometryEditor.selectFeatureInteraction.clearSelectionSet(),e.values.running=!0,e.values.progress=0;const t=e.framework.getActiveMap(),i=t.getScene(),s=e.values.includeObjects?i.sampleHeightMostDetailed.bind(i):Cesium.sampleTerrainMostDetailed.bind(null,i.terrainProvider),r=e.feature.getGeometry().getCoordinates(),n=S.mercatorToWgs84(r[0],r[0]);Cesium.Cartographic.fromDegrees(n[0],n[1],null,jd);const a=S.mercatorToWgs84(r[1],r[1]);Cesium.Cartographic.fromDegrees(a[0],a[1],null,Fd);const o=new Cesium.EllipsoidGeodesic(jd,Fd),l=o.surfaceDistance;let c=Math.floor(l/e.values.resolution);c>e.maxNrOfPoints&&(c=e.maxNrOfPoints,e.values.resolution=Number((l/e.maxNrOfPoints).toFixed(1)));const h=new Array(c);Cesium.Cartographic.toCartesian(jd,null,Yd),Cesium.Cartographic.toCartesian(Fd,null,xd);for(let u=0;u<c;u++){let t;if(0===u?t=jd:(Cesium.Cartesian3.lerp(Yd,xd,u*e.values.resolution/l,Ad),t=Cesium.Cartographic.fromCartesian(Ad,null,Nd)),yield s([t]),h[u]=t.height,e._cancelled)break;e.values.progress=u/(c-1)}l/e.values.resolution-c>.01&&(yield s([Fd]),h.push(Fd.height)),e._cancelled||(e._cachedProfile=e.feature.getGeometry().getCoordinates(),e.values.profilePoints=h.map((t,i)=>new Cesium.Cartesian2(i*e.values.resolution,t)),e.values.running=!1,e.values.progress=0)})()}isActiveTerrain(){const e=this.framework.getLayers(),t=e.find(e=>e instanceof vt&&e.active);return!!t}}var Gd=zd;let Vd;function Bd(e,t,i){const s=A.getInstance(),r=e.slLayer;if(r===i.name){const r=e.slId?e.slId.toString():Object(c["c"])();let n=null;const a=e.slPos;if(a){const e=a.split(",");n={longitude:parseFloat(e[0]),latitude:parseFloat(e[1]),height:parseFloat(e[2])}}if(i instanceof Ki){let t=i.getFeatureById(r);n&&t?(t.set("clickedPosition",n),s.setCurrentItem(r,t,i)):n&&(t=new ol.Feature({}),t.setProperties(e.slAt||{}),t.clickedPosition=n,s.setCurrentItem(r,t,i))}else if(n){const t=e.slAt||{},a={attributes:t,clickedPosition:n};s.setCurrentItem(r,a,i)}else s.setCurrentItem(r,null,i);null!=Vd&&t.unsubscribeByKey(Vd)}}function Ud(e,t){null!=e.slLayer&&(Vd=e.slLayer.startsWith("_searchResultVector")?t.subscribe(I.MAP_ACTIVATED,()=>{const i=t.getLayerByName("_searchResultVector");i&&Bd(e,t,i)}):t.subscribe(I.LAYER_ACTIVATED,Bd.bind(null,e,t)))}function Wd(e,t){const i=n["a"].parse(window.location.href).getQueryParams();if(null!=i.startingmap&&(t.startingmap=i.startingmap),null==i.groundPosition&&null==i.cameraPosition||(t.startViewPoint=E.parseURLparameter(i)),i.verbose&&(v.enabled=i.verbose),Ud(i,t),null!=i.allowSoftwareRendering){const t=e.maps.find(e=>"vcs.vcm.maps.Cesium"===e.type);t&&(t.allowSoftwareRendering=!0)}if(null!=i.layerToActivate){i.layerToActivate=Array.isArray(i.layerToActivate)?i.layerToActivate:[i.layerToActivate];let e=null;i.layerToActivate.forEach(i=>{const s=t.getLayerByName(i);s&&s instanceof ci&&!e&&(e=s,s.isDefaultObliqueLayer=!0)}),e&&t.getLayers().forEach(t=>{t instanceof ci&&t!==e&&(t.isDefaultObliqueLayer=!1)})}return i}function qd(e,t){let i,s,r;if(null!=e.layerToActivate){const n=e.layerToActivate;i=Array.isArray(n)?n:[n];for(let e=0;e<i.length;e++)s=i[e],r=t.getLayerByName(s),!r||r instanceof ci||r.activate(!0)}if(null!=e.layerToDeactivate){const n=e.layerToDeactivate;i=Array.isArray(n)?n:[n];for(let e=0;e<i.length;e++)s=i[e],r=t.getLayerByName(s),!r||r instanceof ci||(r.isCommonLayer()&&r.active&&r.sendLayerEvents(!1,!1),r.activate(!1))}(e["reset-token"]||e["verify-token"])&&sa.getInstance().handleURLParameter(e),Object.values(t.widgets).forEach(t=>t.handleURLParameter(e)),Object.values(t.maps).forEach(t=>t.handleURLParameter(e)),Object.values(t.layers).forEach(t=>t.handleURLParameter(e)),O.getInstance().handleURLParameter(e),ue.getInstance().handleURLParameter(e)}function Jd(e,t){function i(e,t){Object.keys(t).forEach(s=>{const r=t[s];"object"!==typeof r||Array.isArray(r)||"object"!==typeof e[s]?e[s]=r:i(e[s],r)})}"object"===typeof e&&("object"===typeof e.ui&&i(t.config,{ui:e.ui}),Object.keys(e).filter(e=>/^ui_/.test(e)).forEach(s=>{let r={};const n=e[s],a=s.split("_");a.reverse().forEach((e,t)=>{const i={};i[e]=t?r:n,r=i}),i(t.config,r)}))}I.FRAMEWORK_INITIALIZED="FRAMEWORK_INITIALIZED";const Kd={[Mt.className]:Mt,[_i.className]:_i,[ui.className]:ui},Zd=v.getLogger();function Qd(e){return/maps/.test(e)?Kd[e]:/layer/.test(e)?Object.values(s).find(t=>t.className===e):/widgets/.test(e)?Object.values(r).find(t=>t.className===e):null}function $d(e){if(!e.type)return Zd.warning(`ObjectCreation failed: could not find type in options ${e}`),null;const t=Qd(e.type);if(!t)return Zd.warning(`ObjectCreation failed: could not find javascript class of type ${e.type}`),null;let i=null;try{i=new t(e)}catch(s){Zd.warning(`Error: ${s}`),i=null}return i||(Zd.warning("ObjectCreation failed: could not create new Object"),null)}function Xd(e){const t=G.getInstance(),i=$d(e);i&&i instanceof gt?(i[G.configContentSymbol]=!0,t.addLayer(i)&&Zd.info(`Loaded layer of type :${e.type} with name: ${e.name}`)):Zd.warning("Could not load Layer")}function em(e){const t=G.getInstance(),i=$d(e);i&&i instanceof oe?t.addMap(i)&&Zd.info(`Loaded map of type :${e.type} with name: ${e.name}`):Zd.warning("Could not load map")}function tm(e){const t=G.getInstance();if(/Oblique\w+Measurement$/.test(e.type)){Zd.warning(`Widget of type ${e.type} is deprecated. Use ${Bu.className} or ${Wu.className} instead`);const i="vcs.vcm.widgets.ObliqueHeightMeasurement"===e.type?du.OBLIQUE_HEIGHT:du.OBLIQUE_DISTANCE;let s=t.getWidgetByType(Bu.className);if(s||(s=t.getWidgetByType(Wu.className)),s)return void(s.allowedMeasurements.includes(i)||s.allowedMeasurements.push(i));e.type=Wu.className,e.allowedMeasurements=[i]}const i=$d(e);i&&i instanceof kr?t.addWidget(i)&&(Zd.info(`Loaded widget of type :${e.type} with name: ${e.name}`),i.initialize()):Zd.warning("Could not load widget")}function im(e){if(!e.name&&!e.id)return void Zd.warning("styles need a name. please reconfigure the styles section.");let t;if(e.type===pe.DECLARATIVE||e.declarativeStyle){if(t=new it(e),!t.cesiumStyle.ready)return void Zd.warning(`declarative style: ${e.name} has errors in the declarative style section and cannot be used`)}else t=new Je(e);t?(t[G.configContentSymbol]=!0,G.getInstance().addStyle(t),Zd.info(`added ${t.className} with name ${t.name}`)):Zd.warning(`could not create style item: ${e.name}`)}const sm=["vcs.vcm.widgets.legend.Legend","vcs.vcm.widgets.BalloonInfo","vcs.vcm.widgets.Measurement","vcs.vcm.widgets.SingleMeasurement","vcs.vcm.widgets.Planning"];function rm(e,t){let i=t.selectBehavior||null;A.getInstance(i),i=i||{};let s=i.excludedPickPositionEvents;s&&(s=Array.isArray(s)?s:[s]),i.excludedPickPositionEvents=s?s.map(e=>{const t=Object.keys(Q).find(t=>t===e);return t?Q[t]:null}).filter(e=>e).reduce((e,t)=>e|t,0):0,e.isIE11&&(i.pickTranslucent=i.pickTranslucent||!1,i.excludedPickPositionEvents=i.excludedPickPositionEvents||Q.MOVE|Q.DRAG),i.excludedPickPositionEvents&&(us().featureInteraction.excludedPickPositionEvents=i.excludedPickPositionEvents),null!=i.pickTranslucent&&(us().featureInteraction.pickTranslucent=i.pickTranslucent)}function nm(e){const t=G.getInstance();if(e.logLevel&&(v.enabled=e.logLevel),t.projection=new S(e.projection),t.mapcontainer=document.getElementById(e.mapcontainer),!t.mapcontainer)return void alert(`Could not find Container Element with id ${e.mapcontainer}`);t.addElementsToMapContainer(),Array.isArray(e.styles)&&e.styles.forEach(im),Array.isArray(e.flights)&&e.flights.forEach(e=>{t.addFlight(new ga(e))}),e.style&&(Zd.deprecate("style","use styles instead."),Array.isArray(e.style)&&e.style.forEach(im));for(const a in e.layers){const t=e.layers[a];Xd(t)}for(const a in e.viewpoints){const i=e.viewpoints[a];t.createViewPointObject(i)}e.startViewPoint&&(t.startViewPoint=t.getViewPointByName(e.startViewPoint)),t.libraryBasePath=e.libraryBasePath||"",t.baseUrl=e.baseUrl||"",e.availableLocales=e.availableLocales||["de","en"],t.config=e,O.getInstance().initialize(e),t.handleUiPlugins(e.ui),rm(t,e);const i=Wd(e,t);Array.isArray(e.maps)||(Zd.deprecate(".maps Object","Write an array, consistent with the other config keys (layers, widgets etc.)"),e.maps=Object.values(e.maps)),e.maps.forEach(e=>{em(e)});let s=t.getMapByName(t.startingmap);if(!s)for(const a in t.maps)t.maps[a].options.startingmap&&(s=t.maps[a]);s&&t.activateMap(s.name,t.startViewPoint);const r=e.widgets?e.widgets.sort((e,t)=>{const i=sm;let s=i.indexOf(e.type),r=i.indexOf(t.type);return s=s>-1?s:i.length+1,r=r>-1?r:i.length+1,s-r}):[];r.forEach(tm),qd(i,t),Jd(i,t);const n=document.getElementById("vcs_loading");n&&n.parentNode.removeChild(n),us(),t.publish(I.FRAMEWORK_INITIALIZED),t.setInitialized(!0)}function am(e){const t=G.getInstance();t.getLogger().info(`Sending request to load JSON config file [${e}]`),q.a.get(e).then(e=>{nm(e.data)}).catch(e=>{Zd.log(e)})}function om(){hs.destroy(),A.dispose(),G.getInstance().dispose()}class lm extends M{constructor(e){super(e),this.commonLayer=e.commonLayer,this.active=!1,this.initialized=!1}isActive(){return this.active}dispose(){this.initialized=!1}show(){this.active=!0}hide(){this.active=!1}isInitialized(){return this.initialized}mapActivated(e){return Promise.resolve()}mapDeactivated(e){return Promise.resolve()}updateStyle(e){}}var cm=lm;class hm extends cm{static get className(){return"vcs.vcm.layer.cesium.VectorLayer"}constructor(e){e.className=e.className?e.className:hm.className,super(e),this.clickListenerActivated=!1,this._removePostRenderHandler=()=>{}}initialize(){if(!this.initialized){this.olLayer=new ol.layer.Vector({renderOrder:null,visible:!1,source:this.commonLayer.getSource(),style:this.commonLayer.style.style,name:this.commonLayer.name,zIndex:this.commonLayer.getZIndex(),olcs_altitudeMode:this.commonLayer.altitudeMode,olcs_storeyHeight:this.commonLayer.storeyHeight,olcs_skirt:this.commonLayer.skirt,olcs_heightAboveGround:this.commonLayer.heightAboveGround,olcs_scaleByDistance:this.commonLayer.scaleByDistance,olcs_zCoordinateEyeOffset:this.commonLayer.zCoordinateEyeOffset,olcs_classificationType:this.commonLayer.classificationType,layerName:this.commonLayer.name});const e=this.commonLayer.getMinResolution(),t=this.commonLayer.getMaxResolution();e&&this.olLayer.setMinResolution(e),t&&this.olLayer.setMaxResolution(t),this.initialized=!0}return Promise.resolve()}createSynchronization(e){if(this.commonLayer.isVisible()&&!this.alreadySynchronized&&e.isInitialized()){e.ol3map;const t=e.getSynchronizer(this);this.counterPart=t.createSingleLayerCounterparts(this.olLayer)[0],t.addCesiumObject(this.counterPart),this.alreadySynchronized=!0}}mapActivated(e){return e instanceof Mt&&this.active&&!this.alreadySynchronized&&this.createSynchronization(e),Promise.resolve()}mapDeactivated(e){if(e instanceof Mt&&this.counterPart&&this.commonLayer.isDynamic){const t=e.getSynchronizer(this);t.destroySingleLayerCounterparts(this.counterPart),this.alreadySynchronized=!1}return Promise.resolve()}show(){super.show();const e=this.framework.getActiveMap();this.createSynchronization(e);const t=this.commonLayer.isVisible();this.olLayer.setVisible(t),e.initialized&&(this._removePostRenderHandler(),this._removePostRenderHandler=e.getScene().postRender.addEventListener(this.commonLayer.postRenderStyling.bind(this.commonLayer)))}hide(){super.hide(),this.olLayer.setVisible(!1),this._removePostRenderHandler(),this.commonLayer.FVlastUpdated=0}updateStyle(e){if(this.initialized){if(this.olLayer.setStyle(this.commonLayer.style.style),e)return;const t=this.olLayer.getSource().getFeatures();t.forEach(e=>{e.changed()})}}setVisibility(e){this.initialized&&this.olLayer.setVisible(e)}}oe.registerSpecificLayerImpl(Mt.className,Ki.className,hm),oe.registerSpecificLayerImpl(Mt.className,Sr.className,hm);var um=hm;class dm extends um{static get className(){return"vcs.vcm.layer.cesium.AsyncVectorImplementation"}constructor(e){e.className=dm.className,super(e)}initialize(){return super.initialize().then(this.commonLayer.fetchData.bind(this.commonLayer))}}oe.registerSpecificLayerImpl(Mt.className,ur.className,dm),oe.registerSpecificLayerImpl(Mt.className,Js.className,dm);var mm=dm;class gm extends _s{static get className(){return"vcs.vcm.layer.cesium.CesiumTilesetLayerImpl"}constructor(e){const t=e.commonLayer.cesiumTilesetLayerOptions,i={className:gm.className,name:e.commonLayer.name};super(Object.assign({},i,t)),this.commonLayer=e.commonLayer,this.style=this.commonLayer.style}initialize(){super.initialize(),this.cesium3DTileset[gt.vcsLayerNameSymbol]=this.commonLayer.name,this.cesium3DTileset[sr]=!0}show(){super.show(),this.active=!0}hide(){super.hide(),this.active=!1}mapActivated(e){return Promise.resolve()}mapDeactivated(e){return Promise.resolve()}updateStyle(e){this.setStyle(this.commonLayer.style,e)}determineHighlightStyle(){return this.commonLayer.highlightStyle?this.commonLayer.highlightStyle:A.getInstance()._currentItemHighlightColor}objectClickedHandler(e,t,i){return!!this.commonLayer.allowPicking&&super.objectClickedHandler(e,t,i||this.commonLayer)}getGenericFeatureFromClickedObject(e){const t=super.getGenericFeatureFromClickedObject(e);return t.layerName=this.commonLayer.name,t.layerClass=this.commonLayer.className,t}}oe.registerSpecificLayerImpl(Mt.className,nr.className,gm);var pm=gm;class ym extends cm{constructor(e){super(e),this.cesiumLayer=null}show(){const e=this.framework.getActiveMap();if(e&&e instanceof Mt&&e.isInitialized()&&this.cesiumLayer){super.show();const t=e.getScene().imageryLayers;if(!t.contains(this.cesiumLayer)){const i=this.commonLayer.index;this.cesiumLayer.VCMLayerIndex=i;let s=t.length;for(let e=0;e<t.length;e++){const r=t.get(e),n=r.VCMLayerIndex;if(n&&(!(i>n)&&i<n)){s=e;break}}e.getScene().imageryLayers.add(this.cesiumLayer,s)}this.cesiumLayer.show=!0}}hide(){super.hide(),this.cesiumLayer&&(this.cesiumLayer.show=!1)}dispose(){const e=this.framework.getMapByType("vcs.vcm.maps.Cesium");e&&e instanceof Mt&&e.isInitialized()&&e.getScene().imageryLayers.contains(this.cesiumLayer)&&e.getScene().imageryLayers.remove(this.cesiumLayer,!0),this.cesiumLayer=null,this.initialized=!1,this.active=!1}updateOpacity(){this.initialized&&this.cesiumLayer&&(this.cesiumLayer.alpha=this.commonLayer.opacity)}}var _m=ym;class fm extends _m{static get className(){return"vcs.vcm.layer.cesium.OpenStreetMapLayer"}constructor(e){e.className=fm.className,super(e)}initialize(){if(!this.initialized){this.cesiumImageryProvider=Cesium.createOpenStreetMapImageryProvider({maximumLevel:19});const e={alpha:this.commonLayer.opacity};this.cesiumLayer=new Cesium.ImageryLayer(this.cesiumImageryProvider,e),this.initialized=!0}}}oe.registerSpecificLayerImpl(Mt.className,er.className,fm);var vm=fm;class Lm extends _m{static get className(){return"vcs.vcm.layer.cesium.singleImageLayer"}constructor(e){e.className=Lm.className,super(e),this.commonLayer=this.commonLayer,this.currentExtent=null}initialize(){this.initialized||this.updateLayer()}mapActivated(e){return super.mapActivated(e).then(()=>{this.currentExtent&&!this.currentExtent.every((e,t)=>{return this.commonLayer.imageExtent[t]===e})&&this.updateLayer()})}updateLayer(){const e=this.isActive();this.initialized&&this.dispose();const t={url:this.commonLayer.url,credit:this.commonLayer.credit},i=this.commonLayer.imageExtent;i&&(this.currentExtent=i.slice(),t.rectangle=Cesium.Rectangle.fromDegrees(i[0],i[1],i[2],i[3]));const s=new Cesium.SingleTileImageryProvider(t),r={rectangle:t.rectangle,alpha:this.commonLayer.opacity,defaultAlpha:1};this.cesiumLayer=new Cesium.ImageryLayer(s,r),this.initialized=!0,e&&this.show()}}oe.registerSpecificLayerImpl(Mt.className,$s.className,Lm);var Mm=Lm;class bm extends _m{static get className(){return"vcs.vcm.layer.cesium.TMSBaseLayer"}constructor(e){e.className=bm.className,super(e)}initialize(){if(!this.initialized){const e={url:this.commonLayer.getUrl(),fileExtension:this.commonLayer.format,maximumLevel:this.commonLayer.maxLevel,minimumLevel:this.commonLayer.minLevel,show:!1};if(this.commonLayer.extent.isValid()){const t=this.commonLayer.extent.getCoordinatesInProjection(S.createGeographicProjection());e.rectangle=Cesium.Rectangle.fromDegrees(t[0],t[1],t[2],t[3])}"geographic"===this.commonLayer.tilingSchema&&(e.tilingScheme=new Cesium.GeographicTilingScheme);const t=Cesium.createTileMapServiceImageryProvider(e),i={alpha:this.commonLayer.opacity};this.cesiumLayer=new Cesium.ImageryLayer(t,i),this.initialized=!0}}setOpacity(e){this.cesiumLayer.alpha=e}}oe.registerSpecificLayerImpl(Mt.className,ir.className,bm);var wm=bm;class Tm extends um{static get className(){return"vcs.vcm.layer.cesium.VectorClusterLayer"}constructor(e){e.className=Tm.className,super(e)}initialize(){return super.initialize().then(()=>{this.olLayer&&this.olLayer.set("olcs_zCoordinateEyeOffset",this.commonLayer.zCoordinateEyeOffset)})}createSynchronization(e){if(!this.alreadySynchronized&&e.isInitialized()){const t=e.clusterSynchronizer,i=t.createSingleLayerCounterparts(this.olLayer)[0];this.clusterDataSource=i.getDataSource(),this.clusterDataSource.clustering.clusterLabels=!1,this.clusterDataSource.clustering.clusterPoints=!1,e.getClusterDatasources().add(this.clusterDataSource);const s=e.getClusterConverter();s.setLayerStyle(this.olLayer,this.commonLayer.cesiumStyleFunction.bind(this.commonLayer)),this.alreadySynchronized=!0}}}oe.registerSpecificLayerImpl(Mt.className,cr.className,Tm);var Sm=Tm;class Cm extends _m{static get className(){return"vcs.vcm.layer.cesium.WMSLayer"}constructor(e){e.className=Cm.className,super(e)}initialize(){this.initialized||(this.commonLayer.setCommonSource(),this.updateLayer())}show(){super.show(),this.commonLayer.getUseFeatureInfo()&&this.commonLayer.activateFeatureInfo(!0)}hide(){super.hide(),this.commonLayer.getUseFeatureInfo()&&this.commonLayer.activateFeatureInfo(!1)}updateLayer(){const e=this.isActive();this.initialized&&this.dispose();const t={url:this.commonLayer.getUrl(),layers:this.commonLayer.layers.join(","),minimumLevel:this.commonLayer.minLevel,maximumLevel:this.commonLayer.maxLevel,show:!1,parameters:this.commonLayer.parameters};if(this.commonLayer.extent&&this.commonLayer.extent.isValid()){const e=this.commonLayer.extent.getCoordinatesInProjection(S.createGeographicProjection());e&&(t.rectangle=Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]))}"mercator"===this.commonLayer.tilingSchema&&(t.tilingScheme=new Cesium.WebMercatorTilingScheme);const i=new Cesium.WebMapServiceImageryProvider(t),s={alpha:this.commonLayer.opacity};this.cesiumLayer=new Cesium.ImageryLayer(i,s),this.initialized=!0,e&&this.show()}}oe.registerSpecificLayerImpl(Mt.className,mr.className,Cm);var km=Cm;class Em extends _m{static get className(){return"vcs.vcm.layer.cesium.WMTSLayer"}constructor(e){e.className=Em.className,super(e)}initialize(){if(!this.initialized){let e=this.commonLayer.getUrl();e=-1!==e.indexOf("{Layer}")?e.replace("{Layer}",this.commonLayer.layer):e;const t=this.commonLayer.extent.getCoordinatesInProjection(vcs.vcm.util.Projection.createGeographicProjection()),i={url:e,layer:this.commonLayer.layer,style:this.commonLayer.style,format:this.commonLayer.format,tileMatrixSetID:this.commonLayer.tileMatrixSetID,maximumLevel:this.commonLayer.maxLevel,rectangle:Cesium.Rectangle.fromDegrees(t[0],t[1],t[2],t[3])},s={};if((this.commonLayer.numberOfLevelZeroTilesX>1||this.commonLayer.numberOfLevelZeroTilesY>1)&&(s.numberOfLevelZeroTilesX=this.commonLayer.numberOfLevelZeroTilesX,s.numberOfLevelZeroTilesY=this.commonLayer.numberOfLevelZeroTilesY),"geographic"===this.commonLayer.tilingSchema?i.tilingScheme=new Cesium.GeographicTilingScheme(s):i.tilingScheme=new Cesium.WebMercatorTilingScheme(s),this.commonLayer.matrixIds)this.commonLayer.matrixIds.length==this.commonLayer.maxLevel+1?i.tileMatrixLabels=this.commonLayer.matrixIds:this.logger.info("matrixIDs must have the same length as maxZoom");else if(""!==this.commonLayer.tileMatrixPrefix){const e=[];for(let t=0;t<this.commonLayer.maxLevel+1;t++)e[t]=String(this.commonLayer.tileMatrixPrefix)+String(t);i.tileMatrixLabels=e}const r=new Cesium.WebMapTileServiceImageryProvider(i),n={alpha:this.commonLayer.opacity};this.cesiumLayer=new Cesium.ImageryLayer(r,n),this.initialized=!0}}}oe.registerSpecificLayerImpl(Mt.className,pr.className,Em);var Im=Em;class Dm extends um{static get className(){return"vcs.vcm.layer.cesium.Wsv"}constructor(e){e.className=Dm.className,super(e)}}oe.registerSpecificLayerImpl(Mt.className,Lr.className,Dm);var Pm=Dm;class Om extends cm{static get className(){return"vcs.vcm.layer.oblique.VectorLayer"}constructor(e){e.className=e.className?e.className:Om.className,super(e),this.commonLayer=this.commonLayer,this.obliqueSource=new ol.source.Vector({}),this.featureListeners={},this.frameworkListeners=[],this.sourceListener=[],this.currentExtent=null,this.fetchedFeaturesForImageName=null,this._postComposeListener=null,this.FVlastUpdated=0,this.featureVisibility=this.commonLayer.featureVisibility,this.globalHider=this.commonLayer.globalHider}initialize(){return this.initialized||(this.obliqueMap=this.framework.getActiveMap(),this.initializedPromise=this.obliqueMap.inializedPromise.then(()=>{if(this.obliqueMap.initialized){this.olMap=this.obliqueMap.getOl3Map(),this.olLayer=new ol.layer.Vector({renderOrder:null,visible:!1,source:this.obliqueSource,style:this.commonLayer.style.style,name:this.commonLayer.name,zIndex:this.commonLayer.zIndex,altitudeMode:this.commonLayer.getAltitudeMode(),layerName:this.commonLayer.name});const e=this.commonLayer.getMinResolution(),t=this.commonLayer.getMaxResolution();e&&this.olLayer.setMinResolution(e),t&&this.olLayer.setMaxResolution(t),this.initialized=!0}return Promise.resolve()})),this.initializedPromise}updateStyle(){this.initialized&&this.olLayer.setStyle(this.commonLayer.style.style)}getFeatureById(e){return this.obliqueSource.getFeatureById(`${e}_OBLIQUE`)}show(){this.initialized&&(super.show(),this.olLayer.setVisible(this.commonLayer.visibility),this.olMap.addLayer(this.olLayer),null===this._postComposeListener&&(this._postComposeListener=this.olMap.on("postcompose",this.commonLayer.postRenderStyling.bind(this))),this.fetchFeaturesInView())}setVisibility(e){this.initialized&&this.olLayer.setVisible(e)}static setNewGeometry(e,t){const i=e.getGeometry().clone();t.setGeometry(e.getGeometry()[Ki.alreadyTransformedToImage]?i:qt(i)),e.getGeometry()[Ki.alreadyTransformedToImage]&&t.getGeometry().setProperties(e.getGeometry().getProperties(),!1),e[Ki.obliqueGeometry]=t.getGeometry()}addFeature(e){if(this.active||(this.fetchedFeaturesForImageName=null),this.active&&this.currentExtent&&this.framework.getActiveMap()instanceof ui&&(!e[Ki.doNotTransform]||e.getGeometry()[Ki.alreadyTransformedToImage]||!e[Ki.doNotTransform]&&e.getGeometry().intersectsExtent(this.currentExtent))){const t=`${e.getId()}_OBLIQUE`;if(this.obliqueSource.getFeatureById(t))return;const i=new ol.Feature({});i.setId(t),i[Ki.originalFeatureSymbol]=e,Om.setNewGeometry(e,i),i.setStyle(e.getStyle()),this.featureListeners[t]=new Array(3),this.featureListeners[t][0]=e.on("change:geometry",()=>{ol.Observable.unByKey(this.featureListeners[t][2]),Om.setNewGeometry(e,i),this.updateGeometry(e,i),this.featureListeners[t][2]=e.getGeometry().on("change",this.updateGeometry.bind(this,e,i))}),this.featureListeners[t][1]=e.on("change",()=>{i.setStyle(e.getStyle())}),this.featureListeners[t][2]=e.getGeometry().on("change",this.updateGeometry.bind(this,e,i)),this.updateGeometry(e,i).then(()=>{this.obliqueSource.addFeature(i)})}}updateGeometry(e,t){const i=e.getGeometry();if(!i[Ki.alreadyTransformedToImage]){const e=t.getGeometry();return Qt(i,e,this.obliqueMap.activeLayer.currentImage).then(()=>{this.featureListeners[t.getId()].push(e.once("change",()=>{e[Ki.imageGeometryChanged]=!0}))})}return t.getGeometry().setCoordinates(e.getGeometry().getCoordinates()),t.getGeometry()[Ki.imageGeometryChanged]=!0,Promise.resolve()}synchronizeGeometriesAndClearSource(){function e(e){const t=e.getGeometry(),i=t instanceof ol.geom.Circle,s=qt(t);return i&&e.setGeometry(s),s}const t=[];return Object.keys(this.featureListeners).forEach(e=>{ol.Observable.unByKey(this.featureListeners[e]),delete this.featureListeners[e]}),this.obliqueSource.forEachFeature(i=>{const s=i[Ki.originalFeatureSymbol];if(!s[Ki.doNotTransform]&&i.getGeometry()[Ki.imageGeometryChanged]){const r=e(s),n=e(i);t.push($t(n,r,this.obliqueMap.activeLayer.obliqueCollection.getImageByName(this.fetchedFeaturesForImageName)).then(()=>{delete r[Ki.alreadyTransformedToImage]}))}}),Promise.all(t).then(()=>{this.obliqueSource.clear(!0),this.fetchedFeaturesForImageName=null,this.FVlastUpdated=0})}fetchFeaturesInView(){return new Promise(e=>{this.active&&this.fetchedFeaturesForImageName!==this.obliqueMap.getCurrentImage().name&&(this.currentExtent=this.obliqueMap.getExtentOfCurrentImage().getCoordinatesInProjection(S.createMercatorProjection()),this.commonLayer.source.forEachFeatureInExtent(this.currentExtent,e=>{this.addFeature(e)}),this.commonLayer.source.forEachFeature(e=>{e.getGeometry()[Ki.alreadyTransformedToImage]&&this.addFeature(e)}),this.fetchedFeaturesForImageName=this.obliqueMap.getCurrentImage().name),e()})}removeFeature(e){const t=this.obliqueSource.getFeatureById(`${e.getId()}_OBLIQUE`);if(t){const e=t.getId(),i=this.featureListeners[e];i&&(ol.Observable.unByKey(i),delete this.featureListeners[e]),this.obliqueSource.removeFeature(t)}}hide(){super.hide(),this.olMap.removeLayer(this.olLayer),null!=this._postComposeListener&&(ol.Observable.unByKey(this._postComposeListener),this._postComposeListener=null),this.FVlastUpdated=0}dispose(){if(this.olLayer){const e=this.framework.getMapByType("vcs.vcm.maps.Oblique");e.getOl3Map().removeLayer(this.olLayer)}this.olLayer=null,this.initialized=!1,this.active=!1,ol.Observable.unByKey(this.sourceListener),this.sourceListener=[],this.frameworkListeners.forEach(this.framework.unsubscribeByKey,this.framework),this.frameworkListeners=[]}mapActivated(e){return this.sourceListener.push(this.commonLayer.source.on("addfeature",e=>{this.addFeature(e.feature)})),this.sourceListener.push(this.commonLayer.source.on("removefeature",e=>{this.removeFeature(e.feature)})),this.sourceListener.push(this.commonLayer.source.on("changefeature",e=>{const t=`${e.feature.getId()}_OBLIQUE`;this.featureListeners[t]||this.addFeature(e.feature)})),this.frameworkListeners.push(this.framework.subscribe(I.OBLIQUE_IMAGE_CHANGED,()=>{this.synchronizeGeometriesAndClearSource().then(()=>{this.fetchFeaturesInView()})})),this.fetchFeaturesInView()}mapDeactivated(e){return ol.Observable.unByKey(this.sourceListener),this.sourceListener=[],this.frameworkListeners.forEach(this.framework.unsubscribeByKey,this.framework),this.frameworkListeners=[],this.synchronizeGeometriesAndClearSource()}}oe.registerSpecificLayerImpl(ui.className,Ki.className,Om),oe.registerSpecificLayerImpl(ui.className,Sr.className,Om);var Ym=Om;class xm extends Ym{static get className(){return"vcs.vcm.layer.oblique.AsyncVectorImplementation"}constructor(e){e.className=xm.className,super(e),this.commonLayer=this.commonLayer}initialize(){return super.initialize().then(this.commonLayer.fetchData.bind(this.commonLayer))}}oe.registerSpecificLayerImpl(ui.className,ur.className,xm),oe.registerSpecificLayerImpl(ui.className,Js.className,xm),oe.registerSpecificLayerImpl(ui.className,Lr.className,xm);var Am=xm;class jm extends Ym{constructor(e){super(e),this.clusterSource=new ol.source.Cluster({source:this.obliqueSource})}initialize(){return super.initialize().then(()=>{this.clusterSource.setDistance(this.commonLayer.clusterSource.getDistance()),this.olLayer.setSource(this.clusterSource)})}show(){this.initialized&&(null===this._postComposeListener&&(this._postComposeListener=this.olMap.on("postcompose",this.commonLayer.postRenderStyling.bind(this.commonLayer))),super.show())}mapActivated(e){const t=()=>{this.synchronizeGeometriesAndClearSource().then(()=>{this.fetchFeaturesInView()})};return this.sourceListener.push(this.commonLayer.source.on("change",t)),this.frameworkListeners.push(this.framework.subscribe(I.OBLIQUE_IMAGE_CHANGED,t)),this.fetchFeaturesInView()}}oe.registerSpecificLayerImpl(ui.className,cr.className,jm);var Fm=jm;class Nm extends cm{constructor(e){super(e),this.olLayer=null}initialize(){this.initialized||(this.olLayer=this.getOLLayer(),this.initialized=!0)}show(){super.show();const e=this.framework.getActiveMap();let t=null;const i=e.getOl3Map().getLayers().getArray(),s=this.commonLayer.index;this.olLayer.VCMLayerIndex=s;let r=null;for(let a=0;a<i.length;a++){if(i[a]==this.olLayer){t=i[a];break}const e=i[a].VCMLayerIndex;e&&(s>e||s<e&&null===r&&(r=a))}t||(null===r&&(r=i.length),e.getOl3Map().getLayers().insertAt(r,this.olLayer));const n=!this.commonLayer.isVisible||this.commonLayer.isVisible();this.olLayer.setVisible(n)}hide(){super.hide(),this.olLayer.setVisible(!1)}dispose(){if(this.olLayer){const e=this.framework.getMapByType("vcs.vcm.maps.Openlayers");e.getOl3Map().removeLayer(this.olLayer)}this.olLayer=null,this.initialized=!1,this.active=!1}getOLLayer(){throw new Error}}var Hm=Nm;class Rm extends Hm{static get className(){return"vcs.vcm.layer.openlayers.VectorLayer"}constructor(e){e.className=e.className?e.className:Rm.className,super(e),this._postComposeListener=null}updateStyle(){this.initialized&&this.olLayer.setStyle(this.commonLayer.style.style)}getOLLayer(){const e=new ol.layer.Vector({renderOrder:null,visible:!1,source:this.commonLayer.getSource(),style:this.commonLayer.style.style,zIndex:this.commonLayer.zIndex,name:this.commonLayer.name,altitudeMode:"clampToGround"}),t=this.commonLayer.maxResolution,i=this.commonLayer.minResolution;return t&&e.setMinResolution(t),i&&e.setMaxResolution(i),e}show(){super.show();const e=this.framework.getActiveMap();null===this._postComposeListener&&(this._postComposeListener=e.ol3map.on("postcompose",this.commonLayer.postRenderStyling.bind(this.commonLayer)))}hide(){super.hide(),null!=this._postComposeListener&&(ol.Observable.unByKey(this._postComposeListener),this._postComposeListener=null),this.commonLayer.FVlastUpdated=0}setVisibility(e){this.initialized&&this.olLayer.setVisible(e)}}oe.registerSpecificLayerImpl(_i.className,Ki.className,Rm),oe.registerSpecificLayerImpl(_i.className,Lr.className,Rm),oe.registerSpecificLayerImpl(_i.className,Sr.className,Rm);var zm=Rm;class Gm extends zm{constructor(e){super(e)}initialize(){const e=this.commonLayer.fetchData();return super.initialize(),e}}oe.registerSpecificLayerImpl(_i.className,ur.className,Gm),oe.registerSpecificLayerImpl(_i.className,Js.className,Gm),oe.registerSpecificLayerImpl(_i.className,nr.className,Gm);var Vm=Gm;class Bm extends Hm{static get className(){return"vcs.vcm.layer.openlayers.OpenStreetMapLayer"}constructor(e){e.className=Bm.className,super(e)}getOLLayer(){return new ol.layer.Tile({opacity:this.commonLayer.opacity,source:new ol.source.OSM})}updateOpacity(){this.initialized&&this.olLayer.setOpacity(this.commonLayer.opacity)}}oe.registerSpecificLayerImpl(_i.className,er.className,Bm);var Um=Bm;class Wm extends Hm{static get className(){return"vcs.vcm.layer.openlayers.SingleImageLayer"}constructor(e){e.className=Wm.className,super(e),this.commonLayer=this.commonLayer}initialize(){this.initialized||this.updateLayer()}getOLLayer(){return this.initialized||this.initialize(),this.olLayer}updateLayer(){const e=this.isActive();this.initialized&&this.dispose();const t={attributions:this.commonLayer.credit,url:this.commonLayer.url,projection:"EPSG:4326",imageExtent:this.commonLayer.imageExtent};n["a"].hasSameOrigin(this.commonLayer.getUrl())||(t.crossOrigin="anonymous"),this.olLayer=new ol.layer.Image({source:new ol.source.ImageStatic(t),opacity:this.commonLayer.opacity}),this.initialized=!0,e&&this.show()}updateOpacity(){this.initialized&&this.olLayer.setOpacity(this.commonLayer.opacity)}}oe.registerSpecificLayerImpl(_i.className,$s.className,Wm);var qm=Wm;class Jm extends Hm{static get className(){return"vcs.vcm.layer.openlayers.TMSBaseLayer"}constructor(e){e.className=Jm.className,super(e)}getOLLayer(){const e={tileUrlFunction:function(e){const t=`${Cesium.appendForwardSlash(this.commonLayer.getUrl())}{z}/{x}/{y}.${this.commonLayer.format}`,i=(1<<e[0])- -e[2];return t.replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",i.toString())}.bind(this),tileSize:[this.commonLayer.tileWidth,this.commonLayer.tileHeight],minZoom:this.commonLayer.minLevel,maxZoom:this.commonLayer.maxLevel,wrapx:!1};n["a"].hasSameOrigin(this.commonLayer.getUrl())||(e.crossOrigin="anonymous"),"geographic"===this.commonLayer.tilingSchema&&(e.projection="EPSG:4326");const t={source:new ol.source.XYZ(e),opacity:this.commonLayer.opacity};this.commonLayer.extent.isValid()&&(t.extent=this.commonLayer.extent.getCoordinatesInProjection(S.createMercatorProjection()));const i=new ol.layer.Tile(t);return i}updateOpacity(){this.initialized&&this.olLayer.setOpacity(this.commonLayer.opacity)}}oe.registerSpecificLayerImpl(_i.className,ir.className,Jm);var Km=Jm;class Zm extends zm{static get className(){return"vcs.vcm.layer.openlayers.VectorClusterLayer"}constructor(e){e.className=Zm.className,super(e)}}oe.registerSpecificLayerImpl(_i.className,cr.className,Zm);var Qm=Zm;class $m extends Hm{static get className(){return"vcs.vcm.layer.openlayers.WMSLayer"}constructor(e){e.className=$m.className,super(e)}initialize(){this.initialized||(this.olLayer=this.getOLLayer(),this.initialized=!0)}show(){super.show(),this.commonLayer.getUseFeatureInfo()&&this.commonLayer.activateFeatureInfo(!0)}hide(){super.hide(),this.commonLayer.getUseFeatureInfo()&&this.commonLayer.activateFeatureInfo(!1)}getOLLayer(){return this.commonLayer.setCommonSource(),new ol.layer.Tile({renderOrder:null,visible:!1,source:this.commonLayer.wmsSource,opacity:this.commonLayer.opacity})}updateLayer(){return!0}updateOpacity(){this.initialized&&this.olLayer.setOpacity(this.commonLayer.opacity)}}oe.registerSpecificLayerImpl(_i.className,mr.className,$m);var Xm=$m;class eg extends Hm{static get className(){return"vcs.vcm.layer.openlayers.WMTSLayer"}constructor(e){e.className=eg.className,super(e)}getOLLayer(){let e=S.createMercatorProjection();"geographic"===this.commonLayer.tilingSchema&&(e=S.createGeographicProjection());const t=e.getProjection().getExtent();let i=ol.extent.getWidth(t)/256;this.commonLayer.numberOfLevelZeroTilesX>1&&(i/=this.commonLayer.numberOfLevelZeroTilesX),"geographic"===this.commonLayer.tilingSchema&&(i=ol.extent.getWidth(t)/512);const s=this.commonLayer.maxLevel+1,r=new Array(s);let a=new Array(s);for(let n=0;n<s;++n)r[n]=i/Math.pow(2,n),a[n]=String(this.commonLayer.tileMatrixPrefix)+String(n);this.commonLayer.matrixIds&&(this.commonLayer.matrixIds.length==s?a=this.commonLayer.matrixIds:this.logger.info("matrixIDs must have the same length as maxZoom"));const o=this.commonLayer.extent.getCoordinatesInProjection(e),l={origin:ol.extent.getTopLeft(t),extent:o,resolutions:r,matrixIds:a,minZoom:this.commonLayer.minLevel};if(this.commonLayer.numberOfLevelZeroTilesX>1||this.commonLayer.numberOfLevelZeroTilesY>1){const e=[];let t=this.commonLayer.numberOfLevelZeroTilesX,i=this.commonLayer.numberOfLevelZeroTilesY;for(let r=0;r<=s;r++)e.push([t,-i]),t*=2,i*=2;l.sizes=e}const c=new ol.tilegrid.WMTS(l),h=this.commonLayer.getUrl().indexOf("{")>=0?"REST":"KVP",u={tileGrid:c,requestEncoding:h,layer:this.commonLayer.layer,style:this.commonLayer.style,format:this.commonLayer.format,matrixSet:this.commonLayer.tileMatrixSetID,url:this.commonLayer.getUrl()};n["a"].hasSameOrigin(this.commonLayer.getUrl())||(u.crossOrigin="anonymous"),"geographic"===this.commonLayer.tilingSchema&&(u.projection="EPSG:4326");for(const n in this.commonLayer.olOptions)u[n]=this.commonLayer.olOptions[n];return new ol.layer.Tile({opacity:this.commonLayer.opacity,source:new ol.source.WMTS(u)})}updateOpacity(){this.initialized&&this.olLayer.setOpacity(this.commonLayer.opacity)}}oe.registerSpecificLayerImpl(_i.className,pr.className,eg);var tg=eg;function ig(e,t){const i=G.getInstance(),s=i.getActiveMap(),r={};r.startingmap=s.name,r.lang=i.getLocale(),r.layerToActivate=[],r.layerToDeactivate=[],i.getLayers().filter(e=>e[G.configContentSymbol]&&e.isSupported(s)).forEach(e=>{e.active!==e.activeOnStartup&&(e.active?r.layerToActivate.push(e.name):r.layerToDeactivate.push(e.name))}),r.layerToActivate.length||delete r.layerToActivate,r.layerToDeactivate.length||delete r.layerToDeactivate,delete e.queryParams.epsg,t&&(r.epsg=i.getProjection().epsg.match(/\d+/)[0]),e.addQueryParams(r);const n=i.getSelectBehavior();return n&&n.getLink(e),ue.getInstance().getLink(e),s.getViewPoint(!0,!0).then(t=>{return t.getLink(e),e.toString()}).catch(()=>e.toString())}function sg(e){const t=G.getInstance(),i=n["a"].parse(window.location.href);if(t.baseUrl){const e=n["a"].parse(t.baseUrl);i.base=e.base,i.path=e.path}const s=t.getWidgets();for(let r=0;r<s.length;r++)s[r].getLink(i);return ig(i,e)}const rg=v.getLogger("vcs.vcm.util.flight.FlightPlayer");class ng{constructor(){this.destinationSpline=null,this.quaternionSpline=null,this.values={playing:!1,paused:!1,multiplier:1,activeInstance:null,repeat:!1,valid:!1},this.clock={startTime:0,endTime:0,currentTime:0,times:[],currentSystemTime:null},this._postRenderHandler=null,this._flightInstanceChangeHandler=null,this.screenSpaceCameraController=null,this.readyPromise=Promise.resolve(),G.getInstance().subscribe("MAP_ACTIVATED",()=>{this.stop()})}setActiveFlightInstance(e){a(e,ga),this.values.playing&&this.stop(),this.values.activeInstance=e;const t=ue.getInstance();return t.values.walkmode&&t.activateOverviewMode(),this.readyPromise=e.ready.then(()=>{this.values.activeInstance===e&&(this._flightInstanceChangeHandler&&(this._flightInstanceChangeHandler(),this._flightInstanceChangeHandler=null),this.changeHandler(),this._flightInstanceChangeHandler=e.changed.addEventListener(this.changeHandler.bind(this)))}),this.readyPromise}clearActiveFlight(){this.values.playing&&this.stop(),this._flightInstanceChangeHandler&&(this._flightInstanceChangeHandler(),this._flightInstanceChangeHandler=null),this.values.activeInstance=null}play(e){var t=this;return Zc(function*(){if(o(e,ga),!e&&!t.values.activeInstance){const e="Player cannot play without activeInstance, provide a flightInstance or call setActiveInstance";throw rg.error(e),new Error(e)}if(t._postRenderHandler&&(t._postRenderHandler(),t._postRenderHandler=null),e&&t.values.activeInstance!==e&&(yield t.setActiveFlightInstance(e),t.values.activeInstance!==e))return;const i=G.getInstance().getActiveMap();if(i instanceof Mt){const e=i.getScene();t.screenSpaceCameraController=e.screenSpaceCameraController,t._postRenderHandler=e.postRender.addEventListener(t._cesiumPostRender.bind(t))}t.clock.currentSystemTime=null,t.values.playing=!0})()}_cesiumPostRender(e){const t=Date.now()/1e3;this.clock.currentSystemTime||(this.clock.currentSystemTime=t);const i=t-this.clock.currentSystemTime;if(this.clock.currentSystemTime=t,this.values.paused)return void(this.screenSpaceCameraController&&(this.screenSpaceCameraController.enableInputs=!0));if(this.clock.currentTime+=i*this.values.multiplier,this.clock.currentTime>this.clock.endTime){if(!this.values.repeat)return void this.stop();this.clock.currentTime=this.clock.currentTime-this.clock.endTime}else if(this.clock.currentTime<this.clock.startTime){if(!this.values.repeat)return void(this.clock.currentTime=this.clock.startTime);this.clock.currentTime=this.clock.endTime+this.clock.currentTime}const s={destination:this.destinationSpline.evaluate(this.clock.currentTime),orientation:Cesium.HeadingPitchRoll.fromQuaternion(this.quaternionSpline.evaluate(this.clock.currentTime))};e.camera.setView(s),this.screenSpaceCameraController&&(this.screenSpaceCameraController.enableInputs=!1)}stop(){this._postRenderHandler&&(this._postRenderHandler(),this._postRenderHandler=null),this.screenSpaceCameraController&&(this.screenSpaceCameraController.enableInputs=!0),this.values.playing=!1,this.values.paused=!1,this.clock.currentTime=0,this.clock.currentSystemTime=null}goToTime(e){if(this.values.activeInstance&&this.values.activeInstance.isValid()){if(e>this.clock.endTime)rg.warning(`time: ${e} out of range`);else if(this.clock.currentTime=e,this.clock.currentSystemTime=null,!this.values.playing||this.values.playing&&this.values.paused){const e=G.getInstance().getActiveMap();if(e instanceof Mt){const t={destination:this.destinationSpline.evaluate(this.clock.currentTime),orientation:Cesium.HeadingPitchRoll.fromQuaternion(this.quaternionSpline.evaluate(this.clock.currentTime))};e.getScene().camera.setView(t)}}}else rg.warning("cannot go to time on missing or invalid flight")}forward(){const e=this.clock.currentTime,t=this.clock.times.find(t=>t>e)||this.clock.times[this.clock.times.length-1];this.goToTime(t)}backward(){const e=this.clock.currentTime;let t=this.clock.times.findIndex(t=>t>=e)-1;this.backedBefore&&(t-=1,clearTimeout(this.backedBeforeTimeout)),t<0&&(t=0);const i=this.clock.times[t];this.goToTime(i),this.backedBefore=!0,this.backedBeforeTimeout=setTimeout(()=>{this.backedBefore=!1},700)}changeHandler(){this.values.activeInstance&&(this.values.valid=this.values.activeInstance.isValid(),this.values.valid&&this._updateSplines())}_updateSplines(){const e=this.values.activeInstance,t=e.loop,i=e.viewpoints,s=t?i.length+1:i.length,r=new Array(s),n=new Array(s),a=new Array(s);i.forEach((e,t)=>{if(r[t]=Cesium.Cartesian3.fromDegrees(e.cameraPosition[0],e.cameraPosition[1],e.cameraPosition[2]),n[t]=Cesium.Quaternion.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(e.heading,e.pitch,e.roll)),t>0){const e=i[t-1];e.duration||(e.duration=Cesium.Cartesian3.distance(r[t-1],r[t])/300||1),a[t]=a[t-1]+e.duration}else a[t]=0}),t&&(r[s-1]=Cesium.Cartesian3.fromDegrees(i[0].cameraPosition[0],i[0].cameraPosition[1],i[0].cameraPosition[2]),n[s-1]=Cesium.Quaternion.fromHeadingPitchRoll(Cesium.HeadingPitchRoll.fromDegrees(i[0].heading,i[0].pitch,i[0].roll)),i[s-2].duration||(i[s-2].duration=Cesium.Cartesian3.distance(r[s-2],r[s-1])/300||1),a[s-1]=a[s-2]+i[s-2].duration),this.destinationSpline=this.values.activeInstance.interpolation===da.SPLINE?new Cesium.CatmullRomSpline({times:a,points:r}):new Cesium.LinearSpline({times:a,points:r}),this.quaternionSpline=new Cesium.QuaternionSpline({times:a,points:n}),this.clock.endTime=a[s-1],this.clock.times=a,this.values.repeat=t}}let ag;function og(){return ag||(ag=new ng),ag}const lg=v.getLogger("vcs.vcm.util.flight.FlightVisualizer");let cg=null;const hg=new Cesium.Cartographic;class ug{constructor(){this.extent=ol.extent.createEmpty(),this.flightLayer=new Ki({projection:S.createGeographicProjection(),name:"_scratchFlightLayer",style:{declarativeStyle:{labelText:"${title}",image:"false",color:'color("#333333")',strokeWidth:"2"}},altitudeMode:"absolute"}),this._primitives=new Cesium.PrimitiveCollection,this.activeInstance=null,this._flightInstanceChangeHandler=null,this._mapActivatedListener=G.getInstance().subscribe("MAP_ACTIVATED",()=>{this.hide()})}_createFeatures(){this.flightLayer.removeAllFeatures();const e=G.getInstance().getMapByType(Mt.className);if(!e)return void lg.error("could not find a cesium map!");const t=e.getScene();this._primitives.removeAll();const i=this.activeInstance.viewpoints.map((e,i)=>{const s=new Cesium.Camera(t);return s.frustum.far=200,s.frustum.near=10,s.setView({destination:Cesium.Cartesian3.fromDegrees(e.cameraPosition[0],e.cameraPosition[1],e.cameraPosition[2]),orientation:Cesium.HeadingPitchRoll.fromDegrees(e.heading,e.pitch,e.roll)}),this._primitives.add(new Cesium.VcsCameraPrimitve({camera:s,allowPicking:!1})),new ol.Feature({geometry:new ol.geom.Point(e.cameraPosition,"XYZ"),title:e.name||`${O.getInstance().getSingleMessage("i18n_viewpointeditor_number")} ${i+1}`,duration:e.duration})});if(this.activeInstance.isValid()){const e=[],t=og();if(t.values.activeInstance===this.activeInstance){if(this.activeInstance.interpolation===da.SPLINE){const i=i=>{Cesium.Cartographic.fromCartesian(t.destinationSpline.evaluate(i),null,hg),e.push([Cesium.Math.toDegrees(hg.longitude),Cesium.Math.toDegrees(hg.latitude),hg.height])},s=t.clock.endTime,r=s/.2>500?s/500:.2;for(let e=0;e<s;e+=r)i(e);i(s)}else i.forEach(t=>{e.push(t.getGeometry().getCoordinates())}),this.activeInstance.loop&&e.push(e[0]);const s=new ol.Feature({geometry:new ol.geom.LineString(e),title:"Flight Path"});s.setId("flightPathGeom"),i.push(s)}this.flightLayer.addFeatures(i);const s=this.flightLayer.getSource().getExtent();this.extent=w(s,s,2)}}_makeDirty(){this.flightLayer.active&&this._createFeatures()}visualizeFlight(e){a(e,ga);const t=G.getInstance().getMapByType(Mt.className);if(!t)return lg.error("could not find a cesium map!"),Promise.reject(new Error("could not find cesium map"));const i=og();return i.values.activeInstance!==e&&i.setActiveFlightInstance(e),i.readyPromise.then(()=>{if(i.values.activeInstance!==e)return;this._flightInstanceChangeHandler&&(this._flightInstanceChangeHandler(),this._flightInstanceChangeHandler=null),this._flightInstanceChangeHandler=e.changed.addEventListener(this._makeDirty.bind(this)),this.activeInstance=e,this._createFeatures(),this.flightLayer.activate(!0);const s=t.getScene();this._primitives.show=!0,s.primitives.contains(this._primitives)||s.primitives.add(this._primitives)})}hide(){this.flightLayer.activate(!1),this._primitives.show=!1}dispose(){G.getInstance().unsubscribeByKey(this._mapActivatedListener),this.flightLayer.dispose(),this._primitives.destroy(),cg=null}zoomToExtent(){if(!this.activeInstance||!this.activeInstance.isValid()||ol.extent.isEmpty(this.extent))return;const e=E.createViewPointFromExtent(this.extent),t=G.getInstance();t.getActiveMap().gotoViewPoint(e)}}function dg(){return cg||(cg=new ug),cg}const mg=v.getLogger("vcs.vcm.util.style.Icon"),gg=new Map,pg={FAILED:0,IDLE:1,LOADING:2,LOADED:4,TINTED:8};class yg{constructor(e){this.src=e,this.image=new Image,this.state=pg.IDLE,this.size=[32,32],this.canvas=document.createElement("canvas"),gg.set(e,this)}load(){return this.state===pg.IDLE?(this.state=pg.LOADING,new Promise((e,t)=>{this.image.onerror=e=>{this.state=pg.FAILED,t(e)},this.image.onload=()=>{this.state=pg.LOADED},this.image.src=this.src})):Promise.resolve()}_drawImage(){const e=this.canvas.getContext("2d");e.drawImage(this.image,0,0,this.size[32],this.size[32])}tint(e){this.state&(pg.LOADED|pg.TINTED)?Ie(this.canvas.getContext("2d"),e,this.size):mg.debug("cannot tint unloaded image")}untint(){this.state===pg.TINTED?(this._drawImage(),this.state=pg.TINTED):mg.debug("trying to untint a non-tinted image")}}var _g=yg;function fg(e){return gg.get(e)}class vg extends mh{static get className(){return"vcs.vcm.widgets.search.ErrorItem"}constructor(){super({className:vg.className})}}var Lg=vg;ol.geom.Circle.prototype.getCoordinates=function(){return[this.getCenter(),this.getLastCoordinate()]},ol.geom.Circle.prototype.setCoordinates=function(e,t){a(e,[[Number]]),a(e.length,2);const i=t||this.getLayout(),s=/XYM?/.test(i)?jt:Ft;this.setCenterAndRadius(e[0],s(...e),t)},ol.geom.Circle.prototype.rotate=function(e,t){},ol.geom.GeometryCollection.prototype.getCoordinates=function(){return this.getGeometries().map(e=>e.getCoordinates())},ol.geom.GeometryCollection.prototype.setCoordinates=function(e,t){a(e,Array),a(e.length,this.getGeometries().length),this.setGeometries(this.getGeometries().map((i,s)=>{return i.setCoordinates(e[s],t),i}))};i(458),i(459),i(460),i(461),i(462);i.d(t,"vcs",function(){return Mg});const Mg={};window["vcs"]=Mg,Mg.Url=n["a"],Mg.check=a,Mg.checkMaybe=o,Mg.deepForEach=c["a"],Mg.eventCannotBeFromMap=c["b"],Mg.isEmail=c["d"],Mg.oblique={},Mg.oblique.viewDirectionNames=h["c"],Mg.parseBoolean=c["e"],Mg.parseEnumValue=c["f"],Mg.vcm={},Mg.vcm.ExclusiveManager=U,Mg.vcm.Framework=G,Mg.vcm.Framework.dispose=om,Mg.vcm.Framework.getObjectFromOptions=$d,Mg.vcm.Framework.init=nm,Mg.vcm.Framework.loadConfig=am,Mg.vcm.NavigationMode=ue,Mg.vcm.SelectBehavior=A,Mg.vcm.cityGML={},Mg.vcm.cityGML.AllFeatureTypes=Xl,Mg.vcm.cityGML.AllProperties=ec,Mg.vcm.cityGML.AllPropertiesDateGeneric=nc,Mg.vcm.cityGML.AllPropertiesDateNonGeneric=sc,Mg.vcm.cityGML.AllPropertiesValueGeneric=ic,Mg.vcm.cityGML.AllPropertiesValueNonGeneric=tc,Mg.vcm.cityGML.AllPropertiesYearNonGeneric=rc,Mg.vcm.cityGML.Namespaces=$l,Mg.vcm.event={},Mg.vcm.event.EventType=I,Mg.vcm.i18n=O,Mg.vcm.interaction={},Mg.vcm.interaction.AbstractInteraction=ie,Mg.vcm.interaction.BitCounter=K,Mg.vcm.interaction.EventHandler={},Mg.vcm.interaction.EventHandler.getInstance=us,Mg.vcm.interaction.EventType=Q,Mg.vcm.interaction.ModificationKeyType=Z,Mg.vcm.interaction.PointerKeyType=$,Mg.vcm.layer={},Mg.vcm.layer.AbstractRasterLayer=Zs,Mg.vcm.layer.CommonLayer=Di,Mg.vcm.layer.CommonLayerImpl=cm,Mg.vcm.layer.FeatureStore=Sr,Mg.vcm.layer.FeatureStore.featureStoreState=Ds,Mg.vcm.layer.GeoJSON=Js,Mg.vcm.layer.GeoJSON.getEPSGCodeFromGeojson=Ns,Mg.vcm.layer.GeoJSON.parseGeoJSON=Bs,Mg.vcm.layer.GeoJSON.updateLegacyFeature=Hs,Mg.vcm.layer.GeoJSON.writeGeoJSON=Ws,Mg.vcm.layer.GlobalHider={},Mg.vcm.layer.GlobalHider.getInstance=lt,Mg.vcm.layer.Layer=gt,Mg.vcm.layer.OpenStreetMap=er,Mg.vcm.layer.SingleImage=$s,Mg.vcm.layer.TMSBase=ir,Mg.vcm.layer.TiledLayer=nr,Mg.vcm.layer.Vector=Ki,Mg.vcm.layer.VectorCluster=cr,Mg.vcm.layer.WFS=ur,Mg.vcm.layer.WMTS=pr,Mg.vcm.layer.WSV=Lr,Mg.vcm.layer.Wms=mr,Mg.vcm.layer.cesium={},Mg.vcm.layer.cesium.AbstractCesiumTilesetLayer=ps,Mg.vcm.layer.cesium.AsyncVectorImplementation=mm,Mg.vcm.layer.cesium.Buildings=vs,Mg.vcm.layer.cesium.CesiumTilesetLayer=_s,Mg.vcm.layer.cesium.CesiumTilesetLayerImpl=pm,Mg.vcm.layer.cesium.Czml=ws,Mg.vcm.layer.cesium.Entities=Ms,Mg.vcm.layer.cesium.Gltf=Ss,Mg.vcm.layer.cesium.ImageryLayer=_m,Mg.vcm.layer.cesium.OpenStreetMapLayer=vm,Mg.vcm.layer.cesium.PointCloud=Es,Mg.vcm.layer.cesium.SingleImageLayer=Mm,Mg.vcm.layer.cesium.TMSBaseLayer=wm,Mg.vcm.layer.cesium.Terrain=vt,Mg.vcm.layer.cesium.VectorClusterLayer=Sm,Mg.vcm.layer.cesium.VectorLayer=um,Mg.vcm.layer.cesium.WMSLayer=km,Mg.vcm.layer.cesium.WMTSLayer=Im,Mg.vcm.layer.cesium.Wsv=Pm,Mg.vcm.layer.oblique={},Mg.vcm.layer.oblique.AsyncVectorImplementation=Am,Mg.vcm.layer.oblique.ObliqueLayer=ci,Mg.vcm.layer.oblique.VectorClusterLayer=Fm,Mg.vcm.layer.oblique.VectorLayer=Ym,Mg.vcm.layer.openlayers={},Mg.vcm.layer.openlayers.AsyncVectorImplementation=Vm,Mg.vcm.layer.openlayers.Layer=Hm,Mg.vcm.layer.openlayers.OpenStreetMapLayer=Um,Mg.vcm.layer.openlayers.SingleImageLayer=qm,Mg.vcm.layer.openlayers.TMSBaseLayer=Km,Mg.vcm.layer.openlayers.VectorClusterLayer=Qm,Mg.vcm.layer.openlayers.VectorLayer=zm,Mg.vcm.layer.openlayers.WMSLayer=Xm,Mg.vcm.layer.openlayers.WMTSLayer=tg,Mg.vcm.maps={},Mg.vcm.maps.Cesium=Mt,Mg.vcm.maps.Oblique=ui,Mg.vcm.maps.Openlayers=_i,Mg.vcm.util={},Mg.vcm.util.Balloon=eo,Mg.vcm.util.CreateLink={},Mg.vcm.util.CreateLink.getLink=ig,Mg.vcm.util.CreateLink.makeLink=sg,Mg.vcm.util.Extent=ge,Mg.vcm.util.IconManager=fr,Mg.vcm.util.Logger=v,Mg.vcm.util.Login=sa,Mg.vcm.util.Projection=S,Mg.vcm.util.ViewPoint=E,Mg.vcm.util.downloadBlob=ad,Mg.vcm.util.downloadCanvas=ld,Mg.vcm.util.downloadText=od,Mg.vcm.util.editor={},Mg.vcm.util.editor.AltitudeModeNames=ji,Mg.vcm.util.editor.CircleGeometryEditor=Lo,Mg.vcm.util.editor.ClassificationType=Fi,Mg.vcm.util.editor.ClassificationTypeNames=Ni,Mg.vcm.util.editor.CompositeLayerEditor=Wo,Mg.vcm.util.editor.FeatureLayerEditor=Ra,Mg.vcm.util.editor.GeometryLayerEditor=xo,Mg.vcm.util.editor.LineGeometryEditor=_o,Mg.vcm.util.editor.ModeNames=xi,Mg.vcm.util.editor.MultiGeometryEditor=ko,Mg.vcm.util.editor.PointGeometryEditor=no,Mg.vcm.util.editor.RectangleGeometryEditor=Ua,Mg.vcm.util.editor.StyleLayerEditor=Vo,Mg.vcm.util.editor.circleFromCenterRadius=Jt,Mg.vcm.util.editor.convertGeometryToPolygon=qt,Mg.vcm.util.editor.getEditorById=Nn,Mg.vcm.util.editor.getFeatureHeights=Vt,Mg.vcm.util.flight={},Mg.vcm.util.flight.FlightInstance=ga,Mg.vcm.util.flight.FlightPlayer={},Mg.vcm.util.flight.FlightPlayer.getInstance=og,Mg.vcm.util.flight.FlightVisualizer={},Mg.vcm.util.flight.FlightVisualizer.getInstance=dg,Mg.vcm.util.flight.exportFlightAsGeoJson=ha,Mg.vcm.util.flight.flightInterpolations=da,Mg.vcm.util.flight.parseFlightOptionsFromGeoJson=ua,Mg.vcm.util.style={},Mg.vcm.util.style.DeclarativeStyleItem=it,Mg.vcm.util.style.Icon=_g,Mg.vcm.util.style.Icon.getIconBySrc=fg,Mg.vcm.util.style.PatternType=ve,Mg.vcm.util.style.StyleItem=_e,Mg.vcm.util.style.StyleType=pe,Mg.vcm.util.style.VectorStyleItem=Je,Mg.vcm.util.style.VectorStyleItem.defaultVectorStyle=Ke,Mg.vcm.util.style.VectorStyleItem.fromCesiumColor=Ze,Mg.vcm.util.style.createPattern=Te,Mg.vcm.util.style.getShapeFromOptions=Re,Mg.vcm.util.style.getStringColor=we,Mg.vcm.util.style.hexToOlColor=Le,Mg.vcm.util.style.olColorToHex=Se,Mg.vcm.util.style.parseColor=be,Mg.vcm.util.style.shapeCategory=Ge,Mg.vcm.util.style.validateHexColor=Ce,Mg.vcm.util.style.vectorStyleSymbol=We,Mg.vcm.widgets={},Mg.vcm.widgets.AdvancedWalkMode=kh,Mg.vcm.widgets.BalloonInfo=Ih,Mg.vcm.widgets.Copyright=Ph,Mg.vcm.widgets.CreateLink=Yh,Mg.vcm.widgets.DisplayQuality=ru,Mg.vcm.widgets.Drawing=ou,Mg.vcm.widgets.Drawing.defaultDrawingStyle=nu,Mg.vcm.widgets.Export=cu,Mg.vcm.widgets.FeatureList=uu,Mg.vcm.widgets.Flight=Dd,Mg.vcm.widgets.Locator=Xc,Mg.vcm.widgets.Measurement=Bu,Mg.vcm.widgets.Measurement.defaultMeasurementStyle=Gu,Mg.vcm.widgets.NavigationControls=Ku,Mg.vcm.widgets.OverviewMap=Qu,Mg.vcm.widgets.PDFCreator=pd,Mg.vcm.widgets.PDFCreator.OrientationMode=cd,Mg.vcm.widgets.PositionDisplay=vd,Mg.vcm.widgets.Query=Vc,Mg.vcm.widgets.Shadow=Md,Mg.vcm.widgets.SingleMeasurement=Wu,Mg.vcm.widgets.TransparentTerrainMode=Ed,Mg.vcm.widgets.WFSObject=zc,Mg.vcm.widgets.WFSObject.AllLogicalRelations=Hc,Mg.vcm.widgets.WFSObject.AllLogicalRelationsDoubleValue=Nc,Mg.vcm.widgets.WFSObject.AllLogicalRelationsSingleValue=Fc,Mg.vcm.widgets.WFSObject.AllSpatialFilters=Rc,Mg.vcm.widgets.displayQuality={},Mg.vcm.widgets.displayQuality.PostProcessStageType=xh,Mg.vcm.widgets.heightProfile={},Mg.vcm.widgets.heightProfile.HeightProfile=Gd,Mg.vcm.widgets.legend={},Mg.vcm.widgets.legend.AbstractGroupItem=Or,Mg.vcm.widgets.legend.ClusterItem=xr,Mg.vcm.widgets.legend.FlightInstanceItem=tn,Mg.vcm.widgets.legend.GroupItem=Gr,Mg.vcm.widgets.legend.GroupLayerItem=Rr,Mg.vcm.widgets.legend.LayerItem=Fr,Mg.vcm.widgets.legend.Legend=on,Mg.vcm.widgets.legend.PlanningClusterItem=$r,Mg.vcm.widgets.legend.PlanningClusterItem.getPlanningClusterItem=Xr,Mg.vcm.widgets.legend.PlanningInstanceItem=Jr,Mg.vcm.widgets.legend.PluginItem=Br,Mg.vcm.widgets.legend.TreeItem=Dr,Mg.vcm.widgets.legend.ViewpointItem=Wr,Mg.vcm.widgets.measurement={},Mg.vcm.widgets.measurement.MeasurementType=du,Mg.vcm.widgets.planning={},Mg.vcm.widgets.planning.Planning=$o,Mg.vcm.widgets.planning.PlanningComment={},Mg.vcm.widgets.planning.PlanningComment.commentTypes=oa,Mg.vcm.widgets.planning.PlanningInstance=fa,Mg.vcm.widgets.planning.PlanningObject=un,Mg.vcm.widgets.planning.PlanningObject.Status=cn,Mg.vcm.widgets.planning.PlanningObject.Type=ln,Mg.vcm.widgets.planning.PlanningObjectDrawing=Un,Mg.vcm.widgets.planning.PlanningObjectFeatureStore=Qn,Mg.vcm.widgets.planning.PlanningObjectGltf=mn,Mg.vcm.widgets.planning.PlanningObjectImage=pn,Mg.vcm.widgets.planning.PlanningObjectProcessing=Jn,Mg.vcm.widgets.query={},Mg.vcm.widgets.query.filter={},Mg.vcm.widgets.query.filter.CombinationFilter=Ic,Mg.vcm.widgets.query.filter.Filter=Cc,Mg.vcm.widgets.query.filter.GeometryFilter=Yc,Mg.vcm.widgets.query.filter.PropertyFilter=Ac,Mg.vcm.widgets.search={},Mg.vcm.widgets.search.Elasticsearch=th,Mg.vcm.widgets.search.ErrorItem=Lg,Mg.vcm.widgets.search.FeatureItem=ph,Mg.vcm.widgets.search.LayerItem=_h,Mg.vcm.widgets.search.Nominatim=Jc,Mg.vcm.widgets.search.ResultItem=mh,Mg.vcm.widgets.search.Search=Lh,Mg.vcm.widgets.search.VirtualcityLocationService=sh,Mg.vcm.widgets.search.middleware={},Mg.vcm.widgets.search.middleware.Near=ch,Mg.vcm.widgets.search.middleware.Tags=oh}]);