@openremote/core 1.11.2 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORRest","moment","ORModel","ORIcon"],t):"object"==typeof exports?exports.ORCore=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):e.ORCore=t(e.ORRest,e.moment,e.ORModel,e.ORIcon)}(self,(e,t,r,n)=>(()=>{var o={737:function(e,t,r){"use strict";var n=r(528),o=r(235),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},235:function(e,t,r){"use strict";var n=r(156),o=r(528),i=r(427),a=r(682),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,s),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},427:function(e,t,r){"use strict";var n=r(528),o=r(892),i=r(320)(),a=r(455),s=r(682),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},456:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();(function(e){var t={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(t.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&r.indexOf(Object.prototype.toString.call(e))>-1};function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function f(e){var t=new FileReader,r=l(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var r;t.arrayBuffer&&t.blob&&(r=e)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e,t,r,n=c(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=l(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},t.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[i(e)]},u.prototype.get=function(e){return e=i(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},u.prototype.set=function(e,t){this.map[i(e)]=a(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),s(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),s(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),s(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(e,t){var r,n,o=(t=t||{}).body;if(e instanceof g){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new u(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),d.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},h.call(g.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];v.redirect=function(e,t){if(-1===b.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function m(r,n){return new Promise(function(o,i){var a=new g(r,n);if(a.signal&&a.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL"),o(new v("response"in s?s.response:s.responseText,r))},s.onerror=function(){i(TypeError("Network request failed"))},s.ontimeout=function(){i(TypeError("Network request failed"))},s.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&t.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)})}m.polyfill=!0,n.fetch||(n.fetch=m,n.Headers=u,n.Request=g,n.Response=v),e.Headers=u,e.Request=g,e.Response=v,e.fetch=m,Object.defineProperty(e,"__esModule",{value:!0})})({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},892:function(e,t,r){"use strict";var n=r(320)(),o=r(528),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=r(874),s=r(682),u=r(455);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},727:function(e){"use strict";e.exports=EvalError},772:function(e){"use strict";e.exports=Error},511:function(e){"use strict";e.exports=RangeError},912:function(e){"use strict";e.exports=ReferenceError},874:function(e){"use strict";e.exports=SyntaxError},682:function(e){"use strict";e.exports=TypeError},834:function(e){"use strict";e.exports=URIError},521:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},o=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},i=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var a,s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw TypeError("Function.prototype.bind called on incompatible "+s);for(var u=o(arguments,1),c=r(0,s.length-u.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(a=Function("binder","return function ("+i(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=s.apply(this,n(u,arguments));return Object(t)===t?t:this}return s.apply(e,n(u,arguments))}),s.prototype){var p=function(){};p.prototype=s.prototype,a.prototype=new p,p.prototype=null}return a}},156:function(e,t,r){"use strict";var n=r(521);e.exports=Function.prototype.bind||n},528:function(e,t,r){"use strict";var n,o=r(772),i=r(727),a=r(511),s=r(912),u=r(874),c=r(682),l=r(834),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var d=function(){throw new c},g=h?function(){try{return arguments.callee,d}catch(e){try{return h(arguments,"callee").get}catch(e){return d}}}():d,y=r(465)(),v=r(209)(),b=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),m={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":m,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&b?b(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&b?b(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&b?b(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));w["%Error.prototype%"]=S}var k=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(r=b(o.prototype))}return w[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=r(156),x=r(673),A=E.call(Function.call,Array.prototype.concat),R=E.call(Function.apply,Array.prototype.splice),P=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),I=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,N=function(e){var t=C(e,0,1),r=C(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return P(e,j,function(e,t,r,o){n[n.length]=r?P(o,T,"$1"):t||e}),n},L=function(e,t){var r,n=e;if(x(O,n)&&(n="%"+(r=O[n])[0]+"%"),x(w,n)){var o=w[n];if(o===m&&(o=k(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=N(e),n=r.length>0?r[0]:"",o=L("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],R(r,A([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],g=C(d,0,1),y=C(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),n+="."+d,x(w,i="%"+n+"%"))a=w[i];else if(null!=a){if(!(d in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=r.length){var v=h(a,d);a=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[d]}else p=x(a,d),a=a[d];p&&!s&&(w[i]=a)}}return a}},455:function(e,t,r){"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},320:function(e,t,r){"use strict";var n=r(528)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},209:function(e){"use strict";var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},465:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(73);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},73:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},673:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(156).call(n,o)},921:function(e,t,r){!function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self,a=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;a?o=r.g:i&&(o=self);var s=!o.JS_SHA256_NO_COMMON_JS&&e.exports,u="function"==typeof define&&define.amd,c=!o.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),f=[-0x80000000,8388608,32768,128],p=[24,16,8,0],h=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],d=["hex","array","digest","arrayBuffer"],g=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),c&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(r){return new w(t,!0).update(r)[e]()}},v=function(e){var t=y("hex",e);a&&(t=b(t,e)),t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<d.length;++r){var n=d[r];t[n]=y(n,e)}return t},b=function(e,n){var i,a=r(917),s=r(194).Buffer,u=n?"sha224":"sha256";return i=s.from&&!o.JS_SHA256_NO_BUFFER_FROM?s.from:function(e){return new s(e)},function(r){if("string"==typeof r)return a.createHash(u).update(r,"utf8").digest("hex");if(null==r)throw Error(t);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===s?a.createHash(u).update(i(r)).digest("hex"):e(r)}},m=function(e,t){return function(r,n){return new S(r,t,!0).update(n)[e]()}},_=function(e){var t=m("hex",e);t.create=function(t){return new S(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<d.length;++r){var n=d[r];t[n]=m(n,e)}return t};function w(e,t){t?(g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function S(e,r,n){var o,i=typeof e;if("string"===i){var a,s=[],u=e.length,l=0;for(o=0;o<u;++o)(a=e.charCodeAt(o))<128?s[l++]=a:(a<2048?s[l++]=192|a>>>6:(a<55296||a>=57344?s[l++]=224|a>>>12:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),s[l++]=240|a>>>18,s[l++]=128|a>>>12&63),s[l++]=128|a>>>6&63),s[l++]=128|63&a);e=s}else if("object"===i){if(null===e)throw Error(t);else if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new w(r,!0).update(e).array());var f=[],p=[];for(o=0;o<64;++o){var h=e[o]||0;f[o]=92^h,p[o]=54^h}w.call(this,r,n),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}w.prototype.update=function(e){if(!this.finalized){var r,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(t);else if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);r=!0}for(var o,i,a=0,s=e.length,u=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,this.block=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),r)for(i=this.start;a<s&&i<64;++a)u[i>>>2]|=e[a]<<p[3&i++];else for(i=this.start;a<s&&i<64;++a)(o=e.charCodeAt(a))<128?u[i>>>2]|=o<<p[3&i++]:(o<2048?u[i>>>2]|=(192|o>>>6)<<p[3&i++]:(o<55296||o>=57344?u[i>>>2]|=(224|o>>>12)<<p[3&i++]:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++a)),u[i>>>2]|=(240|o>>>18)<<p[3&i++],u[i>>>2]|=(128|o>>>12&63)<<p[3&i++]),u[i>>>2]|=(128|o>>>6&63)<<p[3&i++]),u[i>>>2]|=(128|63&o)<<p[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=u[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000|0,this.bytes=this.bytes%0x100000000),this}},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},w.prototype.hash=function(){var e,t,r,n,o,i,a,s,u,c,l=this.h0,f=this.h1,p=this.h2,d=this.h3,g=this.h4,y=this.h5,v=this.h6,b=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((o=m[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=m[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,m[e]=m[e-16]+t+m[e-7]+r|0;for(e=0,c=f&p;e<64;e+=4)this.first?(this.is224?(a=300032,b=(o=m[0]-0x543c9a5b)-0x8f1a6c7|0,d=o+0x170e9b5|0):(a=0x2a01a605,b=(o=m[0]-0xc881298)-0x5ab00ac6|0,d=o+0x8909ae5|0),this.first=!1):(t=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),n=(a=l&f)^l&p^c,o=b+r+(g&y^~g&v)+h[e]+m[e],i=t+n,b=d+o|0,d=o+i|0),t=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),n=(s=d&l)^d&f^a,o=v+r+(b&g^~b&y)+h[e+1]+m[e+1],i=t+n,v=p+o|0,t=((p=o+i|0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),n=(u=p&d)^p&l^s,o=y+r+(v&b^~v&g)+h[e+2]+m[e+2],i=t+n,y=f+o|0,t=((f=o+i|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(c=f&p)^f&d^u,o=g+r+(y&v^~y&b)+h[e+3]+m[e+3],i=t+n,g=l+o|0,l=o+i|0,this.chromeBugWorkAround=!0;this.h0=this.h0+l|0,this.h1=this.h1+f|0,this.h2=this.h2+p|0,this.h3=this.h3+d|0,this.h4=this.h4+g|0,this.h5=this.h5+y|0,this.h6=this.h6+v|0,this.h7=this.h7+b|0},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=l[e>>>28&15]+l[e>>>24&15]+l[e>>>20&15]+l[e>>>16&15]+l[e>>>12&15]+l[e>>>8&15]+l[e>>>4&15]+l[15&e]+l[t>>>28&15]+l[t>>>24&15]+l[t>>>20&15]+l[t>>>16&15]+l[t>>>12&15]+l[t>>>8&15]+l[t>>>4&15]+l[15&t]+l[r>>>28&15]+l[r>>>24&15]+l[r>>>20&15]+l[r>>>16&15]+l[r>>>12&15]+l[r>>>8&15]+l[r>>>4&15]+l[15&r]+l[n>>>28&15]+l[n>>>24&15]+l[n>>>20&15]+l[n>>>16&15]+l[n>>>12&15]+l[n>>>8&15]+l[n>>>4&15]+l[15&n]+l[o>>>28&15]+l[o>>>24&15]+l[o>>>20&15]+l[o>>>16&15]+l[o>>>12&15]+l[o>>>8&15]+l[o>>>4&15]+l[15&o]+l[i>>>28&15]+l[i>>>24&15]+l[i>>>20&15]+l[i>>>16&15]+l[i>>>12&15]+l[i>>>8&15]+l[i>>>4&15]+l[15&i]+l[a>>>28&15]+l[a>>>24&15]+l[a>>>20&15]+l[a>>>16&15]+l[a>>>12&15]+l[a>>>8&15]+l[a>>>4&15]+l[15&a];return this.is224||(u+=l[s>>>28&15]+l[s>>>24&15]+l[s>>>20&15]+l[s>>>16&15]+l[s>>>12&15]+l[s>>>8&15]+l[s>>>4&15]+l[15&s]),u},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,a>>>24&255,a>>>16&255,a>>>8&255,255&a];return this.is224||u.push(s>>>24&255,s>>>16&255,s>>>8&255,255&s),u},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},S.prototype=new w,S.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();w.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),w.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),s?e.exports=k:(o.sha256=k.sha256,o.sha224=k.sha224,u&&define(function(){return k}))}()},891:function(e,t,r){e=r.nmd(e),(function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=1/0,u=0/0,c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",d="[object Error]",g="[object Function]",y="[object GeneratorFunction]",v="[object Map]",b="[object Number]",m="[object Object]",_="[object Promise]",w="[object RegExp]",S="[object Set]",k="[object String]",O="[object Symbol]",E="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",j="[object Int32Array]",T="[object Uint8Array]",N="[object Uint8ClampedArray]",L="[object Uint16Array]",U="[object Uint32Array]",D=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,V=RegExp(B.source),H=RegExp(W.source),q=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y=/[\\^$.*+?()[\]{}|]/g,X=RegExp(Y.source),Q=/^\s+/,Z=/\s/,ee=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,et=/\{\n\/\* \[wrapped with (.+)\] \*/,er=/,? & /,en=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eo=/[()=,{}\[\]\/\s]/,ei=/\\(\\)?/g,ea=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ec=/^0b[01]+$/i,el=/^\[object .+?Constructor\]$/,ef=/^0o[0-7]+$/i,ep=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ed=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ey="\ud800-\udfff",ev="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",eb="\\u2700-\\u27bf",em="a-z\\xdf-\\xf6\\xf8-\\xff",e_="A-Z\\xc0-\\xd6\\xd8-\\xde",ew="\\ufe0e\\ufe0f",eS="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ek="['’]",eO="["+eS+"]",eE="["+ev+"]",ex="["+em+"]",eA="[^"+ey+eS+"\\d+"+eb+em+e_+"]",eR="\ud83c[\udffb-\udfff]",eP="[^"+ey+"]",eC="(?:\ud83c[\udde6-\uddff]){2}",eI="[\ud800-\udbff][\udc00-\udfff]",ej="["+e_+"]",eT="\\u200d",eN="(?:"+ex+"|"+eA+")",eL="(?:"+ej+"|"+eA+")",eU="(?:"+ek+"(?:d|ll|m|re|s|t|ve))?",eD="(?:"+ek+"(?:D|LL|M|RE|S|T|VE))?",eM="(?:"+eE+"|"+eR+")?",eF="["+ew+"]?",eB="(?:"+eT+"(?:"+[eP,eC,eI].join("|")+")"+eF+eM+")*",eW=eF+eM+eB,eV="(?:"+["["+eb+"]",eC,eI].join("|")+")"+eW,eH="(?:"+[eP+eE+"?",eE,eC,eI,"["+ey+"]"].join("|")+")",eq=RegExp(ek,"g"),ez=RegExp(eE,"g"),eK=RegExp(eR+"(?="+eR+")|"+eH+eW,"g"),eG=RegExp([ej+"?"+ex+"+"+eU+"(?="+[eO,ej,"$"].join("|")+")",eL+"+"+eD+"(?="+[eO,ej+eN,"$"].join("|")+")",ej+"?"+eN+"+"+eU,ej+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eV].join("|"),"g"),e$=RegExp("["+eT+ey+ev+ew+"]"),eJ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eX=-1,eQ={};eQ[R]=eQ[P]=eQ[C]=eQ[I]=eQ[j]=eQ[T]=eQ[N]=eQ[L]=eQ[U]=!0,eQ[l]=eQ[f]=eQ[x]=eQ[p]=eQ[A]=eQ[h]=eQ[d]=eQ[g]=eQ[v]=eQ[b]=eQ[m]=eQ[w]=eQ[S]=eQ[k]=eQ[E]=!1;var eZ={};eZ[l]=eZ[f]=eZ[x]=eZ[A]=eZ[p]=eZ[h]=eZ[R]=eZ[P]=eZ[C]=eZ[I]=eZ[j]=eZ[v]=eZ[b]=eZ[m]=eZ[w]=eZ[S]=eZ[k]=eZ[O]=eZ[T]=eZ[N]=eZ[L]=eZ[U]=!0,eZ[d]=eZ[g]=eZ[E]=!1;var e0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e1=parseFloat,e2=parseInt,e3="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,e5="object"==typeof self&&self&&self.Object===Object&&self,e8=e3||e5||Function("return this")(),e6=t&&!t.nodeType&&t,e4=e6&&e&&!e.nodeType&&e,e9=e4&&e4.exports===e6,e7=e9&&e3.process,te=function(){try{var e=e4&&e4.require&&e4.require("util").types;if(e)return e;return e7&&e7.binding&&e7.binding("util")}catch(e){}}(),tt=te&&te.isArrayBuffer,tr=te&&te.isDate,tn=te&&te.isMap,to=te&&te.isRegExp,ti=te&&te.isSet,ta=te&&te.isTypedArray;function ts(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function tu(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function tc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function tl(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function tf(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function tp(e,t){return!!(null==e?0:e.length)&&tS(e,t,0)>-1}function th(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function td(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function tg(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function ty(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function tv(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function tb(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var tm=tx("length");function t_(e,t,r){var n;return r(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}function tw(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return -1}function tS(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return -1}(e,t,r):tw(e,tO,r)}function tk(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return -1}function tO(e){return e!=e}function tE(e,t){var r=null==e?0:e.length;return r?tP(e,t)/r:u}function tx(e){return function(t){return null==t?n:t[e]}}function tA(e){return function(t){return null==e?n:e[t]}}function tR(e,t,r,n,o){return o(e,function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)}),r}function tP(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);n!==a&&(r=n===r?a:r+a)}return r}function tC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function tI(e){return e?e.slice(0,tG(e)+1).replace(Q,""):e}function tj(e){return function(t){return e(t)}}function tT(e,t){return td(t,function(t){return e[t]})}function tN(e,t){return e.has(t)}function tL(e,t){for(var r=-1,n=e.length;++r<n&&tS(t,e[r],0)>-1;);return r}function tU(e,t){for(var r=e.length;r--&&tS(t,e[r],0)>-1;);return r}var tD=tA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tM=tA({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tF(e){return"\\"+e0[e]}function tB(e){return e$.test(e)}function tW(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function tV(e,t){return function(r){return e(t(r))}}function tH(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r];(s===t||s===a)&&(e[r]=a,i[o++]=r)}return i}function tq(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function tz(e){return tB(e)?function(e){for(var t=eK.lastIndex=0;eK.test(e);)++t;return t}(e):tm(e)}function tK(e){return tB(e)?e.match(eK)||[]:e.split("")}function tG(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var t$=tA({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),tJ=function e(t){var r,Z,ey,ev,eb=(t=null==t?e8:tJ.defaults(e8.Object(),t,tJ.pick(e8,eY))).Array,em=t.Date,e_=t.Error,ew=t.Function,eS=t.Math,ek=t.Object,eO=t.RegExp,eE=t.String,ex=t.TypeError,eA=eb.prototype,eR=ew.prototype,eP=ek.prototype,eC=t["__core-js_shared__"],eI=eR.toString,ej=eP.hasOwnProperty,eT=0,eN=(r=/[^.]+$/.exec(eC&&eC.keys&&eC.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",eL=eP.toString,eU=eI.call(ek),eD=e8._,eM=eO("^"+eI.call(ej).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eF=e9?t.Buffer:n,eB=t.Symbol,eW=t.Uint8Array,eV=eF?eF.allocUnsafe:n,eH=tV(ek.getPrototypeOf,ek),eK=ek.create,e$=eP.propertyIsEnumerable,e0=eA.splice,e3=eB?eB.isConcatSpreadable:n,e5=eB?eB.iterator:n,e6=eB?eB.toStringTag:n,e4=function(){try{var e=op(ek,"defineProperty");return e({},"",{}),e}catch(e){}}(),e7=t.clearTimeout!==e8.clearTimeout&&t.clearTimeout,te=em&&em.now!==e8.Date.now&&em.now,tm=t.setTimeout!==e8.setTimeout&&t.setTimeout,tA=eS.ceil,tY=eS.floor,tX=ek.getOwnPropertySymbols,tQ=eF?eF.isBuffer:n,tZ=t.isFinite,t0=eA.join,t1=tV(ek.keys,ek),t2=eS.max,t3=eS.min,t5=em.now,t8=t.parseInt,t6=eS.random,t4=eA.reverse,t9=op(t,"DataView"),t7=op(t,"Map"),re=op(t,"Promise"),rt=op(t,"Set"),rr=op(t,"WeakMap"),rn=op(ek,"create"),ro=rr&&new rr,ri={},ra=oD(t9),rs=oD(t7),ru=oD(re),rc=oD(rt),rl=oD(rr),rf=eB?eB.prototype:n,rp=rf?rf.valueOf:n,rh=rf?rf.toString:n;function rd(e){if(i$(e)&&!iD(e)&&!(e instanceof rb)){if(e instanceof rv)return e;if(ej.call(e,"__wrapped__"))return oM(e)}return new rv(e)}var rg=function(){function e(){}return function(t){if(!iG(t))return{};if(eK)return eK(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function ry(){}function rv(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function rb(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function rm(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function r_(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rS(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new rw;++t<r;)this.add(e[t])}function rk(e){var t=this.__data__=new r_(e);this.size=t.size}function rO(e,t){var r=iD(e),n=!r&&iU(e),o=!r&&!n&&iW(e),i=!r&&!n&&!o&&i2(e),a=r||n||o||i,s=a?tC(e.length,eE):[],u=s.length;for(var c in e)(t||ej.call(e,c))&&!(a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||om(c,u)))&&s.push(c);return s}function rE(e){var t=e.length;return t?e[nc(0,t-1)]:n}rd.templateSettings={escape:q,evaluate:z,interpolate:K,variable:"",imports:{_:rd}},rd.prototype=ry.prototype,rd.prototype.constructor=rd,rv.prototype=rg(ry.prototype),rv.prototype.constructor=rv,rb.prototype=rg(ry.prototype),rb.prototype.constructor=rb,rm.prototype.clear=function(){this.__data__=rn?rn(null):{},this.size=0},rm.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},rm.prototype.get=function(e){var t=this.__data__;if(rn){var r=t[e];return r===i?n:r}return ej.call(t,e)?t[e]:n},rm.prototype.has=function(e){var t=this.__data__;return rn?t[e]!==n:ej.call(t,e)},rm.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=rn&&n===t?i:t,this},r_.prototype.clear=function(){this.__data__=[],this.size=0},r_.prototype.delete=function(e){var t=this.__data__,r=rR(t,e);return!(r<0)&&(r==t.length-1?t.pop():e0.call(t,r,1),--this.size,!0)},r_.prototype.get=function(e){var t=this.__data__,r=rR(t,e);return r<0?n:t[r][1]},r_.prototype.has=function(e){return rR(this.__data__,e)>-1},r_.prototype.set=function(e,t){var r=this.__data__,n=rR(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},rw.prototype.clear=function(){this.size=0,this.__data__={hash:new rm,map:new(t7||r_),string:new rm}},rw.prototype.delete=function(e){var t=ol(this,e).delete(e);return this.size-=!!t,t},rw.prototype.get=function(e){return ol(this,e).get(e)},rw.prototype.has=function(e){return ol(this,e).has(e)},rw.prototype.set=function(e,t){var r=ol(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},rS.prototype.add=rS.prototype.push=function(e){return this.__data__.set(e,i),this},rS.prototype.has=function(e){return this.__data__.has(e)};function rx(e,t,r){(n===r||iT(e[t],r))&&(n!==r||t in e)||rI(e,t,r)}function rA(e,t,r){var o=e[t];ej.call(e,t)&&iT(o,r)&&(n!==r||t in e)||rI(e,t,r)}function rR(e,t){for(var r=e.length;r--;)if(iT(e[r][0],t))return r;return -1}function rP(e,t,r,n){return rM(e,function(e,o,i){t(n,e,r(e),i)}),n}function rC(e,t){return e&&nW(t,ad(t),e)}function rI(e,t,r){"__proto__"==t&&e4?e4(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rj(e,t){for(var r=-1,o=t.length,i=eb(o),a=null==e;++r<o;)i[r]=a?n:ac(e,t[r]);return i}function rT(e,t,r){return e==e&&(n!==r&&(e=e<=r?e:r),n!==t&&(e=e>=t?e:t)),e}function rN(e,t,r,o,i,a){var s,u=1&t,c=2&t,f=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),n!==s)return s;if(!iG(e))return e;var d=iD(e);if(d){if(E=(_=e).length,D=new _.constructor(E),E&&"string"==typeof _[0]&&ej.call(_,"index")&&(D.index=_.index,D.input=_.input),s=D,!u)return nB(e,s)}else{var _,E,D,M,F,B,W,V,H=og(e),q=H==g||H==y;if(iW(e))return nN(e,u);if(H==m||H==l||q&&!i){if(s=c||q?{}:ov(e),!u){return c?(M=e,F=(V=s)&&nW(e,ag(e),V),nW(M,od(M),F)):(B=e,W=rC(s,e),nW(B,oh(B),W))}}else{if(!eZ[H])return i?e:{};s=function(e,t,r){var n,o,i=e.constructor;switch(t){case x:return nL(e);case p:case h:return new i(+e);case A:return n=r?nL(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case R:case P:case C:case I:case j:case T:case N:case L:case U:return nU(e,r);case v:return new i;case b:case k:return new i(e);case w:return(o=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,o;case S:return new i;case O:return rp?ek(rp.call(e)):{}}}(e,H,u)}}a||(a=new rk);var z=a.get(e);if(z)return z;a.set(e,s),iZ(e)?e.forEach(function(n){s.add(rN(n,t,r,n,e,a))}):iJ(e)&&e.forEach(function(n,o){s.set(o,rN(n,t,r,o,e,a))});var K=f?c?oi:oo:c?ag:ad,G=d?n:K(e);return tc(G||e,function(n,o){G&&(n=e[o=n]),rA(s,o,rN(n,t,r,o,e,a))}),s}function rL(e,t,r){var o=r.length;if(null==e)return!o;for(e=ek(e);o--;){var i=r[o],a=t[i],s=e[i];if(n===s&&!(i in e)||!a(s))return!1}return!0}function rU(e,t,r){if("function"!=typeof e)throw new ex(o);return oC(function(){e.apply(n,r)},t)}function rD(e,t,r,n){var o=-1,i=tp,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;r&&(t=td(t,tj(r))),n?(i=th,a=!1):t.length>=200&&(i=tN,a=!1,t=new rS(t));e:for(;++o<s;){var l=e[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,n)||u.push(l)}return u}rk.prototype.clear=function(){this.__data__=new r_,this.size=0},rk.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},rk.prototype.get=function(e){return this.__data__.get(e)},rk.prototype.has=function(e){return this.__data__.has(e)},rk.prototype.set=function(e,t){var r=this.__data__;if(r instanceof r_){var n=r.__data__;if(!t7||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new rw(n)}return r.set(e,t),this.size=r.size,this};var rM=nq(rK),rF=nq(rG,!0);function rB(e,t){var r=!0;return rM(e,function(e,n,o){return r=!!t(e,n,o)}),r}function rW(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(n===u?s==s&&!i1(s):r(s,u)))var u=s,c=a}return c}function rV(e,t){var r=[];return rM(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function rH(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=ob),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?rH(s,t-1,r,n,o):tg(o,s):n||(o[o.length]=s)}return o}var rq=nz(),rz=nz(!0);function rK(e,t){return e&&rq(e,t,ad)}function rG(e,t){return e&&rz(e,t,ad)}function r$(e,t){return tf(t,function(t){return iq(e[t])})}function rJ(e,t){t=nI(t,e);for(var r=0,o=t.length;null!=e&&r<o;)e=e[oU(t[r++])];return r&&r==o?e:n}function rY(e,t,r){var n=t(e);return iD(e)?n:tg(n,r(e))}function rX(e){var t;return null==e?n===e?"[object Undefined]":"[object Null]":e6&&e6 in ek(e)?function(e){var t=ej.call(e,e6),r=e[e6];try{e[e6]=n;var o=!0}catch(e){}var i=eL.call(e);return o&&(t?e[e6]=r:delete e[e6]),i}(e):(t=e,eL.call(t))}function rQ(e,t){return e>t}function rZ(e,t){return null!=e&&ej.call(e,t)}function r0(e,t){return null!=e&&t in ek(e)}function r1(e,t,r){for(var o=r?th:tp,i=e[0].length,a=e.length,s=a,u=eb(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=td(f,tj(t))),c=t3(f.length,c),u[s]=!r&&(t||i>=120&&f.length>=120)?new rS(s&&f):n}f=e[0];var p=-1,h=u[0];e:for(;++p<i&&l.length<c;){var d=f[p],g=t?t(d):d;if(d=r||0!==d?d:0,!(h?tN(h,g):o(l,g,r))){for(s=a;--s;){var y=u[s];if(!(y?tN(y,g):o(e[s],g,r)))continue e}h&&h.push(g),l.push(d)}}return l}function r2(e,t,r){t=nI(t,e);var o=null==(e=oA(e,t))?e:e[oU(oJ(t))];return null==o?n:ts(o,e,r)}function r3(e){return i$(e)&&rX(e)==l}function r5(e,t,r,o,i){return e===t||(null!=e&&null!=t&&(i$(e)||i$(t))?function(e,t,r,o,i,a){var s=iD(e),u=iD(t),c=s?f:og(e),g=u?f:og(t);c=c==l?m:c,g=g==l?m:g;var y=c==m,_=g==m,E=c==g;if(E&&iW(e)){if(!iW(t))return!1;s=!0,y=!1}if(E&&!y)return a||(a=new rk),s||i2(e)?or(e,t,r,o,i,a):function(e,t,r,n,o,i,a){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case x:if(e.byteLength!=t.byteLength||!i(new eW(e),new eW(t)))break;return!0;case p:case h:case b:return iT(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case k:return e==t+"";case v:var s=tW;case S:var u=1&n;if(s||(s=tq),e.size!=t.size&&!u)break;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=or(s(e),s(t),n,o,i,a);return a.delete(e),l;case O:if(rp)return rp.call(e)==rp.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var R=y&&ej.call(e,"__wrapped__"),P=_&&ej.call(t,"__wrapped__");if(R||P){var C=R?e.value():e,I=P?t.value():t;return a||(a=new rk),i(C,I,r,o,a)}}return!!E&&(a||(a=new rk),function(e,t,r,o,i,a){var s=1&r,u=oo(e),c=u.length;if(c!=oo(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:ej.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var g=s;++l<c;){var y=e[f=u[l]],v=t[f];if(o)var b=s?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(n===b?y===v||i(y,v,r,o,a):b)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var m=e.constructor,_=t.constructor;m!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return a.delete(e),a.delete(t),d}(e,t,r,o,i,a))}(e,t,r,o,r5,i):e!=e&&t!=t)}function r8(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=ek(e);i--;){var u=r[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=r[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(n===l&&!(c in e))return!1}else{var p=new rk;if(o)var h=o(l,f,c,e,t,p);if(!(n===h?r5(f,l,3,o,p):h))return!1}}return!0}function r6(e){var t;return!(!iG(e)||(t=e,eN&&eN in t))&&(iq(e)?eM:el).test(oD(e))}function r4(e){return"function"==typeof e?e:null==e?aB:"object"==typeof e?iD(e)?nr(e[0],e[1]):nt(e):aJ(e)}function r9(e){if(!oO(e))return t1(e);var t=[];for(var r in ek(e))ej.call(e,r)&&"constructor"!=r&&t.push(r);return t}function r7(e,t){return e<t}function ne(e,t){var r=-1,n=iF(e)?eb(e.length):[];return rM(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function nt(e){var t=of(e);return 1==t.length&&t[0][2]?oE(t[0][0],t[0][1]):function(r){return r===e||r8(r,e,t)}}function nr(e,t){var r;return ow(e)&&(r=t)==r&&!iG(r)?oE(oU(e),t):function(r){var o=ac(r,e);return n===o&&o===t?al(r,e):r5(t,o,3)}}function nn(e,t,r,o,i){e!==t&&rq(t,function(a,s){if(i||(i=new rk),iG(a))!function(e,t,r,o,i,a,s){var u=oR(e,r),c=oR(t,r),l=s.get(c);if(l)return rx(e,r,l);var f=a?a(u,c,r+"",e,t,s):n,p=n===f;if(p){var h=iD(c),d=!h&&iW(c),g=!h&&!d&&i2(c);f=c,h||d||g?iD(u)?f=u:iB(u)?f=nB(u):d?(p=!1,f=nN(c,!0)):g?(p=!1,f=nU(c,!0)):f=[]:iX(c)||iU(c)?(f=u,iU(u)?f=ae(u):(!iG(u)||iq(u))&&(f=ov(c))):p=!1}p&&(s.set(c,f),i(f,c,o,a,s),s.delete(c)),rx(e,r,f)}(e,t,s,r,nn,o,i);else{var u=o?o(oR(e,s),a,s+"",e,t,i):n;n===u&&(u=a),rx(e,s,u)}},ag)}function no(e,t){var r=e.length;if(r)return om(t+=t<0?r:0,r)?e[t]:n}function ni(e,t,r){t=t.length?td(t,function(e){return iD(e)?function(t){return rJ(t,1===e.length?e[0]:e)}:e}):[aB];var n=-1;t=td(t,tj(oc()));var o=ne(e,function(e,r,o){return{criteria:td(t,function(t){return t(e)}),index:++n,value:e}}),i=o.length;for(o.sort(function(e,t){return function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,s=r.length;++n<a;){var u=nD(o[n],i[n]);if(u){if(n>=s)return u;return u*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)});i--;)o[i]=o[i].value;return o}function na(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=rJ(e,a);r(s,a)&&np(i,nI(a,e),s)}return i}function ns(e,t,r,n){var o=n?tk:tS,i=-1,a=t.length,s=e;for(e===t&&(t=nB(t)),r&&(s=td(e,tj(r)));++i<a;)for(var u=0,c=t[i],l=r?r(c):c;(u=o(s,l,u,n))>-1;)s!==e&&e0.call(s,u,1),e0.call(e,u,1);return e}function nu(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;om(o)?e0.call(e,o,1):nk(e,o)}}return e}function nc(e,t){return e+tY(t6()*(t-e+1))}function nl(e,t){var r="";if(!e||t<1||t>0x1fffffffffffff)return r;do t%2&&(r+=e),(t=tY(t/2))&&(e+=e);while(t);return r}function nf(e,t){return oI(ox(e,t,aB),e+"")}function np(e,t,r,o){if(!iG(e))return e;t=nI(t,e);for(var i=-1,a=t.length,s=a-1,u=e;null!=u&&++i<a;){var c=oU(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)break;if(i!=s){var f=u[c];l=o?o(f,c,u):n,n===l&&(l=iG(f)?f:om(t[i+1])?[]:{})}rA(u,c,l),u=u[c]}return e}var nh=ro?function(e,t){return ro.set(e,t),e}:aB,nd=e4?function(e,t){return e4(e,"toString",{configurable:!0,enumerable:!1,value:aD(t),writable:!0})}:aB;function ng(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=eb(o);++n<o;)i[n]=e[n+t];return i}function ny(e,t){var r;return rM(e,function(e,n,o){return!(r=t(e,n,o))}),!!r}function nv(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=0x7fffffff){for(;n<o;){var i=n+o>>>1,a=e[i];null!==a&&!i1(a)&&(r?a<=t:a<t)?n=i+1:o=i}return o}return nb(e,t,aB,r)}function nb(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,u=null===t,c=i1(t),l=n===t;i<a;){var f=tY((i+a)/2),p=r(e[f]),h=n!==p,d=null===p,g=p==p,y=i1(p);if(s)var v=o||g;else v=l?g&&(o||h):u?g&&h&&(o||!d):c?g&&h&&!d&&(o||!y):!d&&!y&&(o?p<=t:p<t);v?i=f+1:a=f}return t3(a,0xfffffffe)}function nm(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!iT(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function n_(e){return"number"==typeof e?e:i1(e)?u:+e}function nw(e){if("string"==typeof e)return e;if(iD(e))return td(e,nw)+"";if(i1(e))return rh?rh.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}function nS(e,t,r){var n=-1,o=tp,i=e.length,a=!0,s=[],u=s;if(r)a=!1,o=th;else if(i>=200){var c=t?null:n6(e);if(c)return tq(c);a=!1,o=tN,u=new rS}else u=t?[]:s;e:for(;++n<i;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,r)||(u!==s&&u.push(f),s.push(l))}return s}function nk(e,t){return t=nI(t,e),null==(e=oA(e,t))||delete e[oU(oJ(t))]}function nO(e,t,r,n){return np(e,t,r(rJ(e,t)),n)}function nE(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?ng(e,n?0:i,n?i+1:o):ng(e,n?i+1:0,n?o:i)}function nx(e,t){var r=e;return r instanceof rb&&(r=r.value()),ty(t,function(e,t){return t.func.apply(t.thisArg,tg([e],t.args))},r)}function nA(e,t,r){var n=e.length;if(n<2)return n?nS(e[0]):[];for(var o=-1,i=eb(n);++o<n;)for(var a=e[o],s=-1;++s<n;)s!=o&&(i[o]=rD(i[o]||a,e[s],t,r));return nS(rH(i,1),t,r)}function nR(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var u=o<a?t[o]:n;r(s,e[o],u)}return s}function nP(e){return iB(e)?e:[]}function nC(e){return"function"==typeof e?e:aB}function nI(e,t){return iD(e)?e:ow(e,t)?[e]:oL(at(e))}function nj(e,t,r){var o=e.length;return r=n===r?o:r,!t&&r>=o?e:ng(e,t,r)}var nT=e7||function(e){return e8.clearTimeout(e)};function nN(e,t){if(t)return e.slice();var r=e.length,n=eV?eV(r):new e.constructor(r);return e.copy(n),n}function nL(e){var t=new e.constructor(e.byteLength);return new eW(t).set(new eW(e)),t}function nU(e,t){var r=t?nL(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function nD(e,t){if(e!==t){var r=n!==e,o=null===e,i=e==e,a=i1(e),s=n!==t,u=null===t,c=t==t,l=i1(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!l&&e<t||l&&r&&i&&!o&&!a||u&&r&&i||!s&&i||!c)return -1}return 0}function nM(e,t,r,n){for(var o=-1,i=e.length,a=r.length,s=-1,u=t.length,c=t2(i-a,0),l=eb(u+c),f=!n;++s<u;)l[s]=t[s];for(;++o<a;)(f||o<i)&&(l[r[o]]=e[o]);for(;c--;)l[s++]=e[o++];return l}function nF(e,t,r,n){for(var o=-1,i=e.length,a=-1,s=r.length,u=-1,c=t.length,l=t2(i-s,0),f=eb(l+c),p=!n;++o<l;)f[o]=e[o];for(var h=o;++u<c;)f[h+u]=t[u];for(;++a<s;)(p||o<i)&&(f[h+r[a]]=e[o++]);return f}function nB(e,t){var r=-1,n=e.length;for(t||(t=eb(n));++r<n;)t[r]=e[r];return t}function nW(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=o?o(r[u],e[u],u,r,e):n;n===c&&(c=e[u]),i?rI(r,u,c):rA(r,u,c)}return r}function nV(e,t){return function(r,n){var o=iD(r)?tu:rP,i=t?t():{};return o(r,e,oc(n,2),i)}}function nH(e){return nf(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&o_(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=ek(t);++o<i;){var u=r[o];u&&e(t,u,o,a)}return t})}function nq(e,t){return function(r,n){if(null==r)return r;if(!iF(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=ek(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}function nz(e){return function(t,r,n){for(var o=-1,i=ek(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}}function nK(e){return function(t){var r=tB(t=at(t))?tK(t):n,o=r?r[0]:t.charAt(0),i=r?nj(r,1).join(""):t.slice(1);return o[e]()+i}}function nG(e){return function(t){return ty(aN(ax(t).replace(eq,"")),e,"")}}function n$(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=rg(e.prototype),n=e.apply(r,t);return iG(n)?n:r}}function nJ(e){return function(t,r,o){var i=ek(t);if(!iF(t)){var a=oc(r,3);t=ad(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function nY(e){return on(function(t){var r=t.length,i=r,a=rv.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new ex(o);if(a&&!u&&"wrapper"==os(s))var u=new rv([],!0)}for(i=u?i:r;++i<r;){var c=os(s=t[i]),l="wrapper"==c?oa(s):n;u=l&&oS(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[os(l[0])].apply(u,l[3]):1==s.length&&oS(s)?u[c]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&iD(n))return u.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}})}function nX(e,t,r,o,i,a,s,u,c,l){var f=128&t,p=1&t,h=2&t,d=24&t,g=512&t,y=h?n:n$(e);function v(){for(var b=arguments.length,m=eb(b),_=b;_--;)m[_]=arguments[_];if(d)var w=ou(v),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(m,w);if(o&&(m=nM(m,o,i,d)),a&&(m=nF(m,a,s,d)),b-=S,d&&b<l){var k=tH(m,w);return n5(e,t,nX,v.placeholder,r,m,k,u,c,l-b)}var O=p?r:this,E=h?O[e]:e;return b=m.length,u?m=function(e,t){for(var r=e.length,o=t3(t.length,r),i=nB(e);o--;){var a=t[o];e[o]=om(a,r)?i[a]:n}return e}(m,u):g&&b>1&&m.reverse(),f&&c<b&&(m.length=c),this&&this!==e8&&this instanceof v&&(E=y||n$(E)),E.apply(O,m)}return v}function nQ(e,t){return function(r,n){var o,i;return o=t(n),i={},rK(r,function(t,r,n){e(i,o(t),r,n)}),i}}function nZ(e,t){return function(r,o){var i;if(n===r&&n===o)return t;if(n!==r&&(i=r),n!==o){if(n===i)return o;"string"==typeof r||"string"==typeof o?(r=nw(r),o=nw(o)):(r=n_(r),o=n_(o)),i=e(r,o)}return i}}function n0(e){return on(function(t){return t=td(t,tj(oc())),nf(function(r){var n=this;return e(t,function(e){return ts(e,n,r)})})})}function n1(e,t){var r=(t=n===t?" ":nw(t)).length;if(r<2)return r?nl(t,e):t;var o=nl(t,tA(e/tz(t)));return tB(t)?nj(tK(o),0,e).join(""):o.slice(0,e)}function n2(e){return function(t,r,o){o&&"number"!=typeof o&&o_(t,r,o)&&(r=o=n),t=i6(t),n===r?(r=t,t=0):r=i6(r),o=n===o?t<r?1:-1:i6(o);for(var i=t,a=r,s=o,u=-1,c=t2(tA((a-i)/(s||1)),0),l=eb(c);c--;)l[e?c:++u]=i,i+=s;return l}}function n3(e){return function(t,r){return("string"!=typeof t||"string"!=typeof r)&&(t=i7(t),r=i7(r)),e(t,r)}}function n5(e,t,r,o,i,a,s,u,c,l){var f=8&t,p=f?s:n,h=f?n:s,d=f?a:n,g=f?n:a;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var y=[e,t,i,d,p,g,h,u,c,l],v=r.apply(n,y);return oS(e)&&oP(v,y),v.placeholder=o,oj(v,e,t)}function n8(e){var t=eS[e];return function(e,r){if(e=i7(e),(r=null==r?0:t3(i4(r),292))&&tZ(e)){var n=(at(e)+"e").split("e");return+((n=(at(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(n[1]-r))}return t(e)}}var n6=rt&&1/tq(new rt([,-0]))[1]==s?function(e){return new rt(e)}:az;function n4(e){return function(t){var r,n,o=og(t);return o==v?tW(t):o==S?(r=-1,n=Array(t.size),t.forEach(function(e){n[++r]=[e,e]}),n):td(e(t),function(e){return[e,t[e]]})}}function n9(e,t,r,i,s,u,c,l){var f=2&t;if(!f&&"function"!=typeof e)throw new ex(o);var p=i?i.length:0;if(p||(t&=-97,i=s=n),c=n===c?c:t2(i4(c),0),l=n===l?l:i4(l),p-=s?s.length:0,64&t){var h=i,d=s;i=s=n}var g=f?n:oa(e),y=[e,t,r,i,s,h,d,u,c,l];if(g&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,s=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(i||s){1&n&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nM(c,u,t[4]):u,e[4]=c?tH(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?nF(c,u,t[6]):u,e[6]=c?tH(e[5],a):t[6]),(u=t[7])&&(e[7]=u),128&n&&(e[8]=null==e[8]?t[8]:t3(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}}(y,g),e=y[0],t=y[1],r=y[2],i=y[3],s=y[4],(l=y[9]=y[9]===n?f?0:e.length:t2(y[9]-p,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?R=function(e,t,r){var o=n$(e);function i(){for(var a=arguments.length,s=eb(a),u=a,c=ou(i);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:tH(s,c);return(a-=l.length)<r?n5(e,t,nX,i.placeholder,n,s,l,n,n,r-a):ts(this&&this!==e8&&this instanceof i?o:e,this,s)}return i}(e,t,l):32!=t&&33!=t||s.length?R=nX.apply(n,y):(v=e,b=t,m=r,_=i,w=1&b,S=n$(v),R=function e(){for(var t=-1,r=arguments.length,n=-1,o=_.length,i=eb(o+r),a=this&&this!==e8&&this instanceof e?S:v;++n<o;)i[n]=_[n];for(;r--;)i[n++]=arguments[++t];return ts(a,w?m:this,i)});else var v,b,m,_,w,S,k,O,E,x,A,R=(k=e,O=t,E=r,x=1&O,A=n$(k),function e(){return(this&&this!==e8&&this instanceof e?A:k).apply(x?E:this,arguments)});return oj((g?nh:oP)(R,y),e,t)}function n7(e,t,r,o){return n===e||iT(e,eP[r])&&!ej.call(o,r)?t:e}function oe(e,t,r,o,i,a){return iG(e)&&iG(t)&&(a.set(t,e),nn(e,t,n,oe,a),a.delete(t)),e}function ot(e){return iX(e)?n:e}function or(e,t,r,o,i,a){var s=1&r,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&r?new rS:n;for(a.set(e,t),a.set(t,e);++p<u;){var g=e[p],y=t[p];if(o)var v=s?o(y,g,p,t,e,a):o(g,y,p,e,t,a);if(n!==v){if(v)continue;h=!1;break}if(d){if(!tb(t,function(e,t){if(!tN(d,t)&&(g===e||i(g,e,r,o,a)))return d.push(t)})){h=!1;break}}else if(!(g===y||i(g,y,r,o,a))){h=!1;break}}return a.delete(e),a.delete(t),h}function on(e){return oI(ox(e,n,oq),e+"")}function oo(e){return rY(e,ad,oh)}function oi(e){return rY(e,ag,od)}var oa=ro?function(e){return ro.get(e)}:az;function os(e){for(var t=e.name+"",r=ri[t],n=ej.call(ri,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function ou(e){return(ej.call(rd,"placeholder")?rd:e).placeholder}function oc(){var e=rd.iteratee||aW;return e=e===aW?r4:e,arguments.length?e(arguments[0],arguments[1]):e}function ol(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function of(e){for(var t=ad(e),r=t.length;r--;){var n,o=t[r],i=e[o];t[r]=[o,i,(n=i)==n&&!iG(n)]}return t}function op(e,t){var r=null==e?n:e[t];return r6(r)?r:n}var oh=tX?function(e){return null==e?[]:tf(tX(e=ek(e)),function(t){return e$.call(e,t)})}:aQ,od=tX?function(e){for(var t=[];e;)tg(t,oh(e)),e=eH(e);return t}:aQ,og=rX;function oy(e,t,r){t=nI(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=oU(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&iK(o)&&om(a,o)&&(iD(e)||iU(e))}function ov(e){return"function"!=typeof e.constructor||oO(e)?{}:rg(eH(e))}function ob(e){return iD(e)||iU(e)||!!(e3&&e&&e[e3])}function om(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&ep.test(e))&&e>-1&&e%1==0&&e<t}function o_(e,t,r){if(!iG(r))return!1;var n=typeof t;return("number"==n?!!(iF(r)&&om(t,r.length)):"string"==n&&t in r)&&iT(r[t],e)}function ow(e,t){if(iD(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||i1(e))||$.test(e)||!G.test(e)||null!=t&&e in ek(t)}function oS(e){var t=os(e),r=rd[t];if("function"!=typeof r||!(t in rb.prototype))return!1;if(e===r)return!0;var n=oa(r);return!!n&&e===n[0]}(t9&&og(new t9(new ArrayBuffer(1)))!=A||t7&&og(new t7)!=v||re&&og(re.resolve())!=_||rt&&og(new rt)!=S||rr&&og(new rr)!=E)&&(og=function(e){var t=rX(e),r=t==m?e.constructor:n,o=r?oD(r):"";if(o)switch(o){case ra:return A;case rs:return v;case ru:return _;case rc:return S;case rl:return E}return t});var ok=eC?iq:aZ;function oO(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}function oE(e,t){return function(r){return null!=r&&r[e]===t&&(n!==t||e in ek(r))}}function ox(e,t,r){return t=t2(n===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=t2(n.length-t,0),a=eb(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=eb(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),ts(e,this,s)}}function oA(e,t){return t.length<2?e:rJ(e,ng(t,0,-1))}function oR(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var oP=oT(nh),oC=tm||function(e,t){return e8.setTimeout(e,t)},oI=oT(nd);function oj(e,t,r){var n,o,i,a=t+"";return oI(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ee,"{\n/* [wrapped with "+t+"] */\n")}(a,(n=(i=a.match(et))?i[1].split(er):[],o=r,tc(c,function(e){var t="_."+e[0];o&e[1]&&!tp(n,t)&&n.push(t)}),n.sort())))}function oT(e){var t=0,r=0;return function(){var o=t5(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function oN(e,t){var r=-1,o=e.length,i=o-1;for(t=n===t?o:t;++r<t;){var a=nc(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var oL=(ey=(Z=iA(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,function(e,r,n,o){t.push(n?o.replace(ei,"$1"):r||e)}),t},function(e){return 500===ey.size&&ey.clear(),e})).cache,Z);function oU(e){if("string"==typeof e||i1(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function oD(e){if(null!=e){try{return eI.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function oM(e){if(e instanceof rb)return e.clone();var t=new rv(e.__wrapped__,e.__chain__);return t.__actions__=nB(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var oF=nf(function(e,t){return iB(e)?rD(e,rH(t,1,iB,!0)):[]}),oB=nf(function(e,t){var r=oJ(t);return iB(r)&&(r=n),iB(e)?rD(e,rH(t,1,iB,!0),oc(r,2)):[]}),oW=nf(function(e,t){var r=oJ(t);return iB(r)&&(r=n),iB(e)?rD(e,rH(t,1,iB,!0),n,r):[]});function oV(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:i4(r);return o<0&&(o=t2(n+o,0)),tw(e,oc(t,3),o)}function oH(e,t,r){var o=null==e?0:e.length;if(!o)return -1;var i=o-1;return n!==r&&(i=i4(r),i=r<0?t2(o+i,0):t3(i,o-1)),tw(e,oc(t,3),i,!0)}function oq(e){return(null==e?0:e.length)?rH(e,1):[]}function oz(e){return e&&e.length?e[0]:n}var oK=nf(function(e){var t=td(e,nP);return t.length&&t[0]===e[0]?r1(t):[]}),oG=nf(function(e){var t=oJ(e),r=td(e,nP);return t===oJ(r)?t=n:r.pop(),r.length&&r[0]===e[0]?r1(r,oc(t,2)):[]}),o$=nf(function(e){var t=oJ(e),r=td(e,nP);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?r1(r,n,t):[]});function oJ(e){var t=null==e?0:e.length;return t?e[t-1]:n}var oY=nf(oX);function oX(e,t){return e&&e.length&&t&&t.length?ns(e,t):e}var oQ=on(function(e,t){var r=null==e?0:e.length,n=rj(e,t);return nu(e,td(t,function(e){return om(e,r)?+e:e}).sort(nD)),n});function oZ(e){return null==e?e:t4.call(e)}var o0=nf(function(e){return nS(rH(e,1,iB,!0))}),o1=nf(function(e){var t=oJ(e);return iB(t)&&(t=n),nS(rH(e,1,iB,!0),oc(t,2))}),o2=nf(function(e){var t=oJ(e);return t="function"==typeof t?t:n,nS(rH(e,1,iB,!0),n,t)});function o3(e){if(!(e&&e.length))return[];var t=0;return e=tf(e,function(e){if(iB(e))return t=t2(e.length,t),!0}),tC(t,function(t){return td(e,tx(t))})}function o5(e,t){if(!(e&&e.length))return[];var r=o3(e);return null==t?r:td(r,function(e){return ts(t,n,e)})}var o8=nf(function(e,t){return iB(e)?rD(e,t):[]}),o6=nf(function(e){return nA(tf(e,iB))}),o4=nf(function(e){var t=oJ(e);return iB(t)&&(t=n),nA(tf(e,iB),oc(t,2))}),o9=nf(function(e){var t=oJ(e);return t="function"==typeof t?t:n,nA(tf(e,iB),n,t)}),o7=nf(o3),ie=nf(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,o5(e,r)});function it(e){var t=rd(e);return t.__chain__=!0,t}function ir(e,t){return t(e)}var io=on(function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return rj(t,e)};return!(t>1)&&!this.__actions__.length&&o instanceof rb&&om(r)?((o=o.slice(r,+r+ +!!t)).__actions__.push({func:ir,args:[i],thisArg:n}),new rv(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(i)}),ii=nV(function(e,t,r){ej.call(e,r)?++e[r]:rI(e,r,1)}),ia=nJ(oV),is=nJ(oH);function iu(e,t){return(iD(e)?tc:rM)(e,oc(t,3))}function ic(e,t){return(iD(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:rF)(e,oc(t,3))}var il=nV(function(e,t,r){ej.call(e,r)?e[r].push(t):rI(e,r,[t])}),ip=nf(function(e,t,r){var n=-1,o="function"==typeof t,i=iF(e)?eb(e.length):[];return rM(e,function(e){i[++n]=o?ts(t,e,r):r2(e,t,r)}),i}),ih=nV(function(e,t,r){rI(e,r,t)});function id(e,t){return(iD(e)?td:ne)(e,oc(t,3))}var ig=nV(function(e,t,r){e[+!r].push(t)},function(){return[[],[]]}),iy=nf(function(e,t){if(null==e)return[];var r=t.length;return r>1&&o_(e,t[0],t[1])?t=[]:r>2&&o_(t[0],t[1],t[2])&&(t=[t[0]]),ni(e,rH(t,1),[])}),iv=te||function(){return e8.Date.now()};function ib(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,n9(e,128,n,n,n,n,t)}function im(e,t){var r;if("function"!=typeof t)throw new ex(o);return e=i4(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var i_=nf(function(e,t,r){var n=1;if(r.length){var o=tH(r,ou(i_));n|=32}return n9(e,n,t,r,o)}),iw=nf(function(e,t,r){var n=3;if(r.length){var o=tH(r,ou(iw));n|=32}return n9(t,n,e,r,o)});function iS(e,t,r){t=r?n:t;var o=n9(e,8,n,n,n,n,n,t);return o.placeholder=iS.placeholder,o}function ik(e,t,r){t=r?n:t;var o=n9(e,16,n,n,n,n,n,t);return o.placeholder=ik.placeholder,o}function iO(e,t,r){var i,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new ex(o);function g(t){var r=i,o=a;return i=a=n,f=t,u=e.apply(o,r)}function y(e){var r=e-l,o=e-f;return n===l||r>=t||r<0||h&&o>=s}function v(){var e,r,n,o=iv();if(y(o))return b(o);c=oC(v,(e=o-l,r=o-f,n=t-e,h?t3(n,s-r):n))}function b(e){return(c=n,d&&i)?g(e):(i=a=n,u)}function m(){var e,r=iv(),o=y(r);if(i=arguments,a=this,l=r,o){if(n===c)return f=e=l,c=oC(v,t),p?g(e):u;if(h)return nT(c),c=oC(v,t),g(l)}return n===c&&(c=oC(v,t)),u}return t=i7(t)||0,iG(r)&&(p=!!r.leading,s=(h="maxWait"in r)?t2(i7(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d),m.cancel=function(){n!==c&&nT(c),f=0,i=l=a=c=n},m.flush=function(){return n===c?u:b(iv())},m}var iE=nf(function(e,t){return rU(e,1,t)}),ix=nf(function(e,t,r){return rU(e,i7(t)||0,r)});function iA(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ex(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(iA.Cache||rw),r}function iR(e){if("function"!=typeof e)throw new ex(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}iA.Cache=rw;var iP=nf(function(e,t){var r=(t=1==t.length&&iD(t[0])?td(t[0],tj(oc())):td(rH(t,1),tj(oc()))).length;return nf(function(n){for(var o=-1,i=t3(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return ts(e,this,n)})}),iC=nf(function(e,t){var r=tH(t,ou(iC));return n9(e,32,n,t,r)}),iI=nf(function(e,t){var r=tH(t,ou(iI));return n9(e,64,n,t,r)}),ij=on(function(e,t){return n9(e,256,n,n,n,t)});function iT(e,t){return e===t||e!=e&&t!=t}var iN=n3(rQ),iL=n3(function(e,t){return e>=t}),iU=r3(function(){return arguments}())?r3:function(e){return i$(e)&&ej.call(e,"callee")&&!e$.call(e,"callee")},iD=eb.isArray,iM=tt?tj(tt):function(e){return i$(e)&&rX(e)==x};function iF(e){return null!=e&&iK(e.length)&&!iq(e)}function iB(e){return i$(e)&&iF(e)}var iW=tQ||aZ,iV=tr?tj(tr):function(e){return i$(e)&&rX(e)==h};function iH(e){if(!i$(e))return!1;var t=rX(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iX(e)}function iq(e){if(!iG(e))return!1;var t=rX(e);return t==g||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function iz(e){return"number"==typeof e&&e==i4(e)}function iK(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function iG(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function i$(e){return null!=e&&"object"==typeof e}var iJ=tn?tj(tn):function(e){return i$(e)&&og(e)==v};function iY(e){return"number"==typeof e||i$(e)&&rX(e)==b}function iX(e){if(!i$(e)||rX(e)!=m)return!1;var t=eH(e);if(null===t)return!0;var r=ej.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eI.call(r)==eU}var iQ=to?tj(to):function(e){return i$(e)&&rX(e)==w},iZ=ti?tj(ti):function(e){return i$(e)&&og(e)==S};function i0(e){return"string"==typeof e||!iD(e)&&i$(e)&&rX(e)==k}function i1(e){return"symbol"==typeof e||i$(e)&&rX(e)==O}var i2=ta?tj(ta):function(e){return i$(e)&&iK(e.length)&&!!eQ[rX(e)]},i3=n3(r7),i5=n3(function(e,t){return e<=t});function i8(e){if(!e)return[];if(iF(e))return i0(e)?tK(e):nB(e);if(e5&&e[e5]){for(var t,r=e[e5](),n=[];!(t=r.next()).done;)n.push(t.value);return n}var o=og(e);return(o==v?tW:o==S?tq:ak)(e)}function i6(e){return e?(e=i7(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function i4(e){var t=i6(e),r=t%1;return t==t?r?t-r:t:0}function i9(e){return e?rT(i4(e),0,0xffffffff):0}function i7(e){if("number"==typeof e)return e;if(i1(e))return u;if(iG(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=iG(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tI(e);var r=ec.test(e);return r||ef.test(e)?e2(e.slice(2),r?2:8):eu.test(e)?u:+e}function ae(e){return nW(e,ag(e))}function at(e){return null==e?"":nw(e)}var ar=nH(function(e,t){if(oO(t)||iF(t))return void nW(t,ad(t),e);for(var r in t)ej.call(t,r)&&rA(e,r,t[r])}),an=nH(function(e,t){nW(t,ag(t),e)}),ao=nH(function(e,t,r,n){nW(t,ag(t),e,n)}),ai=nH(function(e,t,r,n){nW(t,ad(t),e,n)}),aa=on(rj),as=nf(function(e,t){e=ek(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&o_(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=ag(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(n===f||iT(f,eP[l])&&!ej.call(e,l))&&(e[l]=a[l])}return e}),au=nf(function(e){return e.push(n,oe),ts(av,n,e)});function ac(e,t,r){var o=null==e?n:rJ(e,t);return n===o?r:o}function al(e,t){return null!=e&&oy(e,t,r0)}var af=nQ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eL.call(t)),e[t]=r},aD(aB)),ap=nQ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eL.call(t)),ej.call(e,t)?e[t].push(r):e[t]=[r]},oc),ah=nf(r2);function ad(e){return iF(e)?rO(e):r9(e)}function ag(e){return iF(e)?rO(e,!0):function(e){if(!iG(e)){var t=e,r=[];if(null!=t)for(var n in ek(t))r.push(n);return r}var o=oO(e),i=[];for(var a in e)"constructor"==a&&(o||!ej.call(e,a))||i.push(a);return i}(e)}var ay=nH(function(e,t,r){nn(e,t,r)}),av=nH(function(e,t,r,n){nn(e,t,r,n)}),ab=on(function(e,t){var r={};if(null==e)return r;var n=!1;t=td(t,function(t){return t=nI(t,e),n||(n=t.length>1),t}),nW(e,oi(e),r),n&&(r=rN(r,7,ot));for(var o=t.length;o--;)nk(r,t[o]);return r}),am=on(function(e,t){return null==e?{}:na(e,t,function(t,r){return al(e,r)})});function a_(e,t){if(null==e)return{};var r=td(oi(e),function(e){return[e]});return t=oc(t),na(e,r,function(e,r){return t(e,r[0])})}var aw=n4(ad),aS=n4(ag);function ak(e){return null==e?[]:tT(e,ad(e))}var aO=nG(function(e,t,r){return t=t.toLowerCase(),e+(r?aE(t):t)});function aE(e){return aT(at(e).toLowerCase())}function ax(e){return(e=at(e))&&e.replace(eh,tD).replace(ez,"")}var aA=nG(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),aR=nG(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),aP=nK("toLowerCase"),aC=nG(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),aI=nG(function(e,t,r){return e+(r?" ":"")+aT(t)}),aj=nG(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),aT=nK("toUpperCase");function aN(e,t,r){if(e=at(e),t=r?n:t,n===t){var o;return(o=e,eJ.test(o))?e.match(eG)||[]:e.match(en)||[]}return e.match(t)||[]}var aL=nf(function(e,t){try{return ts(e,n,t)}catch(e){return iH(e)?e:new e_(e)}}),aU=on(function(e,t){return tc(t,function(t){rI(e,t=oU(t),i_(e[t],e))}),e});function aD(e){return function(){return e}}var aM=nY(),aF=nY(!0);function aB(e){return e}function aW(e){return r4("function"==typeof e?e:rN(e,1))}var aV=nf(function(e,t){return function(r){return r2(r,e,t)}}),aH=nf(function(e,t){return function(r){return r2(e,r,t)}});function aq(e,t,r){var n=ad(t),o=r$(t,n);null!=r||iG(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=r$(t,ad(t)));var i=!(iG(r)&&"chain"in r)||!!r.chain,a=iq(e);return tc(o,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=nB(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,tg([this.value()],arguments))})}),e}function az(){}var aK=n0(td),aG=n0(tl),a$=n0(tb);function aJ(e){return ow(e)?tx(oU(e)):function(t){return rJ(t,e)}}var aY=n2(),aX=n2(!0);function aQ(){return[]}function aZ(){return!1}var a0=nZ(function(e,t){return e+t},0),a1=n8("ceil"),a2=nZ(function(e,t){return e/t},1),a3=n8("floor"),a5=nZ(function(e,t){return e*t},1),a8=n8("round"),a6=nZ(function(e,t){return e-t},0);return rd.after=function(e,t){if("function"!=typeof t)throw new ex(o);return e=i4(e),function(){if(--e<1)return t.apply(this,arguments)}},rd.ary=ib,rd.assign=ar,rd.assignIn=an,rd.assignInWith=ao,rd.assignWith=ai,rd.at=aa,rd.before=im,rd.bind=i_,rd.bindAll=aU,rd.bindKey=iw,rd.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return iD(e)?e:[e]},rd.chain=it,rd.chunk=function(e,t,r){t=(r?o_(e,t,r):n===t)?1:t2(i4(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=eb(tA(o/t));i<o;)s[a++]=ng(e,i,i+=t);return s},rd.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},rd.concat=function(){var e=arguments.length;if(!e)return[];for(var t=eb(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return tg(iD(r)?nB(r):[r],rH(t,1))},rd.cond=function(e){var t=null==e?0:e.length,r=oc();return e=t?td(e,function(e){if("function"!=typeof e[1])throw new ex(o);return[r(e[0]),e[1]]}):[],nf(function(r){for(var n=-1;++n<t;){var o=e[n];if(ts(o[0],this,r))return ts(o[1],this,r)}})},rd.conforms=function(e){var t,r;return r=ad(t=rN(e,1)),function(e){return rL(e,t,r)}},rd.constant=aD,rd.countBy=ii,rd.create=function(e,t){var r=rg(e);return null==t?r:rC(r,t)},rd.curry=iS,rd.curryRight=ik,rd.debounce=iO,rd.defaults=as,rd.defaultsDeep=au,rd.defer=iE,rd.delay=ix,rd.difference=oF,rd.differenceBy=oB,rd.differenceWith=oW,rd.drop=function(e,t,r){var o=null==e?0:e.length;return o?ng(e,(t=r||n===t?1:i4(t))<0?0:t,o):[]},rd.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?ng(e,0,(t=o-(t=r||n===t?1:i4(t)))<0?0:t):[]},rd.dropRightWhile=function(e,t){return e&&e.length?nE(e,oc(t,3),!0,!0):[]},rd.dropWhile=function(e,t){return e&&e.length?nE(e,oc(t,3),!0):[]},rd.fill=function(e,t,r,o){var i=null==e?0:e.length;if(!i)return[];r&&"number"!=typeof r&&o_(e,t,r)&&(r=0,o=i);var a=r,s=o,u=e.length;for((a=i4(a))<0&&(a=-a>u?0:u+a),(s=n===s||s>u?u:i4(s))<0&&(s+=u),s=a>s?0:i9(s);a<s;)e[a++]=t;return e},rd.filter=function(e,t){return(iD(e)?tf:rV)(e,oc(t,3))},rd.flatMap=function(e,t){return rH(id(e,t),1)},rd.flatMapDeep=function(e,t){return rH(id(e,t),s)},rd.flatMapDepth=function(e,t,r){return r=n===r?1:i4(r),rH(id(e,t),r)},rd.flatten=oq,rd.flattenDeep=function(e){return(null==e?0:e.length)?rH(e,s):[]},rd.flattenDepth=function(e,t){return(null==e?0:e.length)?rH(e,t=n===t?1:i4(t)):[]},rd.flip=function(e){return n9(e,512)},rd.flow=aM,rd.flowRight=aF,rd.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},rd.functions=function(e){return null==e?[]:r$(e,ad(e))},rd.functionsIn=function(e){return null==e?[]:r$(e,ag(e))},rd.groupBy=il,rd.initial=function(e){return(null==e?0:e.length)?ng(e,0,-1):[]},rd.intersection=oK,rd.intersectionBy=oG,rd.intersectionWith=o$,rd.invert=af,rd.invertBy=ap,rd.invokeMap=ip,rd.iteratee=aW,rd.keyBy=ih,rd.keys=ad,rd.keysIn=ag,rd.map=id,rd.mapKeys=function(e,t){var r={};return t=oc(t,3),rK(e,function(e,n,o){rI(r,t(e,n,o),e)}),r},rd.mapValues=function(e,t){var r={};return t=oc(t,3),rK(e,function(e,n,o){rI(r,n,t(e,n,o))}),r},rd.matches=function(e){return nt(rN(e,1))},rd.matchesProperty=function(e,t){return nr(e,rN(t,1))},rd.memoize=iA,rd.merge=ay,rd.mergeWith=av,rd.method=aV,rd.methodOf=aH,rd.mixin=aq,rd.negate=iR,rd.nthArg=function(e){return e=i4(e),nf(function(t){return no(t,e)})},rd.omit=ab,rd.omitBy=function(e,t){return a_(e,iR(oc(t)))},rd.once=function(e){return im(2,e)},rd.orderBy=function(e,t,r,o){return null==e?[]:(iD(t)||(t=null==t?[]:[t]),iD(r=o?n:r)||(r=null==r?[]:[r]),ni(e,t,r))},rd.over=aK,rd.overArgs=iP,rd.overEvery=aG,rd.overSome=a$,rd.partial=iC,rd.partialRight=iI,rd.partition=ig,rd.pick=am,rd.pickBy=a_,rd.property=aJ,rd.propertyOf=function(e){return function(t){return null==e?n:rJ(e,t)}},rd.pull=oY,rd.pullAll=oX,rd.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,oc(r,2)):e},rd.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,n,r):e},rd.pullAt=oQ,rd.range=aY,rd.rangeRight=aX,rd.rearg=ij,rd.reject=function(e,t){return(iD(e)?tf:rV)(e,iR(oc(t,3)))},rd.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,o=[],i=e.length;for(t=oc(t,3);++n<i;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return nu(e,o),r},rd.rest=function(e,t){if("function"!=typeof e)throw new ex(o);return nf(e,t=n===t?t:i4(t))},rd.reverse=oZ,rd.sampleSize=function(e,t,r){return t=(r?o_(e,t,r):n===t)?1:i4(t),(iD(e)?function(e,t){return oN(nB(e),rT(t,0,e.length))}:function(e,t){var r=ak(e);return oN(r,rT(t,0,r.length))})(e,t)},rd.set=function(e,t,r){return null==e?e:np(e,t,r)},rd.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:np(e,t,r,o)},rd.shuffle=function(e){return(iD(e)?function(e){return oN(nB(e))}:function(e){return oN(ak(e))})(e)},rd.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&o_(e,t,r)?(t=0,r=o):(t=null==t?0:i4(t),r=n===r?o:i4(r)),ng(e,t,r)):[]},rd.sortBy=iy,rd.sortedUniq=function(e){return e&&e.length?nm(e):[]},rd.sortedUniqBy=function(e,t){return e&&e.length?nm(e,oc(t,2)):[]},rd.split=function(e,t,r){return(r&&"number"!=typeof r&&o_(e,t,r)&&(t=r=n),r=n===r?0xffffffff:r>>>0)?(e=at(e))&&("string"==typeof t||null!=t&&!iQ(t))&&!(t=nw(t))&&tB(e)?nj(tK(e),0,r):e.split(t,r):[]},rd.spread=function(e,t){if("function"!=typeof e)throw new ex(o);return t=null==t?0:t2(i4(t),0),nf(function(r){var n=r[t],o=nj(r,0,t);return n&&tg(o,n),ts(e,this,o)})},rd.tail=function(e){var t=null==e?0:e.length;return t?ng(e,1,t):[]},rd.take=function(e,t,r){return e&&e.length?ng(e,0,(t=r||n===t?1:i4(t))<0?0:t):[]},rd.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?ng(e,(t=o-(t=r||n===t?1:i4(t)))<0?0:t,o):[]},rd.takeRightWhile=function(e,t){return e&&e.length?nE(e,oc(t,3),!1,!0):[]},rd.takeWhile=function(e,t){return e&&e.length?nE(e,oc(t,3)):[]},rd.tap=function(e,t){return t(e),e},rd.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new ex(o);return iG(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),iO(e,t,{leading:n,maxWait:t,trailing:i})},rd.thru=ir,rd.toArray=i8,rd.toPairs=aw,rd.toPairsIn=aS,rd.toPath=function(e){return iD(e)?td(e,oU):i1(e)?[e]:nB(oL(at(e)))},rd.toPlainObject=ae,rd.transform=function(e,t,r){var n=iD(e),o=n||iW(e)||i2(e);if(t=oc(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:iG(e)&&iq(i)?rg(eH(e)):{}}return(o?tc:rK)(e,function(e,n,o){return t(r,e,n,o)}),r},rd.unary=function(e){return ib(e,1)},rd.union=o0,rd.unionBy=o1,rd.unionWith=o2,rd.uniq=function(e){return e&&e.length?nS(e):[]},rd.uniqBy=function(e,t){return e&&e.length?nS(e,oc(t,2)):[]},rd.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?nS(e,n,t):[]},rd.unset=function(e,t){return null==e||nk(e,t)},rd.unzip=o3,rd.unzipWith=o5,rd.update=function(e,t,r){return null==e?e:nO(e,t,nC(r))},rd.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:nO(e,t,nC(r),o)},rd.values=ak,rd.valuesIn=function(e){return null==e?[]:tT(e,ag(e))},rd.without=o8,rd.words=aN,rd.wrap=function(e,t){return iC(nC(t),e)},rd.xor=o6,rd.xorBy=o4,rd.xorWith=o9,rd.zip=o7,rd.zipObject=function(e,t){return nR(e||[],t||[],rA)},rd.zipObjectDeep=function(e,t){return nR(e||[],t||[],np)},rd.zipWith=ie,rd.entries=aw,rd.entriesIn=aS,rd.extend=an,rd.extendWith=ao,aq(rd,rd),rd.add=a0,rd.attempt=aL,rd.camelCase=aO,rd.capitalize=aE,rd.ceil=a1,rd.clamp=function(e,t,r){return n===r&&(r=t,t=n),n!==r&&(r=(r=i7(r))==r?r:0),n!==t&&(t=(t=i7(t))==t?t:0),rT(i7(e),t,r)},rd.clone=function(e){return rN(e,4)},rd.cloneDeep=function(e){return rN(e,5)},rd.cloneDeepWith=function(e,t){return rN(e,5,t="function"==typeof t?t:n)},rd.cloneWith=function(e,t){return rN(e,4,t="function"==typeof t?t:n)},rd.conformsTo=function(e,t){return null==t||rL(e,t,ad(t))},rd.deburr=ax,rd.defaultTo=function(e,t){return null==e||e!=e?t:e},rd.divide=a2,rd.endsWith=function(e,t,r){e=at(e),t=nw(t);var o=e.length,i=r=n===r?o:rT(i4(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},rd.eq=iT,rd.escape=function(e){return(e=at(e))&&H.test(e)?e.replace(W,tM):e},rd.escapeRegExp=function(e){return(e=at(e))&&X.test(e)?e.replace(Y,"\\$&"):e},rd.every=function(e,t,r){var o=iD(e)?tl:rB;return r&&o_(e,t,r)&&(t=n),o(e,oc(t,3))},rd.find=ia,rd.findIndex=oV,rd.findKey=function(e,t){return t_(e,oc(t,3),rK)},rd.findLast=is,rd.findLastIndex=oH,rd.findLastKey=function(e,t){return t_(e,oc(t,3),rG)},rd.floor=a3,rd.forEach=iu,rd.forEachRight=ic,rd.forIn=function(e,t){return null==e?e:rq(e,oc(t,3),ag)},rd.forInRight=function(e,t){return null==e?e:rz(e,oc(t,3),ag)},rd.forOwn=function(e,t){return e&&rK(e,oc(t,3))},rd.forOwnRight=function(e,t){return e&&rG(e,oc(t,3))},rd.get=ac,rd.gt=iN,rd.gte=iL,rd.has=function(e,t){return null!=e&&oy(e,t,rZ)},rd.hasIn=al,rd.head=oz,rd.identity=aB,rd.includes=function(e,t,r,n){e=iF(e)?e:ak(e),r=r&&!n?i4(r):0;var o=e.length;return r<0&&(r=t2(o+r,0)),i0(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&tS(e,t,r)>-1},rd.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:i4(r);return o<0&&(o=t2(n+o,0)),tS(e,t,o)},rd.inRange=function(e,t,r){var o,i,a;return t=i6(t),n===r?(r=t,t=0):r=i6(r),(o=e=i7(e))>=t3(i=t,a=r)&&o<t2(i,a)},rd.invoke=ah,rd.isArguments=iU,rd.isArray=iD,rd.isArrayBuffer=iM,rd.isArrayLike=iF,rd.isArrayLikeObject=iB,rd.isBoolean=function(e){return!0===e||!1===e||i$(e)&&rX(e)==p},rd.isBuffer=iW,rd.isDate=iV,rd.isElement=function(e){return i$(e)&&1===e.nodeType&&!iX(e)},rd.isEmpty=function(e){if(null==e)return!0;if(iF(e)&&(iD(e)||"string"==typeof e||"function"==typeof e.splice||iW(e)||i2(e)||iU(e)))return!e.length;var t=og(e);if(t==v||t==S)return!e.size;if(oO(e))return!r9(e).length;for(var r in e)if(ej.call(e,r))return!1;return!0},rd.isEqual=function(e,t){return r5(e,t)},rd.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return n===o?r5(e,t,n,r):!!o},rd.isError=iH,rd.isFinite=function(e){return"number"==typeof e&&tZ(e)},rd.isFunction=iq,rd.isInteger=iz,rd.isLength=iK,rd.isMap=iJ,rd.isMatch=function(e,t){return e===t||r8(e,t,of(t))},rd.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,r8(e,t,of(t),r)},rd.isNaN=function(e){return iY(e)&&e!=+e},rd.isNative=function(e){if(ok(e))throw new e_("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return r6(e)},rd.isNil=function(e){return null==e},rd.isNull=function(e){return null===e},rd.isNumber=iY,rd.isObject=iG,rd.isObjectLike=i$,rd.isPlainObject=iX,rd.isRegExp=iQ,rd.isSafeInteger=function(e){return iz(e)&&e>=-0x1fffffffffffff&&e<=0x1fffffffffffff},rd.isSet=iZ,rd.isString=i0,rd.isSymbol=i1,rd.isTypedArray=i2,rd.isUndefined=function(e){return n===e},rd.isWeakMap=function(e){return i$(e)&&og(e)==E},rd.isWeakSet=function(e){return i$(e)&&"[object WeakSet]"==rX(e)},rd.join=function(e,t){return null==e?"":t0.call(e,t)},rd.kebabCase=aA,rd.last=oJ,rd.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return -1;var i=o;return n!==r&&(i=(i=i4(r))<0?t2(o+i,0):t3(i,o-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,i):tw(e,tO,i,!0)},rd.lowerCase=aR,rd.lowerFirst=aP,rd.lt=i3,rd.lte=i5,rd.max=function(e){return e&&e.length?rW(e,aB,rQ):n},rd.maxBy=function(e,t){return e&&e.length?rW(e,oc(t,2),rQ):n},rd.mean=function(e){return tE(e,aB)},rd.meanBy=function(e,t){return tE(e,oc(t,2))},rd.min=function(e){return e&&e.length?rW(e,aB,r7):n},rd.minBy=function(e,t){return e&&e.length?rW(e,oc(t,2),r7):n},rd.stubArray=aQ,rd.stubFalse=aZ,rd.stubObject=function(){return{}},rd.stubString=function(){return""},rd.stubTrue=function(){return!0},rd.multiply=a5,rd.nth=function(e,t){return e&&e.length?no(e,i4(t)):n},rd.noConflict=function(){return e8._===this&&(e8._=eD),this},rd.noop=az,rd.now=iv,rd.pad=function(e,t,r){e=at(e);var n=(t=i4(t))?tz(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return n1(tY(o),r)+e+n1(tA(o),r)},rd.padEnd=function(e,t,r){e=at(e);var n=(t=i4(t))?tz(e):0;return t&&n<t?e+n1(t-n,r):e},rd.padStart=function(e,t,r){e=at(e);var n=(t=i4(t))?tz(e):0;return t&&n<t?n1(t-n,r)+e:e},rd.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t*=1),t8(at(e).replace(Q,""),t||0)},rd.random=function(e,t,r){if(r&&"boolean"!=typeof r&&o_(e,t,r)&&(t=r=n),n===r&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),n===e&&n===t?(e=0,t=1):(e=i6(e),n===t?(t=e,e=0):t=i6(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=t6();return t3(e+i*(t-e+e1("1e-"+((i+"").length-1))),t)}return nc(e,t)},rd.reduce=function(e,t,r){var n=iD(e)?ty:tR,o=arguments.length<3;return n(e,oc(t,4),r,o,rM)},rd.reduceRight=function(e,t,r){var n=iD(e)?tv:tR,o=arguments.length<3;return n(e,oc(t,4),r,o,rF)},rd.repeat=function(e,t,r){return t=(r?o_(e,t,r):n===t)?1:i4(t),nl(at(e),t)},rd.replace=function(){var e=arguments,t=at(e[0]);return e.length<3?t:t.replace(e[1],e[2])},rd.result=function(e,t,r){t=nI(t,e);var o=-1,i=t.length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[oU(t[o])];n===a&&(o=i,a=r),e=iq(a)?a.call(e):a}return e},rd.round=a8,rd.runInContext=e,rd.sample=function(e){return(iD(e)?rE:function(e){return rE(ak(e))})(e)},rd.size=function(e){if(null==e)return 0;if(iF(e))return i0(e)?tz(e):e.length;var t=og(e);return t==v||t==S?e.size:r9(e).length},rd.snakeCase=aC,rd.some=function(e,t,r){var o=iD(e)?tb:ny;return r&&o_(e,t,r)&&(t=n),o(e,oc(t,3))},rd.sortedIndex=function(e,t){return nv(e,t)},rd.sortedIndexBy=function(e,t,r){return nb(e,t,oc(r,2))},rd.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=nv(e,t);if(n<r&&iT(e[n],t))return n}return -1},rd.sortedLastIndex=function(e,t){return nv(e,t,!0)},rd.sortedLastIndexBy=function(e,t,r){return nb(e,t,oc(r,2),!0)},rd.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=nv(e,t,!0)-1;if(iT(e[r],t))return r}return -1},rd.startCase=aI,rd.startsWith=function(e,t,r){return e=at(e),r=null==r?0:rT(i4(r),0,e.length),t=nw(t),e.slice(r,r+t.length)==t},rd.subtract=a6,rd.sum=function(e){return e&&e.length?tP(e,aB):0},rd.sumBy=function(e,t){return e&&e.length?tP(e,oc(t,2)):0},rd.template=function(e,t,r){var o=rd.templateSettings;r&&o_(e,t,r)&&(t=n),e=at(e),t=ao({},t,o,n7);var i,a,s=ao({},t.imports,o.imports,n7),u=ad(s),c=tT(s,u),l=0,f=t.interpolate||ed,p="__p += '",h=eO((t.escape||ed).source+"|"+f.source+"|"+(f===K?ea:ed).source+"|"+(t.evaluate||ed).source+"|$","g"),d="//# sourceURL="+(ej.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eX+"]")+"\n";e.replace(h,function(t,r,n,o,s,u){return n||(n=o),p+=e.slice(l,u).replace(eg,tF),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),p+="';\n";var g=ej.call(t,"variable")&&t.variable;if(g){if(eo.test(g))throw new e_("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(D,""):p).replace(M,"$1").replace(F,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=aL(function(){return ew(u,d+"return "+p).apply(n,c)});if(y.source=p,iH(y))throw y;return y},rd.times=function(e,t){if((e=i4(e))<1||e>0x1fffffffffffff)return[];var r=0xffffffff,n=t3(e,0xffffffff);t=oc(t),e-=0xffffffff;for(var o=tC(n,t);++r<e;)t(r);return o},rd.toFinite=i6,rd.toInteger=i4,rd.toLength=i9,rd.toLower=function(e){return at(e).toLowerCase()},rd.toNumber=i7,rd.toSafeInteger=function(e){return e?rT(i4(e),-0x1fffffffffffff,0x1fffffffffffff):0===e?e:0},rd.toString=at,rd.toUpper=function(e){return at(e).toUpperCase()},rd.trim=function(e,t,r){if((e=at(e))&&(r||n===t))return tI(e);if(!e||!(t=nw(t)))return e;var o=tK(e),i=tK(t),a=tL(o,i),s=tU(o,i)+1;return nj(o,a,s).join("")},rd.trimEnd=function(e,t,r){if((e=at(e))&&(r||n===t))return e.slice(0,tG(e)+1);if(!e||!(t=nw(t)))return e;var o=tK(e),i=tU(o,tK(t))+1;return nj(o,0,i).join("")},rd.trimStart=function(e,t,r){if((e=at(e))&&(r||n===t))return e.replace(Q,"");if(!e||!(t=nw(t)))return e;var o=tK(e),i=tL(o,tK(t));return nj(o,i).join("")},rd.truncate=function(e,t){var r=30,o="...";if(iG(t)){var i="separator"in t?t.separator:i;r="length"in t?i4(t.length):r,o="omission"in t?nw(t.omission):o}var a=(e=at(e)).length;if(tB(e)){var s=tK(e);a=s.length}if(r>=a)return e;var u=r-tz(o);if(u<1)return o;var c=s?nj(s,0,u).join(""):e.slice(0,u);if(n===i)return c+o;if(s&&(u+=c.length-u),iQ(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=eO(i.source,at(es.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,n===p?u:p)}}else if(e.indexOf(nw(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+o},rd.unescape=function(e){return(e=at(e))&&V.test(e)?e.replace(B,t$):e},rd.uniqueId=function(e){var t=++eT;return at(e)+t},rd.upperCase=aj,rd.upperFirst=aT,rd.each=iu,rd.eachRight=ic,rd.first=oz,aq(rd,(ev={},rK(rd,function(e,t){ej.call(rd.prototype,t)||(ev[t]=e)}),ev),{chain:!1}),rd.VERSION="4.17.21",tc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){rd[e].placeholder=rd}),tc(["drop","take"],function(e,t){rb.prototype[e]=function(r){r=n===r?1:t2(i4(r),0);var o=this.__filtered__&&!t?new rb(this):this.clone();return o.__filtered__?o.__takeCount__=t3(r,o.__takeCount__):o.__views__.push({size:t3(r,0xffffffff),type:e+(o.__dir__<0?"Right":"")}),o},rb.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tc(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;rb.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oc(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),tc(["head","last"],function(e,t){var r="take"+(t?"Right":"");rb.prototype[e]=function(){return this[r](1).value()[0]}}),tc(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");rb.prototype[e]=function(){return this.__filtered__?new rb(this):this[r](1)}}),rb.prototype.compact=function(){return this.filter(aB)},rb.prototype.find=function(e){return this.filter(e).head()},rb.prototype.findLast=function(e){return this.reverse().find(e)},rb.prototype.invokeMap=nf(function(e,t){return"function"==typeof e?new rb(this):this.map(function(r){return r2(r,e,t)})}),rb.prototype.reject=function(e){return this.filter(iR(oc(e)))},rb.prototype.slice=function(e,t){e=i4(e);var r=this;return r.__filtered__&&(e>0||t<0)?new rb(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(t=i4(t))<0?r.dropRight(-t):r.take(t-e)),r)},rb.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},rb.prototype.toArray=function(){return this.take(0xffffffff)},rK(rb.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=rd[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(rd.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,u=t instanceof rb,c=s[0],l=u||iD(t),f=function(e){var t=i.apply(rd,tg([e],s));return o&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,g=u&&!h;if(!a&&l){t=g?t:new rb(this);var y=e.apply(t,s);return y.__actions__.push({func:ir,args:[f],thisArg:n}),new rv(y,p)}return d&&g?e.apply(this,s):(y=this.thru(f),d?o?y.value()[0]:y.value():y)})}),tc(["pop","push","shift","sort","splice","unshift"],function(e){var t=eA[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);rd.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(iD(o)?o:[],e)}return this[r](function(r){return t.apply(iD(r)?r:[],e)})}}),rK(rb.prototype,function(e,t){var r=rd[t];if(r){var n=r.name+"";ej.call(ri,n)||(ri[n]=[]),ri[n].push({name:t,func:r})}}),ri[nX(n,2).name]=[{name:"wrapper",func:n}],rb.prototype.clone=function(){var e=new rb(this.__wrapped__);return e.__actions__=nB(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nB(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nB(this.__views__),e},rb.prototype.reverse=function(){if(this.__filtered__){var e=new rb(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},rb.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=iD(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n<o;){var i=r[n],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t3(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=n?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=t3(u,this.__takeCount__);if(!r||!n&&o==u&&h==u)return nx(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],b=v.iteratee,m=v.type,_=b(y);if(2==m)y=_;else if(!_)if(1==m)continue e;else break e}d[p++]=y}return d},rd.prototype.at=io,rd.prototype.chain=function(){return it(this)},rd.prototype.commit=function(){return new rv(this.value(),this.__chain__)},rd.prototype.next=function(){this.__values__===n&&(this.__values__=i8(this.value()));var e=this.__index__>=this.__values__.length,t=e?n:this.__values__[this.__index__++];return{done:e,value:t}},rd.prototype.plant=function(e){for(var t,r=this;r instanceof ry;){var o=oM(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},rd.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof rb){var t=e;return this.__actions__.length&&(t=new rb(this)),(t=t.reverse()).__actions__.push({func:ir,args:[oZ],thisArg:n}),new rv(t,this.__chain__)}return this.thru(oZ)},rd.prototype.toJSON=rd.prototype.valueOf=rd.prototype.value=function(){return nx(this.__wrapped__,this.__actions__)},rd.prototype.first=rd.prototype.head,e5&&(rd.prototype[e5]=function(){return this}),rd}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(e8._=tJ,define(function(){return tJ})):e4?((e4.exports=tJ)._=tJ,e6._=tJ):e8._=tJ}).call(this)},916:function(e,t,r){e=r.nmd(e),(function(){"use strict";var n={function:!0,object:!0},o=n[typeof window]&&window||this,i=n[typeof t]&&t,a=n.object&&e&&!e.nodeType&&e,s=i&&a&&"object"==typeof r.g&&r.g;s&&(s.global===s||s.window===s||s.self===s)&&(o=s);var u=/\bOpera/,c=Object.prototype,l=c.hasOwnProperty,f=c.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function h(e){return e=b(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function d(e,t){for(var r in e)l.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?p(e):f.call(e).slice(8,-1)}function y(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function v(e,t){var r=null,n=function(n,o){r=t(r,n,o,e)},o=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=0x1fffffffffffff)for(;++o<i;)n(e[o],o,e);else d(e,n);return r}function b(e){return String(e).replace(/^ +| +$/g,"")}function m(e){var t,r,n,i,a,s=o,c=e&&"object"==typeof e&&"String"!=g(e);c&&(s=e,e=null);var l=s.navigator||{},p=l.userAgent||"";e||(e=p);var _=c?!!l.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(f.toString()),w="Object",S=c&&s.java?"JavaPackage":g(s.java),k=/\bJava/.test(S)&&s.java,O=k&&g(s.environment)==(c?w:"Environment"),E=k?"a":"α",x=k?"b":"β",A=s.document||{},R=s.operamini||s.opera,P=u.test(P=c&&R?R["[[Class]]"]:g(R))?P:R=null,C=e,I=[],j=null,T=e==p,N=T&&R&&"function"==typeof R.version&&R.version(),L=v([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),U=v(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),D=B([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),M=v({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}},function(t,r,n){return t||(r[D]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(D)]||RegExp("\\b"+y(n)+"(?:\\b|\\w*\\d)","i").exec(e))&&n}),F=v(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],function(t,r){var n,o,i,a=r.pattern||y(r);return!t&&(t=RegExp("\\b"+a+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(n=t,o=r.label||r,i={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"},a&&o&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(i=i[/[\d.]+$/.exec(n)])&&(n="Windows "+i),n=String(n),a&&o&&(n=n.replace(RegExp(a,"i"),o)),t=n=h(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])),t});function B(t){return v(t,function(t,r){var n=r.pattern||y(r);return!t&&(t=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),r=r.label||r,t=h(t[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function W(t){return v(t,function(t,r){return t||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(L&&(L=[L]),/\bAndroid\b/.test(F)&&!D&&(i=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(D=b(i[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),M&&!D?D=B([M]):M&&D&&(D=D.replace(RegExp("^("+y(M)+")[-_.\\s]","i"),M+" ").replace(RegExp("^("+y(M)+")[-_.]?(\\w)","i"),M+" $2")),(i=/\bGoogle TV\b/.exec(D))&&(D=i[0]),/\bSimulator\b/i.test(e)&&(D=(D?D+" ":"")+"Simulator"),"Opera Mini"==U&&/\bOPiOS\b/.test(e)&&I.push("running in Turbo/Uncompressed mode"),"IE"==U&&/\blike iPhone OS\b/.test(e)?(M=(i=m(e.replace(/like iPhone OS/,""))).manufacturer,D=i.product):/^iP/.test(D)?(U||(U="Safari"),F="iOS"+((i=/ OS ([\d_]+)/i.exec(e))?" "+i[1].replace(/_/g,"."):"")):"Konqueror"==U&&/^Linux\b/i.test(F)?F="Kubuntu":M&&"Google"!=M&&(/Chrome/.test(U)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(D))||/\bAndroid\b/.test(F)&&/^Chrome/.test(U)&&/\bVersion\//i.test(e)?(U="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==U?(/\bMobi/i.test(e)||(F="Android",I.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&I.unshift("accelerated")):"UC Browser"==U&&/\bUCWEB\b/.test(e)?I.push("speed mode"):"PaleMoon"==U&&(i=/\bFirefox\/([\d.]+)\b/.exec(e))?I.push("identifying as Firefox "+i[1]):"Firefox"==U&&(i=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),D||(D=i[1])):!U||(i=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(U))?(U&&!D&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(i+"/")+8))&&(U=null),(i=D||M||F)&&(D||M||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(U=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:i)+" Browser")):"Electron"==U&&(i=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&I.push("Chromium "+i),N||(N=W(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",y(U),"(?:Firefox|Minefield|NetFront)"])),(i="iCab"==L&&parseFloat(N)>3&&"WebKit"||/\bOpera\b/.test(U)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(L)&&"WebKit"||!L&&/\bMSIE\b/i.test(e)&&("Mac OS"==F?"Tasman":"Trident")||"WebKit"==L&&/\bPlayStation\b(?! Vita\b)/i.test(U)&&"NetFront")&&(L=[i]),"IE"==U&&(i=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(U+=" Mobile",F="Windows Phone "+(/\+$/.test(i)?i:i+".x"),I.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(U="IE Mobile",F="Windows Phone 8.x",I.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=U&&"Trident"==L&&(i=/\brv:([\d.]+)/.exec(e))&&(U&&I.push("identifying as "+U+(N?" "+N:"")),U="IE",N=i[1]),T){if(r="global",n=null!=(t=s)?typeof t[r]:"number",/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!t[r])g(i=s.runtime)==(c?w:"ScriptBridgingProxyObject")?(U="Adobe AIR",F=i.flash.system.Capabilities.os):g(i=s.phantom)==(c?w:"RuntimeObject")?(U="PhantomJS",N=(i=i.version||null)&&i.major+"."+i.minor+"."+i.patch):"number"==typeof A.documentMode&&(i=/\bTrident\/(\d+)/i.exec(e))?(N=[N,A.documentMode],(i=+i[1]+4)!=N[1]&&(I.push("IE "+N[1]+" mode"),L&&(L[1]=""),N[1]=i),N="IE"==U?String(N[1].toFixed(1)):N[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(U)&&(I.push("masking as "+U+" "+N),U="IE",N="11.0",L=["Trident"],F="Windows");else if(k&&(C=(i=k.lang.System).getProperty("os.arch"),F=F||i.getProperty("os.name")+" "+i.getProperty("os.version")),O){try{N=s.require("ringo/engine").version.join("."),U="RingoJS"}catch(e){(i=s.system)&&i.global.system==s.system&&(U="Narwhal",F||(F=i[0].os||null))}U||(U="Rhino")}else"object"==typeof s.process&&!s.process.browser&&(i=s.process)&&("object"==typeof i.versions&&("string"==typeof i.versions.electron?(I.push("Node "+i.versions.node),U="Electron",N=i.versions.electron):"string"==typeof i.versions.nw&&(I.push("Chromium "+N,"Node "+i.versions.node),U="NW.js",N=i.versions.nw)),U||(U="Node.js",C=i.arch,F=i.platform,N=(N=/[\d.]+/.exec(i.version))?N[0]:null));F=F&&h(F)}if(N&&(i=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(T&&l.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(j=/b/i.test(i)?"beta":"alpha",N=N.replace(RegExp(i+"\\+?$"),"")+("beta"==j?x:E)+(/\d+\+?/.exec(i)||"")),"Fennec"==U||"Firefox"==U&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))U="Firefox Mobile";else if("Maxthon"==U&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(D))"Xbox 360"==D&&(F=null),"Xbox 360"==D&&/\bIEMobile\b/.test(e)&&I.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(U)||U&&!D&&!/Browser|Mobi/.test(U))&&("Windows CE"==F||/Mobi/i.test(e)))U+=" Mobile";else if("IE"==U&&T)try{null===s.external&&I.unshift("platform preview")}catch(e){I.unshift("embedded")}else(/\bBlackBerry\b/.test(D)||/\bBB10\b/.test(e))&&(i=(RegExp(D.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||N)?(F=((i=[i,/BB10/.test(e)])[1]?(D=null,M="BlackBerry"):"Device Software")+" "+i[0],N=null):this!=d&&"Wii"!=D&&(T&&R||/Opera/.test(U)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==U&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==U&&(F&&!/^Win/.test(F)&&N>5.5||/\bWindows XP\b/.test(F)&&N>8||8==N&&!/\bTrident\b/.test(e)))&&!u.test(i=m.call(d,e.replace(u,"")+";"))&&i.name&&(i="ing as "+i.name+((i=i.version)?" "+i:""),u.test(U)?(/\bIE\b/.test(i)&&"Mac OS"==F&&(F=null),i="identify"+i):(i="mask"+i,U=P?h(P.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(i)&&(F=null),T||(N=null)),L=["Presto"],I.push(i));(i=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(i=[parseFloat(i.replace(/\.(\d)$/,".0$1")),i],"Safari"==U&&"+"==i[1].slice(-1)?(U="WebKit Nightly",j="alpha",N=i[1].slice(0,-1)):(N==i[1]||N==(i[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(N=null),i[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==i[0]&&537.36==i[2]&&parseFloat(i[1])>=28&&"WebKit"==L&&(L=["Blink"]),T&&(_||i[1])?(L&&(L[1]="like Chrome"),i=i[1]||((i=i[0])<530?1:i<532?2:i<532.05?3:i<533?4:i<534.03?5:i<534.07?6:i<534.1?7:i<534.13?8:i<534.16?9:i<534.24?10:i<534.3?11:i<535.01?12:i<535.02?"13+":i<535.07?15:i<535.11?16:i<535.19?17:i<536.05?18:i<536.1?19:i<537.01?20:i<537.11?"21+":i<537.13?23:i<537.18?24:i<537.24?25:i<537.36?26:"Blink"!=L?"27":"28")):(L&&(L[1]="like Safari"),i=(i=i[0])<400?1:i<500?2:i<526?3:i<533?4:i<534?"4+":i<535?5:i<537?6:i<538?7:i<601?8:i<602?9:i<604?10:i<606?11:i<608?12:"12"),L&&(L[1]+=" "+(i+="number"==typeof i?".x":/[.+]/.test(i)?"":"+")),"Safari"==U&&(!N||parseInt(N)>45)?N=i:"Chrome"==U&&/\bHeadlessChrome/i.test(e)&&I.unshift("headless")),"Opera"==U&&(i=/\bzbov|zvav$/.exec(F))?(U+=" ",I.unshift("desktop mode"),"zvav"==i?(U+="Mini",N=null):U+="Mobile",F=F.replace(RegExp(" *"+i+"$"),"")):"Safari"==U&&/\bChrome\b/.exec(L&&L[1])?(I.unshift("desktop mode"),U="Chrome Mobile",N=null,/\bOS X\b/.test(F)?(M="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(U)&&!N&&(N=W("Chrome")),N&&0==N.indexOf(i=/[\d.]+$/.exec(F))&&e.indexOf("/"+i+"-")>-1&&(F=b(F.replace(i,""))),F&&-1!=F.indexOf(U)&&!RegExp(U+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(U)+" *"),"")),L&&!/\b(?:Avant|Nook)\b/.test(U)&&(/Browser|Lunascape|Maxthon/.test(U)||"Safari"!=U&&/^iOS/.test(F)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(U)&&L[1])&&(i=L[L.length-1])&&I.push(i),I.length&&(I=["("+I.join("; ")+")"]),M&&D&&0>D.indexOf(M)&&I.push("on "+M),D&&I.push((/^on /.test(I[I.length-1])?"":"on ")+D),F&&(a=(i=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-i[0].length-1),F={architecture:32,family:i&&!a?F.replace(i[0],""):F,version:i?i[1]:null,toString:function(){var e=this.version;return this.family+(e&&!a?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(i=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(C))&&!/\bi686\b/i.test(C)?(F&&(F.architecture=64,F.family=F.family.replace(RegExp(" *"+i),"")),U&&(/\bWOW64\b/i.test(e)||T&&/\w(?:86|32)$/.test(l.cpuClass||l.platform)&&!/\bWin64; x64\b/i.test(e))&&I.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==U&&parseFloat(N)>=39&&(F.architecture=64),e||(e=null);var V={};return V.description=e,V.layout=L&&L[0],V.manufacturer=M,V.name=U,V.prerelease=j,V.product=D,V.ua=e,V.version=U&&N,V.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},V.parse=m,V.toString=function(){return this.description||""},V.version&&I.unshift(N),V.name&&I.unshift(U),F&&U&&!(F==String(F).split(" ")[0]&&(F==U.split(" ")[0]||D))&&I.push(D?"("+F+")":"on "+F),I.length&&(V.description=I.join(" ")),V}var _=m();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(o.platform=_,define(function(){return _})):i&&a?d(_,function(e,t){i[t]=e}):o.platform=_}).call(this)},490:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},348:function(e,t,r){"use strict";var n=r(530),o=r(429);e.exports={formats:r(490),parse:o,stringify:n}},429:function(e,t,r){"use strict";var n=r(422),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t){var r={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,l=u.split(t.delimiter,c),f=-1,p=t.charset;if(t.charsetSentinel)for(h=0;h<l.length;++h)0===l[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[h]?p="utf-8":"utf8=%26%2310003%3B"===l[h]&&(p="iso-8859-1"),f=h,h=l.length);for(h=0;h<l.length;++h)if(h!==f){var h,d,g,y=l[h],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(d=t.decoder(y,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(d=t.decoder(y.slice(0,b),a.decoder,p,"key"),g=n.maybeMap(s(y.slice(b+1),t),function(e){return t.decoder(e,a.decoder,p,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=g.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(r,d)?r[d]=n.combine(r[d],g):r[d]=g}return r},c=function(e,t,r,n){for(var o=n?t:s(t,r),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&u!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o},l=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,l=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),c(l,t,r,n)}},f=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}};e.exports=function(e,t){var r=f(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof e?u(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(o),s=0;s<a.length;++s){var c=a[s],p=l(c,o[c],r,"string"==typeof e);i=n.merge(i,p,r)}return!0===r.allowSparse?i:n.compact(i)}},530:function(e,t,r){"use strict";var n=r(29),o=r(422),i=r(490),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,a,s,c,f,p,g,y,v,b,m,_,w,S){for(var k,O,E=t,x=S,A=0,R=!1;void 0!==(x=x.get(d))&&!R;){var P=x.get(t);if(A+=1,void 0!==P)if(P===A)throw RangeError("Cyclic object value");else R=!0;void 0===x.get(d)&&(A=0)}if("function"==typeof p?E=p(r,E):E instanceof Date?E=v(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,function(e){return e instanceof Date?v(e):e})),null===E){if(s)return f&&!_?f(r,h.encoder,w,"key",b):r;E=""}if("string"==typeof(k=E)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||o.isBuffer(E))return f?[m(_?r:f(r,h.encoder,w,"key",b))+"="+m(f(E,h.encoder,w,"value",b))]:[m(r)+"="+m(String(E))];var C=[];if(void 0===E)return C;if("comma"===i&&u(E))_&&f&&(E=o.maybeMap(E,f)),O=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(p))O=p;else{var I=Object.keys(E);O=g?I.sort(g):I}for(var j=a&&u(E)&&1===E.length?r+"[]":r,T=0;T<O.length;++T){var N=O[T],L="object"==typeof N&&void 0!==N.value?N.value:E[N];if(!c||null!==L){var U=u(E)?"function"==typeof i?i(j,N):j:j+(y?"."+N:"["+N+"]");S.set(t,A);var D=n();D.set(d,S),l(C,e(L,U,i,a,s,c,"comma"===i&&_&&u(E)?null:f,p,g,y,v,b,m,_,w,D))}}return C},y=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=h.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}};e.exports=function(e,t){var r,o,i=e,a=y(t);"function"==typeof a.filter?i=(0,a.filter)("",i):u(a.filter)&&(r=a.filter);var c=[];if("object"!=typeof i||null===i)return"";o=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[o];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===f&&t&&t.commaRoundTrip;r||(r=Object.keys(i)),a.sort&&r.sort(a.sort);for(var h=n(),d=0;d<r.length;++d){var v=r[d];a.skipNulls&&null===i[v]||l(c,g(i[v],v,f,p,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,h))}var b=c.join(a.delimiter),m=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),b.length>0?m+b:""}},422:function(e,t,r){"use strict";var n=r(490),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}},u=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:c}),r.push(l))}return s(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);if(45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)){u+=s.charAt(c);continue}if(l<128){u+=a[l];continue}if(l<2048){u+=a[192|l>>6]+a[128|63&l];continue}if(l<55296||l>=57344){u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l];continue}c+=1,u+=a[240|(l=65536+((1023&l)<<10|1023&s.charCodeAt(c)))>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l]}return u},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return(i(t)&&!i(r)&&(a=u(t,n)),i(t)&&i(r))?(r.forEach(function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r}),t):Object.keys(r).reduce(function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t},a)}}},958:function(e,t,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===C?"object":"symbol")?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-x(-e):x(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var L=r(347),U=L.custom,D=W(U)?U:null;function M(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return"[object Array]"===q(e)&&(!I||!("object"==typeof e&&I in e))}function B(e){return"[object RegExp]"===q(e)&&(!I||!("object"==typeof e&&I in e))}function W(e){if(C)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,s){var u,g,_,S,x,R=n||{};if(H(R,"quoteStyle")&&"single"!==R.quoteStyle&&"double"!==R.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(H(R,"maxStringLength")&&("number"==typeof R.maxStringLength?R.maxStringLength<0&&R.maxStringLength!==1/0:null!==R.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var U=!H(R,"customInspect")||R.customInspect;if("boolean"!=typeof U&&"symbol"!==U)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(R,"indent")&&null!==R.indent&&" "!==R.indent&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(R,"numericSeparator")&&"boolean"!=typeof R.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var V=R.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength;return e(b.call(t,0,r.maxStringLength),r)+("... "+n)+" more character"+(n>1?"s":"")}return M(m.call(m.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",r)}(t,R);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var Q=String(t);return V?N(t,Q):Q}if("bigint"==typeof t){var Z=String(t)+"n";return V?N(t,Z):Z}var ee=void 0===R.depth?5:R.depth;if(void 0===o&&(o=0),o>=ee&&ee>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var et=function(e,t){var r;if(" "===e.indent)r=" ";else{if("number"!=typeof e.indent||!(e.indent>0))return null;r=O.call(Array(e.indent+1)," ")}return{base:r,prev:O.call(Array(t+1),r)}}(R,o);if(void 0===s)s=[];else if(z(s,t)>=0)return"[Circular]";function er(t,r,n){if(r&&(s=E.call(s)).push(r),n){var i={depth:R.depth};return H(R,"quoteStyle")&&(i.quoteStyle=R.quoteStyle),e(t,i,o+1,s)}return e(t,R,o+1,s)}if("function"==typeof t&&!B(t)){var en=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),eo=X(t,er);return"[Function"+(en?": "+en:" (anonymous)")+"]"+(eo.length>0?" { "+O.call(eo,", ")+" }":"")}if(W(t)){var ei=C?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||C?ei:G(ei)}if((ea=t)&&"object"==typeof ea&&("undefined"!=typeof HTMLElement&&ea instanceof HTMLElement||"string"==typeof ea.nodeName&&"function"==typeof ea.getAttribute)){for(var ea,es,eu="<"+w.call(String(t.nodeName)),ec=t.attributes||[],el=0;el<ec.length;el++){eu+=" "+ec[el].name+"="+M((es=ec[el].value,m.call(String(es),/"/g,"&quot;")),"double",R)}return eu+=">",t.childNodes&&t.childNodes.length&&(eu+="..."),eu+="</"+w.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var ef=X(t,er);return et&&!function(e){for(var t=0;t<e.length;t++)if(z(e[t],"\n")>=0)return!1;return!0}(ef)?"["+Y(ef,et)+"]":"[ "+O.call(ef,", ")+" ]"}if("[object Error]"===q(u=t)&&(!I||!("object"==typeof u&&I in u))){var ep=X(t,er);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===ep.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(ep,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+er(t.cause),ep),", ")+" }"}if("object"==typeof t&&U){if(D&&"function"==typeof t[D]&&L)return L(t,{depth:ee-o});else if("symbol"!==U&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var eh=[];return a&&a.call(t,function(e,r){eh.push(er(r,t,!0)+" => "+er(e,t))}),J("Map",i.call(t),eh,et)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ed=[];return l&&l.call(t,function(e){ed.push(er(e,t))}),J("Set",c.call(t),ed,et)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return $("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return $("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if("[object Number]"===q(g=t)&&(!I||!("object"==typeof g&&I in g)))return G(er(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return G(er(A.call(t)));if("[object Boolean]"===q(_=t)&&(!I||!("object"==typeof _&&I in _)))return G(d.call(t));if("[object String]"===q(S=t)&&(!I||!("object"==typeof S&&I in S)))return G(er(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===q(x=t)&&(!I||!("object"==typeof x&&I in x)))&&!B(t)){var eg=X(t,er),ey=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,ev=t instanceof Object?"":"null prototype",eb=!ey&&I&&Object(t)===t&&I in t?b.call(q(t),8,-1):ev?"Object":"",em=(ey||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(eb||ev?"["+O.call(k.call([],eb||[],ev||[]),": ")+"] ":"");return 0===eg.length?em+"{}":et?em+"{"+Y(eg,et)+"}":em+"{ "+O.call(eg,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function q(e){return g.call(e)}function z(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}function K(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function G(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function J(e,t,r,n){return e+" ("+t+") {"+(n?Y(r,n):O.call(r,", "))+"}"}function Y(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function X(e,t){var r,n=F(e),o=[];if(n){o.length=e.length;for(var i=0;i<e.length;i++)o[i]=H(e,i)?t(e[i],e):""}var a="function"==typeof R?R(e):[];if(C){r={};for(var s=0;s<a.length;s++)r["$"+a[s]]=a[s]}for(var u in e)if(H(e,u)&&(!n||String(Number(u))!==u||!(u<e.length)))if(C&&r["$"+u]instanceof Symbol)continue;else S.call(/[^\w$]/,u)?o.push(t(u,e)+": "+t(e[u],e)):o.push(u+": "+t(e[u],e));if("function"==typeof R)for(var c=0;c<a.length;c++)j.call(e,a[c])&&o.push("["+t(a[c])+"]: "+t(e[a[c]],e));return o}},29:function(e,t,r){"use strict";var n=r(528),o=r(737),i=r(958),a=r(682),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},y=function(e,t){var r=g(e,t);return r&&r.value},v=function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return p(t,n)}else if(r)return y(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return f(e,n)}else if(u){if(t)return d(t,n)}else if(r)return!!g(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),l(e,n,o)):u?(t||(t=new u),h(t,n,o)):(r||(r={key:{},next:null}),v(r,n,o))}};return n}},488:function(e,t,r){!function(e){"use strict";var t,r,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),o=n&&"a=1"===new n({a:1}).toString(),i=n&&"+"===new n("s=%2B").get("s"),a=n&&"size"in n.prototype,s="__URLSearchParams__",u=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),c=h.prototype,l=!!(e.Symbol&&e.Symbol.iterator);if(!n||!o||!i||!u||!a){c.append=function(e,t){b(this[s],e,t)},c.delete=function(e){delete this[s][e]},c.get=function(e){var t=this[s];return this.has(e)?t[e][0]:null},c.getAll=function(e){var t=this[s];return this.has(e)?t[e].slice(0):[]},c.has=function(e){return _(this[s],e)},c.set=function(e,t){this[s][e]=[""+t]},c.toString=function(){var e,t,r,n,o=this[s],i=[];for(t in o)for(e=0,r=d(t),n=o[t];e<n.length;e++)i.push(r+"="+d(n[e]));return i.join("&")};var f=e.Proxy&&n&&(!i||!u||!o||!a);f?(r=new Proxy(n,{construct:function(e,t){return new e(new h(t[0]).toString())}})).toString=Function.prototype.toString.bind(h):r=h,Object.defineProperty(e,"URLSearchParams",{value:r});var p=e.URLSearchParams.prototype;p.polyfill=!0,!f&&e.Symbol&&(p[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in p||(p.forEach=function(e,t){var r=v(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){e.call(t,r,n,this)},this)},this)}),"sort"in p||(p.sort=function(){var e,t,r,n=v(this.toString()),o=[];for(e in n)o.push(e);for(o.sort(),t=0;t<o.length;t++)this.delete(o[t]);for(t=0;t<o.length;t++){var i=o[t],a=n[i];for(r=0;r<a.length;r++)this.append(i,a[r])}}),"keys"in p||(p.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),y(e)}),"values"in p||(p.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),y(e)}),"entries"in p||(p.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),y(e)}),l&&(p[e.Symbol.iterator]=p[e.Symbol.iterator]||p.entries),"size"in p||Object.defineProperty(p,"size",{get:function(){var e=v(this.toString());if(p===this)throw TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce(function(t,r){return t+e[r].length},0)}})}function h(e){((e=e||"")instanceof URLSearchParams||e instanceof h)&&(e=e.toString()),this[s]=v(e)}function d(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function g(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(e){return decodeURIComponent(e)})}function y(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return l&&(r[e.Symbol.iterator]=function(){return r}),r}function v(e){var t={};if("object"==typeof e)if(m(e))for(var r=0;r<e.length;r++){var n=e[r];if(m(n)&&2===n.length)b(t,n[0],n[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var o in e)e.hasOwnProperty(o)&&b(t,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var i=e.split("&"),a=0;a<i.length;a++){var s=i[a],u=s.indexOf("=");-1<u?b(t,g(s.slice(0,u)),g(s.slice(u+1))):s&&b(t,g(s),"")}}return t}function b(e,t,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);_(e,t)?e[t].push(n):e[t]=[n]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:this)},243:function(e){"use strict";e.exports=n},297:function(e){"use strict";e.exports=r},385:function(t){"use strict";t.exports=e},192:function(e){"use strict";e.exports=t},194:function(){},917:function(){},347:function(){},850:function(e,t,r){var n;if("function"==typeof fetch&&(n=void 0!==r.g&&r.g.fetch?r.g.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=n||r(456);o.default&&(o=o.default),t.default=o,e.exports=t.default}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;a.t=function(r,n){if(1&n&&(r=this(r)),8&n||"object"==typeof r&&r&&(4&n&&r.__esModule||16&n&&"function"==typeof r.then))return r;var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>{i[e]=()=>r[e]});return i.default=()=>r,a.d(o,i),o}})(),a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var s={};return(()=>{"use strict";a.r(s),a.d(s,{Manager:()=>rt,DefaultBoxShadowBottom:()=>t1,DefaultColor3:()=>tX,RESTRICTED_USER_REALM_ROLE:()=>t9,Util:()=>u,OREvent:()=>i,DefaultColor10:()=>tZ,DEFAULT_ICONSET:()=>t6,EventProviderStatus:()=>e,DefaultHeaderHeight:()=>t3,DefaultColor1:()=>tK,OPENREMOTE_CLIENT_ID:()=>t4,default:()=>rn,manager:()=>rr,DefaultColor9:()=>tQ,DEFAULT_LANGUAGES:()=>t7,DefaultColor8:()=>tY,DefaultColor4:()=>tq,subscribe:()=>tH,DefaultColor2:()=>tG,DefaultColor5:()=>t$,DefaultBoxShadow:()=>t2,DefaultDisabledOpacity:()=>t5,DefaultColor11:()=>t0,normaliseConfig:()=>re,Console:()=>tf,DefaultColor6:()=>tJ,ORError:()=>o,DefaultColor7:()=>tz,WebSocketEventProvider:()=>t_});var e,t,r,n,o,i,u={};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:String(t)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function h(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function v(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}a.r(u),a.d(u,{Deferred:()=>e_,arrayRemove:()=>eT,blobToBase64:()=>tu,camelCaseToSentenceCase:()=>eL,capitaliseFirstLetter:()=>eD,cronStringToISOString:()=>eq,dateToCronString:()=>eH,difference:()=>ej,dispatchCancellableEvent:()=>ts,enumContains:()=>eM,formatCronString:()=>eV,getAllowedValueLabel:()=>eJ,getAssetTypeLabel:()=>eG,getAttributeLabel:()=>eX,getAttributeUnits:()=>e4,getAttributeValueAsString:()=>e0,getAttributeValueConstraints:()=>e8,getAttributeValueFormat:()=>e7,getBrowserLanguage:()=>ew,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>eO,getMetaItemNameValueHolder:()=>eY,getMetaLabel:()=>eQ,getMetaUnits:()=>e9,getMetaValue:()=>ez,getMetaValueAsString:()=>e1,getMetaValueConstraints:()=>e6,getMetaValueFormat:()=>te,getQueryParameter:()=>ek,getQueryParameters:()=>eS,getValueAsString:()=>e3,getValueDescriptorLabel:()=>e$,getWeekNumber:()=>eB,hasMetaItem:()=>eK,isFunction:()=>eC,isObject:()=>eP,isTimeDuration:()=>ex,isTimeDurationNegativeInfinity:()=>eR,isTimeDurationPositiveInfinity:()=>eA,loadJs:()=>to,mergeObjects:()=>function e(t,r,n){if(t&&!r)return Object.assign({},t);if(r&&!t)return Object.assign({},r);let o=Object.assign({},t),i=[];return Object.entries(r).forEach(([t,r])=>{var a,s,u,c,l;let f;a=o,s=i,u=t,c=r,l=n,f=a,s.forEach(e=>{f.hasOwnProperty(e)||(f[e]={}),f=f[e]}),f&&(f.hasOwnProperty(u)?null==c?delete f[u]:Array.isArray(f[u])?l?f[u]=[...f[u],...c]:f[u]=[...c]:"object"==typeof c?f[u]=e(Object.assign({},f[u]),c,l):f[u]=c:null==c?delete f[u]:Array.isArray(c)?f[u]=[...c]:"object"==typeof c?f[u]=Object.assign({},c):f[u]=c)}),o},objectsEqual:()=>eI,resolveUnits:()=>e5,sentenceCaseToCamelCase:()=>eN,sortByNumber:()=>ti,sortByString:()=>ta,stringMatch:()=>eU,updateAsset:()=>tn}),a(488);var k={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},O=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.init(t,r)}return h(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||k,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,S(S({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),E=function(){function e(){l(this,e),this.observers={}}return h(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function x(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function A(e){return null==e?"":""+e}function R(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function P(e,t,r){var n=R(e,t,Object);n.obj[n.k]=r}function C(e,t){var r=R(e,t),n=r.obj,o=r.k;if(n)return n[o]}function I(e,t,r){var n=C(e,r);return void 0!==n?n:C(t,r)}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function N(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return T[e]}):e}var L="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=[" ",",","?","!",";"];function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var F=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return l(this,n),t=r.call(this),L&&E.call(d(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return h(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=C(this.data,a);return s||!i||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,a=0;a<o.length;++a){if(!i||"string"==typeof i[o[a]]&&a+1<o.length)return;if(void 0===i[o[a]]){for(var s=2,u=o.slice(a,a+s).join(n),c=i[u];void 0===c&&o.length>a+s;)s++,c=i[u=o.slice(a,a+s).join(n)];if(void 0===c)return;if(null===c)return null;if(r.endsWith(u)){if("string"==typeof c)return c;if(u&&"string"==typeof c[u])return c[u]}var l=o.slice(a+s).join(n);if(l)return e(c,l,n);return}i=i[o[a]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),P(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);var s=C(this.data,a)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=M(M({},s),r),P(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?M(M({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(E),B={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var H={},q=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,n),i=r.call(this),L&&E.call(d(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=d(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=a,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=O.create("translator"),i}return h(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=U.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n);if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==c(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,f=l[l.length-1],p=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var d=t.nsSeparator||this.options.nsSeparator;return i?(g.res="".concat(f).concat(d).concat(u),g):"".concat(f).concat(d).concat(u)}return i?(g.res=u,g):u}var g=this.resolve(e,t),y=g&&g.res,v=g&&g.usedKey||u,b=g&&g.exactUsedKey||u,m=Object.prototype.toString.apply(y),_=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y;if(w&&y&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(m)&&("string"!=typeof _||"[object Array]"!==m)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,V(V({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(g.res=k,g):k}if(a){var O="[object Array]"===m,E=O?[]:{},x=O?b:v;for(var A in y)if(Object.prototype.hasOwnProperty.call(y,A)){var R="".concat(x).concat(a).concat(A);E[A]=this.translate(R,V(V({},t),{joinArrays:!1,ns:l})),E[A]===R&&(E[A]=y[A])}y=E}}else if(w&&"string"==typeof _&&"[object Array]"===m)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,r));else{var P=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,j=n.hasDefaultValue(t),T=I?this.pluralResolver.getSuffix(p,t.count,t):"",N=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(y)&&j&&(P=!0,y=N),this.isValidLookup(y)||(C=!0,y=u);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,U=j&&N!==y&&this.options.updateMissing;if(C||P||U){if(this.logger.log(U?"updateKey":"missingKey",p,f,u,U?N:y),a){var D=this.resolve(u,V(V({},t),{},{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)M.push(F[B]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var W=function(e,r,n){var i=j&&n!==y?n:L;o.options.missingKeyHandler?o.options.missingKeyHandler(e,f,r,i,U,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,f,r,i,U,t),o.emit("missingKey",e,f,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){W([e],u+r,t["defaultValue".concat(r)]||N)})}):W(M,u,N))}y=this.extendTranslation(y,e,t,g,r),C&&y===u&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(u)),(C||P)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(u):u,P?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,V(V({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(V(V({},r),{interpolation:V(V({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(c=V(V({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,r.lng||this.language,r),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=B.handle(p,e,t,this.options&&this.options.postProcessPassResolved?V({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;r=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach(function(e){a.isValidLookup(t)||(i=e,!H["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(H["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(function(r){if(!a.isValidLookup(t)){o=r;var i,u=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,c,r,e,s);else{f&&(l=a.pluralResolver.getSuffix(r,s.count,s));var l,d="".concat(a.options.pluralSeparator,"zero");if(f&&(u.push(c+l),p&&u.push(c+d)),h){var g="".concat(c).concat(a.options.contextSeparator).concat(s.context);u.push(g),f&&(u.push(g+l),p&&u.push(g+d))}}for(;i=u.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(E);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var K=function(){function e(t){l(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create("languageUtils")}return h(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=z(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),G=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},J=["v1","v2","v3"],Y={zero:0,one:1,two:2,few:3,many:4,other:5},X=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.languageUtils=t,this.options=n,this.logger=O.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},G.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:$[e.fc]}})}),r)}return h(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return Y[e]-Y[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!J.includes(this.options.compatibilityJSON)}}]),e}();function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ee=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.logger=O.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return h(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:N,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(0>e.indexOf(s.formatSeparator)){var o=I(t,u,e);return s.alwaysFormat?s.format(o,void 0,r,Z(Z(Z({},n),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(I(t,u,a),c,r,Z(Z(Z({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(a=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=l(r)))if("function"==typeof f){var u=f(e,o,n);i="string"==typeof u?u:""}else if(n&&n.hasOwnProperty(r))i="";else if(p){i=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||s.useRawValueToEscape||(i=A(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Z({},i);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=Z(Z({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],c=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var l=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=l.shift(),u=l,c=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=A(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),c&&(n=u.reduce(function(e,t){return o.format(e,t,i.lng,Z(Z({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function en(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),a=t[i];return a||(a=e(n,o),t[i]=a),a(r)}}var eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.logger=O.create("formatter"),this.options=t,this.formats={number:en(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:en(function(e,t){var r=new Intl.NumberFormat(e,er(er({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:en(function(e,t){var r=new Intl.DateTimeFormat(e,er({},t));return function(e){return r.format(e)}}),relativetime:en(function(e,t){var r=new Intl.RelativeTimeFormat(e,er({},t));return function(e){return r.format(e,t.range||"day")}}),list:en(function(e,t){var r=new Intl.ListFormat(e,er({},t));return function(e){return r.format(e)}})},this.init(t)}return h(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=en(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return _(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var u=e;try{var c=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},l=c.locale||c.lng||n.locale||n.lng||r;u=o.formats[a](e,l,er(er(er({},s),n),c))}catch(e){o.logger.warn(e)}return u}return o.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var es=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(e,t,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return l(this,n),i=r.call(this),L&&E.call(d(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=O.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return h(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},a={},s={},u={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(r){var n,s,u,c,l;n=r.loaded,(c=(u=R(n,[o],Object)).obj)[l=u.k]=c[l]||[],s||c[l].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[r](e,t,function(s,u){if(n.readingCalls--,n.waitingReads.length>0){var c=n.waitingReads.shift();n.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(s&&u&&o<n.maxRetries)return void setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,a)},i);a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)})}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))return void this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ea(ea({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(E);function eu(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function el(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ef(){}var ep=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(l(this,n),t=r.call(this),L&&E.call(d(t)),t.options=eu(o),t.services={},t.logger=O,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=d(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),v(t,d(t));setTimeout(function(){t.init(o,i)},0)}return t}return h(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===c(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===c(e[2])||"object"===c(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=el(el(el({},n),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=el(el({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?O.init(o(this.modules.logger),this.options):O.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=eo);var i,a=new K(this.options);this.store=new F(this.options.resources,this.options);var s=this.services;s.logger=O,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new X(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new ee(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new es(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new q(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=ef),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var l=x(),f=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=x();return e||(e=this.languages),t||(t=this.options.ns),r||(r=ef),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&B.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=x();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},a=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==c(o)){for(var i,a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=el({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",f=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return n.t(f,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=x();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=x();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,o=el(el(el({},this.options),t),{isClone:!0}),i=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=el({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new q(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(E);m(ep,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ep(e,t)});var eh=ep.createInstance();eh.createInstance=ep.createInstance,eh.createInstance,eh.init,eh.loadResources,eh.reloadResources,eh.use,eh.changeLanguage,eh.getFixedT,eh.t,eh.exists,eh.setDefaultNamespace,eh.hasLoadedNamespace,eh.loadNamespaces,eh.loadLanguages;var ed=a(348),eg=a.n(ed),ey=a(297),ev=a(192),eb=a.n(ev),em=a(891);class e_{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),Object.freeze(this)}}function ew(){return navigator.language.split("-")[0]||"en"}function eS(e){return eg().parse(e,{ignoreQueryPrefix:!0})}function ek(e){let t;if(location.search&&""!==location.search&&(t=eS(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eS(location.hash.substring(e+1)))}return t?t[e]:void 0}function eO(e){let t=[];return e.rules.forEach(e=>{if(e.when&&e.then&&e.then.length>0){let r=new Map;for(let n of(function(e,t,r){if(!e)return;let n=[];e.groups&&e.groups.forEach(e=>{e.items&&e.items.forEach(e=>{n.push(e)})}),e.items&&e.items.forEach(e=>{n.push(e)}),n&&n.forEach(e=>{if(e.assets&&e.assets.attributes){let t=[];if(function e(t,r){t&&(t.items.forEach(e=>{e.value&&("radial"===e.value.predicateType||"rect"===e.value.predicateType)&&r.push({predicate:e.value})}),t.groups&&t.groups.forEach(t=>e(t,r)))}(e.assets.attributes,t),t.length>0){let n=e.tag||"0";r.set(n,t)}}})}(e.when,0,r),r.size>0&&e.then.forEach(e=>(function(e,t){if(e&&"notification"===e.action&&e.notification&&e.notification.message&&"push"===e.notification.message.type){let r=e.target;if(r&&r.conditionAssets){let n=t.get(r.conditionAssets);n&&n.forEach(t=>{t.notification=e.notification.message})}else for(let r of t.values())r.forEach(t=>{t.notification=e.notification.message})}})(e,r)),r.values()))n.forEach(e=>{e.notification&&t.push(e)})}}),t}let eE=/([+-])?((\d+)[Dd])?\s*((\d+)[Hh])?\s*((\d+)[Mm]$)?\s*((\d+)[Ss])?\s*((\d+)([Mm][Ss]$))?\s*((\d+)[Ww])?\s*((\d+)[Mm][Nn])?\s*((\d+)[Yy])?/;function ex(e){return!!e&&(e=e.trim()).length>0&&(eE.test(e)||eA(e)||eR(e))}function eA(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eR(e){return"-*"===(e=null!=e?e.trim():void 0)}function eP(e){return!!e&&"object"==typeof e}function eC(e){return!!(e&&e.constructor&&e.call&&e.apply)}function eI(e,t,r=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function||e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length||e instanceof Date||!(e instanceof Object)||!(t instanceof Object))return!1;if(r){let r=Object.keys(e);return Object.keys(t).every(e=>-1!==r.indexOf(e))&&r.every(r=>eI(e[r],t[r]))}return!1}function ej(e,t){let r=(e,t)=>(0,em.transform)(e,function(e,n,o){eI(n,null==t?void 0:t[o])||(e[o]=eP(n)&&eP(null==t?void 0:t[o])?r(n,null==t?void 0:t[o]):n)});return r(e,t)}function eT(e,t){if(0===e.length)return;let r=e.indexOf(t);r>=0&&e.splice(r,1)}function eN(e){return null==e?"":e.split(" ").map((e,t)=>0===t?e[0].toLowerCase()+e.substring(1):e[0].toUpperCase()+e.substring(1)).join("")}function eL(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,r,n)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!n[r-1]||"_"===n[r-1],o=r+1<n.length&&n[r+1]&&"_"!==n[r+1],i=r+3>n.length||!n[r+1]&&!n[r+3];(!t||o)&&(e=" "+e),!o&&(t||i)||(e=e.toLowerCase())}return e}).join("").trim()}function eU(e,t){if(t===e)return!0;let r=e.endsWith("*"),n=!r&&e.startsWith("*"),o=!r&&!n&&e.startsWith("^")&&e.endsWith("$");if(r&&t.startsWith(e.substr(0,e.length-1))||n&&t.endsWith(e.substr(1)))return!0;if(o)try{return new RegExp(e).test(t)}catch(e){console.error("Failed to compile needle as a RegExp: "+e)}return!1}function eD(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eM(e,t){return e&&Object.values(e).includes(t)}function eF(e,t){return Object.keys(e).find(r=>e[r]===t)}function eB(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));let t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}let eW=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function eV(e,t,r,n,o,i,a){let s="";if(i?Array.isArray(i)?s+=i.toString().replace(" ",""):s+=i.toString():s+="0",s+=" ",o?Array.isArray(o)?s+=o.toString().replace(" ",""):s+=o.toString():s+="0",s+=" ",n?Array.isArray(n)?s+=n.toString().replace(" ",""):s+=n.toString():s+="0",s+=" ",r?Array.isArray(r)?s+=r.toString().replace(" ",""):s+=r.toString():s+="*",s+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eW[t].toString())}),s+=e.toString().replace(" ","")}else s+=t.toString().replace(" ","");else s+=t.toString();else s+="*";return s+=" ",a?s+=a.toString():s+="?",s+=" ",e?Array.isArray(e)?s+=e.toString().replace(" ",""):s+=e:s+="*",s}function eH(e){return eV(e.getFullYear(),eW[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eq(e,t){let r=e.split(" ");if(!Number.isNaN(Number(r[0]))&&!Number.isNaN(Number(r[1]))&&!Number.isNaN(Number(r[2]))&&(!Number.isNaN(Number(r[3]))||"*"==r[3])){let e=(!Number.isNaN(Number(r[6]))?r[6]:new Date().getFullYear()).toString(),n="";n=1==(n="*"!=r[4]?eW.indexOf(r[4]).toString():new Date().getMonth().toString()).length?"0"+n:n;let o=1==r[3].length&&"*"!=r[3]?"0"+r[3]:r[3].replace("*","01"),i=1==r[2].length&&"*"!=r[2]?"0"+r[2]:r[2].replace("*","00"),a=1==r[1].length&&"*"!=r[1]?"0"+r[1]:r[1].replace("*","00"),s=1==r[0].length&&"*"!=r[0]?"0"+r[0]:r[0].replace("*","00");if(e.length>0&&n.length>0)if(t)return eb().utc({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString();else return eb()({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString()}}function ez(e,t,r){let n="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(n)?t.meta[n]:r&&r.meta?r.meta[n]:void 0}function eK(e,t,r){let n="string"==typeof e?e:e.name;return!!(t&&t.meta&&t.meta.hasOwnProperty(n)||r&&r.meta&&r.meta.hasOwnProperty(n))}function eG(e){return("string"==typeof e&&(e=ey.AssetModelUtil.getAssetDescriptor(e)),e)?eh.t("label.asset."+e.name,{defaultValue:eL(e.name)}):""}function e$(e){if(!e)return eh.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eh.t("label.value."+t,{defaultValue:eL(t||"")})}function eJ(e,t){if(e)return eh.t("label.allowedValue."+e,{defaultValue:t||eL(e||""),nsSeparator:!1})}function eY(e,t){let r="string"==typeof e?ey.AssetModelUtil.getMetaItemDescriptor(e):e;return r?{name:r.name,type:r.type,value:t}:{name:typeof e,type:ey.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function eX(e,t,r,n,o){return eZ(e,t,r,n,!0,o)}function eQ(e,t,r,n,o){return eZ(e||eY(t,null),t,r,n,!1,o)}function eZ(e,t,r,n,o,i){let a=tr("label",e,t,r,o),s="";if(a||(a=ez("label",e,t&&t.meta?t:void 0)),n&&(s=e5(tt("units",e,t,r,o))),!a){let r=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=i||(r?eL(r):void 0)}return a?a+(s?" ("+s+")":""):s}function e0(e,t,r,n,o){return e2(e,t,r,n,!0,o)}function e1(e,t,r,n,o){return e2(e||eY(t,null),t,r,n,!1,o)}function e2(e,t,r,n,o,i){let a=e3(e?e.value:void 0,()=>tt("format",e,t,r,o),void 0,i),s=e4(e,t,r);return n&&s&&s.length&&(a=e5(tt("units",e,t,r,o),a)),a}function e3(e,t,r,n){let o="";if(null==e)o=n||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let n=t&&t();if(n&&0!==Object.keys(n).length)switch("number"==typeof e?n.asBoolean?e=!!e:n.asDate&&(e=new Date(e)):"boolean"==typeof e&&n.asNumber&&(e=+!!e),typeof e){case"number":o=new Intl.NumberFormat(r||eh.language,n).format(e);break;case"boolean":n.asOnOff&&(o=e?eh.t("on"):eh.t("off")),n.asOpenClosed&&(o=e?eh.t("open"):eh.t("closed")),n.asPressedReleased&&(o=e?eh.t("pressed"):eh.t("released"));break;case"object":if(n.momentJsFormat)o=eb()(e).format(n.momentJsFormat);else if(n.iso8601)o=e.toISOString();else if(n.week){let t=eB(e);o="2-digit"===n.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(r||eh.language,n).format(e)}else o=Object(e).toString()}return o}function e5(e,t){if(!e)return"";t||(t="");let r=e.map((e,r)=>{if(3!==e.length||e.toUpperCase()!==e)return eh.t(["units."+e,"or:units."+e]);{let n=new Intl.NumberFormat(eh.language,{currency:e,style:"currency"}).formatToParts();if(0!==r||"currency"!==n[0].type)return"currency"===n[0].type?n[0].value:n[n.length-1].value;if(!t)return n[0].value;t=n[0].value+t}}).join("");return t.length>0?t+" "+r:r}function e8(e,t,r){return tt("constraints",e,t,r,!0)}function e6(e,t,r){return tt("constraints",e||eY(t,null),t,r,!1)}function e4(e,t,r){return tt("units",e,t,r,!0)}function e9(e,t,r){return tt("units",e||eY(t,null),t,r,!1)}function e7(e,t,r){return tt("format",e,t,r,!0)}function te(e,t,r){return tt("format",e||eY(t,null),t,r,!1)}function tt(e,t,r,n,o){let i,a=[],s=tr(e,t&&"string"==typeof t?t:t?t.name:r?"string"==typeof r?r:r.name:void 0,r,n,o);if(s&&(i=JSON.parse(s)))if("format"!==e)return i;else a.push(i);if(t&&t.meta&&(i=ez(e,t,r)))if("format"!==e)return i;else a.push(i);if(r&&"string"!=typeof r&&r.hasOwnProperty(e)){if(i=r[e],"format"!==e)return i;a.push(i)}if(r&&r.type){if(i=ey.AssetModelUtil.getValueDescriptor(r.type)[e],"format"!==e)return i;a.push(i)}if("format"!==e||0===a.length)return i;let u={};return a.reverse().forEach(e=>{u=Object.assign(Object.assign({},u),e)}),u}function tr(e,t,r,n,o,i){let a;if(t?a="string"==typeof t?t:t.name:r&&(a="string"==typeof r?r:r.name),!a)return;let s=[],u=e+"."+(o?"attribute":"meta")+".";if(n&&s.push(u+n+"."+a),r&&"string"!=typeof r&&(s.push(u+r.type+"."+a),s.push(u+r.type)),s.push(u+a),s.length>0)return eh.t(s,{defaultValue:i||""})}function tn(e,t){let r=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[r];else{let n=e.attributes[r];n&&(n.value=t.value,n.timestamp=t.timestamp)}return Object.assign({},e)}function to(e){return new Promise((t,r)=>{let n=document.createElement("script");n.type="text/javascript",n.src=e,n.addEventListener("load",e=>t(e),!1),n.addEventListener("error",e=>r(e),!1),document.body.appendChild(n)})}function ti(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n-o:0}}function ta(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n.localeCompare(o):0}}function ts(e,t){let r=new e_;return e.dispatchEvent(t),window.setTimeout(()=>{r.resolve(t.detail)}),r.promise}function tu(e){return new Promise((t,r)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=e=>{r(e)}})}var tc=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};let tl=a(916);class tf{constructor(e,t,r){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=r,window.OpenRemoteConsole=this;let n=new URLSearchParams(window.location.search),o=n.get("consoleName"),i=n.get("consoleVersion"),a=n.get("consolePlatform"),s=n.get("consoleProviders"),u=n.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let l=tf._createConsoleRegistration(),f=window.localStorage.getItem("OpenRemoteConsole:"+e);if(f)try{let e=JSON.parse(f);e.id&&(l.id=e.id),e.name&&(l.name=e.name),e.providers&&(l.providers=e.providers),e.apps&&(l.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let p=l.providers;for(let e of(l.providers={},c)){let t=p&&p.hasOwnProperty(e)?p[e]:{enabled:!1,disabled:!1};l.providers[e]=t}let h=rn.getAppName();h.length>0&&0>l.apps.indexOf(h)&&l.apps.push(h),this._registration=l,o&&(l.name=o),i&&(l.version=i),a&&(l.platform=a),u&&(this._autoEnable="TRUE"===u||"true"===u)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return tc(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(e){console.error(e)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return tc(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}})}enableProvider(e,t){return tc(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let r={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},n=yield this.sendProviderMessage(r,!0);this._registration.providers[e].hasPermission=n.hasPermission,this._registration.providers[e].success=n.success,this._registration.providers[e].enabled=n.success,this._registration.providers[e].data=n.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),n})}disableProvider(e){return tc(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t})}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return tc(this,void 0,void 0,function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let r=e.provider+e.action;if(this._pendingProviderPromises[r])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let n=new e_,o=()=>{delete this._pendingProviderPromises[r],n.reject("No response from provider")};return this._pendingProviderPromises[r]=[n,window.setTimeout(o,5e3)],this._doSendProviderMessage(e),n.promise})}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(e=void 0!==e?e:2e3)+"ms"),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),rn.rest.api.ConsoleResource.register(this._registration).then(t=>{if(200!==t.status)throw Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()})}catch(e){console.error("Failed to register console"),t("Failed to register console")}})})}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tc(this,void 0,void 0,function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{let e=yield Promise.race([t,new Promise((e,t)=>setTimeout(t,2e3))]);if(e&&e.value){let t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){let r={type:e,data:t};this.isMobile?this._postNativeShellMessage(r):console.warn("Failed to send generic message to console.",r)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'retrieve' action requires a `key`");let r=window.localStorage.getItem(t);if(null!==r)try{r=JSON.parse(r)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:r}))}break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),r=t.provider,n=t.action,o=this._pendingProviderPromises[r+n];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[r+n],o[0].resolve(t));let i=this._providerMessageListeners[r+n];i&&i(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:tl.name,version:tl.version,platform:tl.os.toString(),apps:[],model:((tl.manufacturer?tl.manufacturer+" ":"")+(tl.product?tl.product:"")).trim()}}_initialiseProvider(e){return tc(this,void 0,void 0,function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}})}}var tp=a(385),th=a.n(tp),td=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(e||(e={}));let tg="SUBSCRIBED:",ty="UNAUTHORIZED:",tv="TRIGGERED:",tb="EVENT:";class tm{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=t_.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=e.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){eT(this._statusCallbacks,e)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===e.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(e.CONNECTING),this._connectingDeferred=new e_,this._doConnect().then(t=>{if(this._connectingDeferred){let r=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=t_.MIN_RECONNECT_DELAY,this._onStatusChanged(e.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),r.resolve(t)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==e.DISCONNECTED&&this._doDisconnect())}subscribe(t,r){let n={eventSubscription:t,callback:r,deferred:new e_};return null!=this._pendingSubscription||this._status!==e.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(t).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.resolve(e)}},e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return td(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(e))return void this._doUnsubscribe(e);if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}return}if(this._attributeEventCallbackMap.delete(e)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}return}})}sendEvent(t){this._status===e.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==e.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(e,t,r){return td(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+tm._subscriptionCounter++;if(!this._assetEventPromise){let e;rn.authenticated||(e={filterType:"asset",realm:rn.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(o,e=>{let t=e.asset.id;n?n.find(e=>t===e)&&r(e):e.asset.realm===rn.displayRealm&&r(e)}),this._assetEventPromise.then(()=>{try{if(n&&t){let e={messageID:"read-assets:"+n.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:n}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{r({eventType:"asset",asset:e,cause:"READ"})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o})})}subscribeAttributeEvents(e,t,r){return td(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0],o=n?e.map(e=>e.id):e,i=n?e:void 0,a="AttributeEvent"+tm._subscriptionCounter++;if(!this._attributeEventPromise){let e;rn.authenticated||(e={filterType:"asset",realm:rn.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let i=t.ref;n?e.forEach(e=>{i.id===e.id&&i.name===e.name&&r(t)}):o?o.find(e=>i.id===e)&&r(t):t.realm===rn.displayRealm&&r(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,r])=>{(!i||i.find(r=>r.id===e.id&&r.name===t))&&s({eventType:"attribute",timestamp:r.timestamp,value:r.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===e.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let r=e.deferred;e.deferred=null,r&&r.resolve(t)},t=>{let r=e.deferred;e.deferred=null,r&&r.reject(t)})},0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(t=>t(e))},0))}_onMessageReceived(e,t){let r=this._subscriptionMap.get(e);r&&r.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===e.CONNECTED&&this._onStatusChanged(e.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(e.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<t_.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(t_.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tm.MIN_RECONNECT_DELAY=0,tm.MAX_RECONNECT_DELAY=3e4,tm._subscriptionCounter=0;class t_ extends tm{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let e=this._endpointUrl+"?Realm="+rn.config.realm;return rn.authenticated&&(e+="&Authorization="+rn.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new e_,this._webSocket.onopen=()=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{let t=e.data;if(t&&t.startsWith(tg)){let e=JSON.parse(t.substring(tg.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(e.subscriptionId)}else if(t.startsWith(ty)){let e=JSON.parse(t.substring(ty.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),r.reject("Unauthorized"))}else if(t.startsWith(tv)){let e=JSON.parse(t.substring(tv.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tb)){let e=JSON.parse(t.substring(tb.length));if(e.messageID){let t=this._repliesDeferred.get(e.messageID);this._repliesDeferred.delete(e.messageID),t&&t.resolve(e)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null==(e=this._webSocket)||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new e_,e.subscriptionId||(e.subscriptionId=t_._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:e}))}_doSend(e){let t=tb+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");let t=new e_;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tb+JSON.stringify(e)),t.promise}}function tw(e){return(tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t_._subscriptionCounter=1;var tS=[],tk=tS.forEach,tO=tS.slice;function tE(e){return tk.call(tO.call(arguments,1),function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])}),e}function tx(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":tw(XMLHttpRequest))==="object"}var tA=a(850),tR=a.t(tA,2);function tP(e){return(tP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(t="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),tx()&&("undefined"!=typeof global&&global.XMLHttpRequest?r=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(r=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?n=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(n=window.ActiveXObject)),t||!tR||r||n||(t=tA||tR),"function"!=typeof t&&(t=void 0);var tC=function(e,t){if(t&&"object"===tP(t)){var r="";for(var n in t)r+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},tI=function(e,r,n){t(e,r).then(function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(function(t){n(null,{status:e.status,data:t})}).catch(n)}).catch(n)},tj=!1,tT=function(e,t,r,n){e.queryStringParams&&(t=tC(t,e.queryStringParams));var o=tE({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);r&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(r):e.requestOptions,a=tE({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o},tj?{}:i);try{tI(t,a,n)}catch(e){if(!i||0===Object.keys(i).length||!e.message||0>e.message.indexOf("not implemented"))return n(e);try{Object.keys(i).forEach(function(e){delete a[e]}),tI(t,a,n),tj=!0}catch(e){n(e)}}},tN=function(e,t,o,i){o&&"object"===tP(o)&&(o=tC("",o).slice(1)),e.queryStringParams&&(t=tC(t,e.queryStringParams));try{(a=r?new r:new n("MSXML2.XMLHTTP.3.0")).open(o?"POST":"GET",t,1),e.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!e.withCredentials,o&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var a,s=e.customHeaders;if(s="function"==typeof s?s():s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(o)}catch(e){console&&console.log(e)}};let tL=function(e,r,n,o){return("function"==typeof n&&(o=n,n=void 0),o=o||function(){},t)?tT(e,r,n,o):tx()||"function"==typeof ActiveXObject?tN(e,r,n,o):void o(Error("No fetch and no xhr implementation found!"))};var tU=function(){var e;function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return e=[{key:"init",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=tE(r,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,r){var n,o;return n={},o=r||"",t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n},request:tL,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=n,this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,r){this._readAny(e,e,t,t,r)}},{key:"read",value:function(e,t,r){this._readAny([e],e,[t],t,r)}},{key:"_readAny",value:function(e,t,r,n,o){var i,a,s=this,u=this.options.loadPath;"function"==typeof this.options.loadPath&&(u=this.options.loadPath(e,r)),(u=(a=i=u)&&"function"==typeof a.then?i:Promise.resolve(i)).then(function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:r.join("+")});s.loadUrl(a,o,t,n)})}},{key:"loadUrl",value:function(e,t,r,n){var o=this;this.options.request(this.options,e,void 0,function(i,a){var s,u;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);try{s="string"==typeof a.data?o.options.parse(a.data,r,n):a.data}catch(t){u="failed parsing "+e+" to json"}if(u)return t(u,!1);t(null,s)})}},{key:"create",value:function(e,t,r,n,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,r,n),s=0,u=[],c=[];e.forEach(function(r){var n=i.options.addPath;"function"==typeof i.options.addPath&&(n=i.options.addPath(r,t));var l=i.services.interpolator.interpolate(n,{lng:r,ns:t});i.options.request(i.options,l,a,function(t,r){s+=1,u.push(t),c.push(r),s===e.length&&o&&o(u,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,r=t.backendConnector,n=t.languageUtils,o=t.logger,i=r.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],s=function(e){n.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(i),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){r.read(t,e,"read",null,null,function(n,i){n&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),r.loaded("".concat(t,"|").concat(e),n,i)})})})}}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();tU.type="backend";var tD=a(243),tM=a(921);class tF extends Error{}function tB(e,t){let r;if("string"!=typeof e)throw new tF("Invalid token specified: must be a string");t||(t={});let n=+(!0!==t.header),o=e.split(".")[n];if("string"!=typeof o)throw new tF(`Invalid token specified: missing part #${n+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new tF(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new tF(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(tF.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tW(e){if(!(this instanceof tW))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,r,n=this,o=[],i={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)(-1!==a[s].src.indexOf("keycloak.js")||-1!==a[s].src.indexOf("keycloak.min.js"))&&-1!==a[s].src.indexOf("version=")&&(n.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var u=!0,c=A(console.info),l=A(console.warn);function f(e,t){for(var r=function(e){var t=null,r=window.crypto||window.msCrypto;if(r&&r.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),r.getRandomValues(t),t;t=Array(e);for(var n=0;n<t.length;n++)t[n]=Math.floor(256*Math.random());return t}(e),n=Array(e),o=0;o<e;o++)n[o]=t.charCodeAt(r[o]%t.length);return String.fromCharCode.apply(null,n)}function p(){return void 0===n.authServerUrl?void 0:"/"==n.authServerUrl.charAt(n.authServerUrl.length-1)?n.authServerUrl+"realms/"+encodeURIComponent(n.realm):n.authServerUrl+"/realms/"+encodeURIComponent(n.realm)}function h(e,t){var r=e.code,o=e.error,i=e.prompt,a=new Date().getTime();if(e.kc_action_status&&n.onActionUpdate&&n.onActionUpdate(e.kc_action_status),o){if("none"!=i)if(e.error_description&&"authentication_expired"===e.error_description)n.login(e.loginOptions);else{var s={error:o,error_description:e.error_description};n.onAuthError&&n.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();return}if("standard"!=n.flow&&(e.access_token||e.id_token)&&h(e.access_token,null,e.id_token,!0),"implicit"!=n.flow&&r){var l="code="+r+"&grant_type=authorization_code",f=n.endpoints.token(),p=new XMLHttpRequest;p.open("POST",f,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l+="&client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(l+="&code_verifier="+e.pkceCodeVerifier),p.withCredentials=!0,p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=JSON.parse(p.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===n.flow),w()}else n.onAuthError&&n.onAuthError(),t&&t.setError()},p.send(l)}function h(r,o,i,s){g(r,o,i,a=(a+new Date().getTime())/2),u&&n.idTokenParsed&&n.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),n.clearToken(),t&&t.setError()):s&&(n.onAuthSuccess&&n.onAuthSuccess(),t&&t.setSuccess())}}function d(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,r,o){if(n.tokenTimeoutHandle&&(clearTimeout(n.tokenTimeoutHandle),n.tokenTimeoutHandle=null),t?(n.refreshToken=t,n.refreshTokenParsed=tB(t)):(delete n.refreshToken,delete n.refreshTokenParsed),r?(n.idToken=r,n.idTokenParsed=tB(r)):(delete n.idToken,delete n.idTokenParsed),e){if(n.token=e,n.tokenParsed=tB(e),n.sessionId=n.tokenParsed.sid,n.authenticated=!0,n.subject=n.tokenParsed.sub,n.realmAccess=n.tokenParsed.realm_access,n.resourceAccess=n.tokenParsed.resource_access,o&&(n.timeSkew=Math.floor(o/1e3)-n.tokenParsed.iat),null!=n.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+n.timeSkew+" seconds"),n.onTokenExpired)){var i=(n.tokenParsed.exp-new Date().getTime()/1e3+n.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(i/1e3)+" s"),i<=0?n.onTokenExpired():n.tokenTimeoutHandle=setTimeout(n.onTokenExpired,i)}}else delete n.token,delete n.tokenParsed,delete n.subject,delete n.realmAccess,delete n.resourceAccess,n.authenticated=!1}function y(){var e="0123456789abcdef",t=f(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function v(e){var t=function(e){switch(n.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var t,r,o,i=e.indexOf("?"),a=e.indexOf("#");if("query"===n.responseMode&&-1!==i?(r=e.substring(0,i),""!==(o=b(e.substring(i+1,-1!==a?a:e.length),t)).paramsString&&(r+="?"+o.paramsString),-1!==a&&(r+=e.substring(a))):"fragment"===n.responseMode&&-1!==a&&(r=e.substring(0,a),""!==(o=b(e.substring(a+1),t)).paramsString&&(r+="#"+o.paramsString)),o&&o.oauthParams){if("standard"===n.flow||"hybrid"===n.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}else if("implicit"===n.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}}(e);if(t){var o=r.get(t.state);return o&&(t.valid=!0,t.redirectUri=o.redirectUri,t.storedNonce=o.nonce,t.prompt=o.prompt,t.pkceCodeVerifier=o.pkceCodeVerifier,t.loginOptions=o.loginOptions),t}}function b(e,t){for(var r=e.split("&"),n={paramsString:"",oauthParams:{}},o=0;o<r.length;o++){var i=r[o].indexOf("="),a=r[o].slice(0,i);-1!==t.indexOf(a)?n.oauthParams[a]=r[o].slice(i+1):(""!==n.paramsString&&(n.paramsString+="&"),n.paramsString+=r[o])}return n}function m(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}function _(){var e=m();if(!i.enable||i.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");i.iframe=t,t.onload=function(){var t=n.endpoints.authorize();"/"===t.charAt(0)?i.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):i.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var r=n.endpoints.checkSessionIframe();return t.setAttribute("src",r),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",function(e){if(e.origin===i.iframeOrigin&&i.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&n.clearToken();for(var t=i.callbackList.splice(0,i.callbackList.length),r=t.length-1;r>=0;--r){var o=t[r];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}},!1),e.promise}function w(){i.enable&&n.token&&setTimeout(function(){S().then(function(e){e&&w()})},1e3*i.interval)}function S(){var e=m();if(i.iframe&&i.iframeOrigin){var t=n.clientId+" "+(n.sessionId?n.sessionId:"");i.callbackList.push(e);var r=i.iframeOrigin;1==i.callbackList.length&&i.iframe.contentWindow.postMessage(t,r)}else e.setSuccess();return e.promise}function k(){var e,t,r,o=m();if(i.enable||n.silentCheckSsoRedirectUri){var a=document.createElement("iframe");a.setAttribute("src",n.endpoints.thirdPartyCookiesIframe()),a.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-3p-check-iframe"),a.style.display="none",document.body.appendChild(a);var s=function(e){a.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(l("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),i.enable=!1,n.silentCheckSsoFallback&&(n.silentCheckSsoRedirectUri=!1)),document.body.removeChild(a),window.removeEventListener("message",s),o.setSuccess())};window.addEventListener("message",s,!1)}else o.setSuccess();return e=o.promise,t=n.messageReceiveTimeout,r=null,Promise.race([e,new Promise(function(e,n){r=setTimeout(function(){n({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(r)})}function O(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(n.createLoginUrl(e)),m().promise},logout:async function(e){if("GET"===(e?.logoutMethod??n.logoutMethod))return void window.location.replace(n.createLogoutUrl(e));let r=n.createLogoutUrl(e),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:n.idToken,client_id:n.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected){window.location.href=o.url;return}if(o.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(e){return window.location.assign(n.createRegisterUrl(e)),m().promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return m().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:location.href}};if("cordova"==e){i.enable=!1;var r=function(e,t,r){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,r):window.open(e,t,r)},o=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,r){return t[r]=e.cordovaOptions[r],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,r){return e.push(r+"="+t[r]),e},[]).join(",")},a=function(){return n.redirectUri||"http://localhost"};return{login:function(e){var t=m(),i=o(e),s=r(n.createLoginUrl(e),"_blank",i),u=!1,c=!1,l=function(){c=!0,s.close()};return s.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(h(v(e.url),t),l(),u=!0)}),s.addEventListener("loaderror",function(e){u||(0==e.url.indexOf(a())?(h(v(e.url),t),l(),u=!0):(t.setError(),l()))}),s.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,o=m(),i=r(n.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return i.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&i.close()}),i.addEventListener("loaderror",function(e){0==e.url.indexOf(a())||(t=!0),i.close()}),i.addEventListener("exit",function(e){t?o.setError():(n.clearToken(),o.setSuccess())}),o.promise},register:function(e){var t=m(),i=r(n.createRegisterUrl(),"_blank",o(e));return i.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(i.close(),h(v(e.url),t))}),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e){var t=r(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return a()}}}if("cordova-native"==e)return i.enable=!1,{login:function(e){var t=m(),r=n.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},logout:function(e){var t=m(),r=n.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),n.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(r),t.promise},register:function(e){var t=m(),r=n.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw"Not supported by the OIDC server"},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}n.init=function(o){if(n.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(n.didInitialize=!0,n.authenticated=!1,r=function(){try{return new E}catch(e){}return new x}(),t=o&&["default","cordova","cordova-native"].indexOf(o.adapter)>-1?O(o.adapter):o&&"object"==typeof o.adapter?o.adapter:window.Cordova||window.cordova?O("cordova"):O(),o){if(void 0!==o.useNonce&&(u=o.useNonce),void 0!==o.checkLoginIframe&&(i.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(i.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(n.loginRequired=!0),o.responseMode)if("query"===o.responseMode||"fragment"===o.responseMode)n.responseMode=o.responseMode;else throw"Invalid value for responseMode";if(o.flow){switch(o.flow){case"standard":n.responseType="code";break;case"implicit":n.responseType="id_token token";break;case"hybrid":n.responseType="code id_token token";break;default:throw"Invalid value for flow"}n.flow=o.flow}if(null!=o.timeSkew&&(n.timeSkew=o.timeSkew),o.redirectUri&&(n.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(n.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?n.silentCheckSsoFallback=o.silentCheckSsoFallback:n.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);n.pkceMethod=o.pkceMethod}else n.pkceMethod="S256";"boolean"==typeof o.enableLogging?n.enableLogging=o.enableLogging:n.enableLogging=!1,"POST"===o.logoutMethod?n.logoutMethod="POST":n.logoutMethod="GET","string"==typeof o.scope&&(n.scope=o.scope),"string"==typeof o.acrValues&&(n.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?n.messageReceiveTimeout=o.messageReceiveTimeout:n.messageReceiveTimeout=1e4}n.responseMode||(n.responseMode="fragment"),n.responseType||(n.responseType="code",n.flow="standard");var a=m(),s=m();s.promise.then(function(){n.onReady&&n.onReady(n.authenticated),a.setSuccess(n.authenticated)}).catch(function(e){a.setError(e)});var c=function(t){var r=m();function o(e){e?n.endpoints={authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:n.endpoints={authorize:function(){return p()+"/protocol/openid-connect/auth"},token:function(){return p()+"/protocol/openid-connect/token"},logout:function(){return p()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=p()+"/protocol/openid-connect/login-status-iframe.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=p()+"/protocol/openid-connect/3p-cookies/step1.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},register:function(){return p()+"/protocol/openid-connect/registrations"},userinfo:function(){return p()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(s=e):s="keycloak.json",s){var i=new XMLHttpRequest;i.open("GET",s,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status||d(i)){var e=JSON.parse(i.responseText);n.authServerUrl=e["auth-server-url"],n.realm=e.realm,n.clientId=e.resource,o(null),r.setSuccess()}else r.setError()},i.send()}else{if(!e.clientId)throw"clientId missing";n.clientId=e.clientId;var a=e.oidcProvider;if(a)if("string"==typeof a){var s,u="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",i=new XMLHttpRequest;i.open("GET",u,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||d(i)?(o(JSON.parse(i.responseText)),r.setSuccess()):r.setError())},i.send()}else o(a),r.setSuccess();else{if(!e.url){for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++)if(c[l].src.match(/.*keycloak\.js/)){e.url=c[l].src.substr(0,c[l].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";n.authServerUrl=e.url,n.realm=e.realm,o(null),r.setSuccess()}}return r.promise}();function l(){var e=function(e){e||(r.prompt="none"),o&&o.locale&&(r.locale=o.locale),n.login(r).then(function(){s.setSuccess()}).catch(function(e){s.setError(e)})},t=function(){var e=document.createElement("iframe"),t=n.createLoginUrl({prompt:"none",redirectUri:n.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var r=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(h(v(t.data),s),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},r={};switch(o.onLoad){case"check-sso":i.enable?_().then(function(){S().then(function(r){r?s.setSuccess():n.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){s.setError(e)})}):n.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function f(){var e=v(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then(function(){h(e,s)}).catch(function(e){s.setError(e)});o?o.token&&o.refreshToken?(g(o.token,o.refreshToken,o.idToken),i.enable?_().then(function(){S().then(function(e){e?(n.onAuthSuccess&&n.onAuthSuccess(),s.setSuccess(),w()):s.setSuccess()}).catch(function(e){s.setError(e)})}):n.updateToken(-1).then(function(){n.onAuthSuccess&&n.onAuthSuccess(),s.setSuccess()}).catch(function(e){n.onAuthError&&n.onAuthError(),o.onLoad?l():s.setError(e)})):o.onLoad?l():s.setSuccess():s.setSuccess()}return c.then(function(){var e,t;(e=m(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(k).then(f).catch(function(e){a.setError(e)})}),c.catch(function(e){a.setError(e)}),a.promise},n.login=function(e){return t.login(e)},n.createLoginUrl=function(e){var o,i=y(),a=y(),s=t.redirectUri(e),c={state:i,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),o=e&&"register"==e.action?n.endpoints.register():n.endpoints.authorize();var l=e&&e.scope||n.scope;l?-1===l.indexOf("openid")&&(l="openid "+l):l="openid";var p=o+"?client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(i)+"&response_mode="+encodeURIComponent(n.responseMode)+"&response_type="+encodeURIComponent(n.responseType)+"&scope="+encodeURIComponent(l);if(u&&(p=p+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(p+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(p+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(p+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(p+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(p+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(p+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(p+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||n.acrValues)&&(p+="&acr_values="+encodeURIComponent(e.acrValues||n.acrValues)),n.pkceMethod){var h=f(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=h,p+="&code_challenge="+function(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(tM.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(n.pkceMethod,h)+"&code_challenge_method="+n.pkceMethod}return r.add(c),p},n.logout=function(e){return t.logout(e)},n.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??n.logoutMethod))return n.endpoints.logout();var r=n.endpoints.logout()+"?client_id="+encodeURIComponent(n.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return n.idToken&&(r+="&id_token_hint="+encodeURIComponent(n.idToken)),r},n.register=function(e){return t.register(e)},n.createRegisterUrl=function(e){return e||(e={}),e.action="register",n.createLoginUrl(e)},n.createAccountUrl=function(e){var r=p(),o=void 0;return void 0!==r&&(o=r+"/account?referrer="+encodeURIComponent(n.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},n.accountManagement=function(){return t.accountManagement()},n.hasRealmRole=function(e){var t=n.realmAccess;return!!t&&t.roles.indexOf(e)>=0},n.hasResourceRole=function(e,t){if(!n.resourceAccess)return!1;var r=n.resourceAccess[t||n.clientId];return!!r&&r.roles.indexOf(e)>=0},n.loadUserProfile=function(){var e=p()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.profile=JSON.parse(t.responseText),r.setSuccess(n.profile)):r.setError())},t.send(),r.promise},n.loadUserInfo=function(){var e=n.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.userInfo=JSON.parse(t.responseText),r.setSuccess(n.userInfo)):r.setError())},t.send(),r.promise},n.isTokenExpired=function(e){if(!n.tokenParsed||!n.refreshToken&&"implicit"!=n.flow)throw"Not authenticated";if(null==n.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=n.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+n.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},n.updateToken=function(e){var t=m();if(!n.refreshToken)return t.setError(),t.promise;e=e||5;var r=function(){var r=!1;if(-1==e?(r=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):(!n.tokenParsed||n.isTokenExpired(e))&&(r=!0,c("[KEYCLOAK] Refreshing token: token expired")),r){var i="grant_type=refresh_token&refresh_token="+n.refreshToken,a=n.endpoints.token();if(o.push(t),1==o.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,i+="&client_id="+encodeURIComponent(n.clientId);var u=new Date().getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),u=(u+new Date().getTime())/2;var e=JSON.parse(s.responseText);g(e.access_token,e.refresh_token,e.id_token,u),n.onAuthRefreshSuccess&&n.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else{l("[KEYCLOAK] Failed to refresh token"),400==s.status&&n.clearToken(),n.onAuthRefreshError&&n.onAuthRefreshError();for(var t=o.pop();null!=t;t=o.pop())t.setError(!0)}},s.send(i)}}else t.setSuccess(!1)};return i.enable?S().then(function(){r()}).catch(function(e){t.setError(e)}):r(),t.promise},n.clearToken=function(){n.token&&(g(null,null,null),n.onAuthLogout&&n.onAuthLogout(),n.loginRequired&&n.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=new Date().getTime(),t=0;t<localStorage.length;t++){var r=localStorage.key(t);if(r&&0==r.indexOf("kc-callback-")){var n=localStorage.getItem(r);if(n)try{var o=JSON.parse(n).expires;(!o||o<e)&&localStorage.removeItem(r)}catch(e){localStorage.removeItem(r)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var r="kc-callback-"+t,n=localStorage.getItem(r);return n&&(localStorage.removeItem(r),n=JSON.parse(n)),e(),n}},this.add=function(t){e();var r="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(r,JSON.stringify(t))}},x=function(){if(!(this instanceof x))return new x;this.get=function(n){if(n){var o=t("kc-callback-"+n);if(r("kc-callback-"+n,"",e(-100)),o)return JSON.parse(o)}},this.add=function(t){r("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){r(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},r=function(e,t,r){var n=e+"="+t+"; expires="+r.toUTCString()+"; ";document.cookie=n}};function A(e){return function(){n.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var tV=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};let tH=t=>r=>class extends r{constructor(){super(...arguments),this._connectRequested=!1,this._status=e.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){if(!t.getEventProvider())return void console.log("No event provider available so cannot subscribe");this._connectRequested||(this._connectRequested=!0,t.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect())}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,t.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return tV(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&t.getEventProvider().status===e.CONNECTED}_onEventProviderStatusChanged(t){switch(t){case e.DISCONNECTED:this._onEventsDisconnect();break;case e.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return tV(this,void 0,void 0,function*(){let e=!!this._attributeRefs,r=!!this._assetIds,n=this._attributeRefs?this._attributeRefs:this._assetIds;if(n&&n.length>0){if(this._subscriptionIds=[],r){let e=yield t.getEventProvider().subscribeAssetEvents(n,!0,e=>this._onEvent(e)),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eI(n,r))return void t.getEventProvider().unsubscribe(e);this._subscriptionIds.push(e)}let o=yield t.getEventProvider().subscribeAttributeEvents(n,e,e=>this._onEvent(e)),i=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eI(n,i))return void t.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(e=>{t.getEventProvider().unsubscribe(e)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eI(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eI(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(e){t.getEventProvider().sendEvent(e)}_sendEventWithReply(e){return t.getEventProvider().sendEventWithReply(e)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tq="#4d9d2a",tz="#FFFFFF",tK="#FFFFFF",tG="#F9F9F9",t$="#CCCCCC",tJ="#be0000",tY="#FFFFFF",tX="#4c4c4c",tQ="#000000",tZ="#000000",t0="#FFFFFF",t1="0 5px 5px -5px rgba(0,0,0,0.3)",t2="0 1px 3px 0 rgba(0,0,0,0.21)",t3="50px",t5="0.3";var t8=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};let t6="mdi",t4="openremote",t9="restricted_user";!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(o||(o={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(i||(i={}));let t7={en:"english",cn:"chinese",nl:"dutch",fr:"french",de:"german",it:"italian",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"};function re(e){let t=e?Object.assign({},e):{};return t.managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId=t4),t}class rt{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){let e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([t,r])=>{let n=r.roles;e.set(t,n)}):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null==(e=this._config)?void 0:e.managerUrl}get keycloakUrl(){var e;return null==(e=this._config)?void 0:e.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return th()}get language(){return eh.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eh.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.authenticated&&this.updateKeycloakUserLanguage(e).catch(e=>console.error(e)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(i.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||t4}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;let e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){0>this._listeners.indexOf(e)&&this._listeners.push(e)}removeListener(e){let t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return t8(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=re(e);let t=yield this.loadManagerInfo(),r=new tf(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(i.CONSOLE_READY)});if(this._console=r,"BASIC"===this._config.auth)t=(yield this.doTranslateInit())&&t,t=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let e,t=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")&&(this._authServerUrl=t.protocol+this._authServerUrl);try{e=new URL(this._authServerUrl)}catch(r){(e=new URL(t)).pathname=this._authServerUrl}e.protocol||(e.protocol=t.protocol),e.hostname||(e.hostname=t.hostname),e.port||(e.port=t.port),this._config.keycloakUrl=e.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),(t=yield this.doAuthInit())||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",t=yield this.doAuthInit())}return!!t&&(t&&(t=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(t=(yield this.doTranslateInit())&&t)&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(t=yield this.doEventsSubscriptionInit(),this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(i.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return t8(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let r=new XMLHttpRequest;r.addEventListener("load",()=>{e(JSON.parse(r.responseText))}),r.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),r.open("GET",this._config.managerUrl+"/api/master/info"),r.send()});return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(o.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return t8(this,void 0,void 0,function*(){if(eh.isInitialized)return!0;eh.on("initialized",e=>{this._emitEvent(i.TRANSLATE_INIT)}),eh.on("languageChanged",e=>{eb().locale(e),this._emitEvent(i.TRANSLATE_LANGUAGE_CHANGED)});let e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,r)=>"uppercase"===t?e.toUpperCase():e instanceof Date?eb()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(e);try{yield eh.use(tU).init(e)}catch(e){return console.error(e),this._setError(o.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return t8(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield th().api.AssetModelResource.getAssetInfos(),t=yield th().api.AssetModelResource.getMetaItemDescriptors(),r=yield th().api.AssetModelResource.getValueDescriptors();ey.AssetModelUtil._assetTypeInfos=e.data,ey.AssetModelUtil._metaItemDescriptors=Object.values(t.data),ey.AssetModelUtil._valueDescriptors=Object.values(r.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return t8(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(o.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(th().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return th().setTimeout(2e4),th().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return t8(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new t_(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(o.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var t;(null==(t=this.events)?void 0:t.status)===e.DISCONNECTED?this.events.connect().catch(e=>{console.error("Failed to connect EventProvider."),console.error(e)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(t){switch(t){case e.DISCONNECTED:this._onDisconnect();break;case e.CONNECTED:break;case e.CONNECTING:this._emitEvent(i.CONNECTING)}}doConsoleInit(){return t8(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(i.CONSOLE_INIT),!0}catch(e){return this._setError(o.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tD.IconSets.addIconSet("mdi",(0,tD.createMdiIconSet)(rr.managerUrl)),tD.IconSets.addIconSet("or",(0,tD.createSvgIconSet)(tD.OrIconSet.size,tD.OrIconSet.icons)))}getConsoleAppConfig(){return t8(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=rr.managerUrl)?e:"")+"/consoleappconfig/"+rr.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return t8(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return t8(this,arguments,void 0,function*(e=this._keycloak){if(e&&e.authenticated){let t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){let e=new Map(Object.entries(t.attributes));if(e.has("locale")){let t=e.get("locale");if("string"==typeof t[0])return t[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}})}updateKeycloakUserLanguage(e){return t8(this,arguments,void 0,function*(e,t=this.rest){return this.authenticated?t?void(yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}})):void console.warn("Tried updating user language, but the REST API is not initialized yet."):void console.warn("Tried updating user language, but the user is not authenticated.")})}logout(e){this._authenticated&&(this._authenticated=!0,this._keycloak?(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){let t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return t8(this,void 0,void 0,function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)})}doBasicLogin(){return t8(this,void 0,void 0,function*(){var e,t,r,n;if(!this.config.basicLoginProvider)return;let o={username:(null==(e=this.config.credentials)?void 0:e.username)?null==(t=this.config.credentials)?void 0:t.username:"",password:(null==(r=this.config.credentials)?void 0:r.password)?null==(n=this.config.credentials)?void 0:n.password:"",cancel:!1},i=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!i;){if((o=yield this.config.basicLoginProvider(o.username,o.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{let t=yield th().api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(e){console.debug("Basic authentication successful"),i=!0;let e=yield th().api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}i&&this._onAuthenticated()})}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(t9)}getApiBaseUrl(){let e=this._config.managerUrl;return e+("/api/"+this._config.realm+"/")}getAppName(){let e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){let r=this.roles;return r&&r.has(t)&&r.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0}loadAndInitialiseKeycloak(){return t8(this,void 0,void 0,function*(){var e,t,r,n;try{this._keycloak=new tW({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),i=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!i&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,i=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(i)this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&(null==(n=null==(r=this._keycloak)?void 0:r.refreshTokenParsed)?void 0:n.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(o.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>t8(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return t8(this,void 0,void 0,function*(){let e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e})}_getNativeOfflineRefreshToken(){return t8(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(e){window.setTimeout(()=>{for(let t of this._listeners)t(e)},0)}_setError(e){this._error=e,this._emitEvent(i.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0)}_onDisconnect(){return t8(this,void 0,void 0,function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(i.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(i.ONLINE)}reconnect(){return t8(this,arguments,void 0,function*(t=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let r=()=>t8(this,void 0,void 0,function*(){var t;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(t){let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e;try{yield this._updateKeycloakAccessToken()}catch(e){console.debug("Cannot update access token so sending to login"),this.login();return}return console.debug("Keycloak access token is valid"),!0}let r=this.events&&this.events.status===e.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+r),!r||(yield null==(t=this.events)?void 0:t.connect())}),n=yield r();if(void 0!==n){if(!n){console.debug("Scheduling another reconnect attempt in (ms): "+(t=Math.min(rt.MAX_RECONNECT_DELAY,t+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(t),t);return}this._onReconnected()}})}isKeycloakReachable(){return t8(this,arguments,void 0,function*(e=2e3){let t=new AbortController,r=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),r=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===r.status}catch(e){return!1}finally{clearTimeout(r)}})}}rt.MAX_RECONNECT_DELAY=45e3;let rr=new rt,rn=rr})(),s})());
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORRest","moment","ORModel","ORIcon"],t):"object"==typeof exports?exports.ORCore=t(require("ORRest"),require("moment"),require("ORModel"),require("ORIcon")):e.ORCore=t(e.ORRest,e.moment,e.ORModel,e.ORIcon)}(self,(e,t,r,n)=>(()=>{var o={737:function(e,t,r){"use strict";var n=r(528),o=r(235),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},235:function(e,t,r){"use strict";var n=r(156),o=r(528),i=r(427),a=r(682),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,s),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},427:function(e,t,r){"use strict";var n=r(528),o=r(892),i=r(320)(),a=r(455),s=r(682),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},456:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();(function(e){var t={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(t.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&r.indexOf(Object.prototype.toString.call(e))>-1};function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}function l(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function f(e){var t=new FileReader,r=l(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var r;t.arrayBuffer&&t.blob&&(r=e)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e,t,r,n=c(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=l(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},t.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},u.prototype.delete=function(e){delete this.map[i(e)]},u.prototype.get=function(e){return e=i(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},u.prototype.set=function(e,t){this.map[i(e)]=a(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),s(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),s(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),s(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var d=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(e,t){var r,n,o=(t=t||{}).body;if(e instanceof g){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new u(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),d.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},h.call(g.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];v.redirect=function(e,t){if(-1===b.indexOf(t))throw RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function m(r,n){return new Promise(function(o,i){var a=new g(r,n);if(a.signal&&a.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();t.append(n,o)}}),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL"),o(new v("response"in s?s.response:s.responseText,r))},s.onerror=function(){i(TypeError("Network request failed"))},s.ontimeout=function(){i(TypeError("Network request failed"))},s.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&t.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)})}m.polyfill=!0,n.fetch||(n.fetch=m,n.Headers=u,n.Request=g,n.Response=v),e.Headers=u,e.Request=g,e.Response=v,e.fetch=m,Object.defineProperty(e,"__esModule",{value:!0})})({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill,(t=n.fetch).default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t},892:function(e,t,r){"use strict";var n=r(320)(),o=r(528),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var a=r(874),s=r(682),u=r(455);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!u&&u(e,t);if(i)i(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else if(!l&&(n||o||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=r}},727:function(e){"use strict";e.exports=EvalError},772:function(e){"use strict";e.exports=Error},511:function(e){"use strict";e.exports=RangeError},912:function(e){"use strict";e.exports=ReferenceError},874:function(e){"use strict";e.exports=SyntaxError},682:function(e){"use strict";e.exports=TypeError},834:function(e){"use strict";e.exports=URIError},521:function(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},o=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},i=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};e.exports=function(e){var a,s=this;if("function"!=typeof s||"[object Function]"!==t.apply(s))throw TypeError("Function.prototype.bind called on incompatible "+s);for(var u=o(arguments,1),c=r(0,s.length-u.length),l=[],f=0;f<c;f++)l[f]="$"+f;if(a=Function("binder","return function ("+i(l,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=s.apply(this,n(u,arguments));return Object(t)===t?t:this}return s.apply(e,n(u,arguments))}),s.prototype){var p=function(){};p.prototype=s.prototype,a.prototype=new p,p.prototype=null}return a}},156:function(e,t,r){"use strict";var n=r(521);e.exports=Function.prototype.bind||n},528:function(e,t,r){"use strict";var n,o=r(772),i=r(727),a=r(511),s=r(912),u=r(874),c=r(682),l=r(834),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var d=function(){throw new c},g=h?function(){try{return arguments.callee,d}catch(e){try{return h(arguments,"callee").get}catch(e){return d}}}():d,y=r(465)(),v=r(209)(),b=Object.getPrototypeOf||(v?function(e){return e.__proto__}:null),m={},_="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":m,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&b?b(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&b?b(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&b?b(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":_,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(e){var S=b(b(e));w["%Error.prototype%"]=S}var k=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&b&&(r=b(o.prototype))}return w[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=r(156),x=r(673),A=E.call(Function.call,Array.prototype.concat),R=E.call(Function.apply,Array.prototype.splice),P=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),I=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,N=function(e){var t=C(e,0,1),r=C(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return P(e,j,function(e,t,r,o){n[n.length]=r?P(o,T,"$1"):t||e}),n},L=function(e,t){var r,n=e;if(x(O,n)&&(n="%"+(r=O[n])[0]+"%"),x(w,n)){var o=w[n];if(o===m&&(o=k(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=N(e),n=r.length>0?r[0]:"",o=L("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],R(r,A([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],g=C(d,0,1),y=C(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),n+="."+d,x(w,i="%"+n+"%"))a=w[i];else if(null!=a){if(!(d in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=r.length){var v=h(a,d);a=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:a[d]}else p=x(a,d),a=a[d];p&&!s&&(w[i]=a)}}return a}},455:function(e,t,r){"use strict";var n=r(528)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},320:function(e,t,r){"use strict";var n=r(528)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},209:function(e){"use strict";var t={foo:{}},r=Object;e.exports=function(){return({__proto__:t}).foo===t.foo&&!(({__proto__:null})instanceof r)}},465:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(73);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},73:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},673:function(e,t,r){"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty;e.exports=r(156).call(n,o)},921:function(e,t,r){!function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var i=!n&&"object"==typeof self,a=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;a?o=r.g:i&&(o=self);var s=!o.JS_SHA256_NO_COMMON_JS&&e.exports,u="function"==typeof define&&define.amd,c=!o.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),f=[-0x80000000,8388608,32768,128],p=[24,16,8,0],h=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],d=["hex","array","digest","arrayBuffer"],g=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),c&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(r){return new w(t,!0).update(r)[e]()}},v=function(e){var t=y("hex",e);a&&(t=b(t,e)),t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<d.length;++r){var n=d[r];t[n]=y(n,e)}return t},b=function(e,n){var i,a=r(917),s=r(194).Buffer,u=n?"sha224":"sha256";return i=s.from&&!o.JS_SHA256_NO_BUFFER_FROM?s.from:function(e){return new s(e)},function(r){if("string"==typeof r)return a.createHash(u).update(r,"utf8").digest("hex");if(null==r)throw Error(t);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===s?a.createHash(u).update(i(r)).digest("hex"):e(r)}},m=function(e,t){return function(r,n){return new S(r,t,!0).update(n)[e]()}},_=function(e){var t=m("hex",e);t.create=function(t){return new S(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<d.length;++r){var n=d[r];t[n]=m(n,e)}return t};function w(e,t){t?(g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=0xc1059ed8,this.h1=0x367cd507,this.h2=0x3070dd17,this.h3=0xf70e5939,this.h4=0xffc00b31,this.h5=0x68581511,this.h6=0x64f98fa7,this.h7=0xbefa4fa4):(this.h0=0x6a09e667,this.h1=0xbb67ae85,this.h2=0x3c6ef372,this.h3=0xa54ff53a,this.h4=0x510e527f,this.h5=0x9b05688c,this.h6=0x1f83d9ab,this.h7=0x5be0cd19),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function S(e,r,n){var o,i=typeof e;if("string"===i){var a,s=[],u=e.length,l=0;for(o=0;o<u;++o)(a=e.charCodeAt(o))<128?s[l++]=a:(a<2048?s[l++]=192|a>>>6:(a<55296||a>=57344?s[l++]=224|a>>>12:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++o)),s[l++]=240|a>>>18,s[l++]=128|a>>>12&63),s[l++]=128|a>>>6&63),s[l++]=128|63&a);e=s}else if("object"===i){if(null===e)throw Error(t);else if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);e.length>64&&(e=new w(r,!0).update(e).array());var f=[],p=[];for(o=0;o<64;++o){var h=e[o]||0;f[o]=92^h,p[o]=54^h}w.call(this,r,n),this.update(p),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}w.prototype.update=function(e){if(!this.finalized){var r,n=typeof e;if("string"!==n){if("object"===n){if(null===e)throw Error(t);else if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!c||!ArrayBuffer.isView(e)))throw Error(t)}else throw Error(t);r=!0}for(var o,i,a=0,s=e.length,u=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,u[0]=this.block,this.block=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0),r)for(i=this.start;a<s&&i<64;++a)u[i>>>2]|=e[a]<<p[3&i++];else for(i=this.start;a<s&&i<64;++a)(o=e.charCodeAt(a))<128?u[i>>>2]|=o<<p[3&i++]:(o<2048?u[i>>>2]|=(192|o>>>6)<<p[3&i++]:(o<55296||o>=57344?u[i>>>2]|=(224|o>>>12)<<p[3&i++]:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++a)),u[i>>>2]|=(240|o>>>18)<<p[3&i++],u[i>>>2]|=(128|o>>>12&63)<<p[3&i++]),u[i>>>2]|=(128|o>>>6&63)<<p[3&i++]),u[i>>>2]|=(128|63&o)<<p[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=u[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>0xffffffff&&(this.hBytes+=this.bytes/0x100000000|0,this.bytes=this.bytes%0x100000000),this}},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},w.prototype.hash=function(){var e,t,r,n,o,i,a,s,u,c,l=this.h0,f=this.h1,p=this.h2,d=this.h3,g=this.h4,y=this.h5,v=this.h6,b=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((o=m[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=m[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,m[e]=m[e-16]+t+m[e-7]+r|0;for(e=0,c=f&p;e<64;e+=4)this.first?(this.is224?(a=300032,b=(o=m[0]-0x543c9a5b)-0x8f1a6c7|0,d=o+0x170e9b5|0):(a=0x2a01a605,b=(o=m[0]-0xc881298)-0x5ab00ac6|0,d=o+0x8909ae5|0),this.first=!1):(t=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),n=(a=l&f)^l&p^c,o=b+r+(g&y^~g&v)+h[e]+m[e],i=t+n,b=d+o|0,d=o+i|0),t=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7),n=(s=d&l)^d&f^a,o=v+r+(b&g^~b&y)+h[e+1]+m[e+1],i=t+n,v=p+o|0,t=((p=o+i|0)>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),n=(u=p&d)^p&l^s,o=y+r+(v&b^~v&g)+h[e+2]+m[e+2],i=t+n,y=f+o|0,t=((f=o+i|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(c=f&p)^f&d^u,o=g+r+(y&v^~y&b)+h[e+3]+m[e+3],i=t+n,g=l+o|0,l=o+i|0,this.chromeBugWorkAround=!0;this.h0=this.h0+l|0,this.h1=this.h1+f|0,this.h2=this.h2+p|0,this.h3=this.h3+d|0,this.h4=this.h4+g|0,this.h5=this.h5+y|0,this.h6=this.h6+v|0,this.h7=this.h7+b|0},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=l[e>>>28&15]+l[e>>>24&15]+l[e>>>20&15]+l[e>>>16&15]+l[e>>>12&15]+l[e>>>8&15]+l[e>>>4&15]+l[15&e]+l[t>>>28&15]+l[t>>>24&15]+l[t>>>20&15]+l[t>>>16&15]+l[t>>>12&15]+l[t>>>8&15]+l[t>>>4&15]+l[15&t]+l[r>>>28&15]+l[r>>>24&15]+l[r>>>20&15]+l[r>>>16&15]+l[r>>>12&15]+l[r>>>8&15]+l[r>>>4&15]+l[15&r]+l[n>>>28&15]+l[n>>>24&15]+l[n>>>20&15]+l[n>>>16&15]+l[n>>>12&15]+l[n>>>8&15]+l[n>>>4&15]+l[15&n]+l[o>>>28&15]+l[o>>>24&15]+l[o>>>20&15]+l[o>>>16&15]+l[o>>>12&15]+l[o>>>8&15]+l[o>>>4&15]+l[15&o]+l[i>>>28&15]+l[i>>>24&15]+l[i>>>20&15]+l[i>>>16&15]+l[i>>>12&15]+l[i>>>8&15]+l[i>>>4&15]+l[15&i]+l[a>>>28&15]+l[a>>>24&15]+l[a>>>20&15]+l[a>>>16&15]+l[a>>>12&15]+l[a>>>8&15]+l[a>>>4&15]+l[15&a];return this.is224||(u+=l[s>>>28&15]+l[s>>>24&15]+l[s>>>20&15]+l[s>>>16&15]+l[s>>>12&15]+l[s>>>8&15]+l[s>>>4&15]+l[15&s]),u},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,a=this.h6,s=this.h7,u=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,i>>>24&255,i>>>16&255,i>>>8&255,255&i,a>>>24&255,a>>>16&255,a>>>8&255,255&a];return this.is224||u.push(s>>>24&255,s>>>16&255,s>>>8&255,255&s),u},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},S.prototype=new w,S.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();w.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),w.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),s?e.exports=k:(o.sha256=k.sha256,o.sha224=k.sha224,u&&define(function(){return k}))}()},891:function(e,t,r){e=r.nmd(e),(function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=1/0,u=0/0,c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",f="[object Array]",p="[object Boolean]",h="[object Date]",d="[object Error]",g="[object Function]",y="[object GeneratorFunction]",v="[object Map]",b="[object Number]",m="[object Object]",_="[object Promise]",w="[object RegExp]",S="[object Set]",k="[object String]",O="[object Symbol]",E="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",R="[object Float32Array]",P="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",j="[object Int32Array]",T="[object Uint8Array]",N="[object Uint8ClampedArray]",L="[object Uint16Array]",U="[object Uint32Array]",D=/\b__p \+= '';/g,M=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,V=RegExp(B.source),H=RegExp(W.source),q=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Y=/[\\^$.*+?()[\]{}|]/g,X=RegExp(Y.source),Q=/^\s+/,Z=/\s/,ee=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,et=/\{\n\/\* \[wrapped with (.+)\] \*/,er=/,? & /,en=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eo=/[()=,{}\[\]\/\s]/,ei=/\\(\\)?/g,ea=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ec=/^0b[01]+$/i,el=/^\[object .+?Constructor\]$/,ef=/^0o[0-7]+$/i,ep=/^(?:0|[1-9]\d*)$/,eh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ed=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ey="\ud800-\udfff",ev="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",eb="\\u2700-\\u27bf",em="a-z\\xdf-\\xf6\\xf8-\\xff",e_="A-Z\\xc0-\\xd6\\xd8-\\xde",ew="\\ufe0e\\ufe0f",eS="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ek="['’]",eO="["+eS+"]",eE="["+ev+"]",ex="["+em+"]",eA="[^"+ey+eS+"\\d+"+eb+em+e_+"]",eR="\ud83c[\udffb-\udfff]",eP="[^"+ey+"]",eC="(?:\ud83c[\udde6-\uddff]){2}",eI="[\ud800-\udbff][\udc00-\udfff]",ej="["+e_+"]",eT="\\u200d",eN="(?:"+ex+"|"+eA+")",eL="(?:"+ej+"|"+eA+")",eU="(?:"+ek+"(?:d|ll|m|re|s|t|ve))?",eD="(?:"+ek+"(?:D|LL|M|RE|S|T|VE))?",eM="(?:"+eE+"|"+eR+")?",eF="["+ew+"]?",eB="(?:"+eT+"(?:"+[eP,eC,eI].join("|")+")"+eF+eM+")*",eW=eF+eM+eB,eV="(?:"+["["+eb+"]",eC,eI].join("|")+")"+eW,eH="(?:"+[eP+eE+"?",eE,eC,eI,"["+ey+"]"].join("|")+")",eq=RegExp(ek,"g"),ez=RegExp(eE,"g"),eK=RegExp(eR+"(?="+eR+")|"+eH+eW,"g"),eG=RegExp([ej+"?"+ex+"+"+eU+"(?="+[eO,ej,"$"].join("|")+")",eL+"+"+eD+"(?="+[eO,ej+eN,"$"].join("|")+")",ej+"?"+eN+"+"+eU,ej+"+"+eD,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eV].join("|"),"g"),e$=RegExp("["+eT+ey+ev+ew+"]"),eJ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eY=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eX=-1,eQ={};eQ[R]=eQ[P]=eQ[C]=eQ[I]=eQ[j]=eQ[T]=eQ[N]=eQ[L]=eQ[U]=!0,eQ[l]=eQ[f]=eQ[x]=eQ[p]=eQ[A]=eQ[h]=eQ[d]=eQ[g]=eQ[v]=eQ[b]=eQ[m]=eQ[w]=eQ[S]=eQ[k]=eQ[E]=!1;var eZ={};eZ[l]=eZ[f]=eZ[x]=eZ[A]=eZ[p]=eZ[h]=eZ[R]=eZ[P]=eZ[C]=eZ[I]=eZ[j]=eZ[v]=eZ[b]=eZ[m]=eZ[w]=eZ[S]=eZ[k]=eZ[O]=eZ[T]=eZ[N]=eZ[L]=eZ[U]=!0,eZ[d]=eZ[g]=eZ[E]=!1;var e0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e1=parseFloat,e2=parseInt,e3="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,e5="object"==typeof self&&self&&self.Object===Object&&self,e8=e3||e5||Function("return this")(),e6=t&&!t.nodeType&&t,e4=e6&&e&&!e.nodeType&&e,e9=e4&&e4.exports===e6,e7=e9&&e3.process,te=function(){try{var e=e4&&e4.require&&e4.require("util").types;if(e)return e;return e7&&e7.binding&&e7.binding("util")}catch(e){}}(),tt=te&&te.isArrayBuffer,tr=te&&te.isDate,tn=te&&te.isMap,to=te&&te.isRegExp,ti=te&&te.isSet,ta=te&&te.isTypedArray;function ts(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function tu(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function tc(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function tl(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function tf(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function tp(e,t){return!!(null==e?0:e.length)&&tS(e,t,0)>-1}function th(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function td(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function tg(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function ty(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function tv(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function tb(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var tm=tx("length");function t_(e,t,r){var n;return r(e,function(e,r,o){if(t(e,r,o))return n=r,!1}),n}function tw(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return -1}function tS(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return -1}(e,t,r):tw(e,tO,r)}function tk(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return -1}function tO(e){return e!=e}function tE(e,t){var r=null==e?0:e.length;return r?tP(e,t)/r:u}function tx(e){return function(t){return null==t?n:t[e]}}function tA(e){return function(t){return null==e?n:e[t]}}function tR(e,t,r,n,o){return o(e,function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)}),r}function tP(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);n!==a&&(r=n===r?a:r+a)}return r}function tC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function tI(e){return e?e.slice(0,tG(e)+1).replace(Q,""):e}function tj(e){return function(t){return e(t)}}function tT(e,t){return td(t,function(t){return e[t]})}function tN(e,t){return e.has(t)}function tL(e,t){for(var r=-1,n=e.length;++r<n&&tS(t,e[r],0)>-1;);return r}function tU(e,t){for(var r=e.length;r--&&tS(t,e[r],0)>-1;);return r}var tD=tA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tM=tA({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function tF(e){return"\\"+e0[e]}function tB(e){return e$.test(e)}function tW(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function tV(e,t){return function(r){return e(t(r))}}function tH(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r];(s===t||s===a)&&(e[r]=a,i[o++]=r)}return i}function tq(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function tz(e){return tB(e)?function(e){for(var t=eK.lastIndex=0;eK.test(e);)++t;return t}(e):tm(e)}function tK(e){return tB(e)?e.match(eK)||[]:e.split("")}function tG(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var t$=tA({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),tJ=function e(t){var r,Z,ey,ev,eb=(t=null==t?e8:tJ.defaults(e8.Object(),t,tJ.pick(e8,eY))).Array,em=t.Date,e_=t.Error,ew=t.Function,eS=t.Math,ek=t.Object,eO=t.RegExp,eE=t.String,ex=t.TypeError,eA=eb.prototype,eR=ew.prototype,eP=ek.prototype,eC=t["__core-js_shared__"],eI=eR.toString,ej=eP.hasOwnProperty,eT=0,eN=(r=/[^.]+$/.exec(eC&&eC.keys&&eC.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",eL=eP.toString,eU=eI.call(ek),eD=e8._,eM=eO("^"+eI.call(ej).replace(Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eF=e9?t.Buffer:n,eB=t.Symbol,eW=t.Uint8Array,eV=eF?eF.allocUnsafe:n,eH=tV(ek.getPrototypeOf,ek),eK=ek.create,e$=eP.propertyIsEnumerable,e0=eA.splice,e3=eB?eB.isConcatSpreadable:n,e5=eB?eB.iterator:n,e6=eB?eB.toStringTag:n,e4=function(){try{var e=op(ek,"defineProperty");return e({},"",{}),e}catch(e){}}(),e7=t.clearTimeout!==e8.clearTimeout&&t.clearTimeout,te=em&&em.now!==e8.Date.now&&em.now,tm=t.setTimeout!==e8.setTimeout&&t.setTimeout,tA=eS.ceil,tY=eS.floor,tX=ek.getOwnPropertySymbols,tQ=eF?eF.isBuffer:n,tZ=t.isFinite,t0=eA.join,t1=tV(ek.keys,ek),t2=eS.max,t3=eS.min,t5=em.now,t8=t.parseInt,t6=eS.random,t4=eA.reverse,t9=op(t,"DataView"),t7=op(t,"Map"),re=op(t,"Promise"),rt=op(t,"Set"),rr=op(t,"WeakMap"),rn=op(ek,"create"),ro=rr&&new rr,ri={},ra=oD(t9),rs=oD(t7),ru=oD(re),rc=oD(rt),rl=oD(rr),rf=eB?eB.prototype:n,rp=rf?rf.valueOf:n,rh=rf?rf.toString:n;function rd(e){if(i$(e)&&!iD(e)&&!(e instanceof rb)){if(e instanceof rv)return e;if(ej.call(e,"__wrapped__"))return oM(e)}return new rv(e)}var rg=function(){function e(){}return function(t){if(!iG(t))return{};if(eK)return eK(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function ry(){}function rv(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function rb(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function rm(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function r_(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rw(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function rS(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new rw;++t<r;)this.add(e[t])}function rk(e){var t=this.__data__=new r_(e);this.size=t.size}function rO(e,t){var r=iD(e),n=!r&&iU(e),o=!r&&!n&&iW(e),i=!r&&!n&&!o&&i2(e),a=r||n||o||i,s=a?tC(e.length,eE):[],u=s.length;for(var c in e)(t||ej.call(e,c))&&!(a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||om(c,u)))&&s.push(c);return s}function rE(e){var t=e.length;return t?e[nc(0,t-1)]:n}rd.templateSettings={escape:q,evaluate:z,interpolate:K,variable:"",imports:{_:rd}},rd.prototype=ry.prototype,rd.prototype.constructor=rd,rv.prototype=rg(ry.prototype),rv.prototype.constructor=rv,rb.prototype=rg(ry.prototype),rb.prototype.constructor=rb,rm.prototype.clear=function(){this.__data__=rn?rn(null):{},this.size=0},rm.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},rm.prototype.get=function(e){var t=this.__data__;if(rn){var r=t[e];return r===i?n:r}return ej.call(t,e)?t[e]:n},rm.prototype.has=function(e){var t=this.__data__;return rn?t[e]!==n:ej.call(t,e)},rm.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=rn&&n===t?i:t,this},r_.prototype.clear=function(){this.__data__=[],this.size=0},r_.prototype.delete=function(e){var t=this.__data__,r=rR(t,e);return!(r<0)&&(r==t.length-1?t.pop():e0.call(t,r,1),--this.size,!0)},r_.prototype.get=function(e){var t=this.__data__,r=rR(t,e);return r<0?n:t[r][1]},r_.prototype.has=function(e){return rR(this.__data__,e)>-1},r_.prototype.set=function(e,t){var r=this.__data__,n=rR(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},rw.prototype.clear=function(){this.size=0,this.__data__={hash:new rm,map:new(t7||r_),string:new rm}},rw.prototype.delete=function(e){var t=ol(this,e).delete(e);return this.size-=!!t,t},rw.prototype.get=function(e){return ol(this,e).get(e)},rw.prototype.has=function(e){return ol(this,e).has(e)},rw.prototype.set=function(e,t){var r=ol(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this},rS.prototype.add=rS.prototype.push=function(e){return this.__data__.set(e,i),this},rS.prototype.has=function(e){return this.__data__.has(e)};function rx(e,t,r){(n===r||iT(e[t],r))&&(n!==r||t in e)||rI(e,t,r)}function rA(e,t,r){var o=e[t];ej.call(e,t)&&iT(o,r)&&(n!==r||t in e)||rI(e,t,r)}function rR(e,t){for(var r=e.length;r--;)if(iT(e[r][0],t))return r;return -1}function rP(e,t,r,n){return rM(e,function(e,o,i){t(n,e,r(e),i)}),n}function rC(e,t){return e&&nW(t,ad(t),e)}function rI(e,t,r){"__proto__"==t&&e4?e4(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function rj(e,t){for(var r=-1,o=t.length,i=eb(o),a=null==e;++r<o;)i[r]=a?n:ac(e,t[r]);return i}function rT(e,t,r){return e==e&&(n!==r&&(e=e<=r?e:r),n!==t&&(e=e>=t?e:t)),e}function rN(e,t,r,o,i,a){var s,u=1&t,c=2&t,f=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),n!==s)return s;if(!iG(e))return e;var d=iD(e);if(d){if(E=(_=e).length,D=new _.constructor(E),E&&"string"==typeof _[0]&&ej.call(_,"index")&&(D.index=_.index,D.input=_.input),s=D,!u)return nB(e,s)}else{var _,E,D,M,F,B,W,V,H=og(e),q=H==g||H==y;if(iW(e))return nN(e,u);if(H==m||H==l||q&&!i){if(s=c||q?{}:ov(e),!u){return c?(M=e,F=(V=s)&&nW(e,ag(e),V),nW(M,od(M),F)):(B=e,W=rC(s,e),nW(B,oh(B),W))}}else{if(!eZ[H])return i?e:{};s=function(e,t,r){var n,o,i=e.constructor;switch(t){case x:return nL(e);case p:case h:return new i(+e);case A:return n=r?nL(e.buffer):e.buffer,new e.constructor(n,e.byteOffset,e.byteLength);case R:case P:case C:case I:case j:case T:case N:case L:case U:return nU(e,r);case v:return new i;case b:case k:return new i(e);case w:return(o=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,o;case S:return new i;case O:return rp?ek(rp.call(e)):{}}}(e,H,u)}}a||(a=new rk);var z=a.get(e);if(z)return z;a.set(e,s),iZ(e)?e.forEach(function(n){s.add(rN(n,t,r,n,e,a))}):iJ(e)&&e.forEach(function(n,o){s.set(o,rN(n,t,r,o,e,a))});var K=f?c?oi:oo:c?ag:ad,G=d?n:K(e);return tc(G||e,function(n,o){G&&(n=e[o=n]),rA(s,o,rN(n,t,r,o,e,a))}),s}function rL(e,t,r){var o=r.length;if(null==e)return!o;for(e=ek(e);o--;){var i=r[o],a=t[i],s=e[i];if(n===s&&!(i in e)||!a(s))return!1}return!0}function rU(e,t,r){if("function"!=typeof e)throw new ex(o);return oC(function(){e.apply(n,r)},t)}function rD(e,t,r,n){var o=-1,i=tp,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;r&&(t=td(t,tj(r))),n?(i=th,a=!1):t.length>=200&&(i=tN,a=!1,t=new rS(t));e:for(;++o<s;){var l=e[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,n)||u.push(l)}return u}rk.prototype.clear=function(){this.__data__=new r_,this.size=0},rk.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},rk.prototype.get=function(e){return this.__data__.get(e)},rk.prototype.has=function(e){return this.__data__.has(e)},rk.prototype.set=function(e,t){var r=this.__data__;if(r instanceof r_){var n=r.__data__;if(!t7||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new rw(n)}return r.set(e,t),this.size=r.size,this};var rM=nq(rK),rF=nq(rG,!0);function rB(e,t){var r=!0;return rM(e,function(e,n,o){return r=!!t(e,n,o)}),r}function rW(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(n===u?s==s&&!i1(s):r(s,u)))var u=s,c=a}return c}function rV(e,t){var r=[];return rM(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function rH(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=ob),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?rH(s,t-1,r,n,o):tg(o,s):n||(o[o.length]=s)}return o}var rq=nz(),rz=nz(!0);function rK(e,t){return e&&rq(e,t,ad)}function rG(e,t){return e&&rz(e,t,ad)}function r$(e,t){return tf(t,function(t){return iq(e[t])})}function rJ(e,t){t=nI(t,e);for(var r=0,o=t.length;null!=e&&r<o;)e=e[oU(t[r++])];return r&&r==o?e:n}function rY(e,t,r){var n=t(e);return iD(e)?n:tg(n,r(e))}function rX(e){var t;return null==e?n===e?"[object Undefined]":"[object Null]":e6&&e6 in ek(e)?function(e){var t=ej.call(e,e6),r=e[e6];try{e[e6]=n;var o=!0}catch(e){}var i=eL.call(e);return o&&(t?e[e6]=r:delete e[e6]),i}(e):(t=e,eL.call(t))}function rQ(e,t){return e>t}function rZ(e,t){return null!=e&&ej.call(e,t)}function r0(e,t){return null!=e&&t in ek(e)}function r1(e,t,r){for(var o=r?th:tp,i=e[0].length,a=e.length,s=a,u=eb(a),c=1/0,l=[];s--;){var f=e[s];s&&t&&(f=td(f,tj(t))),c=t3(f.length,c),u[s]=!r&&(t||i>=120&&f.length>=120)?new rS(s&&f):n}f=e[0];var p=-1,h=u[0];e:for(;++p<i&&l.length<c;){var d=f[p],g=t?t(d):d;if(d=r||0!==d?d:0,!(h?tN(h,g):o(l,g,r))){for(s=a;--s;){var y=u[s];if(!(y?tN(y,g):o(e[s],g,r)))continue e}h&&h.push(g),l.push(d)}}return l}function r2(e,t,r){t=nI(t,e);var o=null==(e=oA(e,t))?e:e[oU(oJ(t))];return null==o?n:ts(o,e,r)}function r3(e){return i$(e)&&rX(e)==l}function r5(e,t,r,o,i){return e===t||(null!=e&&null!=t&&(i$(e)||i$(t))?function(e,t,r,o,i,a){var s=iD(e),u=iD(t),c=s?f:og(e),g=u?f:og(t);c=c==l?m:c,g=g==l?m:g;var y=c==m,_=g==m,E=c==g;if(E&&iW(e)){if(!iW(t))return!1;s=!0,y=!1}if(E&&!y)return a||(a=new rk),s||i2(e)?or(e,t,r,o,i,a):function(e,t,r,n,o,i,a){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case x:if(e.byteLength!=t.byteLength||!i(new eW(e),new eW(t)))break;return!0;case p:case h:case b:return iT(+e,+t);case d:return e.name==t.name&&e.message==t.message;case w:case k:return e==t+"";case v:var s=tW;case S:var u=1&n;if(s||(s=tq),e.size!=t.size&&!u)break;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=or(s(e),s(t),n,o,i,a);return a.delete(e),l;case O:if(rp)return rp.call(e)==rp.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var R=y&&ej.call(e,"__wrapped__"),P=_&&ej.call(t,"__wrapped__");if(R||P){var C=R?e.value():e,I=P?t.value():t;return a||(a=new rk),i(C,I,r,o,a)}}return!!E&&(a||(a=new rk),function(e,t,r,o,i,a){var s=1&r,u=oo(e),c=u.length;if(c!=oo(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:ej.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var d=!0;a.set(e,t),a.set(t,e);for(var g=s;++l<c;){var y=e[f=u[l]],v=t[f];if(o)var b=s?o(v,y,f,t,e,a):o(y,v,f,e,t,a);if(!(n===b?y===v||i(y,v,r,o,a):b)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var m=e.constructor,_=t.constructor;m!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return a.delete(e),a.delete(t),d}(e,t,r,o,i,a))}(e,t,r,o,r5,i):e!=e&&t!=t)}function r8(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=ek(e);i--;){var u=r[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=r[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(n===l&&!(c in e))return!1}else{var p=new rk;if(o)var h=o(l,f,c,e,t,p);if(!(n===h?r5(f,l,3,o,p):h))return!1}}return!0}function r6(e){var t;return!(!iG(e)||(t=e,eN&&eN in t))&&(iq(e)?eM:el).test(oD(e))}function r4(e){return"function"==typeof e?e:null==e?aB:"object"==typeof e?iD(e)?nr(e[0],e[1]):nt(e):aJ(e)}function r9(e){if(!oO(e))return t1(e);var t=[];for(var r in ek(e))ej.call(e,r)&&"constructor"!=r&&t.push(r);return t}function r7(e,t){return e<t}function ne(e,t){var r=-1,n=iF(e)?eb(e.length):[];return rM(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function nt(e){var t=of(e);return 1==t.length&&t[0][2]?oE(t[0][0],t[0][1]):function(r){return r===e||r8(r,e,t)}}function nr(e,t){var r;return ow(e)&&(r=t)==r&&!iG(r)?oE(oU(e),t):function(r){var o=ac(r,e);return n===o&&o===t?al(r,e):r5(t,o,3)}}function nn(e,t,r,o,i){e!==t&&rq(t,function(a,s){if(i||(i=new rk),iG(a))!function(e,t,r,o,i,a,s){var u=oR(e,r),c=oR(t,r),l=s.get(c);if(l)return rx(e,r,l);var f=a?a(u,c,r+"",e,t,s):n,p=n===f;if(p){var h=iD(c),d=!h&&iW(c),g=!h&&!d&&i2(c);f=c,h||d||g?iD(u)?f=u:iB(u)?f=nB(u):d?(p=!1,f=nN(c,!0)):g?(p=!1,f=nU(c,!0)):f=[]:iX(c)||iU(c)?(f=u,iU(u)?f=ae(u):(!iG(u)||iq(u))&&(f=ov(c))):p=!1}p&&(s.set(c,f),i(f,c,o,a,s),s.delete(c)),rx(e,r,f)}(e,t,s,r,nn,o,i);else{var u=o?o(oR(e,s),a,s+"",e,t,i):n;n===u&&(u=a),rx(e,s,u)}},ag)}function no(e,t){var r=e.length;if(r)return om(t+=t<0?r:0,r)?e[t]:n}function ni(e,t,r){t=t.length?td(t,function(e){return iD(e)?function(t){return rJ(t,1===e.length?e[0]:e)}:e}):[aB];var n=-1;t=td(t,tj(oc()));var o=ne(e,function(e,r,o){return{criteria:td(t,function(t){return t(e)}),index:++n,value:e}}),i=o.length;for(o.sort(function(e,t){return function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,a=o.length,s=r.length;++n<a;){var u=nD(o[n],i[n]);if(u){if(n>=s)return u;return u*("desc"==r[n]?-1:1)}}return e.index-t.index}(e,t,r)});i--;)o[i]=o[i].value;return o}function na(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=rJ(e,a);r(s,a)&&np(i,nI(a,e),s)}return i}function ns(e,t,r,n){var o=n?tk:tS,i=-1,a=t.length,s=e;for(e===t&&(t=nB(t)),r&&(s=td(e,tj(r)));++i<a;)for(var u=0,c=t[i],l=r?r(c):c;(u=o(s,l,u,n))>-1;)s!==e&&e0.call(s,u,1),e0.call(e,u,1);return e}function nu(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;om(o)?e0.call(e,o,1):nk(e,o)}}return e}function nc(e,t){return e+tY(t6()*(t-e+1))}function nl(e,t){var r="";if(!e||t<1||t>0x1fffffffffffff)return r;do t%2&&(r+=e),(t=tY(t/2))&&(e+=e);while(t);return r}function nf(e,t){return oI(ox(e,t,aB),e+"")}function np(e,t,r,o){if(!iG(e))return e;t=nI(t,e);for(var i=-1,a=t.length,s=a-1,u=e;null!=u&&++i<a;){var c=oU(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)break;if(i!=s){var f=u[c];l=o?o(f,c,u):n,n===l&&(l=iG(f)?f:om(t[i+1])?[]:{})}rA(u,c,l),u=u[c]}return e}var nh=ro?function(e,t){return ro.set(e,t),e}:aB,nd=e4?function(e,t){return e4(e,"toString",{configurable:!0,enumerable:!1,value:aD(t),writable:!0})}:aB;function ng(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=eb(o);++n<o;)i[n]=e[n+t];return i}function ny(e,t){var r;return rM(e,function(e,n,o){return!(r=t(e,n,o))}),!!r}function nv(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=0x7fffffff){for(;n<o;){var i=n+o>>>1,a=e[i];null!==a&&!i1(a)&&(r?a<=t:a<t)?n=i+1:o=i}return o}return nb(e,t,aB,r)}function nb(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,u=null===t,c=i1(t),l=n===t;i<a;){var f=tY((i+a)/2),p=r(e[f]),h=n!==p,d=null===p,g=p==p,y=i1(p);if(s)var v=o||g;else v=l?g&&(o||h):u?g&&h&&(o||!d):c?g&&h&&!d&&(o||!y):!d&&!y&&(o?p<=t:p<t);v?i=f+1:a=f}return t3(a,0xfffffffe)}function nm(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!iT(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function n_(e){return"number"==typeof e?e:i1(e)?u:+e}function nw(e){if("string"==typeof e)return e;if(iD(e))return td(e,nw)+"";if(i1(e))return rh?rh.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}function nS(e,t,r){var n=-1,o=tp,i=e.length,a=!0,s=[],u=s;if(r)a=!1,o=th;else if(i>=200){var c=t?null:n6(e);if(c)return tq(c);a=!1,o=tN,u=new rS}else u=t?[]:s;e:for(;++n<i;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,r)||(u!==s&&u.push(f),s.push(l))}return s}function nk(e,t){return t=nI(t,e),null==(e=oA(e,t))||delete e[oU(oJ(t))]}function nO(e,t,r,n){return np(e,t,r(rJ(e,t)),n)}function nE(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?ng(e,n?0:i,n?i+1:o):ng(e,n?i+1:0,n?o:i)}function nx(e,t){var r=e;return r instanceof rb&&(r=r.value()),ty(t,function(e,t){return t.func.apply(t.thisArg,tg([e],t.args))},r)}function nA(e,t,r){var n=e.length;if(n<2)return n?nS(e[0]):[];for(var o=-1,i=eb(n);++o<n;)for(var a=e[o],s=-1;++s<n;)s!=o&&(i[o]=rD(i[o]||a,e[s],t,r));return nS(rH(i,1),t,r)}function nR(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var u=o<a?t[o]:n;r(s,e[o],u)}return s}function nP(e){return iB(e)?e:[]}function nC(e){return"function"==typeof e?e:aB}function nI(e,t){return iD(e)?e:ow(e,t)?[e]:oL(at(e))}function nj(e,t,r){var o=e.length;return r=n===r?o:r,!t&&r>=o?e:ng(e,t,r)}var nT=e7||function(e){return e8.clearTimeout(e)};function nN(e,t){if(t)return e.slice();var r=e.length,n=eV?eV(r):new e.constructor(r);return e.copy(n),n}function nL(e){var t=new e.constructor(e.byteLength);return new eW(t).set(new eW(e)),t}function nU(e,t){var r=t?nL(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function nD(e,t){if(e!==t){var r=n!==e,o=null===e,i=e==e,a=i1(e),s=n!==t,u=null===t,c=t==t,l=i1(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!l&&e<t||l&&r&&i&&!o&&!a||u&&r&&i||!s&&i||!c)return -1}return 0}function nM(e,t,r,n){for(var o=-1,i=e.length,a=r.length,s=-1,u=t.length,c=t2(i-a,0),l=eb(u+c),f=!n;++s<u;)l[s]=t[s];for(;++o<a;)(f||o<i)&&(l[r[o]]=e[o]);for(;c--;)l[s++]=e[o++];return l}function nF(e,t,r,n){for(var o=-1,i=e.length,a=-1,s=r.length,u=-1,c=t.length,l=t2(i-s,0),f=eb(l+c),p=!n;++o<l;)f[o]=e[o];for(var h=o;++u<c;)f[h+u]=t[u];for(;++a<s;)(p||o<i)&&(f[h+r[a]]=e[o++]);return f}function nB(e,t){var r=-1,n=e.length;for(t||(t=eb(n));++r<n;)t[r]=e[r];return t}function nW(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=o?o(r[u],e[u],u,r,e):n;n===c&&(c=e[u]),i?rI(r,u,c):rA(r,u,c)}return r}function nV(e,t){return function(r,n){var o=iD(r)?tu:rP,i=t?t():{};return o(r,e,oc(n,2),i)}}function nH(e){return nf(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&o_(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=ek(t);++o<i;){var u=r[o];u&&e(t,u,o,a)}return t})}function nq(e,t){return function(r,n){if(null==r)return r;if(!iF(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=ek(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}function nz(e){return function(t,r,n){for(var o=-1,i=ek(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}}function nK(e){return function(t){var r=tB(t=at(t))?tK(t):n,o=r?r[0]:t.charAt(0),i=r?nj(r,1).join(""):t.slice(1);return o[e]()+i}}function nG(e){return function(t){return ty(aN(ax(t).replace(eq,"")),e,"")}}function n$(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=rg(e.prototype),n=e.apply(r,t);return iG(n)?n:r}}function nJ(e){return function(t,r,o){var i=ek(t);if(!iF(t)){var a=oc(r,3);t=ad(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function nY(e){return on(function(t){var r=t.length,i=r,a=rv.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new ex(o);if(a&&!u&&"wrapper"==os(s))var u=new rv([],!0)}for(i=u?i:r;++i<r;){var c=os(s=t[i]),l="wrapper"==c?oa(s):n;u=l&&oS(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[os(l[0])].apply(u,l[3]):1==s.length&&oS(s)?u[c]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&iD(n))return u.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}})}function nX(e,t,r,o,i,a,s,u,c,l){var f=128&t,p=1&t,h=2&t,d=24&t,g=512&t,y=h?n:n$(e);function v(){for(var b=arguments.length,m=eb(b),_=b;_--;)m[_]=arguments[_];if(d)var w=ou(v),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(m,w);if(o&&(m=nM(m,o,i,d)),a&&(m=nF(m,a,s,d)),b-=S,d&&b<l){var k=tH(m,w);return n5(e,t,nX,v.placeholder,r,m,k,u,c,l-b)}var O=p?r:this,E=h?O[e]:e;return b=m.length,u?m=function(e,t){for(var r=e.length,o=t3(t.length,r),i=nB(e);o--;){var a=t[o];e[o]=om(a,r)?i[a]:n}return e}(m,u):g&&b>1&&m.reverse(),f&&c<b&&(m.length=c),this&&this!==e8&&this instanceof v&&(E=y||n$(E)),E.apply(O,m)}return v}function nQ(e,t){return function(r,n){var o,i;return o=t(n),i={},rK(r,function(t,r,n){e(i,o(t),r,n)}),i}}function nZ(e,t){return function(r,o){var i;if(n===r&&n===o)return t;if(n!==r&&(i=r),n!==o){if(n===i)return o;"string"==typeof r||"string"==typeof o?(r=nw(r),o=nw(o)):(r=n_(r),o=n_(o)),i=e(r,o)}return i}}function n0(e){return on(function(t){return t=td(t,tj(oc())),nf(function(r){var n=this;return e(t,function(e){return ts(e,n,r)})})})}function n1(e,t){var r=(t=n===t?" ":nw(t)).length;if(r<2)return r?nl(t,e):t;var o=nl(t,tA(e/tz(t)));return tB(t)?nj(tK(o),0,e).join(""):o.slice(0,e)}function n2(e){return function(t,r,o){o&&"number"!=typeof o&&o_(t,r,o)&&(r=o=n),t=i6(t),n===r?(r=t,t=0):r=i6(r),o=n===o?t<r?1:-1:i6(o);for(var i=t,a=r,s=o,u=-1,c=t2(tA((a-i)/(s||1)),0),l=eb(c);c--;)l[e?c:++u]=i,i+=s;return l}}function n3(e){return function(t,r){return("string"!=typeof t||"string"!=typeof r)&&(t=i7(t),r=i7(r)),e(t,r)}}function n5(e,t,r,o,i,a,s,u,c,l){var f=8&t,p=f?s:n,h=f?n:s,d=f?a:n,g=f?n:a;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var y=[e,t,i,d,p,g,h,u,c,l],v=r.apply(n,y);return oS(e)&&oP(v,y),v.placeholder=o,oj(v,e,t)}function n8(e){var t=eS[e];return function(e,r){if(e=i7(e),(r=null==r?0:t3(i4(r),292))&&tZ(e)){var n=(at(e)+"e").split("e");return+((n=(at(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(n[1]-r))}return t(e)}}var n6=rt&&1/tq(new rt([,-0]))[1]==s?function(e){return new rt(e)}:az;function n4(e){return function(t){var r,n,o=og(t);return o==v?tW(t):o==S?(r=-1,n=Array(t.size),t.forEach(function(e){n[++r]=[e,e]}),n):td(e(t),function(e){return[e,t[e]]})}}function n9(e,t,r,i,s,u,c,l){var f=2&t;if(!f&&"function"!=typeof e)throw new ex(o);var p=i?i.length:0;if(p||(t&=-97,i=s=n),c=n===c?c:t2(i4(c),0),l=n===l?l:i4(l),p-=s?s.length:0,64&t){var h=i,d=s;i=s=n}var g=f?n:oa(e),y=[e,t,r,i,s,h,d,u,c,l];if(g&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,s=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(i||s){1&n&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?nM(c,u,t[4]):u,e[4]=c?tH(e[3],a):t[4]}(u=t[5])&&(c=e[5],e[5]=c?nF(c,u,t[6]):u,e[6]=c?tH(e[5],a):t[6]),(u=t[7])&&(e[7]=u),128&n&&(e[8]=null==e[8]?t[8]:t3(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}}(y,g),e=y[0],t=y[1],r=y[2],i=y[3],s=y[4],(l=y[9]=y[9]===n?f?0:e.length:t2(y[9]-p,0))||!(24&t)||(t&=-25),t&&1!=t)8==t||16==t?R=function(e,t,r){var o=n$(e);function i(){for(var a=arguments.length,s=eb(a),u=a,c=ou(i);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:tH(s,c);return(a-=l.length)<r?n5(e,t,nX,i.placeholder,n,s,l,n,n,r-a):ts(this&&this!==e8&&this instanceof i?o:e,this,s)}return i}(e,t,l):32!=t&&33!=t||s.length?R=nX.apply(n,y):(v=e,b=t,m=r,_=i,w=1&b,S=n$(v),R=function e(){for(var t=-1,r=arguments.length,n=-1,o=_.length,i=eb(o+r),a=this&&this!==e8&&this instanceof e?S:v;++n<o;)i[n]=_[n];for(;r--;)i[n++]=arguments[++t];return ts(a,w?m:this,i)});else var v,b,m,_,w,S,k,O,E,x,A,R=(k=e,O=t,E=r,x=1&O,A=n$(k),function e(){return(this&&this!==e8&&this instanceof e?A:k).apply(x?E:this,arguments)});return oj((g?nh:oP)(R,y),e,t)}function n7(e,t,r,o){return n===e||iT(e,eP[r])&&!ej.call(o,r)?t:e}function oe(e,t,r,o,i,a){return iG(e)&&iG(t)&&(a.set(t,e),nn(e,t,n,oe,a),a.delete(t)),e}function ot(e){return iX(e)?n:e}function or(e,t,r,o,i,a){var s=1&r,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,h=!0,d=2&r?new rS:n;for(a.set(e,t),a.set(t,e);++p<u;){var g=e[p],y=t[p];if(o)var v=s?o(y,g,p,t,e,a):o(g,y,p,e,t,a);if(n!==v){if(v)continue;h=!1;break}if(d){if(!tb(t,function(e,t){if(!tN(d,t)&&(g===e||i(g,e,r,o,a)))return d.push(t)})){h=!1;break}}else if(!(g===y||i(g,y,r,o,a))){h=!1;break}}return a.delete(e),a.delete(t),h}function on(e){return oI(ox(e,n,oq),e+"")}function oo(e){return rY(e,ad,oh)}function oi(e){return rY(e,ag,od)}var oa=ro?function(e){return ro.get(e)}:az;function os(e){for(var t=e.name+"",r=ri[t],n=ej.call(ri,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function ou(e){return(ej.call(rd,"placeholder")?rd:e).placeholder}function oc(){var e=rd.iteratee||aW;return e=e===aW?r4:e,arguments.length?e(arguments[0],arguments[1]):e}function ol(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function of(e){for(var t=ad(e),r=t.length;r--;){var n,o=t[r],i=e[o];t[r]=[o,i,(n=i)==n&&!iG(n)]}return t}function op(e,t){var r=null==e?n:e[t];return r6(r)?r:n}var oh=tX?function(e){return null==e?[]:tf(tX(e=ek(e)),function(t){return e$.call(e,t)})}:aQ,od=tX?function(e){for(var t=[];e;)tg(t,oh(e)),e=eH(e);return t}:aQ,og=rX;function oy(e,t,r){t=nI(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=oU(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&iK(o)&&om(a,o)&&(iD(e)||iU(e))}function ov(e){return"function"!=typeof e.constructor||oO(e)?{}:rg(eH(e))}function ob(e){return iD(e)||iU(e)||!!(e3&&e&&e[e3])}function om(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&ep.test(e))&&e>-1&&e%1==0&&e<t}function o_(e,t,r){if(!iG(r))return!1;var n=typeof t;return("number"==n?!!(iF(r)&&om(t,r.length)):"string"==n&&t in r)&&iT(r[t],e)}function ow(e,t){if(iD(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||i1(e))||$.test(e)||!G.test(e)||null!=t&&e in ek(t)}function oS(e){var t=os(e),r=rd[t];if("function"!=typeof r||!(t in rb.prototype))return!1;if(e===r)return!0;var n=oa(r);return!!n&&e===n[0]}(t9&&og(new t9(new ArrayBuffer(1)))!=A||t7&&og(new t7)!=v||re&&og(re.resolve())!=_||rt&&og(new rt)!=S||rr&&og(new rr)!=E)&&(og=function(e){var t=rX(e),r=t==m?e.constructor:n,o=r?oD(r):"";if(o)switch(o){case ra:return A;case rs:return v;case ru:return _;case rc:return S;case rl:return E}return t});var ok=eC?iq:aZ;function oO(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||eP)}function oE(e,t){return function(r){return null!=r&&r[e]===t&&(n!==t||e in ek(r))}}function ox(e,t,r){return t=t2(n===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=t2(n.length-t,0),a=eb(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=eb(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),ts(e,this,s)}}function oA(e,t){return t.length<2?e:rJ(e,ng(t,0,-1))}function oR(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var oP=oT(nh),oC=tm||function(e,t){return e8.setTimeout(e,t)},oI=oT(nd);function oj(e,t,r){var n,o,i,a=t+"";return oI(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ee,"{\n/* [wrapped with "+t+"] */\n")}(a,(n=(i=a.match(et))?i[1].split(er):[],o=r,tc(c,function(e){var t="_."+e[0];o&e[1]&&!tp(n,t)&&n.push(t)}),n.sort())))}function oT(e){var t=0,r=0;return function(){var o=t5(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function oN(e,t){var r=-1,o=e.length,i=o-1;for(t=n===t?o:t;++r<t;){var a=nc(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var oL=(ey=(Z=iA(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,function(e,r,n,o){t.push(n?o.replace(ei,"$1"):r||e)}),t},function(e){return 500===ey.size&&ey.clear(),e})).cache,Z);function oU(e){if("string"==typeof e||i1(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function oD(e){if(null!=e){try{return eI.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function oM(e){if(e instanceof rb)return e.clone();var t=new rv(e.__wrapped__,e.__chain__);return t.__actions__=nB(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var oF=nf(function(e,t){return iB(e)?rD(e,rH(t,1,iB,!0)):[]}),oB=nf(function(e,t){var r=oJ(t);return iB(r)&&(r=n),iB(e)?rD(e,rH(t,1,iB,!0),oc(r,2)):[]}),oW=nf(function(e,t){var r=oJ(t);return iB(r)&&(r=n),iB(e)?rD(e,rH(t,1,iB,!0),n,r):[]});function oV(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:i4(r);return o<0&&(o=t2(n+o,0)),tw(e,oc(t,3),o)}function oH(e,t,r){var o=null==e?0:e.length;if(!o)return -1;var i=o-1;return n!==r&&(i=i4(r),i=r<0?t2(o+i,0):t3(i,o-1)),tw(e,oc(t,3),i,!0)}function oq(e){return(null==e?0:e.length)?rH(e,1):[]}function oz(e){return e&&e.length?e[0]:n}var oK=nf(function(e){var t=td(e,nP);return t.length&&t[0]===e[0]?r1(t):[]}),oG=nf(function(e){var t=oJ(e),r=td(e,nP);return t===oJ(r)?t=n:r.pop(),r.length&&r[0]===e[0]?r1(r,oc(t,2)):[]}),o$=nf(function(e){var t=oJ(e),r=td(e,nP);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?r1(r,n,t):[]});function oJ(e){var t=null==e?0:e.length;return t?e[t-1]:n}var oY=nf(oX);function oX(e,t){return e&&e.length&&t&&t.length?ns(e,t):e}var oQ=on(function(e,t){var r=null==e?0:e.length,n=rj(e,t);return nu(e,td(t,function(e){return om(e,r)?+e:e}).sort(nD)),n});function oZ(e){return null==e?e:t4.call(e)}var o0=nf(function(e){return nS(rH(e,1,iB,!0))}),o1=nf(function(e){var t=oJ(e);return iB(t)&&(t=n),nS(rH(e,1,iB,!0),oc(t,2))}),o2=nf(function(e){var t=oJ(e);return t="function"==typeof t?t:n,nS(rH(e,1,iB,!0),n,t)});function o3(e){if(!(e&&e.length))return[];var t=0;return e=tf(e,function(e){if(iB(e))return t=t2(e.length,t),!0}),tC(t,function(t){return td(e,tx(t))})}function o5(e,t){if(!(e&&e.length))return[];var r=o3(e);return null==t?r:td(r,function(e){return ts(t,n,e)})}var o8=nf(function(e,t){return iB(e)?rD(e,t):[]}),o6=nf(function(e){return nA(tf(e,iB))}),o4=nf(function(e){var t=oJ(e);return iB(t)&&(t=n),nA(tf(e,iB),oc(t,2))}),o9=nf(function(e){var t=oJ(e);return t="function"==typeof t?t:n,nA(tf(e,iB),n,t)}),o7=nf(o3),ie=nf(function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,o5(e,r)});function it(e){var t=rd(e);return t.__chain__=!0,t}function ir(e,t){return t(e)}var io=on(function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return rj(t,e)};return!(t>1)&&!this.__actions__.length&&o instanceof rb&&om(r)?((o=o.slice(r,+r+ +!!t)).__actions__.push({func:ir,args:[i],thisArg:n}),new rv(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e})):this.thru(i)}),ii=nV(function(e,t,r){ej.call(e,r)?++e[r]:rI(e,r,1)}),ia=nJ(oV),is=nJ(oH);function iu(e,t){return(iD(e)?tc:rM)(e,oc(t,3))}function ic(e,t){return(iD(e)?function(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}:rF)(e,oc(t,3))}var il=nV(function(e,t,r){ej.call(e,r)?e[r].push(t):rI(e,r,[t])}),ip=nf(function(e,t,r){var n=-1,o="function"==typeof t,i=iF(e)?eb(e.length):[];return rM(e,function(e){i[++n]=o?ts(t,e,r):r2(e,t,r)}),i}),ih=nV(function(e,t,r){rI(e,r,t)});function id(e,t){return(iD(e)?td:ne)(e,oc(t,3))}var ig=nV(function(e,t,r){e[+!r].push(t)},function(){return[[],[]]}),iy=nf(function(e,t){if(null==e)return[];var r=t.length;return r>1&&o_(e,t[0],t[1])?t=[]:r>2&&o_(t[0],t[1],t[2])&&(t=[t[0]]),ni(e,rH(t,1),[])}),iv=te||function(){return e8.Date.now()};function ib(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,n9(e,128,n,n,n,n,t)}function im(e,t){var r;if("function"!=typeof t)throw new ex(o);return e=i4(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var i_=nf(function(e,t,r){var n=1;if(r.length){var o=tH(r,ou(i_));n|=32}return n9(e,n,t,r,o)}),iw=nf(function(e,t,r){var n=3;if(r.length){var o=tH(r,ou(iw));n|=32}return n9(t,n,e,r,o)});function iS(e,t,r){t=r?n:t;var o=n9(e,8,n,n,n,n,n,t);return o.placeholder=iS.placeholder,o}function ik(e,t,r){t=r?n:t;var o=n9(e,16,n,n,n,n,n,t);return o.placeholder=ik.placeholder,o}function iO(e,t,r){var i,a,s,u,c,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new ex(o);function g(t){var r=i,o=a;return i=a=n,f=t,u=e.apply(o,r)}function y(e){var r=e-l,o=e-f;return n===l||r>=t||r<0||h&&o>=s}function v(){var e,r,n,o=iv();if(y(o))return b(o);c=oC(v,(e=o-l,r=o-f,n=t-e,h?t3(n,s-r):n))}function b(e){return(c=n,d&&i)?g(e):(i=a=n,u)}function m(){var e,r=iv(),o=y(r);if(i=arguments,a=this,l=r,o){if(n===c)return f=e=l,c=oC(v,t),p?g(e):u;if(h)return nT(c),c=oC(v,t),g(l)}return n===c&&(c=oC(v,t)),u}return t=i7(t)||0,iG(r)&&(p=!!r.leading,s=(h="maxWait"in r)?t2(i7(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d),m.cancel=function(){n!==c&&nT(c),f=0,i=l=a=c=n},m.flush=function(){return n===c?u:b(iv())},m}var iE=nf(function(e,t){return rU(e,1,t)}),ix=nf(function(e,t,r){return rU(e,i7(t)||0,r)});function iA(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ex(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(iA.Cache||rw),r}function iR(e){if("function"!=typeof e)throw new ex(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}iA.Cache=rw;var iP=nf(function(e,t){var r=(t=1==t.length&&iD(t[0])?td(t[0],tj(oc())):td(rH(t,1),tj(oc()))).length;return nf(function(n){for(var o=-1,i=t3(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return ts(e,this,n)})}),iC=nf(function(e,t){var r=tH(t,ou(iC));return n9(e,32,n,t,r)}),iI=nf(function(e,t){var r=tH(t,ou(iI));return n9(e,64,n,t,r)}),ij=on(function(e,t){return n9(e,256,n,n,n,t)});function iT(e,t){return e===t||e!=e&&t!=t}var iN=n3(rQ),iL=n3(function(e,t){return e>=t}),iU=r3(function(){return arguments}())?r3:function(e){return i$(e)&&ej.call(e,"callee")&&!e$.call(e,"callee")},iD=eb.isArray,iM=tt?tj(tt):function(e){return i$(e)&&rX(e)==x};function iF(e){return null!=e&&iK(e.length)&&!iq(e)}function iB(e){return i$(e)&&iF(e)}var iW=tQ||aZ,iV=tr?tj(tr):function(e){return i$(e)&&rX(e)==h};function iH(e){if(!i$(e))return!1;var t=rX(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iX(e)}function iq(e){if(!iG(e))return!1;var t=rX(e);return t==g||t==y||"[object AsyncFunction]"==t||"[object Proxy]"==t}function iz(e){return"number"==typeof e&&e==i4(e)}function iK(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function iG(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function i$(e){return null!=e&&"object"==typeof e}var iJ=tn?tj(tn):function(e){return i$(e)&&og(e)==v};function iY(e){return"number"==typeof e||i$(e)&&rX(e)==b}function iX(e){if(!i$(e)||rX(e)!=m)return!1;var t=eH(e);if(null===t)return!0;var r=ej.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&eI.call(r)==eU}var iQ=to?tj(to):function(e){return i$(e)&&rX(e)==w},iZ=ti?tj(ti):function(e){return i$(e)&&og(e)==S};function i0(e){return"string"==typeof e||!iD(e)&&i$(e)&&rX(e)==k}function i1(e){return"symbol"==typeof e||i$(e)&&rX(e)==O}var i2=ta?tj(ta):function(e){return i$(e)&&iK(e.length)&&!!eQ[rX(e)]},i3=n3(r7),i5=n3(function(e,t){return e<=t});function i8(e){if(!e)return[];if(iF(e))return i0(e)?tK(e):nB(e);if(e5&&e[e5]){for(var t,r=e[e5](),n=[];!(t=r.next()).done;)n.push(t.value);return n}var o=og(e);return(o==v?tW:o==S?tq:ak)(e)}function i6(e){return e?(e=i7(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function i4(e){var t=i6(e),r=t%1;return t==t?r?t-r:t:0}function i9(e){return e?rT(i4(e),0,0xffffffff):0}function i7(e){if("number"==typeof e)return e;if(i1(e))return u;if(iG(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=iG(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tI(e);var r=ec.test(e);return r||ef.test(e)?e2(e.slice(2),r?2:8):eu.test(e)?u:+e}function ae(e){return nW(e,ag(e))}function at(e){return null==e?"":nw(e)}var ar=nH(function(e,t){if(oO(t)||iF(t))return void nW(t,ad(t),e);for(var r in t)ej.call(t,r)&&rA(e,r,t[r])}),an=nH(function(e,t){nW(t,ag(t),e)}),ao=nH(function(e,t,r,n){nW(t,ag(t),e,n)}),ai=nH(function(e,t,r,n){nW(t,ad(t),e,n)}),aa=on(rj),as=nf(function(e,t){e=ek(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&o_(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=ag(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(n===f||iT(f,eP[l])&&!ej.call(e,l))&&(e[l]=a[l])}return e}),au=nf(function(e){return e.push(n,oe),ts(av,n,e)});function ac(e,t,r){var o=null==e?n:rJ(e,t);return n===o?r:o}function al(e,t){return null!=e&&oy(e,t,r0)}var af=nQ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eL.call(t)),e[t]=r},aD(aB)),ap=nQ(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=eL.call(t)),ej.call(e,t)?e[t].push(r):e[t]=[r]},oc),ah=nf(r2);function ad(e){return iF(e)?rO(e):r9(e)}function ag(e){return iF(e)?rO(e,!0):function(e){if(!iG(e)){var t=e,r=[];if(null!=t)for(var n in ek(t))r.push(n);return r}var o=oO(e),i=[];for(var a in e)"constructor"==a&&(o||!ej.call(e,a))||i.push(a);return i}(e)}var ay=nH(function(e,t,r){nn(e,t,r)}),av=nH(function(e,t,r,n){nn(e,t,r,n)}),ab=on(function(e,t){var r={};if(null==e)return r;var n=!1;t=td(t,function(t){return t=nI(t,e),n||(n=t.length>1),t}),nW(e,oi(e),r),n&&(r=rN(r,7,ot));for(var o=t.length;o--;)nk(r,t[o]);return r}),am=on(function(e,t){return null==e?{}:na(e,t,function(t,r){return al(e,r)})});function a_(e,t){if(null==e)return{};var r=td(oi(e),function(e){return[e]});return t=oc(t),na(e,r,function(e,r){return t(e,r[0])})}var aw=n4(ad),aS=n4(ag);function ak(e){return null==e?[]:tT(e,ad(e))}var aO=nG(function(e,t,r){return t=t.toLowerCase(),e+(r?aE(t):t)});function aE(e){return aT(at(e).toLowerCase())}function ax(e){return(e=at(e))&&e.replace(eh,tD).replace(ez,"")}var aA=nG(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),aR=nG(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),aP=nK("toLowerCase"),aC=nG(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}),aI=nG(function(e,t,r){return e+(r?" ":"")+aT(t)}),aj=nG(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),aT=nK("toUpperCase");function aN(e,t,r){if(e=at(e),t=r?n:t,n===t){var o;return(o=e,eJ.test(o))?e.match(eG)||[]:e.match(en)||[]}return e.match(t)||[]}var aL=nf(function(e,t){try{return ts(e,n,t)}catch(e){return iH(e)?e:new e_(e)}}),aU=on(function(e,t){return tc(t,function(t){rI(e,t=oU(t),i_(e[t],e))}),e});function aD(e){return function(){return e}}var aM=nY(),aF=nY(!0);function aB(e){return e}function aW(e){return r4("function"==typeof e?e:rN(e,1))}var aV=nf(function(e,t){return function(r){return r2(r,e,t)}}),aH=nf(function(e,t){return function(r){return r2(e,r,t)}});function aq(e,t,r){var n=ad(t),o=r$(t,n);null!=r||iG(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=r$(t,ad(t)));var i=!(iG(r)&&"chain"in r)||!!r.chain,a=iq(e);return tc(o,function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=nB(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,tg([this.value()],arguments))})}),e}function az(){}var aK=n0(td),aG=n0(tl),a$=n0(tb);function aJ(e){return ow(e)?tx(oU(e)):function(t){return rJ(t,e)}}var aY=n2(),aX=n2(!0);function aQ(){return[]}function aZ(){return!1}var a0=nZ(function(e,t){return e+t},0),a1=n8("ceil"),a2=nZ(function(e,t){return e/t},1),a3=n8("floor"),a5=nZ(function(e,t){return e*t},1),a8=n8("round"),a6=nZ(function(e,t){return e-t},0);return rd.after=function(e,t){if("function"!=typeof t)throw new ex(o);return e=i4(e),function(){if(--e<1)return t.apply(this,arguments)}},rd.ary=ib,rd.assign=ar,rd.assignIn=an,rd.assignInWith=ao,rd.assignWith=ai,rd.at=aa,rd.before=im,rd.bind=i_,rd.bindAll=aU,rd.bindKey=iw,rd.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return iD(e)?e:[e]},rd.chain=it,rd.chunk=function(e,t,r){t=(r?o_(e,t,r):n===t)?1:t2(i4(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=eb(tA(o/t));i<o;)s[a++]=ng(e,i,i+=t);return s},rd.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},rd.concat=function(){var e=arguments.length;if(!e)return[];for(var t=eb(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return tg(iD(r)?nB(r):[r],rH(t,1))},rd.cond=function(e){var t=null==e?0:e.length,r=oc();return e=t?td(e,function(e){if("function"!=typeof e[1])throw new ex(o);return[r(e[0]),e[1]]}):[],nf(function(r){for(var n=-1;++n<t;){var o=e[n];if(ts(o[0],this,r))return ts(o[1],this,r)}})},rd.conforms=function(e){var t,r;return r=ad(t=rN(e,1)),function(e){return rL(e,t,r)}},rd.constant=aD,rd.countBy=ii,rd.create=function(e,t){var r=rg(e);return null==t?r:rC(r,t)},rd.curry=iS,rd.curryRight=ik,rd.debounce=iO,rd.defaults=as,rd.defaultsDeep=au,rd.defer=iE,rd.delay=ix,rd.difference=oF,rd.differenceBy=oB,rd.differenceWith=oW,rd.drop=function(e,t,r){var o=null==e?0:e.length;return o?ng(e,(t=r||n===t?1:i4(t))<0?0:t,o):[]},rd.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?ng(e,0,(t=o-(t=r||n===t?1:i4(t)))<0?0:t):[]},rd.dropRightWhile=function(e,t){return e&&e.length?nE(e,oc(t,3),!0,!0):[]},rd.dropWhile=function(e,t){return e&&e.length?nE(e,oc(t,3),!0):[]},rd.fill=function(e,t,r,o){var i=null==e?0:e.length;if(!i)return[];r&&"number"!=typeof r&&o_(e,t,r)&&(r=0,o=i);var a=r,s=o,u=e.length;for((a=i4(a))<0&&(a=-a>u?0:u+a),(s=n===s||s>u?u:i4(s))<0&&(s+=u),s=a>s?0:i9(s);a<s;)e[a++]=t;return e},rd.filter=function(e,t){return(iD(e)?tf:rV)(e,oc(t,3))},rd.flatMap=function(e,t){return rH(id(e,t),1)},rd.flatMapDeep=function(e,t){return rH(id(e,t),s)},rd.flatMapDepth=function(e,t,r){return r=n===r?1:i4(r),rH(id(e,t),r)},rd.flatten=oq,rd.flattenDeep=function(e){return(null==e?0:e.length)?rH(e,s):[]},rd.flattenDepth=function(e,t){return(null==e?0:e.length)?rH(e,t=n===t?1:i4(t)):[]},rd.flip=function(e){return n9(e,512)},rd.flow=aM,rd.flowRight=aF,rd.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},rd.functions=function(e){return null==e?[]:r$(e,ad(e))},rd.functionsIn=function(e){return null==e?[]:r$(e,ag(e))},rd.groupBy=il,rd.initial=function(e){return(null==e?0:e.length)?ng(e,0,-1):[]},rd.intersection=oK,rd.intersectionBy=oG,rd.intersectionWith=o$,rd.invert=af,rd.invertBy=ap,rd.invokeMap=ip,rd.iteratee=aW,rd.keyBy=ih,rd.keys=ad,rd.keysIn=ag,rd.map=id,rd.mapKeys=function(e,t){var r={};return t=oc(t,3),rK(e,function(e,n,o){rI(r,t(e,n,o),e)}),r},rd.mapValues=function(e,t){var r={};return t=oc(t,3),rK(e,function(e,n,o){rI(r,n,t(e,n,o))}),r},rd.matches=function(e){return nt(rN(e,1))},rd.matchesProperty=function(e,t){return nr(e,rN(t,1))},rd.memoize=iA,rd.merge=ay,rd.mergeWith=av,rd.method=aV,rd.methodOf=aH,rd.mixin=aq,rd.negate=iR,rd.nthArg=function(e){return e=i4(e),nf(function(t){return no(t,e)})},rd.omit=ab,rd.omitBy=function(e,t){return a_(e,iR(oc(t)))},rd.once=function(e){return im(2,e)},rd.orderBy=function(e,t,r,o){return null==e?[]:(iD(t)||(t=null==t?[]:[t]),iD(r=o?n:r)||(r=null==r?[]:[r]),ni(e,t,r))},rd.over=aK,rd.overArgs=iP,rd.overEvery=aG,rd.overSome=a$,rd.partial=iC,rd.partialRight=iI,rd.partition=ig,rd.pick=am,rd.pickBy=a_,rd.property=aJ,rd.propertyOf=function(e){return function(t){return null==e?n:rJ(e,t)}},rd.pull=oY,rd.pullAll=oX,rd.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,oc(r,2)):e},rd.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?ns(e,t,n,r):e},rd.pullAt=oQ,rd.range=aY,rd.rangeRight=aX,rd.rearg=ij,rd.reject=function(e,t){return(iD(e)?tf:rV)(e,iR(oc(t,3)))},rd.remove=function(e,t){var r=[];if(!(e&&e.length))return r;var n=-1,o=[],i=e.length;for(t=oc(t,3);++n<i;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return nu(e,o),r},rd.rest=function(e,t){if("function"!=typeof e)throw new ex(o);return nf(e,t=n===t?t:i4(t))},rd.reverse=oZ,rd.sampleSize=function(e,t,r){return t=(r?o_(e,t,r):n===t)?1:i4(t),(iD(e)?function(e,t){return oN(nB(e),rT(t,0,e.length))}:function(e,t){var r=ak(e);return oN(r,rT(t,0,r.length))})(e,t)},rd.set=function(e,t,r){return null==e?e:np(e,t,r)},rd.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:np(e,t,r,o)},rd.shuffle=function(e){return(iD(e)?function(e){return oN(nB(e))}:function(e){return oN(ak(e))})(e)},rd.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&o_(e,t,r)?(t=0,r=o):(t=null==t?0:i4(t),r=n===r?o:i4(r)),ng(e,t,r)):[]},rd.sortBy=iy,rd.sortedUniq=function(e){return e&&e.length?nm(e):[]},rd.sortedUniqBy=function(e,t){return e&&e.length?nm(e,oc(t,2)):[]},rd.split=function(e,t,r){return(r&&"number"!=typeof r&&o_(e,t,r)&&(t=r=n),r=n===r?0xffffffff:r>>>0)?(e=at(e))&&("string"==typeof t||null!=t&&!iQ(t))&&!(t=nw(t))&&tB(e)?nj(tK(e),0,r):e.split(t,r):[]},rd.spread=function(e,t){if("function"!=typeof e)throw new ex(o);return t=null==t?0:t2(i4(t),0),nf(function(r){var n=r[t],o=nj(r,0,t);return n&&tg(o,n),ts(e,this,o)})},rd.tail=function(e){var t=null==e?0:e.length;return t?ng(e,1,t):[]},rd.take=function(e,t,r){return e&&e.length?ng(e,0,(t=r||n===t?1:i4(t))<0?0:t):[]},rd.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?ng(e,(t=o-(t=r||n===t?1:i4(t)))<0?0:t,o):[]},rd.takeRightWhile=function(e,t){return e&&e.length?nE(e,oc(t,3),!1,!0):[]},rd.takeWhile=function(e,t){return e&&e.length?nE(e,oc(t,3)):[]},rd.tap=function(e,t){return t(e),e},rd.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new ex(o);return iG(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),iO(e,t,{leading:n,maxWait:t,trailing:i})},rd.thru=ir,rd.toArray=i8,rd.toPairs=aw,rd.toPairsIn=aS,rd.toPath=function(e){return iD(e)?td(e,oU):i1(e)?[e]:nB(oL(at(e)))},rd.toPlainObject=ae,rd.transform=function(e,t,r){var n=iD(e),o=n||iW(e)||i2(e);if(t=oc(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:iG(e)&&iq(i)?rg(eH(e)):{}}return(o?tc:rK)(e,function(e,n,o){return t(r,e,n,o)}),r},rd.unary=function(e){return ib(e,1)},rd.union=o0,rd.unionBy=o1,rd.unionWith=o2,rd.uniq=function(e){return e&&e.length?nS(e):[]},rd.uniqBy=function(e,t){return e&&e.length?nS(e,oc(t,2)):[]},rd.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?nS(e,n,t):[]},rd.unset=function(e,t){return null==e||nk(e,t)},rd.unzip=o3,rd.unzipWith=o5,rd.update=function(e,t,r){return null==e?e:nO(e,t,nC(r))},rd.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:nO(e,t,nC(r),o)},rd.values=ak,rd.valuesIn=function(e){return null==e?[]:tT(e,ag(e))},rd.without=o8,rd.words=aN,rd.wrap=function(e,t){return iC(nC(t),e)},rd.xor=o6,rd.xorBy=o4,rd.xorWith=o9,rd.zip=o7,rd.zipObject=function(e,t){return nR(e||[],t||[],rA)},rd.zipObjectDeep=function(e,t){return nR(e||[],t||[],np)},rd.zipWith=ie,rd.entries=aw,rd.entriesIn=aS,rd.extend=an,rd.extendWith=ao,aq(rd,rd),rd.add=a0,rd.attempt=aL,rd.camelCase=aO,rd.capitalize=aE,rd.ceil=a1,rd.clamp=function(e,t,r){return n===r&&(r=t,t=n),n!==r&&(r=(r=i7(r))==r?r:0),n!==t&&(t=(t=i7(t))==t?t:0),rT(i7(e),t,r)},rd.clone=function(e){return rN(e,4)},rd.cloneDeep=function(e){return rN(e,5)},rd.cloneDeepWith=function(e,t){return rN(e,5,t="function"==typeof t?t:n)},rd.cloneWith=function(e,t){return rN(e,4,t="function"==typeof t?t:n)},rd.conformsTo=function(e,t){return null==t||rL(e,t,ad(t))},rd.deburr=ax,rd.defaultTo=function(e,t){return null==e||e!=e?t:e},rd.divide=a2,rd.endsWith=function(e,t,r){e=at(e),t=nw(t);var o=e.length,i=r=n===r?o:rT(i4(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},rd.eq=iT,rd.escape=function(e){return(e=at(e))&&H.test(e)?e.replace(W,tM):e},rd.escapeRegExp=function(e){return(e=at(e))&&X.test(e)?e.replace(Y,"\\$&"):e},rd.every=function(e,t,r){var o=iD(e)?tl:rB;return r&&o_(e,t,r)&&(t=n),o(e,oc(t,3))},rd.find=ia,rd.findIndex=oV,rd.findKey=function(e,t){return t_(e,oc(t,3),rK)},rd.findLast=is,rd.findLastIndex=oH,rd.findLastKey=function(e,t){return t_(e,oc(t,3),rG)},rd.floor=a3,rd.forEach=iu,rd.forEachRight=ic,rd.forIn=function(e,t){return null==e?e:rq(e,oc(t,3),ag)},rd.forInRight=function(e,t){return null==e?e:rz(e,oc(t,3),ag)},rd.forOwn=function(e,t){return e&&rK(e,oc(t,3))},rd.forOwnRight=function(e,t){return e&&rG(e,oc(t,3))},rd.get=ac,rd.gt=iN,rd.gte=iL,rd.has=function(e,t){return null!=e&&oy(e,t,rZ)},rd.hasIn=al,rd.head=oz,rd.identity=aB,rd.includes=function(e,t,r,n){e=iF(e)?e:ak(e),r=r&&!n?i4(r):0;var o=e.length;return r<0&&(r=t2(o+r,0)),i0(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&tS(e,t,r)>-1},rd.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:i4(r);return o<0&&(o=t2(n+o,0)),tS(e,t,o)},rd.inRange=function(e,t,r){var o,i,a;return t=i6(t),n===r?(r=t,t=0):r=i6(r),(o=e=i7(e))>=t3(i=t,a=r)&&o<t2(i,a)},rd.invoke=ah,rd.isArguments=iU,rd.isArray=iD,rd.isArrayBuffer=iM,rd.isArrayLike=iF,rd.isArrayLikeObject=iB,rd.isBoolean=function(e){return!0===e||!1===e||i$(e)&&rX(e)==p},rd.isBuffer=iW,rd.isDate=iV,rd.isElement=function(e){return i$(e)&&1===e.nodeType&&!iX(e)},rd.isEmpty=function(e){if(null==e)return!0;if(iF(e)&&(iD(e)||"string"==typeof e||"function"==typeof e.splice||iW(e)||i2(e)||iU(e)))return!e.length;var t=og(e);if(t==v||t==S)return!e.size;if(oO(e))return!r9(e).length;for(var r in e)if(ej.call(e,r))return!1;return!0},rd.isEqual=function(e,t){return r5(e,t)},rd.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return n===o?r5(e,t,n,r):!!o},rd.isError=iH,rd.isFinite=function(e){return"number"==typeof e&&tZ(e)},rd.isFunction=iq,rd.isInteger=iz,rd.isLength=iK,rd.isMap=iJ,rd.isMatch=function(e,t){return e===t||r8(e,t,of(t))},rd.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,r8(e,t,of(t),r)},rd.isNaN=function(e){return iY(e)&&e!=+e},rd.isNative=function(e){if(ok(e))throw new e_("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return r6(e)},rd.isNil=function(e){return null==e},rd.isNull=function(e){return null===e},rd.isNumber=iY,rd.isObject=iG,rd.isObjectLike=i$,rd.isPlainObject=iX,rd.isRegExp=iQ,rd.isSafeInteger=function(e){return iz(e)&&e>=-0x1fffffffffffff&&e<=0x1fffffffffffff},rd.isSet=iZ,rd.isString=i0,rd.isSymbol=i1,rd.isTypedArray=i2,rd.isUndefined=function(e){return n===e},rd.isWeakMap=function(e){return i$(e)&&og(e)==E},rd.isWeakSet=function(e){return i$(e)&&"[object WeakSet]"==rX(e)},rd.join=function(e,t){return null==e?"":t0.call(e,t)},rd.kebabCase=aA,rd.last=oJ,rd.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return -1;var i=o;return n!==r&&(i=(i=i4(r))<0?t2(o+i,0):t3(i,o-1)),t==t?function(e,t,r){for(var n=r+1;n--&&e[n]!==t;);return n}(e,t,i):tw(e,tO,i,!0)},rd.lowerCase=aR,rd.lowerFirst=aP,rd.lt=i3,rd.lte=i5,rd.max=function(e){return e&&e.length?rW(e,aB,rQ):n},rd.maxBy=function(e,t){return e&&e.length?rW(e,oc(t,2),rQ):n},rd.mean=function(e){return tE(e,aB)},rd.meanBy=function(e,t){return tE(e,oc(t,2))},rd.min=function(e){return e&&e.length?rW(e,aB,r7):n},rd.minBy=function(e,t){return e&&e.length?rW(e,oc(t,2),r7):n},rd.stubArray=aQ,rd.stubFalse=aZ,rd.stubObject=function(){return{}},rd.stubString=function(){return""},rd.stubTrue=function(){return!0},rd.multiply=a5,rd.nth=function(e,t){return e&&e.length?no(e,i4(t)):n},rd.noConflict=function(){return e8._===this&&(e8._=eD),this},rd.noop=az,rd.now=iv,rd.pad=function(e,t,r){e=at(e);var n=(t=i4(t))?tz(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return n1(tY(o),r)+e+n1(tA(o),r)},rd.padEnd=function(e,t,r){e=at(e);var n=(t=i4(t))?tz(e):0;return t&&n<t?e+n1(t-n,r):e},rd.padStart=function(e,t,r){e=at(e);var n=(t=i4(t))?tz(e):0;return t&&n<t?n1(t-n,r)+e:e},rd.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t*=1),t8(at(e).replace(Q,""),t||0)},rd.random=function(e,t,r){if(r&&"boolean"!=typeof r&&o_(e,t,r)&&(t=r=n),n===r&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),n===e&&n===t?(e=0,t=1):(e=i6(e),n===t?(t=e,e=0):t=i6(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=t6();return t3(e+i*(t-e+e1("1e-"+((i+"").length-1))),t)}return nc(e,t)},rd.reduce=function(e,t,r){var n=iD(e)?ty:tR,o=arguments.length<3;return n(e,oc(t,4),r,o,rM)},rd.reduceRight=function(e,t,r){var n=iD(e)?tv:tR,o=arguments.length<3;return n(e,oc(t,4),r,o,rF)},rd.repeat=function(e,t,r){return t=(r?o_(e,t,r):n===t)?1:i4(t),nl(at(e),t)},rd.replace=function(){var e=arguments,t=at(e[0]);return e.length<3?t:t.replace(e[1],e[2])},rd.result=function(e,t,r){t=nI(t,e);var o=-1,i=t.length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[oU(t[o])];n===a&&(o=i,a=r),e=iq(a)?a.call(e):a}return e},rd.round=a8,rd.runInContext=e,rd.sample=function(e){return(iD(e)?rE:function(e){return rE(ak(e))})(e)},rd.size=function(e){if(null==e)return 0;if(iF(e))return i0(e)?tz(e):e.length;var t=og(e);return t==v||t==S?e.size:r9(e).length},rd.snakeCase=aC,rd.some=function(e,t,r){var o=iD(e)?tb:ny;return r&&o_(e,t,r)&&(t=n),o(e,oc(t,3))},rd.sortedIndex=function(e,t){return nv(e,t)},rd.sortedIndexBy=function(e,t,r){return nb(e,t,oc(r,2))},rd.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=nv(e,t);if(n<r&&iT(e[n],t))return n}return -1},rd.sortedLastIndex=function(e,t){return nv(e,t,!0)},rd.sortedLastIndexBy=function(e,t,r){return nb(e,t,oc(r,2),!0)},rd.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=nv(e,t,!0)-1;if(iT(e[r],t))return r}return -1},rd.startCase=aI,rd.startsWith=function(e,t,r){return e=at(e),r=null==r?0:rT(i4(r),0,e.length),t=nw(t),e.slice(r,r+t.length)==t},rd.subtract=a6,rd.sum=function(e){return e&&e.length?tP(e,aB):0},rd.sumBy=function(e,t){return e&&e.length?tP(e,oc(t,2)):0},rd.template=function(e,t,r){var o=rd.templateSettings;r&&o_(e,t,r)&&(t=n),e=at(e),t=ao({},t,o,n7);var i,a,s=ao({},t.imports,o.imports,n7),u=ad(s),c=tT(s,u),l=0,f=t.interpolate||ed,p="__p += '",h=eO((t.escape||ed).source+"|"+f.source+"|"+(f===K?ea:ed).source+"|"+(t.evaluate||ed).source+"|$","g"),d="//# sourceURL="+(ej.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++eX+"]")+"\n";e.replace(h,function(t,r,n,o,s,u){return n||(n=o),p+=e.slice(l,u).replace(eg,tF),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),p+="';\n";var g=ej.call(t,"variable")&&t.variable;if(g){if(eo.test(g))throw new e_("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(D,""):p).replace(M,"$1").replace(F,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=aL(function(){return ew(u,d+"return "+p).apply(n,c)});if(y.source=p,iH(y))throw y;return y},rd.times=function(e,t){if((e=i4(e))<1||e>0x1fffffffffffff)return[];var r=0xffffffff,n=t3(e,0xffffffff);t=oc(t),e-=0xffffffff;for(var o=tC(n,t);++r<e;)t(r);return o},rd.toFinite=i6,rd.toInteger=i4,rd.toLength=i9,rd.toLower=function(e){return at(e).toLowerCase()},rd.toNumber=i7,rd.toSafeInteger=function(e){return e?rT(i4(e),-0x1fffffffffffff,0x1fffffffffffff):0===e?e:0},rd.toString=at,rd.toUpper=function(e){return at(e).toUpperCase()},rd.trim=function(e,t,r){if((e=at(e))&&(r||n===t))return tI(e);if(!e||!(t=nw(t)))return e;var o=tK(e),i=tK(t),a=tL(o,i),s=tU(o,i)+1;return nj(o,a,s).join("")},rd.trimEnd=function(e,t,r){if((e=at(e))&&(r||n===t))return e.slice(0,tG(e)+1);if(!e||!(t=nw(t)))return e;var o=tK(e),i=tU(o,tK(t))+1;return nj(o,0,i).join("")},rd.trimStart=function(e,t,r){if((e=at(e))&&(r||n===t))return e.replace(Q,"");if(!e||!(t=nw(t)))return e;var o=tK(e),i=tL(o,tK(t));return nj(o,i).join("")},rd.truncate=function(e,t){var r=30,o="...";if(iG(t)){var i="separator"in t?t.separator:i;r="length"in t?i4(t.length):r,o="omission"in t?nw(t.omission):o}var a=(e=at(e)).length;if(tB(e)){var s=tK(e);a=s.length}if(r>=a)return e;var u=r-tz(o);if(u<1)return o;var c=s?nj(s,0,u).join(""):e.slice(0,u);if(n===i)return c+o;if(s&&(u+=c.length-u),iQ(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=eO(i.source,at(es.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,n===p?u:p)}}else if(e.indexOf(nw(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+o},rd.unescape=function(e){return(e=at(e))&&V.test(e)?e.replace(B,t$):e},rd.uniqueId=function(e){var t=++eT;return at(e)+t},rd.upperCase=aj,rd.upperFirst=aT,rd.each=iu,rd.eachRight=ic,rd.first=oz,aq(rd,(ev={},rK(rd,function(e,t){ej.call(rd.prototype,t)||(ev[t]=e)}),ev),{chain:!1}),rd.VERSION="4.17.21",tc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){rd[e].placeholder=rd}),tc(["drop","take"],function(e,t){rb.prototype[e]=function(r){r=n===r?1:t2(i4(r),0);var o=this.__filtered__&&!t?new rb(this):this.clone();return o.__filtered__?o.__takeCount__=t3(r,o.__takeCount__):o.__views__.push({size:t3(r,0xffffffff),type:e+(o.__dir__<0?"Right":"")}),o},rb.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),tc(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;rb.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oc(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),tc(["head","last"],function(e,t){var r="take"+(t?"Right":"");rb.prototype[e]=function(){return this[r](1).value()[0]}}),tc(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");rb.prototype[e]=function(){return this.__filtered__?new rb(this):this[r](1)}}),rb.prototype.compact=function(){return this.filter(aB)},rb.prototype.find=function(e){return this.filter(e).head()},rb.prototype.findLast=function(e){return this.reverse().find(e)},rb.prototype.invokeMap=nf(function(e,t){return"function"==typeof e?new rb(this):this.map(function(r){return r2(r,e,t)})}),rb.prototype.reject=function(e){return this.filter(iR(oc(e)))},rb.prototype.slice=function(e,t){e=i4(e);var r=this;return r.__filtered__&&(e>0||t<0)?new rb(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(t=i4(t))<0?r.dropRight(-t):r.take(t-e)),r)},rb.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},rb.prototype.toArray=function(){return this.take(0xffffffff)},rK(rb.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=rd[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(rd.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,u=t instanceof rb,c=s[0],l=u||iD(t),f=function(e){var t=i.apply(rd,tg([e],s));return o&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=a&&!p,g=u&&!h;if(!a&&l){t=g?t:new rb(this);var y=e.apply(t,s);return y.__actions__.push({func:ir,args:[f],thisArg:n}),new rv(y,p)}return d&&g?e.apply(this,s):(y=this.thru(f),d?o?y.value()[0]:y.value():y)})}),tc(["pop","push","shift","sort","splice","unshift"],function(e){var t=eA[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);rd.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(iD(o)?o:[],e)}return this[r](function(r){return t.apply(iD(r)?r:[],e)})}}),rK(rb.prototype,function(e,t){var r=rd[t];if(r){var n=r.name+"";ej.call(ri,n)||(ri[n]=[]),ri[n].push({name:t,func:r})}}),ri[nX(n,2).name]=[{name:"wrapper",func:n}],rb.prototype.clone=function(){var e=new rb(this.__wrapped__);return e.__actions__=nB(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=nB(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=nB(this.__views__),e},rb.prototype.reverse=function(){if(this.__filtered__){var e=new rb(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},rb.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=iD(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n<o;){var i=r[n],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=t3(t,e+a);break;case"takeRight":e=t2(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=n?s:a-1,l=this.__iteratees__,f=l.length,p=0,h=t3(u,this.__takeCount__);if(!r||!n&&o==u&&h==u)return nx(e,this.__actions__);var d=[];e:for(;u--&&p<h;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],b=v.iteratee,m=v.type,_=b(y);if(2==m)y=_;else if(!_)if(1==m)continue e;else break e}d[p++]=y}return d},rd.prototype.at=io,rd.prototype.chain=function(){return it(this)},rd.prototype.commit=function(){return new rv(this.value(),this.__chain__)},rd.prototype.next=function(){this.__values__===n&&(this.__values__=i8(this.value()));var e=this.__index__>=this.__values__.length,t=e?n:this.__values__[this.__index__++];return{done:e,value:t}},rd.prototype.plant=function(e){for(var t,r=this;r instanceof ry;){var o=oM(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},rd.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof rb){var t=e;return this.__actions__.length&&(t=new rb(this)),(t=t.reverse()).__actions__.push({func:ir,args:[oZ],thisArg:n}),new rv(t,this.__chain__)}return this.thru(oZ)},rd.prototype.toJSON=rd.prototype.valueOf=rd.prototype.value=function(){return nx(this.__wrapped__,this.__actions__)},rd.prototype.first=rd.prototype.head,e5&&(rd.prototype[e5]=function(){return this}),rd}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(e8._=tJ,define(function(){return tJ})):e4?((e4.exports=tJ)._=tJ,e6._=tJ):e8._=tJ}).call(this)},916:function(e,t,r){e=r.nmd(e),(function(){"use strict";var n={function:!0,object:!0},o=n[typeof window]&&window||this,i=n[typeof t]&&t,a=n.object&&e&&!e.nodeType&&e,s=i&&a&&"object"==typeof r.g&&r.g;s&&(s.global===s||s.window===s||s.self===s)&&(o=s);var u=/\bOpera/,c=Object.prototype,l=c.hasOwnProperty,f=c.toString;function p(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function h(e){return e=b(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:p(e)}function d(e,t){for(var r in e)l.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?p(e):f.call(e).slice(8,-1)}function y(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function v(e,t){var r=null,n=function(n,o){r=t(r,n,o,e)},o=-1,i=e?e.length:0;if("number"==typeof i&&i>-1&&i<=0x1fffffffffffff)for(;++o<i;)n(e[o],o,e);else d(e,n);return r}function b(e){return String(e).replace(/^ +| +$/g,"")}function m(e){var t,r,n,i,a,s=o,c=e&&"object"==typeof e&&"String"!=g(e);c&&(s=e,e=null);var l=s.navigator||{},p=l.userAgent||"";e||(e=p);var _=c?!!l.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(f.toString()),w="Object",S=c&&s.java?"JavaPackage":g(s.java),k=/\bJava/.test(S)&&s.java,O=k&&g(s.environment)==(c?w:"Environment"),E=k?"a":"α",x=k?"b":"β",A=s.document||{},R=s.operamini||s.opera,P=u.test(P=c&&R?R["[[Class]]"]:g(R))?P:R=null,C=e,I=[],j=null,T=e==p,N=T&&R&&"function"==typeof R.version&&R.version(),L=v([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),U=v(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],function(t,r){return t||RegExp("\\b"+(r.pattern||y(r))+"\\b","i").exec(e)&&(r.label||r)}),D=B([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),M=v({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}},function(t,r,n){return t||(r[D]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(D)]||RegExp("\\b"+y(n)+"(?:\\b|\\w*\\d)","i").exec(e))&&n}),F=v(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],function(t,r){var n,o,i,a=r.pattern||y(r);return!t&&(t=RegExp("\\b"+a+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(n=t,o=r.label||r,i={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"},a&&o&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(i=i[/[\d.]+$/.exec(n)])&&(n="Windows "+i),n=String(n),a&&o&&(n=n.replace(RegExp(a,"i"),o)),t=n=h(n.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])),t});function B(t){return v(t,function(t,r){var n=r.pattern||y(r);return!t&&(t=RegExp("\\b"+n+" *\\d+[.\\w_]*","i").exec(e)||RegExp("\\b"+n+" *\\w+-[\\w]*","i").exec(e)||RegExp("\\b"+n+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(e))&&((t=String(r.label&&!RegExp(n,"i").test(r.label)?r.label:t).split("/"))[1]&&!/[\d.]+/.test(t[0])&&(t[0]+=" "+t[1]),r=r.label||r,t=h(t[0].replace(RegExp(n,"i"),r).replace(RegExp("; *(?:"+r+"[_-])?","i")," ").replace(RegExp("("+r+")[-_.]?(\\w)","i"),"$1 $2"))),t})}function W(t){return v(t,function(t,r){return t||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(L&&(L=[L]),/\bAndroid\b/.test(F)&&!D&&(i=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(D=b(i[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),M&&!D?D=B([M]):M&&D&&(D=D.replace(RegExp("^("+y(M)+")[-_.\\s]","i"),M+" ").replace(RegExp("^("+y(M)+")[-_.]?(\\w)","i"),M+" $2")),(i=/\bGoogle TV\b/.exec(D))&&(D=i[0]),/\bSimulator\b/i.test(e)&&(D=(D?D+" ":"")+"Simulator"),"Opera Mini"==U&&/\bOPiOS\b/.test(e)&&I.push("running in Turbo/Uncompressed mode"),"IE"==U&&/\blike iPhone OS\b/.test(e)?(M=(i=m(e.replace(/like iPhone OS/,""))).manufacturer,D=i.product):/^iP/.test(D)?(U||(U="Safari"),F="iOS"+((i=/ OS ([\d_]+)/i.exec(e))?" "+i[1].replace(/_/g,"."):"")):"Konqueror"==U&&/^Linux\b/i.test(F)?F="Kubuntu":M&&"Google"!=M&&(/Chrome/.test(U)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(D))||/\bAndroid\b/.test(F)&&/^Chrome/.test(U)&&/\bVersion\//i.test(e)?(U="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==U?(/\bMobi/i.test(e)||(F="Android",I.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&I.unshift("accelerated")):"UC Browser"==U&&/\bUCWEB\b/.test(e)?I.push("speed mode"):"PaleMoon"==U&&(i=/\bFirefox\/([\d.]+)\b/.exec(e))?I.push("identifying as Firefox "+i[1]):"Firefox"==U&&(i=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),D||(D=i[1])):!U||(i=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(U))?(U&&!D&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(i+"/")+8))&&(U=null),(i=D||M||F)&&(D||M||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(U=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:i)+" Browser")):"Electron"==U&&(i=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&I.push("Chromium "+i),N||(N=W(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",y(U),"(?:Firefox|Minefield|NetFront)"])),(i="iCab"==L&&parseFloat(N)>3&&"WebKit"||/\bOpera\b/.test(U)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(L)&&"WebKit"||!L&&/\bMSIE\b/i.test(e)&&("Mac OS"==F?"Tasman":"Trident")||"WebKit"==L&&/\bPlayStation\b(?! Vita\b)/i.test(U)&&"NetFront")&&(L=[i]),"IE"==U&&(i=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(U+=" Mobile",F="Windows Phone "+(/\+$/.test(i)?i:i+".x"),I.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(U="IE Mobile",F="Windows Phone 8.x",I.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=U&&"Trident"==L&&(i=/\brv:([\d.]+)/.exec(e))&&(U&&I.push("identifying as "+U+(N?" "+N:"")),U="IE",N=i[1]),T){if(r="global",n=null!=(t=s)?typeof t[r]:"number",/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!t[r])g(i=s.runtime)==(c?w:"ScriptBridgingProxyObject")?(U="Adobe AIR",F=i.flash.system.Capabilities.os):g(i=s.phantom)==(c?w:"RuntimeObject")?(U="PhantomJS",N=(i=i.version||null)&&i.major+"."+i.minor+"."+i.patch):"number"==typeof A.documentMode&&(i=/\bTrident\/(\d+)/i.exec(e))?(N=[N,A.documentMode],(i=+i[1]+4)!=N[1]&&(I.push("IE "+N[1]+" mode"),L&&(L[1]=""),N[1]=i),N="IE"==U?String(N[1].toFixed(1)):N[0]):"number"==typeof A.documentMode&&/^(?:Chrome|Firefox)\b/.test(U)&&(I.push("masking as "+U+" "+N),U="IE",N="11.0",L=["Trident"],F="Windows");else if(k&&(C=(i=k.lang.System).getProperty("os.arch"),F=F||i.getProperty("os.name")+" "+i.getProperty("os.version")),O){try{N=s.require("ringo/engine").version.join("."),U="RingoJS"}catch(e){(i=s.system)&&i.global.system==s.system&&(U="Narwhal",F||(F=i[0].os||null))}U||(U="Rhino")}else"object"==typeof s.process&&!s.process.browser&&(i=s.process)&&("object"==typeof i.versions&&("string"==typeof i.versions.electron?(I.push("Node "+i.versions.node),U="Electron",N=i.versions.electron):"string"==typeof i.versions.nw&&(I.push("Chromium "+N,"Node "+i.versions.node),U="NW.js",N=i.versions.nw)),U||(U="Node.js",C=i.arch,F=i.platform,N=(N=/[\d.]+/.exec(i.version))?N[0]:null));F=F&&h(F)}if(N&&(i=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(T&&l.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(j=/b/i.test(i)?"beta":"alpha",N=N.replace(RegExp(i+"\\+?$"),"")+("beta"==j?x:E)+(/\d+\+?/.exec(i)||"")),"Fennec"==U||"Firefox"==U&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))U="Firefox Mobile";else if("Maxthon"==U&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(D))"Xbox 360"==D&&(F=null),"Xbox 360"==D&&/\bIEMobile\b/.test(e)&&I.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(U)||U&&!D&&!/Browser|Mobi/.test(U))&&("Windows CE"==F||/Mobi/i.test(e)))U+=" Mobile";else if("IE"==U&&T)try{null===s.external&&I.unshift("platform preview")}catch(e){I.unshift("embedded")}else(/\bBlackBerry\b/.test(D)||/\bBB10\b/.test(e))&&(i=(RegExp(D.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||N)?(F=((i=[i,/BB10/.test(e)])[1]?(D=null,M="BlackBerry"):"Device Software")+" "+i[0],N=null):this!=d&&"Wii"!=D&&(T&&R||/Opera/.test(U)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==U&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==U&&(F&&!/^Win/.test(F)&&N>5.5||/\bWindows XP\b/.test(F)&&N>8||8==N&&!/\bTrident\b/.test(e)))&&!u.test(i=m.call(d,e.replace(u,"")+";"))&&i.name&&(i="ing as "+i.name+((i=i.version)?" "+i:""),u.test(U)?(/\bIE\b/.test(i)&&"Mac OS"==F&&(F=null),i="identify"+i):(i="mask"+i,U=P?h(P.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(i)&&(F=null),T||(N=null)),L=["Presto"],I.push(i));(i=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(i=[parseFloat(i.replace(/\.(\d)$/,".0$1")),i],"Safari"==U&&"+"==i[1].slice(-1)?(U="WebKit Nightly",j="alpha",N=i[1].slice(0,-1)):(N==i[1]||N==(i[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(N=null),i[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==i[0]&&537.36==i[2]&&parseFloat(i[1])>=28&&"WebKit"==L&&(L=["Blink"]),T&&(_||i[1])?(L&&(L[1]="like Chrome"),i=i[1]||((i=i[0])<530?1:i<532?2:i<532.05?3:i<533?4:i<534.03?5:i<534.07?6:i<534.1?7:i<534.13?8:i<534.16?9:i<534.24?10:i<534.3?11:i<535.01?12:i<535.02?"13+":i<535.07?15:i<535.11?16:i<535.19?17:i<536.05?18:i<536.1?19:i<537.01?20:i<537.11?"21+":i<537.13?23:i<537.18?24:i<537.24?25:i<537.36?26:"Blink"!=L?"27":"28")):(L&&(L[1]="like Safari"),i=(i=i[0])<400?1:i<500?2:i<526?3:i<533?4:i<534?"4+":i<535?5:i<537?6:i<538?7:i<601?8:i<602?9:i<604?10:i<606?11:i<608?12:"12"),L&&(L[1]+=" "+(i+="number"==typeof i?".x":/[.+]/.test(i)?"":"+")),"Safari"==U&&(!N||parseInt(N)>45)?N=i:"Chrome"==U&&/\bHeadlessChrome/i.test(e)&&I.unshift("headless")),"Opera"==U&&(i=/\bzbov|zvav$/.exec(F))?(U+=" ",I.unshift("desktop mode"),"zvav"==i?(U+="Mini",N=null):U+="Mobile",F=F.replace(RegExp(" *"+i+"$"),"")):"Safari"==U&&/\bChrome\b/.exec(L&&L[1])?(I.unshift("desktop mode"),U="Chrome Mobile",N=null,/\bOS X\b/.test(F)?(M="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(U)&&!N&&(N=W("Chrome")),N&&0==N.indexOf(i=/[\d.]+$/.exec(F))&&e.indexOf("/"+i+"-")>-1&&(F=b(F.replace(i,""))),F&&-1!=F.indexOf(U)&&!RegExp(U+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(U)+" *"),"")),L&&!/\b(?:Avant|Nook)\b/.test(U)&&(/Browser|Lunascape|Maxthon/.test(U)||"Safari"!=U&&/^iOS/.test(F)&&/\bSafari\b/.test(L[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(U)&&L[1])&&(i=L[L.length-1])&&I.push(i),I.length&&(I=["("+I.join("; ")+")"]),M&&D&&0>D.indexOf(M)&&I.push("on "+M),D&&I.push((/^on /.test(I[I.length-1])?"":"on ")+D),F&&(a=(i=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-i[0].length-1),F={architecture:32,family:i&&!a?F.replace(i[0],""):F,version:i?i[1]:null,toString:function(){var e=this.version;return this.family+(e&&!a?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(i=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(C))&&!/\bi686\b/i.test(C)?(F&&(F.architecture=64,F.family=F.family.replace(RegExp(" *"+i),"")),U&&(/\bWOW64\b/i.test(e)||T&&/\w(?:86|32)$/.test(l.cpuClass||l.platform)&&!/\bWin64; x64\b/i.test(e))&&I.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==U&&parseFloat(N)>=39&&(F.architecture=64),e||(e=null);var V={};return V.description=e,V.layout=L&&L[0],V.manufacturer=M,V.name=U,V.prerelease=j,V.product=D,V.ua=e,V.version=U&&N,V.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},V.parse=m,V.toString=function(){return this.description||""},V.version&&I.unshift(N),V.name&&I.unshift(U),F&&U&&!(F==String(F).split(" ")[0]&&(F==U.split(" ")[0]||D))&&I.push(D?"("+F+")":"on "+F),I.length&&(V.description=I.join(" ")),V}var _=m();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(o.platform=_,define(function(){return _})):i&&a?d(_,function(e,t){i[t]=e}):o.platform=_}).call(this)},490:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},348:function(e,t,r){"use strict";var n=r(530),o=r(429);e.exports={formats:r(490),parse:o,stringify:n}},429:function(e,t,r){"use strict";var n=r(422),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t){var r={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,l=u.split(t.delimiter,c),f=-1,p=t.charset;if(t.charsetSentinel)for(h=0;h<l.length;++h)0===l[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[h]?p="utf-8":"utf8=%26%2310003%3B"===l[h]&&(p="iso-8859-1"),f=h,h=l.length);for(h=0;h<l.length;++h)if(h!==f){var h,d,g,y=l[h],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(d=t.decoder(y,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(d=t.decoder(y.slice(0,b),a.decoder,p,"key"),g=n.maybeMap(s(y.slice(b+1),t),function(e){return t.decoder(e,a.decoder,p,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=g.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(r,d)?r[d]=n.combine(r[d],g):r[d]=g}return r},c=function(e,t,r,n){for(var o=n?t:s(t,r),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&u!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o},l=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,l=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),c(l,t,r,n)}},f=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}};e.exports=function(e,t){var r=f(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof e?u(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(o),s=0;s<a.length;++s){var c=a[s],p=l(c,o[c],r,"string"==typeof e);i=n.merge(i,p,r)}return!0===r.allowSparse?i:n.compact(i)}},530:function(e,t,r){"use strict";var n=r(29),o=r(422),i=r(490),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,a,s,c,f,p,g,y,v,b,m,_,w,S){for(var k,O,E=t,x=S,A=0,R=!1;void 0!==(x=x.get(d))&&!R;){var P=x.get(t);if(A+=1,void 0!==P)if(P===A)throw RangeError("Cyclic object value");else R=!0;void 0===x.get(d)&&(A=0)}if("function"==typeof p?E=p(r,E):E instanceof Date?E=v(E):"comma"===i&&u(E)&&(E=o.maybeMap(E,function(e){return e instanceof Date?v(e):e})),null===E){if(s)return f&&!_?f(r,h.encoder,w,"key",b):r;E=""}if("string"==typeof(k=E)||"number"==typeof k||"boolean"==typeof k||"symbol"==typeof k||"bigint"==typeof k||o.isBuffer(E))return f?[m(_?r:f(r,h.encoder,w,"key",b))+"="+m(f(E,h.encoder,w,"value",b))]:[m(r)+"="+m(String(E))];var C=[];if(void 0===E)return C;if("comma"===i&&u(E))_&&f&&(E=o.maybeMap(E,f)),O=[{value:E.length>0?E.join(",")||null:void 0}];else if(u(p))O=p;else{var I=Object.keys(E);O=g?I.sort(g):I}for(var j=a&&u(E)&&1===E.length?r+"[]":r,T=0;T<O.length;++T){var N=O[T],L="object"==typeof N&&void 0!==N.value?N.value:E[N];if(!c||null!==L){var U=u(E)?"function"==typeof i?i(j,N):j:j+(y?"."+N:"["+N+"]");S.set(t,A);var D=n();D.set(d,S),l(C,e(L,U,i,a,s,c,"comma"===i&&_&&u(E)?null:f,p,g,y,v,b,m,_,w,D))}}return C},y=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=h.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}};e.exports=function(e,t){var r,o,i=e,a=y(t);"function"==typeof a.filter?i=(0,a.filter)("",i):u(a.filter)&&(r=a.filter);var c=[];if("object"!=typeof i||null===i)return"";o=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[o];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===f&&t&&t.commaRoundTrip;r||(r=Object.keys(i)),a.sort&&r.sort(a.sort);for(var h=n(),d=0;d<r.length;++d){var v=r[d];a.skipNulls&&null===i[v]||l(c,g(i[v],v,f,p,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,h))}var b=c.join(a.delimiter),m=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),b.length>0?m+b:""}},422:function(e,t,r){"use strict";var n=r(490),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}},u=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:u,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:c}),r.push(l))}return s(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var u="",c=0;c<s.length;++c){var l=s.charCodeAt(c);if(45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)){u+=s.charAt(c);continue}if(l<128){u+=a[l];continue}if(l<2048){u+=a[192|l>>6]+a[128|63&l];continue}if(l<55296||l>=57344){u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l];continue}c+=1,u+=a[240|(l=65536+((1023&l)<<10|1023&s.charCodeAt(c)))>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l]}return u},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return(i(t)&&!i(r)&&(a=u(t,n)),i(t)&&i(r))?(r.forEach(function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r}),t):Object.keys(r).reduce(function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t},a)}}},958:function(e,t,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&u&&"function"==typeof u.get?u.get:null,l=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,_=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,k=Array.prototype.concat,O=Array.prototype.join,E=Array.prototype.slice,x=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===C?"object":"symbol")?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-x(-e):x(e);if(n!==e){var o=String(n),i=b.call(t,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(t,r,"$&_")}var L=r(347),U=L.custom,D=W(U)?U:null;function M(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return"[object Array]"===q(e)&&(!I||!("object"==typeof e&&I in e))}function B(e){return"[object RegExp]"===q(e)&&(!I||!("object"==typeof e&&I in e))}function W(e){if(C)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,o,s){var u,g,_,S,x,R=n||{};if(H(R,"quoteStyle")&&"single"!==R.quoteStyle&&"double"!==R.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(H(R,"maxStringLength")&&("number"==typeof R.maxStringLength?R.maxStringLength<0&&R.maxStringLength!==1/0:null!==R.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var U=!H(R,"customInspect")||R.customInspect;if("boolean"!=typeof U&&"symbol"!==U)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(R,"indent")&&null!==R.indent&&" "!==R.indent&&!(parseInt(R.indent,10)===R.indent&&R.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(R,"numericSeparator")&&"boolean"!=typeof R.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var V=R.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength;return e(b.call(t,0,r.maxStringLength),r)+("... "+n)+" more character"+(n>1?"s":"")}return M(m.call(m.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",r)}(t,R);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var Q=String(t);return V?N(t,Q):Q}if("bigint"==typeof t){var Z=String(t)+"n";return V?N(t,Z):Z}var ee=void 0===R.depth?5:R.depth;if(void 0===o&&(o=0),o>=ee&&ee>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var et=function(e,t){var r;if(" "===e.indent)r=" ";else{if("number"!=typeof e.indent||!(e.indent>0))return null;r=O.call(Array(e.indent+1)," ")}return{base:r,prev:O.call(Array(t+1),r)}}(R,o);if(void 0===s)s=[];else if(z(s,t)>=0)return"[Circular]";function er(t,r,n){if(r&&(s=E.call(s)).push(r),n){var i={depth:R.depth};return H(R,"quoteStyle")&&(i.quoteStyle=R.quoteStyle),e(t,i,o+1,s)}return e(t,R,o+1,s)}if("function"==typeof t&&!B(t)){var en=function(e){if(e.name)return e.name;var t=v.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),eo=X(t,er);return"[Function"+(en?": "+en:" (anonymous)")+"]"+(eo.length>0?" { "+O.call(eo,", ")+" }":"")}if(W(t)){var ei=C?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||C?ei:G(ei)}if((ea=t)&&"object"==typeof ea&&("undefined"!=typeof HTMLElement&&ea instanceof HTMLElement||"string"==typeof ea.nodeName&&"function"==typeof ea.getAttribute)){for(var ea,es,eu="<"+w.call(String(t.nodeName)),ec=t.attributes||[],el=0;el<ec.length;el++){eu+=" "+ec[el].name+"="+M((es=ec[el].value,m.call(String(es),/"/g,"&quot;")),"double",R)}return eu+=">",t.childNodes&&t.childNodes.length&&(eu+="..."),eu+="</"+w.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var ef=X(t,er);return et&&!function(e){for(var t=0;t<e.length;t++)if(z(e[t],"\n")>=0)return!1;return!0}(ef)?"["+Y(ef,et)+"]":"[ "+O.call(ef,", ")+" ]"}if("[object Error]"===q(u=t)&&(!I||!("object"==typeof u&&I in u))){var ep=X(t,er);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===ep.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(ep,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+er(t.cause),ep),", ")+" }"}if("object"==typeof t&&U){if(D&&"function"==typeof t[D]&&L)return L(t,{depth:ee-o});else if("symbol"!==U&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var eh=[];return a&&a.call(t,function(e,r){eh.push(er(r,t,!0)+" => "+er(e,t))}),J("Map",i.call(t),eh,et)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ed=[];return l&&l.call(t,function(e){ed.push(er(e,t))}),J("Set",c.call(t),ed,et)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return $("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return $("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return $("WeakRef");if("[object Number]"===q(g=t)&&(!I||!("object"==typeof g&&I in g)))return G(er(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return G(er(A.call(t)));if("[object Boolean]"===q(_=t)&&(!I||!("object"==typeof _&&I in _)))return G(d.call(t));if("[object String]"===q(S=t)&&(!I||!("object"==typeof S&&I in S)))return G(er(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===q(x=t)&&(!I||!("object"==typeof x&&I in x)))&&!B(t)){var eg=X(t,er),ey=T?T(t)===Object.prototype:t instanceof Object||t.constructor===Object,ev=t instanceof Object?"":"null prototype",eb=!ey&&I&&Object(t)===t&&I in t?b.call(q(t),8,-1):ev?"Object":"",em=(ey||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(eb||ev?"["+O.call(k.call([],eb||[],ev||[]),": ")+"] ":"");return 0===eg.length?em+"{}":et?em+"{"+Y(eg,et)+"}":em+"{ "+O.call(eg,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return V.call(e,t)}function q(e){return g.call(e)}function z(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}function K(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function G(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function J(e,t,r,n){return e+" ("+t+") {"+(n?Y(r,n):O.call(r,", "))+"}"}function Y(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function X(e,t){var r,n=F(e),o=[];if(n){o.length=e.length;for(var i=0;i<e.length;i++)o[i]=H(e,i)?t(e[i],e):""}var a="function"==typeof R?R(e):[];if(C){r={};for(var s=0;s<a.length;s++)r["$"+a[s]]=a[s]}for(var u in e)if(H(e,u)&&(!n||String(Number(u))!==u||!(u<e.length)))if(C&&r["$"+u]instanceof Symbol)continue;else S.call(/[^\w$]/,u)?o.push(t(u,e)+": "+t(e[u],e)):o.push(u+": "+t(e[u],e));if("function"==typeof R)for(var c=0;c<a.length;c++)j.call(e,a[c])&&o.push("["+t(a[c])+"]: "+t(e[a[c]],e));return o}},29:function(e,t,r){"use strict";var n=r(528),o=r(737),i=r(958),a=r(682),s=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},y=function(e,t){var r=g(e,t);return r&&r.value},v=function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return p(t,n)}else if(r)return y(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return f(e,n)}else if(u){if(t)return d(t,n)}else if(r)return!!g(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),l(e,n,o)):u?(t||(t=new u),h(t,n,o)):(r||(r={key:{},next:null}),v(r,n,o))}};return n}},488:function(e,t,r){!function(e){"use strict";var t,r,n=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),o=n&&"a=1"===new n({a:1}).toString(),i=n&&"+"===new n("s=%2B").get("s"),a=n&&"size"in n.prototype,s="__URLSearchParams__",u=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),c=h.prototype,l=!!(e.Symbol&&e.Symbol.iterator);if(!n||!o||!i||!u||!a){c.append=function(e,t){b(this[s],e,t)},c.delete=function(e){delete this[s][e]},c.get=function(e){var t=this[s];return this.has(e)?t[e][0]:null},c.getAll=function(e){var t=this[s];return this.has(e)?t[e].slice(0):[]},c.has=function(e){return _(this[s],e)},c.set=function(e,t){this[s][e]=[""+t]},c.toString=function(){var e,t,r,n,o=this[s],i=[];for(t in o)for(e=0,r=d(t),n=o[t];e<n.length;e++)i.push(r+"="+d(n[e]));return i.join("&")};var f=e.Proxy&&n&&(!i||!u||!o||!a);f?(r=new Proxy(n,{construct:function(e,t){return new e(new h(t[0]).toString())}})).toString=Function.prototype.toString.bind(h):r=h,Object.defineProperty(e,"URLSearchParams",{value:r});var p=e.URLSearchParams.prototype;p.polyfill=!0,!f&&e.Symbol&&(p[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in p||(p.forEach=function(e,t){var r=v(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){e.call(t,r,n,this)},this)},this)}),"sort"in p||(p.sort=function(){var e,t,r,n=v(this.toString()),o=[];for(e in n)o.push(e);for(o.sort(),t=0;t<o.length;t++)this.delete(o[t]);for(t=0;t<o.length;t++){var i=o[t],a=n[i];for(r=0;r<a.length;r++)this.append(i,a[r])}}),"keys"in p||(p.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),y(e)}),"values"in p||(p.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),y(e)}),"entries"in p||(p.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),y(e)}),l&&(p[e.Symbol.iterator]=p[e.Symbol.iterator]||p.entries),"size"in p||Object.defineProperty(p,"size",{get:function(){var e=v(this.toString());if(p===this)throw TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce(function(t,r){return t+e[r].length},0)}})}function h(e){((e=e||"")instanceof URLSearchParams||e instanceof h)&&(e=e.toString()),this[s]=v(e)}function d(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function g(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(e){return decodeURIComponent(e)})}function y(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return l&&(r[e.Symbol.iterator]=function(){return r}),r}function v(e){var t={};if("object"==typeof e)if(m(e))for(var r=0;r<e.length;r++){var n=e[r];if(m(n)&&2===n.length)b(t,n[0],n[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var o in e)e.hasOwnProperty(o)&&b(t,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var i=e.split("&"),a=0;a<i.length;a++){var s=i[a],u=s.indexOf("=");-1<u?b(t,g(s.slice(0,u)),g(s.slice(u+1))):s&&b(t,g(s),"")}}return t}function b(e,t,r){var n="string"==typeof r?r:null!=r&&"function"==typeof r.toString?r.toString():JSON.stringify(r);_(e,t)?e[t].push(n):e[t]=[n]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(void 0!==r.g?r.g:"undefined"!=typeof window?window:this)},243:function(e){"use strict";e.exports=n},297:function(e){"use strict";e.exports=r},385:function(t){"use strict";t.exports=e},192:function(e){"use strict";e.exports=t},194:function(){},917:function(){},347:function(){},850:function(e,t,r){var n;if("function"==typeof fetch&&(n=void 0!==r.g&&r.g.fetch?r.g.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var o=n||r(456);o.default&&(o=o.default),t.default=o,e.exports=t.default}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;a.t=function(r,n){if(1&n&&(r=this(r)),8&n||"object"==typeof r&&r&&(4&n&&r.__esModule||16&n&&"function"==typeof r.then))return r;var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>{i[e]=()=>r[e]});return i.default=()=>r,a.d(o,i),o}})(),a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var s={};return(()=>{"use strict";a.r(s),a.d(s,{Manager:()=>rt,DefaultBoxShadowBottom:()=>t1,DefaultColor3:()=>tX,RESTRICTED_USER_REALM_ROLE:()=>t9,Util:()=>u,OREvent:()=>i,DefaultColor10:()=>tZ,DEFAULT_ICONSET:()=>t6,EventProviderStatus:()=>e,DefaultHeaderHeight:()=>t3,DefaultColor1:()=>tK,OPENREMOTE_CLIENT_ID:()=>t4,default:()=>rn,manager:()=>rr,DefaultColor9:()=>tQ,DEFAULT_LANGUAGES:()=>t7,DefaultColor8:()=>tY,DefaultColor4:()=>tq,subscribe:()=>tH,DefaultColor2:()=>tG,DefaultColor5:()=>t$,DefaultBoxShadow:()=>t2,DefaultDisabledOpacity:()=>t5,DefaultColor11:()=>t0,normaliseConfig:()=>re,Console:()=>tf,DefaultColor6:()=>tJ,ORError:()=>o,DefaultColor7:()=>tz,WebSocketEventProvider:()=>t_});var e,t,r,n,o,i,u={};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:String(t)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function h(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function v(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return d(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}a.r(u),a.d(u,{Deferred:()=>e_,arrayRemove:()=>eT,blobToBase64:()=>tu,camelCaseToSentenceCase:()=>eL,capitaliseFirstLetter:()=>eD,cronStringToISOString:()=>eq,dateToCronString:()=>eH,difference:()=>ej,dispatchCancellableEvent:()=>ts,enumContains:()=>eM,formatCronString:()=>eV,getAllowedValueLabel:()=>eJ,getAssetTypeLabel:()=>eG,getAttributeLabel:()=>eX,getAttributeUnits:()=>e4,getAttributeValueAsString:()=>e0,getAttributeValueConstraints:()=>e8,getAttributeValueFormat:()=>e7,getBrowserLanguage:()=>ew,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>eO,getMetaItemNameValueHolder:()=>eY,getMetaLabel:()=>eQ,getMetaUnits:()=>e9,getMetaValue:()=>ez,getMetaValueAsString:()=>e1,getMetaValueConstraints:()=>e6,getMetaValueFormat:()=>te,getQueryParameter:()=>ek,getQueryParameters:()=>eS,getValueAsString:()=>e3,getValueDescriptorLabel:()=>e$,getWeekNumber:()=>eB,hasMetaItem:()=>eK,isFunction:()=>eC,isObject:()=>eP,isTimeDuration:()=>ex,isTimeDurationNegativeInfinity:()=>eR,isTimeDurationPositiveInfinity:()=>eA,loadJs:()=>to,mergeObjects:()=>function e(t,r,n){if(t&&!r)return Object.assign({},t);if(r&&!t)return Object.assign({},r);let o=Object.assign({},t),i=[];return Object.entries(r).forEach(([t,r])=>{var a,s,u,c,l;let f;a=o,s=i,u=t,c=r,l=n,f=a,s.forEach(e=>{f.hasOwnProperty(e)||(f[e]={}),f=f[e]}),f&&(f.hasOwnProperty(u)?null==c?delete f[u]:Array.isArray(f[u])?l?f[u]=[...f[u],...c]:f[u]=[...c]:"object"==typeof c?f[u]=e(Object.assign({},f[u]),c,l):f[u]=c:null==c?delete f[u]:Array.isArray(c)?f[u]=[...c]:"object"==typeof c?f[u]=Object.assign({},c):f[u]=c)}),o},objectsEqual:()=>eI,resolveUnits:()=>e5,sentenceCaseToCamelCase:()=>eN,sortByNumber:()=>ti,sortByString:()=>ta,stringMatch:()=>eU,updateAsset:()=>tn}),a(488);var k={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},O=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.init(t,r)}return h(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||k,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,S(S({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),E=function(){function e(){l(this,e),this.observers={}}return h(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach(function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)}),this}},{key:"off",value:function(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e]=this.observers[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(r))})}}]),e}();function x(){var e,t,r=new Promise(function(r,n){e=r,t=n});return r.resolve=e,r.reject=t,r}function A(e){return null==e?"":""+e}function R(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:n(i.shift())}}function P(e,t,r){var n=R(e,t,Object);n.obj[n.k]=r}function C(e,t){var r=R(e,t),n=r.obj,o=r.k;if(n)return n[o]}function I(e,t,r){var n=C(e,r);return void 0!==n?n:C(t,r)}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function N(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return T[e]}):e}var L="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=[" ",",","?","!",";"];function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var F=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return l(this,n),t=r.call(this),L&&E.call(d(t)),t.data=e||{},t.options=o,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return h(n,[{key:"addNamespaces",value:function(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."));var s=C(this.data,a);return s||!i||"string"!=typeof r?s:function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(t){if(t[r])return t[r];for(var o=r.split(n),i=t,a=0;a<o.length;++a){if(!i||"string"==typeof i[o[a]]&&a+1<o.length)return;if(void 0===i[o[a]]){for(var s=2,u=o.slice(a,a+s).join(n),c=i[u];void 0===c&&o.length>a+s;)s++,c=i[u=o.slice(a,a+s).join(n)];if(void 0===c)return;if(null===c)return null;if(r.endsWith(u)){if("string"==typeof c)return c;if(u&&"string"==typeof c[u])return c[u]}var l=o.slice(a+s).join(n);if(l)return e(c,l,n);return}i=i[o[a]]}return i}}(this.data&&this.data[e]&&this.data[e][t],r,o)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),P(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)("string"==typeof r[o]||"[object Array]"===Object.prototype.toString.apply(r[o]))&&this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);var s=C(this.data,a)||{};n?function e(t,r,n){for(var o in r)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof r[o]||r[o]instanceof String?n&&(t[o]=r[o]):e(t[o],r[o],n):t[o]=r[o]);return t}(s,r,o):s=M(M({},s),r),P(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?M(M({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(function(e){return t[e]&&Object.keys(t[e]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(E),B={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach(function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))}),t}};function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var H={},q=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(this,n),i=r.call(this),L&&E.call(d(i)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o=d(i),t.forEach(function(t){e[t]&&(o[t]=e[t])}),i.options=a,void 0===i.options.keySeparator&&(i.options.keySeparator="."),i.logger=O.create("translator"),i}return h(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,r){t=t||"",r=r||"";var n=U.filter(function(e){return 0>t.indexOf(e)&&0>r.indexOf(e)});if(0===n.length)return!0;var o=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n);if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var u=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==c(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),u=s.key,l=s.namespaces,f=l[l.length-1],p=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(h){var d=t.nsSeparator||this.options.nsSeparator;return i?(g.res="".concat(f).concat(d).concat(u),g):"".concat(f).concat(d).concat(u)}return i?(g.res=u,g):u}var g=this.resolve(e,t),y=g&&g.res,v=g&&g.usedKey||u,b=g&&g.exactUsedKey||u,m=Object.prototype.toString.apply(y),_=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y;if(w&&y&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(m)&&("string"!=typeof _||"[object Array]"!==m)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,y,V(V({},t),{},{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return i?(g.res=k,g):k}if(a){var O="[object Array]"===m,E=O?[]:{},x=O?b:v;for(var A in y)if(Object.prototype.hasOwnProperty.call(y,A)){var R="".concat(x).concat(a).concat(A);E[A]=this.translate(R,V(V({},t),{joinArrays:!1,ns:l})),E[A]===R&&(E[A]=y[A])}y=E}}else if(w&&"string"==typeof _&&"[object Array]"===m)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,r));else{var P=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,j=n.hasDefaultValue(t),T=I?this.pluralResolver.getSuffix(p,t.count,t):"",N=t["defaultValue".concat(T)]||t.defaultValue;!this.isValidLookup(y)&&j&&(P=!0,y=N),this.isValidLookup(y)||(C=!0,y=u);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,U=j&&N!==y&&this.options.updateMissing;if(C||P||U){if(this.logger.log(U?"updateKey":"missingKey",p,f,u,U?N:y),a){var D=this.resolve(u,V(V({},t),{},{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var M=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var B=0;B<F.length;B++)M.push(F[B]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var W=function(e,r,n){var i=j&&n!==y?n:L;o.options.missingKeyHandler?o.options.missingKeyHandler(e,f,r,i,U,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,f,r,i,U,t),o.emit("missingKey",e,f,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?M.forEach(function(e){o.pluralResolver.getSuffixes(e,t).forEach(function(r){W([e],u+r,t["defaultValue".concat(r)]||N)})}):W(M,u,N))}y=this.extendTranslation(y,e,t,g,r),C&&y===u&&this.options.appendNamespaceToMissingKey&&(y="".concat(f,":").concat(u)),(C||P)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(f,":").concat(u):u,P?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,V(V({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(V(V({},r),{interpolation:V(V({},this.options.interpolation),r.interpolation)}));var a,s="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(c=V(V({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,r.lng||this.language,r),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=B.handle(p,e,t,this.options&&this.options.postProcessPassResolved?V({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;r=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=f&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach(function(e){a.isValidLookup(t)||(i=e,!H["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(H["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach(function(r){if(!a.isValidLookup(t)){o=r;var i,u=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(u,c,r,e,s);else{f&&(l=a.pluralResolver.getSuffix(r,s.count,s));var l,d="".concat(a.options.pluralSeparator,"zero");if(f&&(u.push(c+l),p&&u.push(c+d)),h){var g="".concat(c).concat(a.options.contextSeparator).concat(s.context);u.push(g),f&&(u.push(g+l),p&&u.push(g+d))}}for(;i=u.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,s))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}]),n}(E);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var K=function(){function e(t){l(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=O.create("languageUtils")}return h(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return null;var t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||0>e.indexOf("-"))return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map(function(e){return e.toLowerCase()}):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=z(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=z(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach(function(e){if(!t){var n=r.formatLanguageCode(e);(!r.options.supportedLngs||r.isSupportedCode(n))&&(t=n)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find(function(e){if(0===e.indexOf(n))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach(function(e){0>o.indexOf(e)&&i(r.formatLanguageCode(e))}),o}}]),e}(),G=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(+(1!=e&&(e%10!=1||e%100==11)))},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4))},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},J=["v1","v2","v3"],Y={zero:0,one:1,two:2,few:3,many:4,other:5},X=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.languageUtils=t,this.options=n,this.logger=O.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},G.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:$[e.fc]}})}),r)}return h(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(function(e){return"".concat(t).concat(e)})}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(function(e,t){return Y[e]-Y[t]}).map(function(e){return"".concat(t.options.prepend).concat(e)}):n.numbers.map(function(n){return t.getSuffix(e,n,r)}):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!J.includes(this.options.compatibilityJSON)}}]),e}();function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ee=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.logger=O.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return h(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:N,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(0>e.indexOf(s.formatSeparator)){var o=I(t,u,e);return s.alwaysFormat?s.format(o,void 0,r,Z(Z(Z({},n),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(I(t,u,a),c,r,Z(Z(Z({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach(function(t){for(a=0;o=t.regex.exec(e);){var r=o[1].trim();if(void 0===(i=l(r)))if("function"==typeof f){var u=f(e,o,n);i="string"==typeof u?u:""}else if(n&&n.hasOwnProperty(r))i="";else if(p){i=o[0];continue}else s.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i="";else"string"==typeof i||s.useRawValueToEscape||(i=A(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Z({},i);function s(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=Z(Z({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],c=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var l=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=l.shift(),u=l,c=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=A(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),c&&(n=u.reduce(function(e,t){return o.format(e,t,i.lng,Z(Z({},i),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function en(e){var t={};return function(r,n,o){var i=n+JSON.stringify(o),a=t[i];return a||(a=e(n,o),t[i]=a),a(r)}}var eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,e),this.logger=O.create("formatter"),this.options=t,this.formats={number:en(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:en(function(e,t){var r=new Intl.NumberFormat(e,er(er({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:en(function(e,t){var r=new Intl.DateTimeFormat(e,er({},t));return function(e){return r.format(e)}}),relativetime:en(function(e,t){var r=new Intl.RelativeTimeFormat(e,er({},t));return function(e){return r.format(e,t.range||"day")}}),list:en(function(e,t){var r=new Intl.ListFormat(e,er({},t));return function(e){return r.format(e)}})},this.init(t)}return h(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=t.interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=en(t)}},{key:"format",value:function(e,t,r,n){var o=this;return t.split(this.formatSeparator).reduce(function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(function(e){if(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return _(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],i=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[o.trim()]||(r[o.trim()]=i),"false"===i&&(r[o.trim()]=!1),"true"===i&&(r[o.trim()]=!0),isNaN(i)||(r[o.trim()]=parseInt(i,10))}})}return{formatName:t,formatOptions:r}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var u=e;try{var c=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},l=c.locale||c.lng||n.locale||n.lng||r;u=o.formats[a](e,l,er(er(er({},s),n),c))}catch(e){o.logger.warn(e)}return u}return o.logger.warn("there was no format function for ".concat(a)),e},e)}}]),e}();function ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var es=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(e,t,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return l(this,n),i=r.call(this),L&&E.call(d(i)),i.backend=e,i.store=t,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=O.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return h(n,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i={},a={},s={},u={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,n=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===u[t]&&(u[t]=!0)))}),n||(s[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(r){var n,s,u,c,l;n=r.loaded,(c=(u=R(n,[o],Object)).obj)[l=u.k]=c[l]||[],s||c[l].push(i),void 0!==r.pending[e]&&(delete r.pending[e],r.pendingCount--),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[r](e,t,function(s,u){if(n.readingCalls--,n.waitingReads.length>0){var c=n.waitingReads.shift();n.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(s&&u&&o<n.maxRetries)return void setTimeout(function(){n.read.call(n,e,t,r,o+1,2*i,a)},i);a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(function(e){r.loadOne(e)})}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)})}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))return void this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,ea(ea({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(E);function eu(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ec(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function el(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ec(Object(r),!0).forEach(function(t){m(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ec(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ef(){}var ep=function(e){y(n,e);var t,r=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=b(n);return e=t?Reflect.construct(r,arguments,b(this).constructor):r.apply(this,arguments),v(this,e)});function n(){var e,t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(l(this,n),t=r.call(this),L&&E.call(d(t)),t.options=eu(o),t.services={},t.logger=O,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=d(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),i&&!t.isInitialized&&!o.isClone){if(!t.options.initImmediate)return t.init(o,i),v(t,d(t));setTimeout(function(){t.init(o,i)},0)}return t}return h(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));var n={debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===c(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===c(e[2])||"object"===c(e[3])){var r=e[3]||e[2];Object.keys(r).forEach(function(e){t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=el(el(el({},n),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=el(el({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){this.modules.logger?O.init(o(this.modules.logger),this.options):O.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=eo);var i,a=new K(this.options);this.store=new F(this.options.resources,this.options);var s=this.services;s.logger=O,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new X(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new ee(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new es(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new q(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.format=this.options.interpolation.format,r||(r=ef),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}});var l=x(),f=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>i.indexOf(e)&&i.push(e)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return a(e)}),this.options.preload&&this.options.preload.forEach(function(e){return a(e)}),this.services.backendConnector.load(i,this.options.ns,function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)})}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=x();return e||(e=this.languages),t||(t=this.options.ns),r||(r=ef),this.services.backendConnector.reload(e,t,function(e){n.resolve(),r(e)}),n}},{key:"use",value:function(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&B.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=x();this.emit("languageChanging",e);var o=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(e,i){i?(o(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},a=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||o(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,o=function e(t,o){if("object"!==c(o)){for(var i,a=arguments.length,s=Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=n.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=el({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||r||e.keyPrefix;var l=n.options.keySeparator||".",f=i.keyPrefix?"".concat(i.keyPrefix).concat(l).concat(t):t;return n.t(f,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=x();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){0>r.options.ns.indexOf(e)&&r.options.ns.push(e)}),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=x();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter(function(e){return 0>n.indexOf(e)});return o.length?(this.options.preload=n.concat(o),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),e)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,o=el(el(el({},this.options),t),{isClone:!0}),i=new n(o);return(void 0!==t.debug||void 0!==t.prefix)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(function(t){i[t]=e[t]}),i.services=el({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new q(i.services,i.options),i.translator.on("*",function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))}),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(E);m(ep,"createInstance",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ep(e,t)});var eh=ep.createInstance();eh.createInstance=ep.createInstance,eh.createInstance,eh.init,eh.loadResources,eh.reloadResources,eh.use,eh.changeLanguage,eh.getFixedT,eh.t,eh.exists,eh.setDefaultNamespace,eh.hasLoadedNamespace,eh.loadNamespaces,eh.loadLanguages;var ed=a(348),eg=a.n(ed),ey=a(297),ev=a(192),eb=a.n(ev),em=a(891);class e_{get resolve(){return this._resolve}get reject(){return this._reject}get promise(){return this._promise}constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),Object.freeze(this)}}function ew(){return navigator.language.split("-")[0]||"en"}function eS(e){return eg().parse(e,{ignoreQueryPrefix:!0})}function ek(e){let t;if(location.search&&""!==location.search&&(t=eS(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eS(location.hash.substring(e+1)))}return t?t[e]:void 0}function eO(e){let t=[];return e.rules.forEach(e=>{if(e.when&&e.then&&e.then.length>0){let r=new Map;for(let n of(function(e,t,r){if(!e)return;let n=[];e.groups&&e.groups.forEach(e=>{e.items&&e.items.forEach(e=>{n.push(e)})}),e.items&&e.items.forEach(e=>{n.push(e)}),n&&n.forEach(e=>{if(e.assets&&e.assets.attributes){let t=[];if(function e(t,r){t&&(t.items.forEach(e=>{e.value&&("radial"===e.value.predicateType||"rect"===e.value.predicateType)&&r.push({predicate:e.value})}),t.groups&&t.groups.forEach(t=>e(t,r)))}(e.assets.attributes,t),t.length>0){let n=e.tag||"0";r.set(n,t)}}})}(e.when,0,r),r.size>0&&e.then.forEach(e=>(function(e,t){if(e&&"notification"===e.action&&e.notification&&e.notification.message&&"push"===e.notification.message.type){let r=e.target;if(r&&r.conditionAssets){let n=t.get(r.conditionAssets);n&&n.forEach(t=>{t.notification=e.notification.message})}else for(let r of t.values())r.forEach(t=>{t.notification=e.notification.message})}})(e,r)),r.values()))n.forEach(e=>{e.notification&&t.push(e)})}}),t}let eE=/([+-])?((\d+)[Dd])?\s*((\d+)[Hh])?\s*((\d+)[Mm]$)?\s*((\d+)[Ss])?\s*((\d+)([Mm][Ss]$))?\s*((\d+)[Ww])?\s*((\d+)[Mm][Nn])?\s*((\d+)[Yy])?/;function ex(e){return!!e&&(e=e.trim()).length>0&&(eE.test(e)||eA(e)||eR(e))}function eA(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eR(e){return"-*"===(e=null!=e?e.trim():void 0)}function eP(e){return!!e&&"object"==typeof e}function eC(e){return!!(e&&e.constructor&&e.call&&e.apply)}function eI(e,t,r=!0){if(null==e||null==t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Function||e instanceof RegExp)return e===t;if(e===t||e.valueOf()===t.valueOf())return!0;if(Array.isArray(e)&&e.length!==t.length||e instanceof Date||!(e instanceof Object)||!(t instanceof Object))return!1;if(r){let r=Object.keys(e);return Object.keys(t).every(e=>-1!==r.indexOf(e))&&r.every(r=>eI(e[r],t[r]))}return!1}function ej(e,t){let r=(e,t)=>(0,em.transform)(e,function(e,n,o){eI(n,null==t?void 0:t[o])||(e[o]=eP(n)&&eP(null==t?void 0:t[o])?r(n,null==t?void 0:t[o]):n)});return r(e,t)}function eT(e,t){if(0===e.length)return;let r=e.indexOf(t);r>=0&&e.splice(r,1)}function eN(e){return null==e?"":e.split(" ").map((e,t)=>0===t?e[0].toLowerCase()+e.substring(1):e[0].toUpperCase()+e.substring(1)).join("")}function eL(e){if(null==e)return"";let t=!1;return e.split(/([A-Z]|\d)/).map((e,r,n)=>{if(!e)return e;if(!t)return t=!0,e.charAt(0).toUpperCase()+e.slice(1);if("_"===e)return" ";if(1===e.length&&e===e.toUpperCase()){let t=!n[r-1]||"_"===n[r-1],o=r+1<n.length&&n[r+1]&&"_"!==n[r+1],i=r+3>n.length||!n[r+1]&&!n[r+3];(!t||o)&&(e=" "+e),!o&&(t||i)||(e=e.toLowerCase())}return e}).join("").trim()}function eU(e,t){if(t===e)return!0;let r=e.endsWith("*"),n=!r&&e.startsWith("*"),o=!r&&!n&&e.startsWith("^")&&e.endsWith("$");if(r&&t.startsWith(e.substr(0,e.length-1))||n&&t.endsWith(e.substr(1)))return!0;if(o)try{return new RegExp(e).test(t)}catch(e){console.error("Failed to compile needle as a RegExp: "+e)}return!1}function eD(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eM(e,t){return e&&Object.values(e).includes(t)}function eF(e,t){return Object.keys(e).find(r=>e[r]===t)}function eB(e){(e=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))).setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));let t=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-t.getTime())/864e5+1)/7)}let eW=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function eV(e,t,r,n,o,i,a){let s="";if(i?Array.isArray(i)?s+=i.toString().replace(" ",""):s+=i.toString():s+="0",s+=" ",o?Array.isArray(o)?s+=o.toString().replace(" ",""):s+=o.toString():s+="0",s+=" ",n?Array.isArray(n)?s+=n.toString().replace(" ",""):s+=n.toString():s+="0",s+=" ",r?Array.isArray(r)?s+=r.toString().replace(" ",""):s+=r.toString():s+="*",s+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eW[t].toString())}),s+=e.toString().replace(" ","")}else s+=t.toString().replace(" ","");else s+=t.toString();else s+="*";return s+=" ",a?s+=a.toString():s+="?",s+=" ",e?Array.isArray(e)?s+=e.toString().replace(" ",""):s+=e:s+="*",s}function eH(e){return eV(e.getFullYear(),eW[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eq(e,t){let r=e.split(" ");if(!Number.isNaN(Number(r[0]))&&!Number.isNaN(Number(r[1]))&&!Number.isNaN(Number(r[2]))&&(!Number.isNaN(Number(r[3]))||"*"==r[3])){let e=(!Number.isNaN(Number(r[6]))?r[6]:new Date().getFullYear()).toString(),n="";n=1==(n="*"!=r[4]?eW.indexOf(r[4]).toString():new Date().getMonth().toString()).length?"0"+n:n;let o=1==r[3].length&&"*"!=r[3]?"0"+r[3]:r[3].replace("*","01"),i=1==r[2].length&&"*"!=r[2]?"0"+r[2]:r[2].replace("*","00"),a=1==r[1].length&&"*"!=r[1]?"0"+r[1]:r[1].replace("*","00"),s=1==r[0].length&&"*"!=r[0]?"0"+r[0]:r[0].replace("*","00");if(e.length>0&&n.length>0)if(t)return eb().utc({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString();else return eb()({year:Number(e),month:Number(n),date:Number(o),hour:Number(i),minute:Number(a),second:Number(s)}).toISOString()}}function ez(e,t,r){let n="string"==typeof e?e:e.name;return t&&t.meta&&t.meta.hasOwnProperty(n)?t.meta[n]:r&&r.meta?r.meta[n]:void 0}function eK(e,t,r){let n="string"==typeof e?e:e.name;return!!(t&&t.meta&&t.meta.hasOwnProperty(n)||r&&r.meta&&r.meta.hasOwnProperty(n))}function eG(e){return("string"==typeof e&&(e=ey.AssetModelUtil.getAssetDescriptor(e)),e)?eh.t("label.asset."+e.name,{defaultValue:eL(e.name)}):""}function e$(e){if(!e)return eh.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eh.t("label.value."+t,{defaultValue:eL(t||"")})}function eJ(e,t){if(e)return eh.t("label.allowedValue."+e,{defaultValue:t||eL(e||""),nsSeparator:!1})}function eY(e,t){let r="string"==typeof e?ey.AssetModelUtil.getMetaItemDescriptor(e):e;return r?{name:r.name,type:r.type,value:t}:{name:typeof e,type:ey.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function eX(e,t,r,n,o){return eZ(e,t,r,n,!0,o)}function eQ(e,t,r,n,o){return eZ(e||eY(t,null),t,r,n,!1,o)}function eZ(e,t,r,n,o,i){let a=tr("label",e,t,r,o),s="";if(a||(a=ez("label",e,t&&t.meta?t:void 0)),n&&(s=e5(tt("units",e,t,r,o))),!a){let r=e?e.name:t?"string"==typeof t?t:t.name:void 0;a=i||(r?eL(r):void 0)}return a?a+(s?" ("+s+")":""):s}function e0(e,t,r,n,o){return e2(e,t,r,n,!0,o)}function e1(e,t,r,n,o){return e2(e||eY(t,null),t,r,n,!1,o)}function e2(e,t,r,n,o,i){let a=e3(e?e.value:void 0,()=>tt("format",e,t,r,o),void 0,i),s=e4(e,t,r);return n&&s&&s.length&&(a=e5(tt("units",e,t,r,o),a)),a}function e3(e,t,r,n){let o="";if(null==e)o=n||"";else if("string"==typeof e)o=e;else if("number"==typeof e||"boolean"==typeof e||e instanceof Date){let n=t&&t();if(n&&0!==Object.keys(n).length)switch("number"==typeof e?n.asBoolean?e=!!e:n.asDate&&(e=new Date(e)):"boolean"==typeof e&&n.asNumber&&(e=+!!e),typeof e){case"number":o=new Intl.NumberFormat(r||eh.language,n).format(e);break;case"boolean":n.asOnOff&&(o=e?eh.t("on"):eh.t("off")),n.asOpenClosed&&(o=e?eh.t("open"):eh.t("closed")),n.asPressedReleased&&(o=e?eh.t("pressed"):eh.t("released"));break;case"object":if(n.momentJsFormat)o=eb()(e).format(n.momentJsFormat);else if(n.iso8601)o=e.toISOString();else if(n.week){let t=eB(e);o="2-digit"===n.week?String(t).padStart(2,"0"):Number(t).toString(10)}else o=new Intl.DateTimeFormat(r||eh.language,n).format(e)}else o=Object(e).toString()}return o}function e5(e,t){if(!e)return"";t||(t="");let r=e.map((e,r)=>{if(3!==e.length||e.toUpperCase()!==e)return eh.t(["units."+e,"or:units."+e]);{let n=new Intl.NumberFormat(eh.language,{currency:e,style:"currency"}).formatToParts();if(0!==r||"currency"!==n[0].type)return"currency"===n[0].type?n[0].value:n[n.length-1].value;if(!t)return n[0].value;t=n[0].value+t}}).join("");return t.length>0?t+" "+r:r}function e8(e,t,r){return tt("constraints",e,t,r,!0)}function e6(e,t,r){return tt("constraints",e||eY(t,null),t,r,!1)}function e4(e,t,r){return tt("units",e,t,r,!0)}function e9(e,t,r){return tt("units",e||eY(t,null),t,r,!1)}function e7(e,t,r){return tt("format",e,t,r,!0)}function te(e,t,r){return tt("format",e||eY(t,null),t,r,!1)}function tt(e,t,r,n,o){let i,a=[],s=tr(e,t&&"string"==typeof t?t:t?t.name:r?"string"==typeof r?r:r.name:void 0,r,n,o);if(s&&(i=JSON.parse(s)))if("format"!==e)return i;else a.push(i);if(t&&t.meta&&(i=ez(e,t,r)))if("format"!==e)return i;else a.push(i);if(r&&"string"!=typeof r&&r.hasOwnProperty(e)){if(i=r[e],"format"!==e)return i;a.push(i)}if(r&&r.type){if(i=ey.AssetModelUtil.getValueDescriptor(r.type)[e],"format"!==e)return i;a.push(i)}if("format"!==e||0===a.length)return i;let u={};return a.reverse().forEach(e=>{u=Object.assign(Object.assign({},u),e)}),u}function tr(e,t,r,n,o,i){let a;if(t?a="string"==typeof t?t:t.name:r&&(a="string"==typeof r?r:r.name),!a)return;let s=[],u=e+"."+(o?"attribute":"meta")+".";if(n&&s.push(u+n+"."+a),r&&"string"!=typeof r&&(s.push(u+r.type+"."+a),s.push(u+r.type)),s.push(u+a),s.length>0)return eh.t(s,{defaultValue:i||""})}function tn(e,t){let r=t.ref.name;if(e.attributes)if(t.deleted)delete e.attributes[r];else{let n=e.attributes[r];n&&(n.value=t.value,n.timestamp=t.timestamp)}return Object.assign({},e)}function to(e){return new Promise((t,r)=>{let n=document.createElement("script");n.type="text/javascript",n.src=e,n.addEventListener("load",e=>t(e),!1),n.addEventListener("error",e=>r(e),!1),document.body.appendChild(n)})}function ti(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n-o:0}}function ta(e){return(t,r)=>{let n=e(t),o=e(r);return n||o?n&&!o?1:!n&&o?-1:n.localeCompare(o):0}}function ts(e,t){let r=new e_;return e.dispatchEvent(t),window.setTimeout(()=>{r.resolve(t.detail)}),r.promise}function tu(e){return new Promise((t,r)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=e=>{r(e)}})}var tc=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};let tl=a(916);class tf{constructor(e,t,r){this._autoEnable=!1,this._initialised=!1,this._initialiseInProgress=!1,this._pendingProviderPromises={},this._providerMessageListeners={},this._pendingProviderEnables=[],this._registrationTimer=null,this._realm=e,this._autoEnable=t,this._enableCompleteCallback=r,window.OpenRemoteConsole=this;let n=new URLSearchParams(window.location.search),o=n.get("consoleName"),i=n.get("consoleVersion"),a=n.get("consolePlatform"),s=n.get("consoleProviders"),u=n.get("consoleAutoEnable"),c=s&&s.length>0?s.split(" "):["push"];this._pendingProviderEnables=c;let l=tf._createConsoleRegistration(),f=window.localStorage.getItem("OpenRemoteConsole:"+e);if(f)try{let e=JSON.parse(f);e.id&&(l.id=e.id),e.name&&(l.name=e.name),e.providers&&(l.providers=e.providers),e.apps&&(l.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}let p=l.providers;for(let e of(l.providers={},c)){let t=p&&p.hasOwnProperty(e)?p[e]:{enabled:!1,disabled:!1};l.providers[e]=t}let h=rn.getAppName();h.length>0&&0>l.apps.indexOf(h)&&l.apps.push(h),this._registration=l,o&&(l.name=o),i&&(l.version=i),a&&(l.platform=a),u&&(this._autoEnable="TRUE"===u||"true"===u)}get registration(){return this._registration}get autoEnable(){return this._autoEnable}get pendingProviderEnables(){return this._pendingProviderEnables.slice(0)}get shellApple(){let e=navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform:navigator.platform;return e&&("iP"===e.substring(0,2)||"Mac"===e.substring(0,3))&&window.webkit&&window.webkit.messageHandlers}get shellAndroid(){return!!window.MobileInterface}get isMobile(){return this.shellApple||this.shellAndroid}initialise(){return tc(this,void 0,void 0,function*(){if(!this._initialised&&!this._initialiseInProgress){console.debug("Console: initialising"),this._initialiseInProgress=!0;try{if(this._registration.providers)for(let e of Object.keys(this._registration.providers))yield this._initialiseProvider(e);this._registration.id||(yield this.sendRegistration(0)),this._initialised=!0,this._initialiseInProgress=!1,0===this._pendingProviderEnables.length?(yield this.sendRegistration(),this._callCompletedCallback()):this._autoEnable&&(yield this.enableProviders())}catch(e){console.error(e)}finally{this._initialiseInProgress=!1}}})}enableProviders(){return tc(this,void 0,void 0,function*(){if(!this._initialised)throw Error("Console must be initialised before enabling providers");for(let e=this._pendingProviderEnables.length-1;e>-1;e--){let t=this._pendingProviderEnables[e];yield this.enableProvider(t)}})}enableProvider(e,t){return tc(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before enabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: enabling provider '"+e+"'");let r={provider:e,action:"PROVIDER_ENABLE",consoleId:this._registration.id,data:t},n=yield this.sendProviderMessage(r,!0);this._registration.providers[e].hasPermission=n.hasPermission,this._registration.providers[e].success=n.success,this._registration.providers[e].enabled=n.success,this._registration.providers[e].data=n.data;let o=this._pendingProviderEnables.indexOf(e);return o>=0&&(this._pendingProviderEnables.splice(o,1),0===this._pendingProviderEnables.length&&(this.sendRegistration(),this._callCompletedCallback())),n})}disableProvider(e){return tc(this,void 0,void 0,function*(){if(!this._initialised)throw console.debug("Console must be initialised before disabling providers"),Error("Console must be initialised before disabling providers");if(!this._registration.providers.hasOwnProperty(e))throw console.debug("Invalid console provider '"+e+"'"),Error("Invalid console provider '"+e+"'");console.debug("Console: disabling provider '"+e+"'");let t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_DISABLE"},!0);return this._registration.providers[e].disabled=!0,this._registration.providers[e].enabled=!1,t})}getProvider(e){return this._registration&&this._registration.providers?this._registration.providers[e]:void 0}sendProviderMessage(e,t){return tc(this,void 0,void 0,function*(){if("storage"!==e.provider&&!this._registration.providers.hasOwnProperty(e.provider))throw console.debug("Invalid console provider '"+e.provider+"'"),Error("Invalid console provider '"+e.provider+"'");if(!t)return void this._doSendProviderMessage(e);let r=e.provider+e.action;if(this._pendingProviderPromises[r])throw Error("Message already pending for provider '"+e.provider+"' with action '"+e.action+"'");let n=new e_,o=()=>{delete this._pendingProviderPromises[r],n.reject("No response from provider")};return this._pendingProviderPromises[r]=[n,window.setTimeout(o,5e3)],this._doSendProviderMessage(e),n.promise})}sendRegistration(e){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),console.debug("Sending registration in: "+(e=void 0!==e?e:2e3)+"ms"),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>{this._registrationTimer=null,console.debug("Console: updating registration");try{this._registration.name||(this._registration.name="Console"),this._registration.platform||(this._registration.platform="N/A"),this._registration.version||(this._registration.version="N/A"),this._registration.providers||(this._registration.providers={}),rn.rest.api.ConsoleResource.register(this._registration).then(t=>{if(200!==t.status)throw Error("Failed to register console");this._registration=t.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem("OpenRemoteConsole:"+this._realm,JSON.stringify(this._registration)),e()})}catch(e){console.error("Failed to register console"),t("Failed to register console")}})})}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tc(this,void 0,void 0,function*(){let t=this.sendProviderMessage({provider:"storage",action:"RETRIEVE",key:e},!0);try{let e=yield Promise.race([t,new Promise((e,t)=>setTimeout(t,2e3))]);if(e&&e.value){let t=e.value;return"null"===t?void 0:t}}catch(e){console.log("Failed to retrieve data from storage provider")}})}addProviderMessageListener(e,t){this._providerMessageListeners[e.provider+e.action]=t}removeProviderMessageListener(e){delete this._providerMessageListeners[e.provider+e.action]}_postNativeShellMessage(e){try{if(this.shellAndroid)return window.MobileInterface.postMessage(JSON.stringify(e));if(this.shellApple)return window.webkit.messageHandlers.int.postMessage(e)}catch(e){console.error("Failed to send shell message towards console",e)}}_doSendGenericMessage(e,t){let r={type:e,data:t};this.isMobile?this._postNativeShellMessage(r):console.warn("Failed to send generic message to console.",r)}_doSendProviderMessage(e){if(this.isMobile)this._postNativeShellMessage({type:"provider",data:e});else{if(!e.provider||!e.action)return;switch(e.provider.trim().toUpperCase()){case"PUSH":switch(e.action.trim().toUpperCase()){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"push",version:"web",enabled:!0,disabled:!1,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"push",hasPermission:!0,success:!0}));break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;case"STORAGE":switch(e.action){case"PROVIDER_INIT":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_INIT",provider:"storage",version:"1.0.0",disabled:!1,enabled:!0,hasPermission:!0,requiresPermission:!1,success:!0}));break;case"PROVIDER_ENABLE":this._handleProviderResponse(JSON.stringify({action:"PROVIDER_ENABLE",provider:"storage",hasPermission:!0,success:!0}));break;case"STORE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'store' action requires a `key`");null===e.value?window.localStorage.removeItem(t):window.localStorage.setItem(t,JSON.stringify(e.value))}break;case"RETRIEVE":{let t=e.key?e.key.trim():null;if(!t||0===t.length)throw Error("Storage provider 'retrieve' action requires a `key`");let r=window.localStorage.getItem(t);if(null!==r)try{r=JSON.parse(r)}catch(e){}this._handleProviderResponse(JSON.stringify({action:"RETRIEVE",provider:"storage",key:t,value:r}))}break;default:throw Error("Unsupported provider '"+e.provider+"' and action '"+e.action+"'")}break;default:console.error("Unsupported provider: "+e.provider)}}}_handleProviderResponse(e){if(!e)return;let t=JSON.parse(e),r=t.provider,n=t.action,o=this._pendingProviderPromises[r+n];o&&(window.clearTimeout(o[1]),delete this._pendingProviderPromises[r+n],o[0].resolve(t));let i=this._providerMessageListeners[r+n];i&&i(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:tl.name,version:tl.version,platform:tl.os.toString(),apps:[],model:((tl.manufacturer?tl.manufacturer+" ":"")+(tl.product?tl.product:"")).trim()}}_initialiseProvider(e){return tc(this,void 0,void 0,function*(){let t;console.debug("Console: initialising provider '"+e+"'");try{t=yield this.sendProviderMessage({provider:e,action:"PROVIDER_INIT"},!0),this._registration.providers[e].version=t.version,this._registration.providers[e].requiresPermission=t.requiresPermission,this._registration.providers[e].hasPermission=t.hasPermission,this._registration.providers[e].success=t.success,this._registration.providers[e].enabled=t.enabled,this._registration.providers[e].disabled=t.disabled,this._registration.providers[e].data=t.data}catch(e){console.error(e),t={action:"",disabled:!1,enabled:!1,hasPermission:!1,provider:"",requiresPermission:!1,version:"",success:!1}}if(t.success||(console.debug("Provider initialisation failed: '"+e+"'"),t.disabled=!0,this._registration.providers[e].disabled=!0),t.disabled||t.enabled){let t=this._pendingProviderEnables.indexOf(e);t>=0&&this._pendingProviderEnables.splice(t,1)}})}}var tp=a(385),th=a.n(tp),td=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};!function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING"}(e||(e={}));let tg="SUBSCRIBED:",ty="UNAUTHORIZED:",tv="TRIGGERED:",tb="EVENT:";class tm{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=t_.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=e.DISCONNECTED,this._connectingDeferred=null,this._statusCallbacks=[],this._pendingSubscription=null,this._queuedSubscriptions=[],this._subscriptionMap=new Map,this._assetEventCallbackMap=new Map,this._attributeEventCallbackMap=new Map,this._unloading=!1}get status(){return this._status}subscribeStatusChange(e){this._statusCallbacks.push(e)}unsubscribeStatusChange(e){eT(this._statusCallbacks,e)}connect(){return(this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===e.CONNECTED)?Promise.resolve(!0):(this._disconnectRequested=!1,this._connectingDeferred||(this._onStatusChanged(e.CONNECTING),this._connectingDeferred=new e_,this._doConnect().then(t=>{if(this._connectingDeferred){let r=this._connectingDeferred;this._connectingDeferred=null,t?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=t_.MIN_RECONNECT_DELAY,this._onStatusChanged(e.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):(console.debug("Failed to connect to event service: "+this.endpointUrl),this._scheduleReconnect()),r.resolve(t)}})),this._connectingDeferred.promise)}disconnect(){console.debug("Disconnecting from event service: "+this.endpointUrl),this._disconnectRequested||(this._disconnectRequested=!0,this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this.status!==e.DISCONNECTED&&this._doDisconnect())}subscribe(t,r){let n={eventSubscription:t,callback:r,deferred:new e_};return null!=this._pendingSubscription||this._status!==e.CONNECTED?(this._queuedSubscriptions.push(n),n.deferred.promise):(this._pendingSubscription=n,this._doSubscribe(t).then(e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._subscriptionMap.set(e,t),this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.resolve(e)}},e=>{if(this._pendingSubscription){let t=this._pendingSubscription;this._pendingSubscription=null,this._processNextSubscription();let r=t.deferred;t.deferred=null,r&&r.reject(e)}}),this._pendingSubscription.deferred.promise)}unsubscribe(e){return td(this,void 0,void 0,function*(){if(this._subscriptionMap.delete(e))return void this._doUnsubscribe(e);if(this._assetEventCallbackMap.delete(e)){if(this._assetEventPromise&&0===this._assetEventCallbackMap.size){let e=yield this._assetEventPromise;this._assetEventPromise=void 0,this.unsubscribe(e)}return}if(this._attributeEventCallbackMap.delete(e)){if(this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}return}})}sendEvent(t){this._status===e.CONNECTED&&this._doSend(t)}sendEventWithReply(t){return this._status!==e.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(t)}subscribeAssetEvents(e,t,r){return td(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,o="AssetEvent"+tm._subscriptionCounter++;if(!this._assetEventPromise){let e;rn.authenticated||(e={filterType:"asset",realm:rn.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(o,e=>{let t=e.asset.id;n?n.find(e=>t===e)&&r(e):e.asset.realm===rn.displayRealm&&r(e)}),this._assetEventPromise.then(()=>{try{if(n&&t){let e={messageID:"read-assets:"+n.join(",")+":"+o,eventType:"read-assets",assetQuery:{ids:n}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(o)&&e.assets.forEach(e=>{r({eventType:"asset",asset:e,cause:"READ"})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),o&&this.unsubscribe(o),t}return o})})}subscribeAttributeEvents(e,t,r){return td(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0],o=n?e.map(e=>e.id):e,i=n?e:void 0,a="AttributeEvent"+tm._subscriptionCounter++;if(!this._attributeEventPromise){let e;rn.authenticated||(e={filterType:"asset",realm:rn.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let s=t=>{let i=t.ref;n?e.forEach(e=>{i.id===e.id&&i.name===e.name&&r(t)}):o?o.find(e=>i.id===e)&&r(t):t.realm===rn.displayRealm&&r(t)};return this._attributeEventCallbackMap.set(a,s),this._attributeEventPromise.then(()=>{try{if(t&&o){let e={messageID:"read-assets:"+o.join(",")+":"+a,eventType:"read-assets",assetQuery:{ids:o}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(a)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,r])=>{(!i||i.find(r=>r.id===e.id&&r.name===t))&&s({eventType:"attribute",timestamp:r.timestamp,value:r.value,ref:{id:e.id,name:t}})})})})}}catch(t){throw console.error("Failed to subscribe to asset events for assets: "+e),a&&this.unsubscribe(a),t}return a})})}_processNextSubscription(){this._status===e.CONNECTED&&0!==this._queuedSubscriptions.length&&setTimeout(()=>{let e=this._queuedSubscriptions.shift();e&&this.subscribe(e.eventSubscription,e.callback).then(t=>{let r=e.deferred;e.deferred=null,r&&r.resolve(t)},t=>{let r=e.deferred;e.deferred=null,r&&r.reject(t)})},0)}_onStatusChanged(e){e!==this._status&&(console.debug("Event provider status changed: "+e),this._status=e,this._unloading||window.setTimeout(()=>{this._statusCallbacks.forEach(t=>t(e))},0))}_onMessageReceived(e,t){let r=this._subscriptionMap.get(e);r&&r.callback(t)}_onConnect(){if(Object.keys(this._subscriptionMap).length>0){for(let e in this._subscriptionMap)this._subscriptionMap.has(e)&&this._queuedSubscriptions.unshift(this._subscriptionMap.get(e));this._subscriptionMap.clear()}this._processNextSubscription()}_onDisconnect(){this._status===e.CONNECTED&&this._onStatusChanged(e.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(e.CONNECTING),this._scheduleReconnect()}_scheduleReconnect(){this._reconnectTimer||!this._disconnectRequested&&(console.debug("Event provider scheduling reconnect in "+this._reconnectDelayMillis+"ms"),this._reconnectTimer=window.setTimeout(()=>{this._disconnectRequested||this.connect()},this._reconnectDelayMillis),this._reconnectDelayMillis<t_.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(t_.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tm.MIN_RECONNECT_DELAY=0,tm.MAX_RECONNECT_DELAY=3e4,tm._subscriptionCounter=0;class t_ extends tm{get endpointUrl(){return this._endpointUrl}constructor(e){super(),this._webSocket=void 0,this._connectDeferred=null,this._subscribeDeferred=null,this._repliesDeferred=new Map,this._endpointUrl=(e.startsWith("https:")?"wss":"ws")+"://"+e.substr(e.indexOf("://")+3)+"/websocket/events",window.addEventListener("beforeunload",()=>{this._unloading=!0,this.disconnect()})}_doConnect(){let e=this._endpointUrl+"?Realm="+rn.config.realm;return rn.authenticated&&(e+="&Authorization="+rn.getAuthorizationHeader()),this._webSocket=new WebSocket(e),this._connectDeferred=new e_,this._webSocket.onopen=()=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else console.debug("Event provider error"),this._beforeDisconnect()},this._webSocket.onclose=()=>{if(this._webSocket=void 0,this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onmessage=e=>{let t=e.data;if(t&&t.startsWith(tg)){let e=JSON.parse(t.substring(tg.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(e.subscriptionId)}else if(t.startsWith(ty)){let e=JSON.parse(t.substring(ty.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&(console.warn("Unauthorized event subscription: "+JSON.stringify(e,null,2)),r.reject("Unauthorized"))}else if(t.startsWith(tv)){let e=JSON.parse(t.substring(tv.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tb)){let e=JSON.parse(t.substring(tb.length));if(e.messageID){let t=this._repliesDeferred.get(e.messageID);this._repliesDeferred.delete(e.messageID),t&&t.resolve(e)}}},this._connectDeferred.promise}_beforeDisconnect(){this._onDisconnect()}_doDisconnect(){var e;null==(e=this._webSocket)||e.close(),this._subscribeDeferred=null,this._repliesDeferred.clear()}_doSubscribe(e){return this._webSocket?this._subscribeDeferred?Promise.reject("There's already a pending subscription"):(this._subscribeDeferred=new e_,e.subscriptionId||(e.subscriptionId=t_._subscriptionCounter+++""),this._webSocket.send("SUBSCRIBE:"+JSON.stringify(e)),this._subscribeDeferred.promise):Promise.reject("Not connected")}_doUnsubscribe(e){this._webSocket&&this._webSocket.send("UNSUBSCRIBE:"+JSON.stringify({subscriptionId:e}))}_doSend(e){let t=tb+JSON.stringify(e);this._webSocket.send(t)}_doSendWithReply(e){if(e.messageID||(e.messageID=(new Date().getTime()+10*Math.random()).toString(10)),this._repliesDeferred.has(e.messageID))return Promise.reject("There's already a pending send and reply with this ID");let t=new e_;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tb+JSON.stringify(e)),t.promise}}function tw(e){return(tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t_._subscriptionCounter=1;var tS=[],tk=tS.forEach,tO=tS.slice;function tE(e){return tk.call(tO.call(arguments,1),function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])}),e}function tx(){return"function"==typeof XMLHttpRequest||("undefined"==typeof XMLHttpRequest?"undefined":tw(XMLHttpRequest))==="object"}var tA=a(850),tR=a.t(tA,2);function tP(e){return(tP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof fetch&&(t="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),tx()&&("undefined"!=typeof global&&global.XMLHttpRequest?r=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(r=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?n=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(n=window.ActiveXObject)),t||!tR||r||n||(t=tA||tR),"function"!=typeof t&&(t=void 0);var tC=function(e,t){if(t&&"object"===tP(t)){var r="";for(var n in t)r+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},tI=function(e,r,n){t(e,r).then(function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(function(t){n(null,{status:e.status,data:t})}).catch(n)}).catch(n)},tj=!1,tT=function(e,t,r,n){e.queryStringParams&&(t=tC(t,e.queryStringParams));var o=tE({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);r&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(r):e.requestOptions,a=tE({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:o},tj?{}:i);try{tI(t,a,n)}catch(e){if(!i||0===Object.keys(i).length||!e.message||0>e.message.indexOf("not implemented"))return n(e);try{Object.keys(i).forEach(function(e){delete a[e]}),tI(t,a,n),tj=!0}catch(e){n(e)}}},tN=function(e,t,o,i){o&&"object"===tP(o)&&(o=tC("",o).slice(1)),e.queryStringParams&&(t=tC(t,e.queryStringParams));try{(a=r?new r:new n("MSXML2.XMLHTTP.3.0")).open(o?"POST":"GET",t,1),e.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!e.withCredentials,o&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var a,s=e.customHeaders;if(s="function"==typeof s?s():s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(o)}catch(e){console&&console.log(e)}};let tL=function(e,r,n,o){return("function"==typeof n&&(o=n,n=void 0),o=o||function(){},t)?tT(e,r,n,o):tx()||"function"==typeof ActiveXObject?tN(e,r,n,o):void o(Error("No fetch and no xhr implementation found!"))};var tU=function(){var e;function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return e=[{key:"init",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=tE(r,this.options||{},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,r){var n,o;return n={},o=r||"",t in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n},request:tL,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.allOptions=n,this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,r){this._readAny(e,e,t,t,r)}},{key:"read",value:function(e,t,r){this._readAny([e],e,[t],t,r)}},{key:"_readAny",value:function(e,t,r,n,o){var i,a,s=this,u=this.options.loadPath;"function"==typeof this.options.loadPath&&(u=this.options.loadPath(e,r)),(u=(a=i=u)&&"function"==typeof a.then?i:Promise.resolve(i)).then(function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:r.join("+")});s.loadUrl(a,o,t,n)})}},{key:"loadUrl",value:function(e,t,r,n){var o=this;this.options.request(this.options,e,void 0,function(i,a){var s,u;if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+i.message,!0);if(i)return t(i,!1);try{s="string"==typeof a.data?o.options.parse(a.data,r,n):a.data}catch(t){u="failed parsing "+e+" to json"}if(u)return t(u,!1);t(null,s)})}},{key:"create",value:function(e,t,r,n,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,r,n),s=0,u=[],c=[];e.forEach(function(r){var n=i.options.addPath;"function"==typeof i.options.addPath&&(n=i.options.addPath(r,t));var l=i.services.interpolator.interpolate(n,{lng:r,ns:t});i.options.request(i.options,l,a,function(t,r){s+=1,u.push(t),c.push(r),s===e.length&&o&&o(u,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,r=t.backendConnector,n=t.languageUtils,o=t.logger,i=r.language;if(!i||"cimode"!==i.toLowerCase()){var a=[],s=function(e){n.toResolveHierarchy(e).forEach(function(e){0>a.indexOf(e)&&a.push(e)})};s(i),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(t){e.allOptions.ns.forEach(function(e){r.read(t,e,"read",null,null,function(n,i){n&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),r.loaded("".concat(t,"|").concat(e),n,i)})})})}}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();tU.type="backend";var tD=a(243),tM=a(921);class tF extends Error{}function tB(e,t){let r;if("string"!=typeof e)throw new tF("Invalid token specified: must be a string");t||(t={});let n=+(!0!==t.header),o=e.split(".")[n];if("string"!=typeof o)throw new tF(`Invalid token specified: missing part #${n+1}`);try{r=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Error("base64 string is not of the correct length")}try{var r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new tF(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new tF(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(tF.prototype.name="InvalidTokenError","undefined"==typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tW(e){if(!(this instanceof tW))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,r,n=this,o=[],i={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),s=0;s<a.length;s++)(-1!==a[s].src.indexOf("keycloak.js")||-1!==a[s].src.indexOf("keycloak.min.js"))&&-1!==a[s].src.indexOf("version=")&&(n.iframeVersion=a[s].src.substring(a[s].src.indexOf("version=")+8).split("&")[0]);var u=!0,c=A(console.info),l=A(console.warn);function f(e,t){for(var r=function(e){var t=null,r=window.crypto||window.msCrypto;if(r&&r.getRandomValues&&window.Uint8Array)return t=new Uint8Array(e),r.getRandomValues(t),t;t=Array(e);for(var n=0;n<t.length;n++)t[n]=Math.floor(256*Math.random());return t}(e),n=Array(e),o=0;o<e;o++)n[o]=t.charCodeAt(r[o]%t.length);return String.fromCharCode.apply(null,n)}function p(){return void 0===n.authServerUrl?void 0:"/"==n.authServerUrl.charAt(n.authServerUrl.length-1)?n.authServerUrl+"realms/"+encodeURIComponent(n.realm):n.authServerUrl+"/realms/"+encodeURIComponent(n.realm)}function h(e,t){var r=e.code,o=e.error,i=e.prompt,a=new Date().getTime();if(e.kc_action_status&&n.onActionUpdate&&n.onActionUpdate(e.kc_action_status),o){if("none"!=i)if(e.error_description&&"authentication_expired"===e.error_description)n.login(e.loginOptions);else{var s={error:o,error_description:e.error_description};n.onAuthError&&n.onAuthError(s),t&&t.setError(s)}else t&&t.setSuccess();return}if("standard"!=n.flow&&(e.access_token||e.id_token)&&h(e.access_token,null,e.id_token,!0),"implicit"!=n.flow&&r){var l="code="+r+"&grant_type=authorization_code",f=n.endpoints.token(),p=new XMLHttpRequest;p.open("POST",f,!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),l+="&client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(l+="&code_verifier="+e.pkceCodeVerifier),p.withCredentials=!0,p.onreadystatechange=function(){if(4==p.readyState)if(200==p.status){var e=JSON.parse(p.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===n.flow),w()}else n.onAuthError&&n.onAuthError(),t&&t.setError()},p.send(l)}function h(r,o,i,s){g(r,o,i,a=(a+new Date().getTime())/2),u&&n.idTokenParsed&&n.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),n.clearToken(),t&&t.setError()):s&&(n.onAuthSuccess&&n.onAuthSuccess(),t&&t.setSuccess())}}function d(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,r,o){if(n.tokenTimeoutHandle&&(clearTimeout(n.tokenTimeoutHandle),n.tokenTimeoutHandle=null),t?(n.refreshToken=t,n.refreshTokenParsed=tB(t)):(delete n.refreshToken,delete n.refreshTokenParsed),r?(n.idToken=r,n.idTokenParsed=tB(r)):(delete n.idToken,delete n.idTokenParsed),e){if(n.token=e,n.tokenParsed=tB(e),n.sessionId=n.tokenParsed.sid,n.authenticated=!0,n.subject=n.tokenParsed.sub,n.realmAccess=n.tokenParsed.realm_access,n.resourceAccess=n.tokenParsed.resource_access,o&&(n.timeSkew=Math.floor(o/1e3)-n.tokenParsed.iat),null!=n.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+n.timeSkew+" seconds"),n.onTokenExpired)){var i=(n.tokenParsed.exp-new Date().getTime()/1e3+n.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(i/1e3)+" s"),i<=0?n.onTokenExpired():n.tokenTimeoutHandle=setTimeout(n.onTokenExpired,i)}}else delete n.token,delete n.tokenParsed,delete n.subject,delete n.realmAccess,delete n.resourceAccess,n.authenticated=!1}function y(){var e="0123456789abcdef",t=f(36,e).split("");return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}function v(e){var t=function(e){switch(n.flow){case"standard":t=["code","state","session_state","kc_action_status","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"]}t.push("error"),t.push("error_description"),t.push("error_uri");var t,r,o,i=e.indexOf("?"),a=e.indexOf("#");if("query"===n.responseMode&&-1!==i?(r=e.substring(0,i),""!==(o=b(e.substring(i+1,-1!==a?a:e.length),t)).paramsString&&(r+="?"+o.paramsString),-1!==a&&(r+=e.substring(a))):"fragment"===n.responseMode&&-1!==a&&(r=e.substring(0,a),""!==(o=b(e.substring(a+1),t)).paramsString&&(r+="#"+o.paramsString)),o&&o.oauthParams){if("standard"===n.flow||"hybrid"===n.flow){if((o.oauthParams.code||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}else if("implicit"===n.flow&&(o.oauthParams.access_token||o.oauthParams.error)&&o.oauthParams.state)return o.oauthParams.newUrl=r,o.oauthParams}}(e);if(t){var o=r.get(t.state);return o&&(t.valid=!0,t.redirectUri=o.redirectUri,t.storedNonce=o.nonce,t.prompt=o.prompt,t.pkceCodeVerifier=o.pkceCodeVerifier,t.loginOptions=o.loginOptions),t}}function b(e,t){for(var r=e.split("&"),n={paramsString:"",oauthParams:{}},o=0;o<r.length;o++){var i=r[o].indexOf("="),a=r[o].slice(0,i);-1!==t.indexOf(a)?n.oauthParams[a]=r[o].slice(i+1):(""!==n.paramsString&&(n.paramsString+="&"),n.paramsString+=r[o])}return n}function m(){var e={setSuccess:function(t){e.resolve(t)},setError:function(t){e.reject(t)}};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}function _(){var e=m();if(!i.enable||i.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");i.iframe=t,t.onload=function(){var t=n.endpoints.authorize();"/"===t.charAt(0)?i.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):i.iframeOrigin=t.substring(0,t.indexOf("/",8)),e.setSuccess()};var r=n.endpoints.checkSessionIframe();return t.setAttribute("src",r),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t),window.addEventListener("message",function(e){if(e.origin===i.iframeOrigin&&i.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&n.clearToken();for(var t=i.callbackList.splice(0,i.callbackList.length),r=t.length-1;r>=0;--r){var o=t[r];"error"==e.data?o.setError():o.setSuccess("unchanged"==e.data)}}},!1),e.promise}function w(){i.enable&&n.token&&setTimeout(function(){S().then(function(e){e&&w()})},1e3*i.interval)}function S(){var e=m();if(i.iframe&&i.iframeOrigin){var t=n.clientId+" "+(n.sessionId?n.sessionId:"");i.callbackList.push(e);var r=i.iframeOrigin;1==i.callbackList.length&&i.iframe.contentWindow.postMessage(t,r)}else e.setSuccess();return e.promise}function k(){var e,t,r,o=m();if(i.enable||n.silentCheckSsoRedirectUri){var a=document.createElement("iframe");a.setAttribute("src",n.endpoints.thirdPartyCookiesIframe()),a.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-3p-check-iframe"),a.style.display="none",document.body.appendChild(a);var s=function(e){a.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(l("[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:\n\n - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).\n - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).\n\nFor more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers"),i.enable=!1,n.silentCheckSsoFallback&&(n.silentCheckSsoRedirectUri=!1)),document.body.removeChild(a),window.removeEventListener("message",s),o.setSuccess())};window.addEventListener("message",s,!1)}else o.setSuccess();return e=o.promise,t=n.messageReceiveTimeout,r=null,Promise.race([e,new Promise(function(e,n){r=setTimeout(function(){n({error:"Timeout when waiting for 3rd party check iframe message."})},t)})]).finally(function(){clearTimeout(r)})}function O(e){if(!e||"default"==e)return{login:function(e){return window.location.assign(n.createLoginUrl(e)),m().promise},logout:async function(e){if("GET"===(e?.logoutMethod??n.logoutMethod))return void window.location.replace(n.createLogoutUrl(e));let r=n.createLogoutUrl(e),o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:n.idToken,client_id:n.clientId,post_logout_redirect_uri:t.redirectUri(e,!1)})});if(o.redirected){window.location.href=o.url;return}if(o.ok)return void window.location.reload();throw Error("Logout failed, request returned an error code.")},register:function(e){return window.location.assign(n.createRegisterUrl(e)),m().promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return m().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:location.href}};if("cordova"==e){i.enable=!1;var r=function(e,t,r){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(e,t,r):window.open(e,t,r)},o=function(e){var t=e&&e.cordovaOptions?Object.keys(e.cordovaOptions).reduce(function(t,r){return t[r]=e.cordovaOptions[r],t},{}):{};return t.location="no",e&&"none"==e.prompt&&(t.hidden="yes"),Object.keys(t).reduce(function(e,r){return e.push(r+"="+t[r]),e},[]).join(",")},a=function(){return n.redirectUri||"http://localhost"};return{login:function(e){var t=m(),i=o(e),s=r(n.createLoginUrl(e),"_blank",i),u=!1,c=!1,l=function(){c=!0,s.close()};return s.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(h(v(e.url),t),l(),u=!0)}),s.addEventListener("loaderror",function(e){u||(0==e.url.indexOf(a())?(h(v(e.url),t),l(),u=!0):(t.setError(),l()))}),s.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,o=m(),i=r(n.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return i.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&i.close()}),i.addEventListener("loaderror",function(e){0==e.url.indexOf(a())||(t=!0),i.close()}),i.addEventListener("exit",function(e){t?o.setError():(n.clearToken(),o.setSuccess())}),o.promise},register:function(e){var t=m(),i=r(n.createRegisterUrl(),"_blank",o(e));return i.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&(i.close(),h(v(e.url),t))}),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e){var t=r(e,"_blank","location=no");t.addEventListener("loadstart",function(e){0==e.url.indexOf(a())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return a()}}}if("cordova-native"==e)return i.enable=!1,{login:function(e){var t=m(),r=n.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},logout:function(e){var t=m(),r=n.createLogoutUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),n.clearToken(),t.setSuccess()}),window.cordova.plugins.browsertab.openUrl(r),t.promise},register:function(e){var t=m(),r=n.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(v(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.cordova.plugins.browsertab.openUrl(e);else throw"Not supported by the OIDC server"},redirectUri:function(e){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:"http://localhost"}};throw"invalid adapter type: "+e}n.init=function(o){if(n.didInitialize)throw Error("A 'Keycloak' instance can only be initialized once.");if(n.didInitialize=!0,n.authenticated=!1,r=function(){try{return new E}catch(e){}return new x}(),t=o&&["default","cordova","cordova-native"].indexOf(o.adapter)>-1?O(o.adapter):o&&"object"==typeof o.adapter?o.adapter:window.Cordova||window.cordova?O("cordova"):O(),o){if(void 0!==o.useNonce&&(u=o.useNonce),void 0!==o.checkLoginIframe&&(i.enable=o.checkLoginIframe),o.checkLoginIframeInterval&&(i.interval=o.checkLoginIframeInterval),"login-required"===o.onLoad&&(n.loginRequired=!0),o.responseMode)if("query"===o.responseMode||"fragment"===o.responseMode)n.responseMode=o.responseMode;else throw"Invalid value for responseMode";if(o.flow){switch(o.flow){case"standard":n.responseType="code";break;case"implicit":n.responseType="id_token token";break;case"hybrid":n.responseType="code id_token token";break;default:throw"Invalid value for flow"}n.flow=o.flow}if(null!=o.timeSkew&&(n.timeSkew=o.timeSkew),o.redirectUri&&(n.redirectUri=o.redirectUri),o.silentCheckSsoRedirectUri&&(n.silentCheckSsoRedirectUri=o.silentCheckSsoRedirectUri),"boolean"==typeof o.silentCheckSsoFallback?n.silentCheckSsoFallback=o.silentCheckSsoFallback:n.silentCheckSsoFallback=!0,void 0!==o.pkceMethod){if("S256"!==o.pkceMethod&&!1!==o.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${o.pkceMethod}.`);n.pkceMethod=o.pkceMethod}else n.pkceMethod="S256";"boolean"==typeof o.enableLogging?n.enableLogging=o.enableLogging:n.enableLogging=!1,"POST"===o.logoutMethod?n.logoutMethod="POST":n.logoutMethod="GET","string"==typeof o.scope&&(n.scope=o.scope),"string"==typeof o.acrValues&&(n.acrValues=o.acrValues),"number"==typeof o.messageReceiveTimeout&&o.messageReceiveTimeout>0?n.messageReceiveTimeout=o.messageReceiveTimeout:n.messageReceiveTimeout=1e4}n.responseMode||(n.responseMode="fragment"),n.responseType||(n.responseType="code",n.flow="standard");var a=m(),s=m();s.promise.then(function(){n.onReady&&n.onReady(n.authenticated),a.setSuccess(n.authenticated)}).catch(function(e){a.setError(e)});var c=function(t){var r=m();function o(e){e?n.endpoints={authorize:function(){return e.authorization_endpoint},token:function(){return e.token_endpoint},logout:function(){if(!e.end_session_endpoint)throw"Not supported by the OIDC server";return e.end_session_endpoint},checkSessionIframe:function(){if(!e.check_session_iframe)throw"Not supported by the OIDC server";return e.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!e.userinfo_endpoint)throw"Not supported by the OIDC server";return e.userinfo_endpoint}}:n.endpoints={authorize:function(){return p()+"/protocol/openid-connect/auth"},token:function(){return p()+"/protocol/openid-connect/token"},logout:function(){return p()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=p()+"/protocol/openid-connect/login-status-iframe.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=p()+"/protocol/openid-connect/3p-cookies/step1.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},register:function(){return p()+"/protocol/openid-connect/registrations"},userinfo:function(){return p()+"/protocol/openid-connect/userinfo"}}}if(e?"string"==typeof e&&(s=e):s="keycloak.json",s){var i=new XMLHttpRequest;i.open("GET",s,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status||d(i)){var e=JSON.parse(i.responseText);n.authServerUrl=e["auth-server-url"],n.realm=e.realm,n.clientId=e.resource,o(null),r.setSuccess()}else r.setError()},i.send()}else{if(!e.clientId)throw"clientId missing";n.clientId=e.clientId;var a=e.oidcProvider;if(a)if("string"==typeof a){var s,u="/"==a.charAt(a.length-1)?a+".well-known/openid-configuration":a+"/.well-known/openid-configuration",i=new XMLHttpRequest;i.open("GET",u,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||d(i)?(o(JSON.parse(i.responseText)),r.setSuccess()):r.setError())},i.send()}else o(a),r.setSuccess();else{if(!e.url){for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++)if(c[l].src.match(/.*keycloak\.js/)){e.url=c[l].src.substr(0,c[l].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";n.authServerUrl=e.url,n.realm=e.realm,o(null),r.setSuccess()}}return r.promise}();function l(){var e=function(e){e||(r.prompt="none"),o&&o.locale&&(r.locale=o.locale),n.login(r).then(function(){s.setSuccess()}).catch(function(e){s.setError(e)})},t=function(){var e=document.createElement("iframe"),t=n.createLoginUrl({prompt:"none",redirectUri:n.silentCheckSsoRedirectUri});e.setAttribute("src",t),e.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),e.setAttribute("title","keycloak-silent-check-sso"),e.style.display="none",document.body.appendChild(e);var r=function(t){t.origin===window.location.origin&&e.contentWindow===t.source&&(h(v(t.data),s),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},r={};switch(o.onLoad){case"check-sso":i.enable?_().then(function(){S().then(function(r){r?s.setSuccess():n.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){s.setError(e)})}):n.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function f(){var e=v(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then(function(){h(e,s)}).catch(function(e){s.setError(e)});o?o.token&&o.refreshToken?(g(o.token,o.refreshToken,o.idToken),i.enable?_().then(function(){S().then(function(e){e?(n.onAuthSuccess&&n.onAuthSuccess(),s.setSuccess(),w()):s.setSuccess()}).catch(function(e){s.setError(e)})}):n.updateToken(-1).then(function(){n.onAuthSuccess&&n.onAuthSuccess(),s.setSuccess()}).catch(function(e){n.onAuthError&&n.onAuthError(),o.onLoad?l():s.setError(e)})):o.onLoad?l():s.setSuccess():s.setSuccess()}return c.then(function(){var e,t;(e=m(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(k).then(f).catch(function(e){a.setError(e)})}),c.catch(function(e){a.setError(e)}),a.promise},n.login=function(e){return t.login(e)},n.createLoginUrl=function(e){var o,i=y(),a=y(),s=t.redirectUri(e),c={state:i,nonce:a,redirectUri:encodeURIComponent(s),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),o=e&&"register"==e.action?n.endpoints.register():n.endpoints.authorize();var l=e&&e.scope||n.scope;l?-1===l.indexOf("openid")&&(l="openid "+l):l="openid";var p=o+"?client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+encodeURIComponent(s)+"&state="+encodeURIComponent(i)+"&response_mode="+encodeURIComponent(n.responseMode)+"&response_type="+encodeURIComponent(n.responseType)+"&scope="+encodeURIComponent(l);if(u&&(p=p+"&nonce="+encodeURIComponent(a)),e&&e.prompt&&(p+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(p+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(p+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(p+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(p+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(p+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(p+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||n.acrValues)&&(p+="&acr_values="+encodeURIComponent(e.acrValues||n.acrValues)),n.pkceMethod){var h=f(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=h,p+="&code_challenge="+function(e,t){if("S256"!==e)throw TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${e}'.`);return btoa(String.fromCodePoint(...new Uint8Array(tM.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(n.pkceMethod,h)+"&code_challenge_method="+n.pkceMethod}return r.add(c),p},n.logout=function(e){return t.logout(e)},n.createLogoutUrl=function(e){if("POST"===(e?.logoutMethod??n.logoutMethod))return n.endpoints.logout();var r=n.endpoints.logout()+"?client_id="+encodeURIComponent(n.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(t.redirectUri(e,!1));return n.idToken&&(r+="&id_token_hint="+encodeURIComponent(n.idToken)),r},n.register=function(e){return t.register(e)},n.createRegisterUrl=function(e){return e||(e={}),e.action="register",n.createLoginUrl(e)},n.createAccountUrl=function(e){var r=p(),o=void 0;return void 0!==r&&(o=r+"/account?referrer="+encodeURIComponent(n.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),o},n.accountManagement=function(){return t.accountManagement()},n.hasRealmRole=function(e){var t=n.realmAccess;return!!t&&t.roles.indexOf(e)>=0},n.hasResourceRole=function(e,t){if(!n.resourceAccess)return!1;var r=n.resourceAccess[t||n.clientId];return!!r&&r.roles.indexOf(e)>=0},n.loadUserProfile=function(){var e=p()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.profile=JSON.parse(t.responseText),r.setSuccess(n.profile)):r.setError())},t.send(),r.promise},n.loadUserInfo=function(){var e=n.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=m();return t.onreadystatechange=function(){4==t.readyState&&(200==t.status?(n.userInfo=JSON.parse(t.responseText),r.setSuccess(n.userInfo)):r.setError())},t.send(),r.promise},n.isTokenExpired=function(e){if(!n.tokenParsed||!n.refreshToken&&"implicit"!=n.flow)throw"Not authenticated";if(null==n.timeSkew)return c("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=n.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+n.timeSkew;if(e){if(isNaN(e))throw"Invalid minValidity";t-=e}return t<0},n.updateToken=function(e){var t=m();if(!n.refreshToken)return t.setError(),t.promise;e=e||5;var r=function(){var r=!1;if(-1==e?(r=!0,c("[KEYCLOAK] Refreshing token: forced refresh")):(!n.tokenParsed||n.isTokenExpired(e))&&(r=!0,c("[KEYCLOAK] Refreshing token: token expired")),r){var i="grant_type=refresh_token&refresh_token="+n.refreshToken,a=n.endpoints.token();if(o.push(t),1==o.length){var s=new XMLHttpRequest;s.open("POST",a,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.withCredentials=!0,i+="&client_id="+encodeURIComponent(n.clientId);var u=new Date().getTime();s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status){c("[KEYCLOAK] Token refreshed"),u=(u+new Date().getTime())/2;var e=JSON.parse(s.responseText);g(e.access_token,e.refresh_token,e.id_token,u),n.onAuthRefreshSuccess&&n.onAuthRefreshSuccess();for(var t=o.pop();null!=t;t=o.pop())t.setSuccess(!0)}else{l("[KEYCLOAK] Failed to refresh token"),400==s.status&&n.clearToken(),n.onAuthRefreshError&&n.onAuthRefreshError();for(var t=o.pop();null!=t;t=o.pop())t.setError(!0)}},s.send(i)}}else t.setSuccess(!1)};return i.enable?S().then(function(){r()}).catch(function(e){t.setError(e)}):r(),t.promise},n.clearToken=function(){n.token&&(g(null,null,null),n.onAuthLogout&&n.onAuthLogout(),n.loginRequired&&n.login())};var E=function(){if(!(this instanceof E))return new E;function e(){for(var e=new Date().getTime(),t=0;t<localStorage.length;t++){var r=localStorage.key(t);if(r&&0==r.indexOf("kc-callback-")){var n=localStorage.getItem(r);if(n)try{var o=JSON.parse(n).expires;(!o||o<e)&&localStorage.removeItem(r)}catch(e){localStorage.removeItem(r)}}}}localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test"),this.get=function(t){if(t){var r="kc-callback-"+t,n=localStorage.getItem(r);return n&&(localStorage.removeItem(r),n=JSON.parse(n)),e(),n}},this.add=function(t){e();var r="kc-callback-"+t.state;t.expires=new Date().getTime()+36e5,localStorage.setItem(r,JSON.stringify(t))}},x=function(){if(!(this instanceof x))return new x;this.get=function(n){if(n){var o=t("kc-callback-"+n);if(r("kc-callback-"+n,"",e(-100)),o)return JSON.parse(o)}},this.add=function(t){r("kc-callback-"+t.state,JSON.stringify(t),e(60))},this.removeItem=function(t){r(t,"",e(-100))};var e=function(e){var t=new Date;return t.setTime(t.getTime()+60*e*1e3),t},t=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var o=r[n];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},r=function(e,t,r){var n=e+"="+t+"; expires="+r.toUTCString()+"; ";document.cookie=n}};function A(e){return function(){n.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var tV=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};let tH=t=>r=>class extends r{constructor(){super(...arguments),this._connectRequested=!1,this._status=e.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){if(!t.getEventProvider())return void console.log("No event provider available so cannot subscribe");this._connectRequested||(this._connectRequested=!0,t.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect())}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,t.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return tV(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&t.getEventProvider().status===e.CONNECTED}_onEventProviderStatusChanged(t){switch(t){case e.DISCONNECTED:this._onEventsDisconnect();break;case e.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return tV(this,void 0,void 0,function*(){let e=!!this._attributeRefs,r=!!this._assetIds,n=this._attributeRefs?this._attributeRefs:this._assetIds;if(n&&n.length>0){if(this._subscriptionIds=[],r){let e=yield t.getEventProvider().subscribeAssetEvents(n,!0,e=>this._onEvent(e)),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eI(n,r))return void t.getEventProvider().unsubscribe(e);this._subscriptionIds.push(e)}let o=yield t.getEventProvider().subscribeAttributeEvents(n,e,e=>this._onEvent(e)),i=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eI(n,i))return void t.getEventProvider().unsubscribe(o);this._subscriptionIds.push(o)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(e=>{t.getEventProvider().unsubscribe(e)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eI(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eI(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(e){t.getEventProvider().sendEvent(e)}_sendEventWithReply(e){return t.getEventProvider().sendEventWithReply(e)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tq="#4d9d2a",tz="#FFFFFF",tK="#FFFFFF",tG="#F9F9F9",t$="#CCCCCC",tJ="#be0000",tY="#FFFFFF",tX="#4c4c4c",tQ="#000000",tZ="#000000",t0="#FFFFFF",t1="0 5px 5px -5px rgba(0,0,0,0.3)",t2="0 1px 3px 0 rgba(0,0,0,0.21)",t3="50px",t5="0.3";var t8=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})};let t6="mdi",t4="openremote",t9="restricted_user";!function(e){e.MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",e.AUTH_FAILED="AUTH_FAILED",e.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",e.CONSOLE_ERROR="CONSOLE_INIT_ERROR",e.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",e.TRANSLATION_ERROR="TRANSLATION_ERROR"}(o||(o={})),function(e){e.ERROR="ERROR",e.READY="READY",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE",e.CONNECTING="CONNECTING",e.CONSOLE_INIT="CONSOLE_INIT",e.CONSOLE_READY="CONSOLE_READY",e.TRANSLATE_INIT="TRANSLATE_INIT",e.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",e.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED"}(i||(i={}));let t7={en:"english",cn:"chinese",nl:"dutch",fr:"french",de:"german",it:"italian",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"};function re(e){let t=e?Object.assign({},e):{};return t.managerUrl&&""!==t.managerUrl?t.managerUrl=t.managerUrl.replace(/\/+$/,""):t.managerUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname.replace(/\/[^/]+\/?$/,""),t.realm&&""!==t.realm||(t.realm="master"),t.auth||(t.auth="KEYCLOAK"),void 0===t.consoleAutoEnable&&(t.consoleAutoEnable=!0),void 0===t.applyConfigToAdmin&&(t.applyConfigToAdmin=!0),t.eventProviderType||(t.eventProviderType="WEBSOCKET"),(!t.pollingIntervalMillis||t.pollingIntervalMillis<5e3)&&(t.pollingIntervalMillis=1e4),void 0===t.loadIcons&&(t.loadIcons=!0),void 0===t.loadTranslations&&(t.loadTranslations=["or"]),void 0===t.translationsLoadPath&&(t.translationsLoadPath="locales/{{lng}}/{{ns}}.json"),void 0===t.loadDescriptors&&(t.loadDescriptors=!0),void 0===t.clientId&&(t.clientId=t4),t}class rt{constructor(){this._authenticated=!1,this._ready=!1,this._name="",this._username="",this._keycloakUpdateTokenInterval=void 0,this._managerVersion="",this._authServerUrl="",this._listeners=[],this._disconnected=!1}get username(){return this._username}get error(){return this._error}get authenticated(){return this._authenticated}get ready(){return this._ready}get config(){return this._config}get roles(){let e=new Map;return this._keycloak?this._keycloak.resourceAccess&&this._config.clientId&&this._keycloak.resourceAccess&&Object.entries(this._keycloak.resourceAccess).forEach(([t,r])=>{let n=r.roles;e.set(t,n)}):this._basicIdentity&&this._basicIdentity.roles&&e.set(this._config.clientId,this._basicIdentity.roles),e}get managerVersion(){return this._managerVersion}get isManagerAvailable(){return this._managerVersion&&""!==this._managerVersion}get managerUrl(){var e;return null==(e=this._config)?void 0:e.managerUrl}get keycloakUrl(){var e;return null==(e=this._config)?void 0:e.keycloakUrl}get isError(){return!!this._error}get connectionStatus(){return this._events&&this._events.status}get console(){return this._console}get consoleAppConfig(){return this._consoleAppConfig}get events(){return this._events}get rest(){return th()}get language(){return eh.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eh.changeLanguage(e),this.console.storeData("LANGUAGE",e),this.authenticated&&this.updateKeycloakUserLanguage(e).catch(e=>console.error(e)))}get displayRealm(){return this._displayRealm||this._config.realm}set displayRealm(e){this.isSuperUser()&&this._displayRealm!==e&&(this._displayRealm=e,this._emitEvent(i.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||t4}getEventProvider(){return this.events}get mapType(){return this._config.mapType||"VECTOR"}isManagerSameOrigin(){if(!this.ready)return!1;let e=new URL(this._config.managerUrl),t=window.location;return e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}addListener(e){0>this._listeners.indexOf(e)&&this._listeners.push(e)}removeListener(e){let t=this._listeners.indexOf(e);t>=0&&this._listeners.splice(t,1)}init(e){return t8(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=re(e);let t=yield this.loadManagerInfo(),r=new tf(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(i.CONSOLE_READY)});if(this._console=r,"BASIC"===this._config.auth)t=(yield this.doTranslateInit())&&t,t=yield this.doAuthInit();else if("KEYCLOAK"===this._config.auth){if(!this._config.keycloakUrl&&this._authServerUrl){let e,t=new URL(this._config.managerUrl);this._authServerUrl.startsWith("//")&&(this._authServerUrl=t.protocol+this._authServerUrl);try{e=new URL(this._authServerUrl)}catch(r){(e=new URL(t)).pathname=this._authServerUrl}e.protocol||(e.protocol=t.protocol),e.hostname||(e.hostname=t.hostname),e.port||(e.port=t.port),this._config.keycloakUrl=e.toString()}this._config.keycloakUrl||(this._config.keycloakUrl=this._config.managerUrl+"/auth"),this._config.keycloakUrl=this._config.keycloakUrl.replace(/\/+$/,""),(t=yield this.doAuthInit())||this._config.skipFallbackToBasicAuth||(console.debug("Falling back to basic auth"),this._config.auth="BASIC",t=yield this.doAuthInit())}return!!t&&(t&&(t=this.doRestApiInit()),(yield this.doConsoleInit())&&this._clearWebHistory(),(t=(yield this.doTranslateInit())&&t)&&(t=yield this.doDescriptorsInit(),t=yield this.getConsoleAppConfig()),this.doIconInit(),t?(t=yield this.doEventsSubscriptionInit(),this._readyCallback&&(yield this._readyCallback()),this._ready=!0,this._emitEvent(i.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return t8(this,void 0,void 0,function*(){try{let e=yield new Promise((e,t)=>{let r=new XMLHttpRequest;r.addEventListener("load",()=>{e(JSON.parse(r.responseText))}),r.addEventListener("error",()=>{t(Error("Failed to contact the manager"))}),r.open("GET",this._config.managerUrl+"/api/master/info"),r.send()});return this._managerVersion=e&&e.version?e.version:"",this._authServerUrl=e&&e.authServerUrl?e.authServerUrl:"",!0}catch(e){return console.error("Failed to contact the manager",e),this._setError(o.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return t8(this,void 0,void 0,function*(){if(eh.isInitialized)return!0;eh.on("initialized",e=>{this._emitEvent(i.TRANSLATE_INIT)}),eh.on("languageChanged",e=>{eb().locale(e),this._emitEvent(i.TRANSLATE_LANGUAGE_CHANGED)});let e={lng:(yield this.getConsolePreferredLanguage())||(yield this.getUserPreferredLanguage())||this.config.defaultLanguage||"en",fallbackLng:"en",defaultNS:"app",fallbackNS:"or",ns:this.config.loadTranslations,interpolation:{format:(e,t,r)=>"uppercase"===t?e.toUpperCase():e instanceof Date?eb()(e).format(t):e},backend:{loadPath:(e,t)=>1===t.length&&"or"===t[0]?this.config.managerUrl+"/shared/locales/{{lng}}/{{ns}}.json":this.config.translationsLoadPath?this.config.translationsLoadPath:"locales/{{lng}}/{{ns}}.json"}};this.config.configureTranslationsOptions&&this.config.configureTranslationsOptions(e);try{yield eh.use(tU).init(e)}catch(e){return console.error(e),this._setError(o.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return t8(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield th().api.AssetModelResource.getAssetInfos(),t=yield th().api.AssetModelResource.getMetaItemDescriptors(),r=yield th().api.AssetModelResource.getValueDescriptors();ey.AssetModelUtil._assetTypeInfos=e.data,ey.AssetModelUtil._metaItemDescriptors=Object.values(t.data),ey.AssetModelUtil._valueDescriptors=Object.values(r.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return t8(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"BASIC":e=yield this.initialiseBasicAuth();break;case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(o.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(th().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return th().setTimeout(2e4),th().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return t8(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new t_(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(o.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var t;(null==(t=this.events)?void 0:t.status)===e.DISCONNECTED?this.events.connect().catch(e=>{console.error("Failed to connect EventProvider."),console.error(e)}):console.warn("Tried to connect EventProvider, but it wasn't disconnected!")}_onEventProviderStatusChanged(t){switch(t){case e.DISCONNECTED:this._onDisconnect();break;case e.CONNECTED:break;case e.CONNECTING:this._emitEvent(i.CONNECTING)}}doConsoleInit(){return t8(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(i.CONSOLE_INIT),!0}catch(e){return this._setError(o.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tD.IconSets.addIconSet("mdi",(0,tD.createMdiIconSet)(rr.managerUrl)),tD.IconSets.addIconSet("or",(0,tD.createSvgIconSet)(tD.OrIconSet.size,tD.OrIconSet.icons)))}getConsoleAppConfig(){return t8(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=rr.managerUrl)?e:"")+"/consoleappconfig/"+rr.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return t8(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return t8(this,arguments,void 0,function*(e=this._keycloak){if(e&&e.authenticated){let t=(null==e?void 0:e.profile)||(yield null==e?void 0:e.loadUserProfile());if(null==t?void 0:t.attributes){let e=new Map(Object.entries(t.attributes));if(e.has("locale")){let t=e.get("locale");if("string"==typeof t[0])return t[0]}console.warn("Could not get user language from keycloak: no user attributes were found.")}else console.warn("Could not get user language from keycloak: no valid keycloak user profile was found.")}})}updateKeycloakUserLanguage(e){return t8(this,arguments,void 0,function*(e,t=this.rest){return this.authenticated?t?void(yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}})):void console.warn("Tried updating user language, but the REST API is not initialized yet."):void console.warn("Tried updating user language, but the user is not authenticated.")})}logout(e){this._authenticated&&(this._authenticated=!0,this._keycloak?(this.isMobile()&&this.console.storeData("REFRESH_TOKEN",null),this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._keycloak.logout(e&&""!==e?{redirectUri:e}:void 0)):this._basicIdentity&&(this._basicIdentity=void 0,e?window.location.href=e:window.location.reload()))}login(e){switch(this._config.auth){case"BASIC":e&&e.credentials&&(this._config.credentials=Object.assign({},e.credentials)),this.doBasicLogin();break;case"KEYCLOAK":if(this._keycloak){let t={};e&&e.redirectUrl&&""!==e.redirectUrl&&(t.redirectUri=e.redirectUrl),(null==e?void 0:e.action)&&""!==e.action&&(t.action=e.action),this.isMobile()&&(t.scope="offline_access"),this._keycloak.login(t)}}}initialiseBasicAuth(){return t8(this,void 0,void 0,function*(){return this.config.basicLoginProvider?(this.config.autoLogin&&(this._readyCallback=()=>this.doBasicLogin()),!0):(console.debug("No basicLoginProvider defined on config so cannot display login UI"),!1)})}doBasicLogin(){return t8(this,void 0,void 0,function*(){var e,t,r,n;if(!this.config.basicLoginProvider)return;let o={username:(null==(e=this.config.credentials)?void 0:e.username)?null==(t=this.config.credentials)?void 0:t.username:"",password:(null==(r=this.config.credentials)?void 0:r.password)?null==(n=this.config.credentials)?void 0:n.password:"",cancel:!1},i=!1;for(this._basicIdentity={roles:void 0,token:void 0,user:void 0};!i;){if((o=yield this.config.basicLoginProvider(o.username,o.password)).cancel){console.debug("Basic authentication cancelled by user");break}if(!o.username||!o.password)continue;this._basicIdentity.token=btoa(o.username+":"+o.password);let e=!1;try{let t=yield th().api.UserResource.getCurrent();200===t.status&&(e=!0,this._basicIdentity.user=t.data),e||401!==t.status&&403!==t.status||console.debug("Basic authentication invalid credentials, trying again")}catch(e){console.error("Basic auth failed: ",e)}if(e){console.debug("Basic authentication successful"),i=!0;let e=yield th().api.UserResource.getCurrentUserClientRoles(this.clientId);this._basicIdentity.roles=e.data}else{console.debug("Unknown response so aborting"),this._basicIdentity=void 0;break}}i&&this._onAuthenticated()})}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(t9)}getApiBaseUrl(){let e=this._config.managerUrl;return e+("/api/"+this._config.realm+"/")}getAppName(){let e=location.pathname.split("/");return e.length>=1?e[1]:""}hasRealmRole(e){return this.isKeycloak()&&this._keycloak.hasRealmRole(e)}hasRole(e,t=this._config.clientId){let r=this.roles;return r&&r.has(t)&&r.get(t).indexOf(e)>=0}getAuthorizationHeader(){return this.getKeycloakToken()?"Bearer "+this.getKeycloakToken():this.getBasicToken()?"Basic "+this.getBasicToken():void 0}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}getBasicToken(){return this._basicIdentity?this._basicIdentity.token:void 0}getRealm(){if(this._config)return this._config.realm}isMobile(){return this.console&&this.console.isMobile}isKeycloak(){return!!this._keycloak}_onAuthenticated(){this._authenticated=!0}loadAndInitialiseKeycloak(){return t8(this,void 0,void 0,function*(){var e,t,r,n;try{this._keycloak=new tW({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),i=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!i&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,i=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(i)this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,this._createTokenUpdateInterval(),this.isMobile()&&(null==(n=null==(r=this._keycloak)?void 0:r.refreshTokenParsed)?void 0:n.typ)==="Offline"&&(console.debug("Storing offline refresh token"),this.console.storeData("REFRESH_TOKEN",this._keycloak.refreshToken)),this._onAuthenticated();else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(o.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>t8(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4))}_updateKeycloakAccessToken(){return t8(this,void 0,void 0,function*(){let e=yield this._keycloak.updateToken(20);return console.debug("Access token update success, refreshed from server: "+e),e&&this._onAuthenticated(),e})}_getNativeOfflineRefreshToken(){return t8(this,void 0,void 0,function*(){if(this.isMobile())return yield this.console.retrieveData("REFRESH_TOKEN")})}_emitEvent(e){window.setTimeout(()=>{for(let t of this._listeners)t(e)},0)}_setError(e){this._error=e,this._emitEvent(i.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return t8(this,void 0,void 0,function*(){this._disconnected||(console.debug("Disconnected"),this._disconnected=!0,this._keycloakUpdateTokenInterval&&(window.clearTimeout(this._keycloakUpdateTokenInterval),this._keycloakUpdateTokenInterval=void 0),this._emitEvent(i.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected"),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(i.ONLINE)}reconnect(){return t8(this,arguments,void 0,function*(t=3e3){if(!this._disconnected)return;this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let r=()=>t8(this,void 0,void 0,function*(){var t;if(console.debug("Attempting reconnect"),!(yield this.isKeycloakReachable()))return console.debug("Keycloak is unreachable"),!1;console.debug("Keycloak is reachable"),console.debug("Checking keycloak access token");try{yield this._updateKeycloakAccessToken()}catch(t){let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e;try{yield this._updateKeycloakAccessToken()}catch(e){console.debug("Cannot update access token so sending to login"),this.login();return}return console.debug("Keycloak access token is valid"),!0}let r=this.events&&this.events.status===e.CONNECTING;return console.debug("If event provider offline then attempting reconnect: offline="+r),!r||(yield null==(t=this.events)?void 0:t.connect())}),n=yield r();if(void 0!==n){if(!n){console.debug("Scheduling another reconnect attempt in (ms): "+(t=Math.min(rt.MAX_RECONNECT_DELAY,t+3e3))),this._reconnectTimer=window.setTimeout(()=>this.reconnect(t),t);return}this._onReconnected()}})}isKeycloakReachable(){return t8(this,arguments,void 0,function*(e=2e3){let t=new AbortController,r=setTimeout(()=>t.abort(),e);try{let e=this._keycloak.endpoints.token(),r=yield fetch(e,{method:"OPTIONS",signal:t.signal});return 200===r.status}catch(e){return!1}finally{clearTimeout(r)}})}}rt.MAX_RECONNECT_DELAY=45e3;let rr=new rt,rn=rr})(),s})());
2
2
  //# sourceMappingURL=index.js.map