@openremote/core 1.30.0-snapshot.20260902114525 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var ORCore;(()=>{var e={3260(e){"use strict";let t=(async function(){}).constructor;e.exports=()=>t},7052(e){"use strict";let t=(async function*(){}).constructor;e.exports=()=>t},9630(e,t,r){"use strict";var n=r(469),i=r(24),o=r(1530);e.exports=r(7009)||n.call(o,i)},24(e){"use strict";e.exports=Function.prototype.apply},1530(e){"use strict";e.exports=Function.prototype.call},7196(e,t,r){"use strict";var n=r(469),i=r(6757),o=r(1530),s=r(9630);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return s(n,o,e)}},7009(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},8682(e,t,r){"use strict";var n=r(4295),i=r(7196),o=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i([r]):r}},714(e,t,r){"use strict";var n,i=r(7196),o=r(1233);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&o&&o(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof l&&function(e){return l(null==e?e:a(e))}},9997(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},155(e){"use strict";e.exports=EvalError},593(e){"use strict";e.exports=Error},7180(e){"use strict";e.exports=RangeError},9304(e){"use strict";e.exports=ReferenceError},1742(e){"use strict";e.exports=SyntaxError},6757(e){"use strict";e.exports=TypeError},4923(e){"use strict";e.exports=URIError},802(e){"use strict";e.exports=Object},9691(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 i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},i=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},o=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 s,a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw TypeError("Function.prototype.bind called on incompatible "+a);for(var l=i(arguments,1),c=r(0,a.length-l.length),u=[],d=0;d<c;d++)u[d]="$"+d;if(s=Function("binder","return function ("+o(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof s){var t=a.apply(this,n(l,arguments));return Object(t)===t?t:this}return a.apply(e,n(l,arguments))}),a.prototype){var f=function(){};f.prototype=a.prototype,s.prototype=new f,f.prototype=null}return s}},469(e,t,r){"use strict";var n=r(9691);e.exports=Function.prototype.bind||n},5175(e){"use strict";let t=(function*(){}).constructor;e.exports=()=>t},4295(e,t,r){"use strict";var n,i=r(802),o=r(593),s=r(155),a=r(7180),l=r(9304),c=r(1742),u=r(6757),d=r(4923),f=r(7256),h=r(5414),p=r(7954),g=r(3452),y=r(1358),m=r(5720),v=r(3515),b=r(1233),_=r(9997),w=function(){throw new u},S=b?function(){try{return arguments.callee,w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,k=r(8573)(),O=r(7582),E=r(2170),x=r(9090),P=r(24),R=r(1530),A={},D="u">typeof Uint8Array&&O?O(Uint8Array):n,C={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":k&&O?O([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":A,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&O?O(O([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&k&&O?O(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&k&&O?O(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&O?O(""[Symbol.iterator]()):n,"%Symbol%":k?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":S,"%TypedArray%":D,"%TypeError%":u,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":P,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":E,"%Math.abs%":f,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":v,"%Reflect.getPrototypeOf%":x};if(O)try{null.error}catch(e){var T=O(O(e));C["%Error.prototype%"]=T}var M=r(3260),N=r(5175),I=r(7052),j=function e(t){var r;if("%AsyncFunction%"===t)r=M()||void 0;else if("%GeneratorFunction%"===t)r=N()||void 0;else if("%AsyncGeneratorFunction%"===t)r=I()||void 0;else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&O&&(r=O(i.prototype))}return C[t]=r,r},L={__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"]},U=r(469),F=r(9731),Y=U.call(R,Array.prototype.concat),W=U.call(P,Array.prototype.splice),V=U.call(R,String.prototype.replace),H=U.call(R,String.prototype.slice),B=U.call(R,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,z=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return V(e,G,function(e,t,r,i){n[n.length]=r?V(i,K,"$1"):t||e}),n},q=function(e,t){var r,n=e;if(F(L,n)&&(n="%"+(r=L[n])[0]+"%"),F(C,n)){var i=C[n];if(i===A&&(i=j(n)),void 0===i&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=z(e),n=r.length>0?r[0]:"",i=q("%"+n+"%",t),o=i.name,s=i.value,a=!1,l=i.alias;l&&(n=l[0],W(r,Y([0,1],l)));for(var d=1,f=!0;d<r.length;d+=1){var h=r[d],p=H(h,0,1),g=H(h,-1);if(('"'===p||"'"===p||"`"===p||'"'===g||"'"===g||"`"===g)&&p!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&f||(a=!0),n+="."+h,F(C,o="%"+n+"%"))s=C[o];else if(null!=s){if(!(h in s)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=r.length){var y=b(s,h);s=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[h]}else f=F(s,h),s=s[h];f&&!a&&(C[o]=s)}}return s}},2170(e,t,r){"use strict";e.exports=r(802).getPrototypeOf||null},9090(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},7582(e,t,r){"use strict";var n=r(9090),i=r(2170),o=r(714);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},1067(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},1233(e,t,r){"use strict";var n=r(1067);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8573(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,i=r(9535);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},9535(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(var n 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 i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[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}},9731(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=r(469).call(n,i)},4954(e,t,r){!function(){"use strict";var t="input is invalid type",n="object"==typeof window,i=n?window:{};i.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&"object"==typeof self,s=!i.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?i=r.g:o&&(i=self);var a=!i.JS_SHA256_NO_COMMON_JS&&e.exports,l="function"==typeof define&&define.amd,c=!i.JS_SHA256_NO_ARRAY_BUFFER&&"u">typeof ArrayBuffer,u="0123456789abcdef".split(""),d=[-0x80000000,8388608,32768,128],f=[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],p=["hex","array","digest","arrayBuffer"],g=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),c&&(i.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]()}},m=function(e){var t=y("hex",e);s&&(t=v(t,e)),t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<p.length;++r){var n=p[r];t[n]=y(n,e)}return t},v=function(e,n){var o,s=r(7791),a=r(5610).Buffer,l=n?"sha224":"sha256";return o=a.from&&!i.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(r){if("string"==typeof r)return s.createHash(l).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===a?s.createHash(l).update(o(r)).digest("hex"):e(r)}},b=function(e,t){return function(r,n){return new S(r,t,!0).update(n)[e]()}},_=function(e){var t=b("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<p.length;++r){var n=p[r];t[n]=b(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 i,o=typeof e;if("string"===o){var s,a=[],l=e.length,u=0;for(i=0;i<l;++i)(s=e.charCodeAt(i))<128?a[u++]=s:(s<2048?a[u++]=192|s>>>6:(s<55296||s>=57344?a[u++]=224|s>>>12:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++i)),a[u++]=240|s>>>18,a[u++]=128|s>>>12&63),a[u++]=128|s>>>6&63),a[u++]=128|63&s);e=a}else if("object"===o){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 d=[],f=[];for(i=0;i<64;++i){var h=e[i]||0;d[i]=92^h,f[i]=54^h}w.call(this,r,n),this.update(f),this.oKeyPad=d,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 i,o,s=0,a=e.length,l=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,this.block=l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),r)for(o=this.start;s<a&&o<64;++s)l[o>>>2]|=e[s]<<f[3&o++];else for(o=this.start;s<a&&o<64;++s)(i=e.charCodeAt(s))<128?l[o>>>2]|=i<<f[3&o++]:(i<2048?l[o>>>2]|=(192|i>>>6)<<f[3&o++]:(i<55296||i>=57344?l[o>>>2]|=(224|i>>>12)<<f[3&o++]:(i=65536+((1023&i)<<10|1023&e.charCodeAt(++s)),l[o>>>2]|=(240|i>>>18)<<f[3&o++],l[o>>>2]|=(128|i>>>12&63)<<f[3&o++]),l[o>>>2]|=(128|i>>>6&63)<<f[3&o++]),l[o>>>2]|=(128|63&i)<<f[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=l[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}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]|=d[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,i,o,s,a,l,c,u=this.h0,d=this.h1,f=this.h2,p=this.h3,g=this.h4,y=this.h5,m=this.h6,v=this.h7,b=this.blocks;for(e=16;e<64;++e)t=((i=b[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,r=((i=b[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,b[e]=b[e-16]+t+b[e-7]+r|0;for(c=d&f,e=0;e<64;e+=4)this.first?(this.is224?(s=300032,v=(i=b[0]-0x543c9a5b)-0x8f1a6c7|0,p=i+0x170e9b5|0):(s=0x2a01a605,v=(i=b[0]-0xc881298)-0x5ab00ac6|0,p=i+0x8909ae5|0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),n=(s=u&d)^u&f^c,i=v+r+(g&y^~g&m)+h[e]+b[e],o=t+n,v=p+i|0,p=i+o|0),t=(p>>>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=(a=p&u)^p&d^s,i=m+r+(v&g^~v&y)+h[e+1]+b[e+1],o=t+n,m=f+i|0,t=((f=i+o|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),n=(l=f&p)^f&u^a,i=y+r+(m&v^~m&g)+h[e+2]+b[e+2],o=t+n,y=d+i|0,t=((d=i+o|0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(c=d&f)^d&p^l,i=g+r+(y&m^~y&v)+h[e+3]+b[e+3],o=t+n,g=u+i|0,u=i+o|0,this.chromeBugWorkAround=!0;this.h0=this.h0+u|0,this.h1=this.h1+d|0,this.h2=this.h2+f|0,this.h3=this.h3+p|0,this.h4=this.h4+g|0,this.h5=this.h5+y|0,this.h6=this.h6+m|0,this.h7=this.h7+v|0},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,l=u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[15&e]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[15&t]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[15&r]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[15&n]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[15&i]+u[o>>>28&15]+u[o>>>24&15]+u[o>>>20&15]+u[o>>>16&15]+u[o>>>12&15]+u[o>>>8&15]+u[o>>>4&15]+u[15&o]+u[s>>>28&15]+u[s>>>24&15]+u[s>>>20&15]+u[s>>>16&15]+u[s>>>12&15]+u[s>>>8&15]+u[s>>>4&15]+u[15&s];return this.is224||(l+=u[a>>>28&15]+u[a>>>24&15]+u[a>>>20&15]+u[a>>>16&15]+u[a>>>12&15]+u[a>>>8&15]+u[a>>>4&15]+u[15&a]),l},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,i=this.h4,o=this.h5,s=this.h6,a=this.h7,l=[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,i>>>24&255,i>>>16&255,i>>>8&255,255&i,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||l.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),l},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=m();k.sha256=k,k.sha224=m(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),a?e.exports=k:(i.sha256=k.sha256,i.sha224=k.sha224,l&&define(function(){return k}))}()},3472(e,t,r){e=r.nmd(e);var n,i="__lodash_hash_undefined__",o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",v="[object Symbol]",b="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k=/^\w*$/,O=/^\./,E=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,P=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[o]=A[s]=A[_]=A[a]=A[w]=A[l]=A[c]=A[u]=A[d]=A[f]=A[h]=A[g]=A[y]=A[m]=A[b]=!1;var D="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,C="object"==typeof self&&self&&self.Object===Object&&self,T=D||C||Function("return this")(),M=t&&!t.nodeType&&t,N=M&&e&&!e.nodeType&&e,I=N&&N.exports===M&&D.process,j=function(){try{return I&&I.binding("util")}catch(e){}}(),L=j&&j.isTypedArray;function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function F(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Y(e,t){return function(r){return e(t(r))}}function W(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var V=Array.prototype,H=Function.prototype,B=Object.prototype,G=T["__core-js_shared__"],K=(n=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",z=H.toString,q=B.hasOwnProperty,$=B.toString,J=RegExp("^"+z.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),X=T.Symbol,Z=T.Uint8Array,Q=Y(Object.getPrototypeOf,Object),ee=Object.create,et=B.propertyIsEnumerable,er=V.splice,en=Y(Object.keys,Object),ei=eD(T,"DataView"),eo=eD(T,"Map"),es=eD(T,"Promise"),ea=eD(T,"Set"),el=eD(T,"WeakMap"),ec=eD(Object,"create"),eu=eL(ei),ed=eL(eo),ef=eL(es),eh=eL(ea),ep=eL(el),eg=X?X.prototype:void 0,ey=eg?eg.valueOf:void 0,em=eg?eg.toString:void 0;function ev(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eb(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function e_(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ew(e){var t=-1,r=e?e.length:0;for(this.__data__=new e_;++t<r;)this.add(e[t])}function eS(e){this.__data__=new eb(e)}function ek(e,t){for(var r=e.length;r--;)if(eF(e[r][0],t))return r;return -1}ev.prototype.clear=function(){this.__data__=ec?ec(null):{}},ev.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ev.prototype.get=function(e){var t=this.__data__;if(ec){var r=t[e];return r===i?void 0:r}return q.call(t,e)?t[e]:void 0},ev.prototype.has=function(e){var t=this.__data__;return ec?void 0!==t[e]:q.call(t,e)},ev.prototype.set=function(e,t){return this.__data__[e]=ec&&void 0===t?i:t,this},eb.prototype.clear=function(){this.__data__=[]},eb.prototype.delete=function(e){var t=this.__data__,r=ek(t,e);return!(r<0)&&(r==t.length-1?t.pop():er.call(t,r,1),!0)},eb.prototype.get=function(e){var t=this.__data__,r=ek(t,e);return r<0?void 0:t[r][1]},eb.prototype.has=function(e){return ek(this.__data__,e)>-1},eb.prototype.set=function(e,t){var r=this.__data__,n=ek(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},e_.prototype.clear=function(){this.__data__={hash:new ev,map:new(eo||eb),string:new ev}},e_.prototype.delete=function(e){return eA(this,e).delete(e)},e_.prototype.get=function(e){return eA(this,e).get(e)},e_.prototype.has=function(e){return eA(this,e).has(e)},e_.prototype.set=function(e,t){return eA(this,e).set(e,t),this},ew.prototype.add=ew.prototype.push=function(e){return this.__data__.set(e,i),this},ew.prototype.has=function(e){return this.__data__.has(e)},eS.prototype.clear=function(){this.__data__=new eb},eS.prototype.delete=function(e){return this.__data__.delete(e)},eS.prototype.get=function(e){return this.__data__.get(e)},eS.prototype.has=function(e){return this.__data__.has(e)},eS.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eb){var n=r.__data__;if(!eo||n.length<199)return n.push([e,t]),this;r=this.__data__=new e_(n)}return r.set(e,t),this};var eO=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}return e};function eE(e,t){var r;t=eM(t,e)?[t]:eW(r=t)?r:eI(r);for(var n=0,i=t.length;null!=e&&n<i;)e=e[ej(t[n++])];return n&&n==i?e:void 0}function ex(e,t){return null!=e&&t in Object(e)}function eP(e,t,r,n,i){return e===t||(null!=e&&null!=t&&(eG(e)||eK(t))?function(e,t,r,n,i,u){var p=eW(e),b=eW(t),S=s,k=s;p||(S=(S=eC(e))==o?h:S),b||(k=(k=eC(t))==o?h:k);var O=S==h&&!U(e),E=k==h&&!U(t),x=S==k;if(x&&!O)return u||(u=new eS),p||eq(e)?eR(e,t,r,n,i,u):function(e,t,r,n,i,o,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case _:if(e.byteLength!=t.byteLength||!n(new Z(e),new Z(t)))break;return!0;case a:case l:case f:return eF(+e,+t);case c:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var u=F;case y:var h=2&o;if(u||(u=W),e.size!=t.size&&!h)break;var p=s.get(e);if(p)return p==t;o|=1,s.set(e,t);var b=eR(u(e),u(t),n,i,o,s);return s.delete(e),b;case v:if(ey)return ey.call(e)==ey.call(t)}return!1}(e,t,S,r,n,i,u);if(!(2&i)){var P=O&&q.call(e,"__wrapped__"),R=E&&q.call(t,"__wrapped__");if(P||R){var A=P?e.value():e,D=R?t.value():t;return u||(u=new eS),r(A,D,n,i,u)}}return!!x&&(u||(u=new eS),function(e,t,r,n,i,o){var s=2&i,a=e$(e),l=a.length;if(l!=e$(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:q.call(t,u)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var f=!0;o.set(e,t),o.set(t,e);for(var h=s;++c<l;){var p=e[u=a[c]],g=t[u];if(n)var y=s?n(g,p,u,t,e,o):n(p,g,u,e,t,o);if(!(void 0===y?p===g||r(p,g,n,i,o):y)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var m=e.constructor,v=t.constructor;m!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof v&&v instanceof v)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,r,n,i,u))}(e,t,eP,r,n,i):e!=e&&t!=t)}function eR(e,t,r,n,i,o){var s=2&i,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,f=1&i?new ew:void 0;for(o.set(e,t),o.set(t,e);++u<a;){var h=e[u],p=t[u];if(n)var g=s?n(p,h,u,t,e,o):n(h,p,u,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!function(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}(t,function(e,t){if(!f.has(t)&&(h===e||r(h,e,n,i,o)))return f.add(t)})){d=!1;break}}else if(!(h===p||r(h,p,n,i,o))){d=!1;break}}return o.delete(e),o.delete(t),d}function eA(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function eD(e,t){var r,n=null==e?void 0:e[t];return!(!eG(n)||(r=n,K&&K in r))&&(eH(n)||U(n)?J:P).test(eL(n))?n:void 0}var eC=function(e){return $.call(e)};function eT(e,t){return!!(t=null==t?0x1fffffffffffff:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function eM(e,t){if(eW(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||ez(e))||k.test(e)||!S.test(e)||null!=t&&e in Object(t)}(ei&&eC(new ei(new ArrayBuffer(1)))!=w||eo&&eC(new eo)!=d||es&&eC(es.resolve())!=p||ea&&eC(new ea)!=y||el&&eC(new el)!=b)&&(eC=function(e){var t=$.call(e),r=t==h?e.constructor:void 0,n=r?eL(r):void 0;if(n)switch(n){case eu:return w;case ed:return d;case ef:return p;case eh:return y;case ep:return b}return t});function eN(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}var eI=eU(function(e){e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ez(e))return em?em.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var t,r=[];return O.test(e)&&r.push(""),e.replace(E,function(e,t,n,i){r.push(n?i.replace(x,"$1"):t||e)}),r});function ej(e){if("string"==typeof e||ez(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function eL(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eU(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(eU.Cache||e_),r}function eF(e,t){return e===t||e!=e&&t!=t}function eY(e){var t;return eK(t=e)&&eV(t)&&q.call(e,"callee")&&(!et.call(e,"callee")||$.call(e)==o)}eU.Cache=e_;var eW=Array.isArray;function eV(e){return null!=e&&eB(e.length)&&!eH(e)}function eH(e){var t=eG(e)?$.call(e):"";return t==u||"[object GeneratorFunction]"==t}function eB(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eG(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function eK(e){return!!e&&"object"==typeof e}function ez(e){return"symbol"==typeof e||eK(e)&&$.call(e)==v}var eq=L?function(e){return L(e)}:function(e){return eK(e)&&eB(e.length)&&!!A[$.call(e)]};function e$(e){return eV(e)?function(e){var t=eW(e)||eY(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],r=t.length,n=!!r;for(var i in e)q.call(e,i)&&!(n&&("length"==i||eT(i,r)))&&t.push(i);return t}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||B))return en(e);var t,r,n=[];for(var i in Object(e))q.call(e,i)&&"constructor"!=i&&n.push(i);return n}(e)}function eJ(e){return e}e.exports=function(e,t,r){var n=eW(e)||eq(e);if(t="function"==typeof(c=t)?c:null==c?eJ:"object"==typeof c?eW(c)?(i=c[0],o=c[1],eM(i)&&(s=o)==s&&!eG(s)?eN(ej(i),o):function(e){var t,r,n,s,a,l=(t=e,r=i,void 0===(n=null==t?void 0:eE(t,r))?void 0:n);return void 0===l&&l===o?(s=e,a=i,null!=s&&function(e,t,r){t=eM(t,e)?[t]:eW(n=t)?n:eI(n);for(var n,i,o=-1,s=t.length;++o<s;){var a=ej(t[o]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}if(i)return i;var s=e?e.length:0;return!!s&&eB(s)&&eT(a,s)&&(eW(e)||eY(e))}(s,a,ex)):eP(o,l,void 0,3)}):1==(l=function(e){for(var t=e$(e),r=t.length;r--;){var n,i=t[r],o=e[i];t[r]=[i,o,(n=o)==n&&!eG(n)]}return t}(a=c)).length&&l[0][2]?eN(l[0][0],l[0][1]):function(e){return e===a||function(e,t){var r=t.length,n=r;if(null==e)return!n;for(e=Object(e);r--;){var i=t[r];if((0,i[2])?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++r<n;){var o=(i=t[r])[0],s=e[o],a=i[1];if(0,i[2]){if(void 0===s&&!(o in e))return!1}else{var l,c=new eS;if(!(void 0===l?eP(a,s,void 0,3,c):l))return!1}}return!0}(e,l)}:function(e){var t;return eM(e)?(t=ej(e),function(e){return null==e?void 0:e[t]}):function(t){return eE(t,e)}}(c),null==r)if(n||eG(e)){var i,o,s,a,l,c,u,d=e.constructor;r=n?eW(e)?new d:[]:eH(d)&&eG(u=Q(e))?ee(u):{}}else r={};return(n?function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}:function(e,t){return e&&eO(e,t,e$)})(e,function(e,n,i){return t(r,e,n,i)}),r}},7256(e){"use strict";e.exports=Math.abs},5414(e){"use strict";e.exports=Math.floor},981(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},7954(e){"use strict";e.exports=Math.max},3452(e){"use strict";e.exports=Math.min},1358(e){"use strict";e.exports=Math.pow},5720(e){"use strict";e.exports=Math.round},3515(e,t,r){"use strict";var n=r(981);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},4867(e,t,r){e=r.nmd(e),e.exports=function(){"use strict";function t(){return W.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t;if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(t in e)if(o(e,t))return!1;return!0}function a(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var r,n=[],i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function d(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return to(e,t,r,n,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());return(n&&(t=h(e),r=V.call(t.parsedDateParts,function(e){return null!=e}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e))?n:(e._isValid=n,e._isValid)}function g(e){var t=f(0/0);return null!=e?d(h(t),e):h(t).userInvalidated=!0,t}V=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var y,m,v=t.momentProperties=[],b=!1;function _(e,t){var r,n,i,o=v.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=h(t)),a(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)a(i=t[n=v[r]])||(e[n]=i);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():0/0),this.isValid()||(this._d=new Date(0/0)),!1===b&&(b=!0,t.updateOffset(this),b=!1)}function S(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function k(e){!1===t.suppressDeprecationWarnings&&"u">typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,r){var n=!0;return d(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),n){var i,s,a,l=[],c=arguments.length;for(s=0;s<c;s++){if(i="","object"==typeof arguments[s]){for(a in i+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];l.push(i)}k(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+Error().stack),n=!1}return r.apply(this,arguments)},r)}var E={};function x(e,r){null!=t.deprecationHandler&&t.deprecationHandler(e,r),E[e]||(k(r),E[e]=!0)}function P(e){return"u">typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function R(e,t){var r,n=d({},e);for(r in t)o(t,r)&&(i(e[r])&&i(t[r])?(n[r]={},d(n[r],e[r]),d(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)o(e,r)&&!o(t,r)&&i(e[r])&&(n[r]=d({},n[r]));return n}function A(e){null!=e&&this.set(e)}function D(e,t,r){var n=""+Math.abs(e);return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,t-n.length)).toString().substr(1)+n}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var C=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,T=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,M={},N={};function I(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(N[e]=i),t&&(N[t[0]]=function(){return D(i.apply(this,arguments),t[1],t[2])}),r&&(N[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function j(e,t){return e.isValid()?(M[t=L(t,e.localeData())]=M[t]||function(e){var t,r,n,i=e.match(C);for(r=0,n=i.length;r<n;r++)N[i[r]]?i[r]=N[i[r]]:i[r]=(t=i[r]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=P(i[r])?i[r].call(t,e):i[r];return o}}(t),M[t](e)):e.localeData().invalidDate()}function L(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(T.lastIndex=0;r>=0&&T.test(e);)e=e.replace(T,n),T.lastIndex=0,r-=1;return e}var U={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function F(e){return"string"==typeof e?U[e]||U[e.toLowerCase()]:void 0}function Y(e){var t,r,n={};for(r in e)o(e,r)&&(t=F(r))&&(n[t]=e[r]);return n}var W,V,H,B={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},G=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r},K=/\d/,z=/\d\d/,q=/\d{3}/,$=/\d{4}/,J=/[+-]?\d{6}/,X=/\d\d?/,Z=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,ee=/\d{1,3}/,et=/\d{1,4}/,er=/[+-]?\d{1,6}/,en=/\d+/,ei=/[+-]?\d+/,eo=/Z|[+-]\d\d:?\d\d/gi,es=/Z|[+-]\d\d(?::?\d\d)?/gi,ea=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,el=/^[1-9]\d?/,ec=/^([1-9]\d|\d)/;function eu(e,t,r){H[e]=P(t)?t:function(e,n){return e&&r?r:t}}function ed(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ef(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function eh(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=ef(t)),r}H={};var ep={};function eg(e,t){var r,n,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,r){r[t]=eh(e)}),n=e.length,r=0;r<n;r++)ep[e[r]]=i}function ey(e,t){eg(e,function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function em(e){return e%4==0&&e%100!=0||e%400==0}function ev(e){return em(e)?366:365}I("Y",0,0,function(){var e=this.year();return e<=9999?D(e,4):"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),eu("Y",ei),eu("YY",X,z),eu("YYYY",et,$),eu("YYYYY",er,J),eu("YYYYYY",er,J),eg(["YYYYY","YYYYYY"],0),eg("YYYY",function(e,r){r[0]=2===e.length?t.parseTwoDigitYear(e):eh(e)}),eg("YY",function(e,r){r[0]=t.parseTwoDigitYear(e)}),eg("Y",function(e,t){t[0]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return eh(e)+(eh(e)>68?1900:2e3)};var eb=e_("FullYear",!0);function e_(e,r){return function(n){return null!=n?(eS(this,e,n),t.updateOffset(this,r),this):ew(this,e)}}function ew(e,t){if(!e.isValid())return 0/0;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return 0/0}}function eS(e,t,r){var n,i,o,s;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=e.month(),s=29!==(s=e.date())||1!==o||em(r)?s:28,i?n.setUTCFullYear(r,o,s):n.setFullYear(r,o,s)}}function ek(e,t){if(isNaN(e)||isNaN(t))return 0/0;var r=(t%12+12)%12;return e+=(t-r)/12,1===r?em(e)?29:28:31-r%7%2}eH=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return -1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),eu("M",X,el),eu("MM",X,z),eu("MMM",function(e,t){return t.monthsShortRegex(e)}),eu("MMMM",function(e,t){return t.monthsRegex(e)}),eg(["M","MM"],function(e,t){t[1]=eh(e)-1}),eg(["MMM","MMMM"],function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[1]=i:h(r).invalidMonth=e});var eO="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),eE=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;function ex(e,t,r){var n,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();if(r)if("MMM"===t)return -1!==(i=eH.call(this._shortMonthsParse,s))?i:null;else return -1!==(i=eH.call(this._longMonthsParse,s))?i:null;return"MMM"===t?-1!==(i=eH.call(this._shortMonthsParse,s))||-1!==(i=eH.call(this._longMonthsParse,s))?i:null:-1!==(i=eH.call(this._longMonthsParse,s))||-1!==(i=eH.call(this._shortMonthsParse,s))?i:null}function eP(e,t){if(!e.isValid())return e;if("string"==typeof t){if(/^\d+$/.test(t))t=eh(t);else if(!l(t=e.localeData().monthsParse(t)))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,ek(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function eR(e){return null!=e?(eP(this,e),t.updateOffset(this,!0),this):ew(this,"Month")}function eA(){function e(e,t){return t.length-e.length}var t,r,n,i,o=[],s=[],a=[];for(t=0;t<12;t++)r=f([2e3,t]),n=ed(this.monthsShort(r,"")),i=ed(this.months(r,"")),o.push(n),s.push(i),a.push(i),a.push(n);o.sort(e),s.sort(e),a.sort(e),this._monthsRegex=RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=RegExp("^("+o.join("|")+")","i")}function eD(e,t,r,n,i,o,s){var a;return e<100&&e>=0?isFinite((a=new Date(e+400,t,r,n,i,o,s)).getFullYear())&&a.setFullYear(e):a=new Date(e,t,r,n,i,o,s),a}function eC(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,isFinite((t=new Date(Date.UTC.apply(null,r))).getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function eT(e,t,r){var n=7+t-r;return-((7+eC(e,0,n).getUTCDay()-t)%7)+n-1}function eM(e,t,r,n,i){var o,s,a=1+7*(t-1)+(7+r-n)%7+eT(e,n,i);return a<=0?s=ev(o=e-1)+a:a>ev(e)?(o=e+1,s=a-ev(e)):(o=e,s=a),{year:o,dayOfYear:s}}function eN(e,t,r){var n,i,o=eT(e.year(),t,r),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?n=s+eI(i=e.year()-1,t,r):s>eI(e.year(),t,r)?(n=s-eI(e.year(),t,r),i=e.year()+1):(i=e.year(),n=s),{week:n,year:i}}function eI(e,t,r){var n=eT(e,t,r),i=eT(e+1,t,r);return(ev(e)-n+i)/7}function ej(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),eu("w",X,el),eu("ww",X,z),eu("W",X,el),eu("WW",X,z),ey(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=eh(e)}),I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),eu("d",X),eu("e",X),eu("E",X),eu("dd",function(e,t){return t.weekdaysMinRegex(e)}),eu("ddd",function(e,t){return t.weekdaysShortRegex(e)}),eu("dddd",function(e,t){return t.weekdaysRegex(e)}),ey(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:h(r).invalidWeekday=e}),ey(["d","e","E"],function(e,t,r,n){t[n]=eh(e)});var eL="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function eU(e,t,r){var n,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();if(r)if("dddd"===t)return -1!==(i=eH.call(this._weekdaysParse,s))?i:null;else if("ddd"===t)return -1!==(i=eH.call(this._shortWeekdaysParse,s))?i:null;else return -1!==(i=eH.call(this._minWeekdaysParse,s))?i:null;return"dddd"===t?-1!==(i=eH.call(this._weekdaysParse,s))||-1!==(i=eH.call(this._shortWeekdaysParse,s))||-1!==(i=eH.call(this._minWeekdaysParse,s))?i:null:"ddd"===t?-1!==(i=eH.call(this._shortWeekdaysParse,s))||-1!==(i=eH.call(this._weekdaysParse,s))||-1!==(i=eH.call(this._minWeekdaysParse,s))?i:null:-1!==(i=eH.call(this._minWeekdaysParse,s))||-1!==(i=eH.call(this._weekdaysParse,s))||-1!==(i=eH.call(this._shortWeekdaysParse,s))?i:null}function eF(){function e(e,t){return t.length-e.length}var t,r,n,i,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)r=f([2e3,1]).day(t),n=ed(this.weekdaysMin(r,"")),i=ed(this.weekdaysShort(r,"")),o=ed(this.weekdays(r,"")),s.push(n),a.push(i),l.push(o),c.push(n),c.push(i),c.push(o);s.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=RegExp("^("+s.join("|")+")","i")}function eY(){return this.hours()%12||12}function eW(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function eV(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,eY),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+eY.apply(this)+D(this.minutes(),2)}),I("hmmss",0,0,function(){return""+eY.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+D(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)}),eW("a",!0),eW("A",!1),eu("a",eV),eu("A",eV),eu("H",X,ec),eu("h",X,el),eu("k",X,el),eu("HH",X,z),eu("hh",X,z),eu("kk",X,z),eu("hmm",Z),eu("hmmss",Q),eu("Hmm",Z),eu("Hmmss",Q),eg(["H","HH"],3),eg(["k","kk"],function(e,t,r){var n=eh(e);t[3]=24===n?0:n}),eg(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),eg(["h","hh"],function(e,t,r){t[3]=eh(e),h(r).bigHour=!0}),eg("hmm",function(e,t,r){var n=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n)),h(r).bigHour=!0}),eg("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n,2)),t[5]=eh(e.substr(i)),h(r).bigHour=!0}),eg("Hmm",function(e,t,r){var n=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n))}),eg("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n,2)),t[5]=eh(e.substr(i))});var eH,eB,eG=e_("Hours",!0),eK={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:eO,week:{dow:0,doy:6},weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysShort:eL,meridiemParse:/[ap]\.?m?\.?/i},ez={},eq={};function e$(e){return e?e.toLowerCase().replace("_","-"):e}function eJ(t){var n=null;if(void 0===ez[t]&&e&&e.exports&&t&&t.match("^[^/\\\\]*$"))try{n=eB._abbr,r(3118)("./locale/"+t),eX(n)}catch(e){ez[t]=null}return ez[t]}function eX(e,t){var r;return e&&((r=a(t)?eQ(e):eZ(e,t))?eB=r:"u">typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),eB._abbr}function eZ(e,t){if(null===t)return delete ez[e],null;var r,n=eK;if(t.abbr=e,null!=ez[e])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ez[e]._config;else if(null!=t.parentLocale)if(null!=ez[t.parentLocale])n=ez[t.parentLocale]._config;else{if(null==(r=eJ(t.parentLocale)))return eq[t.parentLocale]||(eq[t.parentLocale]=[]),eq[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ez[e]=new A(R(n,t)),eq[e]&&eq[e].forEach(function(e){eZ(e.name,e.config)}),eX(e),ez[e]}function eQ(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return eB;if(!n(e)){if(t=eJ(e))return t;e=[e]}return function(e){for(var t,r,n,i,o=0;o<e.length;){for(t=(i=e$(e[o]).split("-")).length,r=(r=e$(e[o+1]))?r.split("-"):null;t>0;){if(n=eJ(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}(i,r)>=t-1)break;t--}o++}return eB}(e)}function e0(e){var t,r=e._a;return r&&-2===h(e).overflow&&(t=r[1]<0||r[1]>11?1:r[2]<1||r[2]>ek(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}var e1=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e2=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e5=/Z|[+-]\d\d(?::?\d\d)?/,e3=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],e6=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],e4=/^\/?Date\((-?\d+)/i,e8=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,e9={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function e7(e){var t,r,n,i,o,s,a=e._i,l=e1.exec(a)||e2.exec(a),c=e3.length,u=e6.length;if(l){for(h(e).iso=!0,t=0,r=c;t<r;t++)if(e3[t][1].exec(l[1])){i=e3[t][0],n=!1!==e3[t][2];break}if(null==i){e._isValid=!1;return}if(l[3]){for(t=0,r=u;t<r;t++)if(e6[t][1].exec(l[3])){o=(l[2]||" ")+e6[t][0];break}if(null==o){e._isValid=!1;return}}if(!n&&null!=o){e._isValid=!1;return}if(l[4])if(e5.exec(l[4]))s="Z";else{e._isValid=!1;return}e._f=i+(o||"")+(s||""),tn(e)}else e._isValid=!1}function te(e){var t,r,n,i,o,s,a,l,c,u,d,f=e8.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(f){if(o=f[4],s=f[3],a=f[2],l=f[5],c=f[6],u=f[7],d=[(t=parseInt(o,10))<=49?2e3+t:t<=999?1900+t:t,eO.indexOf(s),parseInt(a,10),parseInt(l,10),parseInt(c,10)],u&&d.push(parseInt(u,10)),r=f[1],n=d,i=e,r&&eL.indexOf(r)!==new Date(n[0],n[1],n[2]).getDay()&&(h(i).weekdayMismatch=!0,i._isValid=!1,1))return;e._a=d,e._tzm=function(e,t,r){if(e)return e9[e];if(t)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}(f[8],f[9],f[10]),e._d=eC.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function tt(e,t,r){return null!=e?e:null!=t?t:r}function tr(e){var r,n,i,o,s,a,l,c,u,d,f,p,g,y,m,v,b=[];if(!e._d){for(f=new Date(t.now()),y=e._useUTC?[f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()]:[f.getFullYear(),f.getMonth(),f.getDate()],e._w&&null==e._a[2]&&null==e._a[1]&&(null!=(n=(r=e)._w).GG||null!=n.W||null!=n.E?(a=1,l=4,i=tt(n.GG,r._a[0],eN(ts(),1,4).year),o=tt(n.W,1),((s=tt(n.E,1))<1||s>7)&&(u=!0)):(a=r._locale._week.dow,l=r._locale._week.doy,d=eN(ts(),a,l),i=tt(n.gg,r._a[0],d.year),o=tt(n.w,d.week),null!=n.d?((s=n.d)<0||s>6)&&(u=!0):null!=n.e?(s=n.e+a,(n.e<0||n.e>6)&&(u=!0)):s=a),o<1||o>eI(i,a,l)?h(r)._overflowWeeks=!0:null!=u?h(r)._overflowWeekday=!0:(c=eM(i,o,s,a,l),r._a[0]=c.year,r._dayOfYear=c.dayOfYear)),null!=e._dayOfYear&&(v=tt(e._a[0],y[0]),(e._dayOfYear>ev(v)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),g=eC(v,0,e._dayOfYear),e._a[1]=g.getUTCMonth(),e._a[2]=g.getUTCDate()),p=0;p<3&&null==e._a[p];++p)e._a[p]=b[p]=y[p];for(;p<7;p++)e._a[p]=b[p]=null==e._a[p]?+(2===p):e._a[p];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?eC:eD).apply(null,b),m=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==m&&(h(e).weekdayMismatch=!0)}}function tn(e){if(e._f===t.ISO_8601)return void e7(e);if(e._f===t.RFC_2822)return void te(e);e._a=[],h(e).empty=!0;var r,n,i,s,a,l,c,u,d,f,p,g=""+e._i,y=g.length,m=0;for(p=(c=L(e._f,e._locale).match(C)||[]).length,a=0;a<p;a++)if(u=c[a],(l=(g.match(!o(H,u)?new RegExp(ed(u.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))):H[u](e._strict,e._locale))||[])[0])&&((d=g.substr(0,g.indexOf(l))).length>0&&h(e).unusedInput.push(d),g=g.slice(g.indexOf(l)+l.length),m+=l.length),N[u])l?h(e).empty=!1:h(e).unusedTokens.push(u),null!=l&&o(ep,u)&&ep[u](l,e._a,e,u);else e._strict&&!l&&h(e).unusedTokens.push(u);h(e).charsLeftOver=y-m,g.length>0&&h(e).unusedInput.push(g),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=(r=e._locale,n=e._a[3],null==(i=e._meridiem)?n:null!=r.meridiemHour?r.meridiemHour(n,i):(null!=r.isPM&&((s=r.isPM(i))&&n<12&&(n+=12),s||12!==n||(n=0)),n)),null!==(f=h(e).era)&&(e._a[0]=e._locale.erasConvertYear(f,e._a[0])),tr(e),e0(e)}function ti(e){var r=e._i,o=e._f;return(e._locale=e._locale||eQ(e._l),null===r||void 0===o&&""===r)?g({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r))?new w(e0(r)):(c(r)?e._d=r:n(o)?!function(e){var t,r,n,i,o,s,a=!1,l=e._f.length;if(0===l){h(e).invalidFormat=!0,e._d=new Date(0/0);return}for(i=0;i<l;i++)o=0,s=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],tn(t),p(t)&&(s=!0),o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,a?o<n&&(n=o,r=t):(null==n||o<n||s)&&(n=o,r=t,s&&(a=!0));d(e,r||t)}(e):o?tn(e):function(e){var r=e._i;if(a(r))e._d=new Date(t.now());else if(c(r))e._d=new Date(r.valueOf());else if("string"==typeof r)!function(e){var r=e4.exec(e._i);if(null!==r){e._d=new Date(+r[1]);return}e7(e),!1!==e._isValid||(delete e._isValid,te(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:t.createFromInputFallback(e)))}(e);else if(n(r))e._a=u(r.slice(0),function(e){return parseInt(e,10)}),tr(e);else if(i(r)){if(!e._d){var o=Y(e._i),s=void 0===o.day?o.date:o.day;e._a=u([o.year,o.month,s,o.hour,o.minute,o.second,o.millisecond],function(e){return e&&parseInt(e,10)}),tr(e)}}else l(r)?e._d=new Date(r):t.createFromInputFallback(e)}(e),p(e)||(e._d=null),e)}function to(e,t,r,o,a){var l,c={};return(!0===t||!1===t)&&(o=t,t=void 0),(!0===r||!1===r)&&(o=r,r=void 0),(i(e)&&s(e)||n(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=a,c._l=r,c._i=e,c._f=t,c._strict=o,(l=new w(e0(ti(c))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function ts(e,t,r,n){return to(e,t,r,n,!1)}t.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var ta=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ts.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),tl=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ts.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()});function tc(e,t){var r,i;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return ts();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](r))&&(r=t[i]);return r}var tu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function td(e){var t=Y(e),r=t.year||0,n=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,r,n=!1,i=tu.length;for(t in e)if(o(e,t)&&!(-1!==eH.call(tu,t)&&(null==e[t]||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[tu[r]]){if(n)return!1;parseFloat(e[tu[r]])!==eh(e[tu[r]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*3600,this._days=+a+7*s,this._months=+i+3*n+12*r,this._data={},this._locale=eQ(),this._bubble()}function tf(e){return e instanceof td}function th(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function tp(e,t){I(e,0,0,function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+D(~~(e/60),2)+t+D(~~e%60,2)})}tp("Z",":"),tp("ZZ",""),eu("Z",es),eu("ZZ",es),eg(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=ty(es,e)});var tg=/([\+\-]|\d\d)/gi;function ty(e,t){var r,n,i=(t||"").match(e);return null===i?null:0===(n=+(60*(r=((i[i.length-1]||[])+"").match(tg)||["-",0,0])[1])+eh(r[2]))?0:"+"===r[0]?n:-n}function tm(e,r){var n,i;return r._isUTC?(n=r.clone(),i=(S(e)||c(e)?e.valueOf():ts(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),t.updateOffset(n,!1),n):ts(e).local()}function tv(e){return-Math.round(e._d.getTimezoneOffset())}function tb(){return!!this.isValid()&&this._isUTC&&0===this._offset}t.updateOffset=function(){};var t_=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,tw=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function tS(e,t){var r,n,i,s,a,c,u=e,d=null;return tf(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(d=t_.exec(e))?(s="-"===d[1]?-1:1,u={y:0,d:eh(d[2])*s,h:eh(d[3])*s,m:eh(d[4])*s,s:eh(d[5])*s,ms:eh(th(1e3*d[6]))*s}):(d=tw.exec(e))?(s="-"===d[1]?-1:1,u={y:tk(d[2],s),M:tk(d[3],s),w:tk(d[4],s),d:tk(d[5],s),h:tk(d[6],s),m:tk(d[7],s),s:tk(d[8],s)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(r=ts(u.from),n=ts(u.to),c=r.isValid()&&n.isValid()?(n=tm(n,r),r.isBefore(n)?i=tO(r,n):((i=tO(n,r)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0},(u={}).ms=c.milliseconds,u.M=c.months),a=new td(u),tf(e)&&o(e,"_locale")&&(a._locale=e._locale),tf(e)&&o(e,"_isValid")&&(a._isValid=e._isValid),a}function tk(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function tO(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=t-e.clone().add(r.months,"M"),r}function tE(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(x(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),tx(this,tS(r,n),e),this}}function tx(e,r,n,i){var o=r._milliseconds,s=th(r._days),a=th(r._months);e.isValid()&&(i=null==i||i,a&&eP(e,ew(e,"Month")+a*n),s&&eS(e,"Date",ew(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&t.updateOffset(e,s||a))}tS.fn=td.prototype,tS.invalid=function(){return tS(0/0)};var tP=tE(1,"add"),tR=tE(-1,"subtract");function tA(e){return"string"==typeof e||e instanceof String}function tD(e,t){if(e.date()<t.date())return-tD(t,e);var r,n=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(n,"months");return r=t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i),-(n+r)||0}function tC(e){var t;return void 0===e?this._locale._abbr:(null!=(t=eQ(e))&&(this._locale=t),this)}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tT=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function tM(){return this._locale}function tN(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-126227808e5:new Date(e,t,r).valueOf()}function tI(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-126227808e5:Date.UTC(e,t,r)}function tj(e,t){return t.erasAbbrRegex(e)}function tL(){var e,t,r,n,i,o=[],s=[],a=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)r=ed(c[e].name),n=ed(c[e].abbr),i=ed(c[e].narrow),s.push(r),o.push(n),a.push(i),l.push(r),l.push(n),l.push(i);this._erasRegex=RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=RegExp("^("+a.join("|")+")","i")}function tU(e,t){I(0,[e,e.length],0,t)}function tF(e,t,r,n,i){var o;return null==e?eN(this,n,i).year:(t>(o=eI(e,n,i))&&(t=o),tY.call(this,e,t,r,n,i))}function tY(e,t,r,n,i){var o=eM(e,t,r,n,i),s=eC(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}I("N",0,0,"eraAbbr"),I("NN",0,0,"eraAbbr"),I("NNN",0,0,"eraAbbr"),I("NNNN",0,0,"eraName"),I("NNNNN",0,0,"eraNarrow"),I("y",["y",1],"yo","eraYear"),I("y",["yy",2],0,"eraYear"),I("y",["yyy",3],0,"eraYear"),I("y",["yyyy",4],0,"eraYear"),eu("N",tj),eu("NN",tj),eu("NNN",tj),eu("NNNN",function(e,t){return t.erasNameRegex(e)}),eu("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),eg(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?h(r).era=i:h(r).invalidEra=e}),eu("y",en),eu("yy",en),eu("yyy",en),eu("yyyy",en),eu("yo",function(e,t){return t._eraYearOrdinalRegex||en}),eg(["y","yy","yyy","yyyy"],0),eg(["yo"],function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[0]=r._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)}),I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tU("gggg","weekYear"),tU("ggggg","weekYear"),tU("GGGG","isoWeekYear"),tU("GGGGG","isoWeekYear"),eu("G",ei),eu("g",ei),eu("GG",X,z),eu("gg",X,z),eu("GGGG",et,$),eu("gggg",et,$),eu("GGGGG",er,J),eu("ggggg",er,J),ey(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=eh(e)}),ey(["gg","GG"],function(e,r,n,i){r[i]=t.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),eu("Q",K),eg("Q",function(e,t){t[1]=(eh(e)-1)*3}),I("D",["DD",2],"Do","date"),eu("D",X,el),eu("DD",X,z),eu("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),eg(["D","DD"],2),eg("Do",function(e,t){t[2]=eh(e.match(X)[0])});var tW=e_("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),eu("DDD",ee),eu("DDDD",q),eg(["DDD","DDDD"],function(e,t,r){r._dayOfYear=eh(e)}),I("m",["mm",2],0,"minute"),eu("m",X,ec),eu("mm",X,z),eg(["m","mm"],4);var tV=e_("Minutes",!1);I("s",["ss",2],0,"second"),eu("s",X,ec),eu("ss",X,z),eg(["s","ss"],5);var tH=e_("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),eu("S",ee,K),eu("SS",ee,z),eu("SSS",ee,q),y="SSSS";y.length<=9;y+="S")eu(y,en);function tB(e,t){t[6]=eh(("0."+e)*1e3)}for(y="S";y.length<=9;y+="S")eg(y,tB);m=e_("Milliseconds",!1),I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var tG=w.prototype;function tK(e){return e}tG.add=tP,tG.calendar=function(e,r){if(1==arguments.length)if(arguments[0]){var a,u,d,f;if(a=arguments[0],S(a)||c(a)||tA(a)||l(a)||(d=n(u=a),f=!1,d&&(f=0===u.filter(function(e){return!l(e)&&tA(u)}).length),d&&f)||function(e){var t,r,n=i(e)&&!s(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=l.length;for(t=0;t<c;t+=1)r=l[t],a=a||o(e,r);return n&&a}(a)||null==a)e=arguments[0],r=void 0;else(function(e){var t,r,n=i(e)&&!s(e),a=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<l.length;t+=1)r=l[t],a=a||o(e,r);return n&&a})(arguments[0])&&(r=arguments[0],e=void 0)}else e=void 0,r=void 0;var h=e||ts(),p=tm(h,this).startOf("day"),g=t.calendarFormat(this,p)||"sameElse",y=r&&(P(r[g])?r[g].call(this,h):r[g]);return this.format(y||this.localeData().calendar(g,this,ts(h)))},tG.clone=function(){return new w(this)},tG.diff=function(e,t,r){var n,i,o;if(!this.isValid()||!(n=tm(e,this)).isValid())return 0/0;switch(i=(n.utcOffset()-this.utcOffset())*6e4,t=F(t)){case"year":o=tD(this,n)/12;break;case"month":o=tD(this,n);break;case"quarter":o=tD(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-i)/864e5;break;case"week":o=(this-n-i)/6048e5;break;default:o=this-n}return r?o:ef(o)},tG.endOf=function(e){var r,n;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?tI:tN,e){case"year":r=n(this.year()+1,0,1)-1;break;case"quarter":r=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=n(this.year(),this.month()+1,1)-1;break;case"week":r=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=36e5-((r+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5-1;break;case"minute":r=this._d.valueOf(),r+=6e4-(r%6e4+6e4)%6e4-1;break;case"second":r=this._d.valueOf(),r+=1e3-(r%1e3+1e3)%1e3-1}return this._d.setTime(r),t.updateOffset(this,!0),this},tG.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var r=j(this,e);return this.localeData().postformat(r)},tG.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||ts(e).isValid())?tS({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tG.fromNow=function(e){return this.from(ts(),e)},tG.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||ts(e).isValid())?tS({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tG.toNow=function(e){return this.to(ts(),e)},tG.get=function(e){return P(this[e=F(e)])?this[e]():this},tG.invalidAt=function(){return h(this).overflow},tG.isAfter=function(e,t){var r=S(e)?e:ts(e);return!!(this.isValid()&&r.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())},tG.isBefore=function(e,t){var r=S(e)?e:ts(e);return!!(this.isValid()&&r.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())},tG.isBetween=function(e,t,r,n){var i=S(e)?e:ts(e),o=S(t)?t:ts(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(o,r):!this.isAfter(o,r))},tG.isSame=function(e,t){var r,n=S(e)?e:ts(e);return!!(this.isValid()&&n.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))},tG.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},tG.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},tG.isValid=function(){return p(this)},tG.lang=tT,tG.locale=tC,tG.localeData=tM,tG.max=tl,tG.min=ta,tG.parsingFlags=function(){return d({},h(this))},tG.set=function(e,t){if("object"==typeof e){var r,n=function(e){var t,r=[];for(t in e)o(e,t)&&r.push({unit:t,priority:B[t]});return r.sort(function(e,t){return e.priority-t.priority}),r}(e=Y(e)),i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(P(this[e=F(e)]))return this[e](t);return this},tG.startOf=function(e){var r,n;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?tI:tN,e){case"year":r=n(this.year(),0,1);break;case"quarter":r=n(this.year(),this.month()-this.month()%3,1);break;case"month":r=n(this.year(),this.month(),1);break;case"week":r=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=n(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=((r+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5;break;case"minute":r=this._d.valueOf(),r-=(r%6e4+6e4)%6e4;break;case"second":r=this._d.valueOf(),r-=(r%1e3+1e3)%1e3}return this._d.setTime(r),t.updateOffset(this,!0),this},tG.subtract=tR,tG.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},tG.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},tG.toDate=function(){return new Date(this.valueOf())},tG.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;if(0>r.year()||r.year()>9999)return j(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(P(Date.prototype.toISOString))if(t)return this.toDate().toISOString();else return new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",j(r,"Z"));return j(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},tG.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",i="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+n+'("]',t=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",r=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"u">typeof Symbol&&null!=Symbol.for&&(tG[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),tG.toJSON=function(){return this.isValid()?this.toISOString():null},tG.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},tG.unix=function(){return Math.floor(this.valueOf()/1e3)},tG.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},tG.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},tG.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""},tG.eraNarrow=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""},tG.eraAbbr=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""},tG.eraYear=function(){var e,r,n,i,o=this.localeData().eras();for(e=0,r=o.length;e<r;++e)if(n=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-t(o[e].since).year())*n+o[e].offset;return this.year()},tG.year=eb,tG.isLeapYear=function(){return em(this.year())},tG.weekYear=function(e){return tF.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},tG.isoWeekYear=function(e){return tF.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},tG.quarter=tG.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)},tG.month=eR,tG.daysInMonth=function(){return ek(this.year(),this.month())},tG.week=tG.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add((e-t)*7,"d")},tG.isoWeek=tG.isoWeeks=function(e){var t=eN(this,1,4).week;return null==e?t:this.add((e-t)*7,"d")},tG.weeksInYear=function(){var e=this.localeData()._week;return eI(this.year(),e.dow,e.doy)},tG.weeksInWeekYear=function(){var e=this.localeData()._week;return eI(this.weekYear(),e.dow,e.doy)},tG.isoWeeksInYear=function(){return eI(this.year(),1,4)},tG.isoWeeksInISOWeekYear=function(){return eI(this.isoWeekYear(),1,4)},tG.date=tW,tG.day=tG.days=function(e){if(!this.isValid())return null!=e?this:0/0;var t,r,n=ew(this,"Day");return null==e?n:(t=e,r=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=r.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-n,"d"))},tG.weekday=function(e){if(!this.isValid())return null!=e?this:0/0;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},tG.isoWeekday=function(e){if(!this.isValid())return null!=e?this:0/0;if(null==e)return this.day()||7;var t,r=(t=this.localeData(),"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},tG.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},tG.hour=tG.hours=eG,tG.minute=tG.minutes=tV,tG.second=tG.seconds=tH,tG.millisecond=tG.milliseconds=m,tG.utcOffset=function(e,r,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:0/0;if(null==e)return this._isUTC?o:tv(this);if("string"==typeof e){if(null===(e=ty(es,e)))return this}else 16>Math.abs(e)&&!n&&(e*=60);return!this._isUTC&&r&&(i=tv(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!r||this._changeInProgress?tx(this,tS(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this},tG.utc=function(e){return this.utcOffset(0,e)},tG.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(tv(this),"m")),this},tG.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=ty(eo,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},tG.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ts(e).utcOffset():0,(this.utcOffset()-e)%60==0)},tG.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},tG.isLocal=function(){return!!this.isValid()&&!this._isUTC},tG.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},tG.isUtc=tb,tG.isUTC=tb,tG.zoneAbbr=function(){return this._isUTC?"UTC":""},tG.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},tG.dates=O("dates accessor is deprecated. Use date instead.",tW),tG.months=O("months accessor is deprecated. Use month instead",eR),tG.years=O("years accessor is deprecated. Use year instead",eb),tG.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),tG.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=ti(t))._a?(e=t._isUTC?f(t._a):ts(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var r,n=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<n;r++)eh(e[r])!==eh(t[r])&&o++;return o+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var tz=A.prototype;function tq(e,t,r,n){var i=eQ(),o=f().set(n,t);return i[r](o,e)}function t$(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return tq(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=tq(e,n,r,"month");return i}function tJ(e,t,r,n){"boolean"==typeof e||(r=t=e,e=!1),l(t)&&(r=t,t=void 0),t=t||"";var i,o=eQ(),s=e?o._week.dow:0,a=[];if(null!=r)return tq(t,(r+s)%7,n,"day");for(i=0;i<7;i++)a[i]=tq(t,(i+s)%7,n,"day");return a}tz.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return P(n)?n.call(t,r):n},tz.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(C).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},tz.invalidDate=function(){return this._invalidDate},tz.ordinal=function(e){return this._ordinal.replace("%d",e)},tz.preparse=tK,tz.postformat=tK,tz.relativeTime=function(e,t,r,n){var i=this._relativeTime[r];return P(i)?i(e,t,r,n):i.replace(/%d/i,e)},tz.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return P(r)?r(t):r.replace(/%s/i,t)},tz.set=function(e){var t,r;for(r in e)o(e,r)&&(P(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},tz.eras=function(e,r){var n,i,o,s=this._eras||eQ("en")._eras;for(n=0,i=s.length;n<i;++n)switch("string"==typeof s[n].since&&(o=t(s[n].since).startOf("day"),s[n].since=o.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":o=t(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf()}return s},tz.erasParse=function(e,t,r){var n,i,o,s,a,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(o=l[n].name.toUpperCase(),s=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[n];break;case"NNNN":if(o===e)return l[n];break;case"NNNNN":if(a===e)return l[n]}else if([o,s,a].indexOf(e)>=0)return l[n]},tz.erasConvertYear=function(e,r){var n=e.since<=e.until?1:-1;return void 0===r?t(e.since).year():t(e.since).year()+(r-e.offset)*n},tz.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||tL.call(this),e?this._erasAbbrRegex:this._erasRegex},tz.erasNameRegex=function(e){return o(this,"_erasNameRegex")||tL.call(this),e?this._erasNameRegex:this._erasRegex},tz.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||tL.call(this),e?this._erasNarrowRegex:this._erasRegex},tz.months=function(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||eE).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone},tz.monthsShort=function(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[eE.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},tz.monthsParse=function(e,t,r){var n,i,o;if(this._monthsParseExact)return ex.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},tz.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||eA.call(this),e)?this._monthsStrictRegex:this._monthsRegex:(o(this,"_monthsRegex")||(this._monthsRegex=ea),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},tz.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||eA.call(this),e)?this._monthsShortStrictRegex:this._monthsShortRegex:(o(this,"_monthsShortRegex")||(this._monthsShortRegex=ea),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},tz.week=function(e){return eN(e,this._week.dow,this._week.doy).week},tz.firstDayOfYear=function(){return this._week.doy},tz.firstDayOfWeek=function(){return this._week.dow},tz.weekdays=function(e,t){var r=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ej(r,this._week.dow):e?r[e.day()]:r},tz.weekdaysMin=function(e){return!0===e?ej(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},tz.weekdaysShort=function(e){return!0===e?ej(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},tz.weekdaysParse=function(e,t,r){var n,i,o;if(this._weekdaysParseExact)return eU.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;else if(!r&&this._weekdaysParse[n].test(e))return n}},tz.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysStrictRegex:this._weekdaysRegex:(o(this,"_weekdaysRegex")||(this._weekdaysRegex=ea),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},tz.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysShortStrictRegex:this._weekdaysShortRegex:(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ea),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},tz.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysMinStrictRegex:this._weekdaysMinRegex:(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ea),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},tz.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tz.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},eX("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=1===eh(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}}),t.lang=O("moment.lang is deprecated. Use moment.locale instead.",eX),t.langData=O("moment.langData is deprecated. Use moment.localeData instead.",eQ);var tX=Math.abs;function tZ(e,t,r,n){var i=tS(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function tQ(e){return e<0?Math.floor(e):Math.ceil(e)}function t0(e){return 4800*e/146097}function t1(e){return 146097*e/4800}function t2(e){return function(){return this.as(e)}}var t5=t2("ms"),t3=t2("s"),t6=t2("m"),t4=t2("h"),t8=t2("d"),t9=t2("w"),t7=t2("M"),re=t2("Q"),rt=t2("y");function rr(e){return function(){return this.isValid()?this._data[e]:0/0}}var rn=rr("milliseconds"),ri=rr("seconds"),ro=rr("minutes"),rs=rr("hours"),ra=rr("days"),rl=rr("months"),rc=rr("years"),ru=Math.round,rd={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rf(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}var rh=Math.abs;function rp(e){return(e>0)-(e<0)||+e}function rg(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,s,a,l=rh(this._milliseconds)/1e3,c=rh(this._days),u=rh(this._months),d=this.asSeconds();return d?(e=ef(l/60),t=ef(e/60),l%=60,e%=60,r=ef(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=rp(this._months)!==rp(d)?"-":"",s=rp(this._days)!==rp(d)?"-":"",a=rp(this._milliseconds)!==rp(d)?"-":"",i+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?s+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+n+"S":"")):"P0D"}var ry=td.prototype;return ry.isValid=function(){return this._isValid},ry.abs=function(){var e=this._data;return this._milliseconds=tX(this._milliseconds),this._days=tX(this._days),this._months=tX(this._months),e.milliseconds=tX(e.milliseconds),e.seconds=tX(e.seconds),e.minutes=tX(e.minutes),e.hours=tX(e.hours),e.months=tX(e.months),e.years=tX(e.years),this},ry.add=function(e,t){return tZ(this,e,t,1)},ry.subtract=function(e,t){return tZ(this,e,t,-1)},ry.as=function(e){if(!this.isValid())return 0/0;var t,r,n=this._milliseconds;if("month"===(e=F(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+t0(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(t1(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw Error("Unknown unit "+e)}},ry.asMilliseconds=t5,ry.asSeconds=t3,ry.asMinutes=t6,ry.asHours=t4,ry.asDays=t8,ry.asWeeks=t9,ry.asMonths=t7,ry.asQuarters=re,ry.asYears=rt,ry.valueOf=t5,ry._bubble=function(){var e,t,r,n,i,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*tQ(t1(a)+s),s=0,a=0),l.milliseconds=o%1e3,l.seconds=(e=ef(o/1e3))%60,l.minutes=(t=ef(e/60))%60,l.hours=(r=ef(t/60))%24,s+=ef(r/24),a+=i=ef(t0(s)),s-=tQ(t1(i)),n=ef(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},ry.clone=function(){return tS(this)},ry.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():0/0},ry.milliseconds=rn,ry.seconds=ri,ry.minutes=ro,ry.hours=rs,ry.days=ra,ry.weeks=function(){return ef(this.days()/7)},ry.months=rl,ry.years=rc,ry.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i,o,s,a,l,c,u,d,f,h,p,g=!1,y=rd;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(g=e),"object"==typeof t&&(y=Object.assign({},rd,t),null!=t.s&&null==t.ss&&(y.ss=t.s-1)),h=this.localeData(),r=!g,n=y,i=tS(this).abs(),o=ru(i.as("s")),s=ru(i.as("m")),a=ru(i.as("h")),l=ru(i.as("d")),c=ru(i.as("M")),u=ru(i.as("w")),d=ru(i.as("y")),f=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l],null!=n.w&&(f=f||u<=1&&["w"]||u<n.w&&["ww",u]),(f=f||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=r,f[3]=+this>0,f[4]=h,p=rf.apply(null,f),g&&(p=h.pastFuture(+this,p)),h.postformat(p)},ry.toISOString=rg,ry.toString=rg,ry.toJSON=rg,ry.locale=tC,ry.localeData=tM,ry.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",rg),ry.lang=tT,I("X",0,0,"unix"),I("x",0,0,"valueOf"),eu("x",ei),eu("X",/[+-]?\d+(\.\d{1,3})?/),eg("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e))}),eg("x",function(e,t,r){r._d=new Date(eh(e))}),t.version="2.30.1",W=ts,t.fn=tG,t.min=function(){var e=[].slice.call(arguments,0);return tc("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return tc("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=f,t.unix=function(e){return ts(1e3*e)},t.months=function(e,t){return t$(e,t,"months")},t.isDate=c,t.locale=eX,t.invalid=g,t.duration=tS,t.isMoment=S,t.weekdays=function(e,t,r){return tJ(e,t,r,"weekdays")},t.parseZone=function(){return ts.apply(null,arguments).parseZone()},t.localeData=eQ,t.isDuration=tf,t.monthsShort=function(e,t){return t$(e,t,"monthsShort")},t.weekdaysMin=function(e,t,r){return tJ(e,t,r,"weekdaysMin")},t.defineLocale=eZ,t.updateLocale=function(e,t){if(null!=t){var r,n,i=eK;null!=ez[e]&&null!=ez[e].parentLocale?ez[e].set(R(ez[e]._config,t)):(null!=(n=eJ(e))&&(i=n._config),t=R(i,t),null==n&&(t.abbr=e),(r=new A(t)).parentLocale=ez[e],ez[e]=r),eX(e)}else null!=ez[e]&&(null!=ez[e].parentLocale?(ez[e]=ez[e].parentLocale,e===eX()&&eX(e)):null!=ez[e]&&delete ez[e]);return ez[e]},t.locales=function(){return G(ez)},t.weekdaysShort=function(e,t,r){return tJ(e,t,r,"weekdaysShort")},t.normalizeUnits=F,t.relativeTimeRounding=function(e){return void 0===e?ru:"function"==typeof e&&(ru=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==rd[e]&&(void 0===t?rd[e]:(rd[e]=t,"s"===e&&(rd.ss=t-1),!0))},t.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},t.prototype=tG,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}()},3118(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=3118,e.exports=t},3109(e,t,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&l&&"function"==typeof l.get?l.get:null,u=a&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=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,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D?"object":"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(1/0===e||-1/0===e||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 i=String(n),o=v.call(t,i.length+1);return b.call(i,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var I=r(6550),j=I.custom,L=B(j)?j:null,U={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function Y(e,t,r){var n=U[r.quoteStyle||t];return n+e+n}function W(e){return!C||!("object"==typeof e&&(C in e||void 0!==e[C]))}function V(e){return"[object Array]"===z(e)&&W(e)}function H(e){return"[object RegExp]"===z(e)&&W(e)}function B(e){if(D)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,i,a){var l,g,_,S,x,R=n||{};if(K(R,"quoteStyle")&&!K(U,R.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(K(R,"maxStringLength")&&("number"==typeof R.maxStringLength?R.maxStringLength<0&&1/0!==R.maxStringLength:null!==R.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var j=!K(R,"customInspect")||R.customInspect;if("boolean"!=typeof j&&"symbol"!==j)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(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(K(R,"numericSeparator")&&"boolean"!=typeof R.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var G=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(v.call(t,0,r.maxStringLength),r)+("... "+n)+" more character"+(n>1?"s":"")}var i=F[r.quoteStyle||"single"];return i.lastIndex=0,Y(b.call(b.call(t,i,"\\$1"),/[\x00-\x1f]/g,$),"single",r)}(t,R);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var et=String(t);return G?N(t,et):et}if("bigint"==typeof t){var er=String(t)+"n";return G?N(t,er):er}var en=void 0===R.depth?5:R.depth;if(void 0===i&&(i=0),i>=en&&en>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var ei=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,i);if(void 0===a)a=[];else if(q(a,t)>=0)return"[Circular]";function eo(t,r,n){if(r&&(a=E.call(a)).push(r),n){var o={depth:R.depth};return K(R,"quoteStyle")&&(o.quoteStyle=R.quoteStyle),e(t,o,i+1,a)}return e(t,R,i+1,a)}if("function"==typeof t&&!H(t)){var es=function(e){if(e.name)return e.name;var t=m.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ea=ee(t,eo);return"[Function"+(es?": "+es:" (anonymous)")+"]"+(ea.length>0?" { "+O.call(ea,", ")+" }":"")}if(B(t)){var el=D?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(t);return"object"!=typeof t||D?el:J(el)}if((ec=t)&&"object"==typeof ec&&("u">typeof HTMLElement&&ec instanceof HTMLElement||"string"==typeof ec.nodeName&&"function"==typeof ec.getAttribute)){for(var ec,eu,ed="<"+w.call(String(t.nodeName)),ef=t.attributes||[],eh=0;eh<ef.length;eh++){ed+=" "+ef[eh].name+"="+Y((eu=ef[eh].value,b.call(String(eu),/"/g,"&quot;")),"double",R)}return ed+=">",t.childNodes&&t.childNodes.length&&(ed+="..."),ed+="</"+w.call(String(t.nodeName))+">"}if(V(t)){if(0===t.length)return"[]";var ep=ee(t,eo);return ei&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ep)?"["+Q(ep,ei)+"]":"[ "+O.call(ep,", ")+" ]"}if("[object Error]"===z(l=t)&&W(l)){var eg=ee(t,eo);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===eg.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(eg,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+eo(t.cause),eg),", ")+" }"}if("object"==typeof t&&j){if(L&&"function"==typeof t[L]&&I)return I(t,{depth:en-i});else if("symbol"!==j&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ey=[];return s&&s.call(t,function(e,r){ey.push(eo(r,t,!0)+" => "+eo(e,t))}),Z("Map",o.call(t),ey,ei)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var em=[];return u&&u.call(t,function(e){em.push(eo(e,t))}),Z("Set",c.call(t),em,ei)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if("[object Number]"===z(g=t)&&W(g))return J(eo(Number(t)));if(function(e){if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}(t))return J(eo(P.call(t)));if("[object Boolean]"===z(_=t)&&W(_))return J(p.call(t));if("[object String]"===z(S=t)&&W(S))return J(eo(String(t)));if("u">typeof window&&t===window)return"{ [object Window] }";if("u">typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===z(x=t)&&W(x))&&!H(t)){var ev=ee(t,eo),eb=M?M(t)===Object.prototype:t instanceof Object||t.constructor===Object,e_=t instanceof Object?"":"null prototype",ew=!eb&&C&&Object(t)===t&&C in t?v.call(z(t),8,-1):e_?"Object":"",eS=(eb||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ew||e_?"["+O.call(k.call([],ew||[],e_||[]),": ")+"] ":"");return 0===ev.length?eS+"{}":ei?eS+"{"+Q(ev,ei)+"}":eS+"{ "+O.call(ev,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function z(e){return g.call(e)}function q(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 $(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 J(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Z(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):O.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r,n=V(e),i=[];if(n){i.length=e.length;for(var o=0;o<e.length;o++)i[o]=K(e,o)?t(e[o],e):""}var s="function"==typeof R?R(e):[];if(D){r={};for(var a=0;a<s.length;a++)r["$"+s[a]]=s[a]}for(var l in e)if(K(e,l)&&(!n||String(Number(l))!==l||!(l<e.length)))if(D&&r["$"+l]instanceof Symbol)continue;else S.call(/[^\w$]/,l)?i.push(t(l,e)+": "+t(e[l],e)):i.push(l+": "+t(e[l],e));if("function"==typeof R)for(var c=0;c<s.length;c++)T.call(e,s[c])&&i.push("["+t(s[c])+"]: "+t(e[s[c]],e));return i}},4461(e,t,r){e=r.nmd(e),(function(){"use strict";var n={function:!0,object:!0},i=n[typeof window]&&window||this,o=n[typeof t]&&t,s=n.object&&e&&!e.nodeType&&e,a=o&&s&&"object"==typeof r.g&&r.g;a&&(a.global===a||a.window===a||a.self===a)&&(i=a);var l=/\bOpera/,c=Object.prototype,u=c.hasOwnProperty,d=c.toString;function f(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function h(e){return e=v(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:f(e)}function p(e,t){for(var r in e)u.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?f(e):d.call(e).slice(8,-1)}function y(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function m(e,t){var r=null,n=function(n,i){r=t(r,n,i,e)},i=-1,o=e?e.length:0;if("number"==typeof o&&o>-1&&o<=0x1fffffffffffff)for(;++i<o;)n(e[i],i);else p(e,n);return r}function v(e){return String(e).replace(/^ +| +$/g,"")}function b(e){var t,r,n,o,s,a=i,c=e&&"object"==typeof e&&"String"!=g(e);c&&(a=e,e=null);var u=a.navigator||{},f=u.userAgent||"";e||(e=f);var _=c?!!u.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(d.toString()),w="Object",S=c&&a.java?"JavaPackage":g(a.java),k=/\bJava/.test(S)&&a.java,O=k&&g(a.environment)==(c?w:"Environment"),E=k?"a":"α",x=k?"b":"β",P=a.document||{},R=a.operamini||a.opera,A=l.test(A=c&&R?R["[[Class]]"]:g(R))?A:R=null,D=e,C=[],T=null,M=e==f,N=M&&R&&"function"==typeof R.version&&R.version(),I=m([{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)}),j=m(["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)}),L=Y([{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"]),U=m({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[L]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(L)]||RegExp("\\b"+y(n)+"(?:\\b|\\w*\\d)","i").exec(e))&&n}),F=m(["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,i,o,s=r.pattern||y(r);return!t&&(t=RegExp("\\b"+s+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(n=t,i=r.label||r,o={"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"},s&&i&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(o=o[/[\d.]+$/.exec(n)])&&(n="Windows "+o),n=String(n),s&&i&&(n=n.replace(RegExp(s,"i"),i)),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 Y(t){return m(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 m(t,function(t,r){return t||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(I&&(I=[I]),/\bAndroid\b/.test(F)&&!L&&(o=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(L=v(o[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),U&&!L?L=Y([U]):U&&L&&(L=L.replace(RegExp("^("+y(U)+")[-_.\\s]","i"),U+" ").replace(RegExp("^("+y(U)+")[-_.]?(\\w)","i"),U+" $2")),(o=/\bGoogle TV\b/.exec(L))&&(L=o[0]),/\bSimulator\b/i.test(e)&&(L=(L?L+" ":"")+"Simulator"),"Opera Mini"==j&&/\bOPiOS\b/.test(e)&&C.push("running in Turbo/Uncompressed mode"),"IE"==j&&/\blike iPhone OS\b/.test(e)?(U=(o=b(e.replace(/like iPhone OS/,""))).manufacturer,L=o.product):/^iP/.test(L)?(j||(j="Safari"),F="iOS"+((o=/ OS ([\d_]+)/i.exec(e))?" "+o[1].replace(/_/g,"."):"")):"Konqueror"==j&&/^Linux\b/i.test(F)?F="Kubuntu":U&&"Google"!=U&&(/Chrome/.test(j)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(L))||/\bAndroid\b/.test(F)&&/^Chrome/.test(j)&&/\bVersion\//i.test(e)?(j="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==j?(/\bMobi/i.test(e)||(F="Android",C.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&C.unshift("accelerated")):"UC Browser"==j&&/\bUCWEB\b/.test(e)?C.push("speed mode"):"PaleMoon"==j&&(o=/\bFirefox\/([\d.]+)\b/.exec(e))?C.push("identifying as Firefox "+o[1]):"Firefox"==j&&(o=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),L||(L=o[1])):!j||(o=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(j))?(j&&!L&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(o+"/")+8))&&(j=null),(o=L||U||F)&&(L||U||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(j=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:o)+" Browser")):"Electron"==j&&(o=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&C.push("Chromium "+o),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(j),"(?:Firefox|Minefield|NetFront)"])),(o="iCab"==I&&parseFloat(N)>3&&"WebKit"||/\bOpera\b/.test(j)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(I)&&"WebKit"||!I&&/\bMSIE\b/i.test(e)&&("Mac OS"==F?"Tasman":"Trident")||"WebKit"==I&&/\bPlayStation\b(?! Vita\b)/i.test(j)&&"NetFront")&&(I=[o]),"IE"==j&&(o=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(j+=" Mobile",F="Windows Phone "+(/\+$/.test(o)?o:o+".x"),C.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(j="IE Mobile",F="Windows Phone 8.x",C.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=j&&"Trident"==I&&(o=/\brv:([\d.]+)/.exec(e))&&(j&&C.push("identifying as "+j+(N?" "+N:"")),j="IE",N=o[1]),M){if(r="global",n=null!=(t=a)?typeof t[r]:"number",/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!t[r])g(o=a.runtime)==(c?w:"ScriptBridgingProxyObject")?(j="Adobe AIR",F=o.flash.system.Capabilities.os):g(o=a.phantom)==(c?w:"RuntimeObject")?(j="PhantomJS",N=(o=o.version||null)&&o.major+"."+o.minor+"."+o.patch):"number"==typeof P.documentMode&&(o=/\bTrident\/(\d+)/i.exec(e))?(N=[N,P.documentMode],(o=+o[1]+4)!=N[1]&&(C.push("IE "+N[1]+" mode"),I&&(I[1]=""),N[1]=o),N="IE"==j?String(N[1].toFixed(1)):N[0]):"number"==typeof P.documentMode&&/^(?:Chrome|Firefox)\b/.test(j)&&(C.push("masking as "+j+" "+N),j="IE",N="11.0",I=["Trident"],F="Windows");else if(k&&(D=(o=k.lang.System).getProperty("os.arch"),F=F||o.getProperty("os.name")+" "+o.getProperty("os.version")),O){try{N=a.require("ringo/engine").version.join("."),j="RingoJS"}catch(e){(o=a.system)&&o.global.system==a.system&&(j="Narwhal",F||(F=o[0].os||null))}j||(j="Rhino")}else"object"==typeof a.process&&!a.process.browser&&(o=a.process)&&("object"==typeof o.versions&&("string"==typeof o.versions.electron?(C.push("Node "+o.versions.node),j="Electron",N=o.versions.electron):"string"==typeof o.versions.nw&&(C.push("Chromium "+N,"Node "+o.versions.node),j="NW.js",N=o.versions.nw)),j||(j="Node.js",D=o.arch,F=o.platform,N=(N=/[\d.]+/.exec(o.version))?N[0]:null));F=F&&h(F)}if(N&&(o=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(M&&u.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(T=/b/i.test(o)?"beta":"alpha",N=N.replace(RegExp(o+"\\+?$"),"")+("beta"==T?x:E)+(/\d+\+?/.exec(o)||"")),"Fennec"==j||"Firefox"==j&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))j="Firefox Mobile";else if("Maxthon"==j&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(L))"Xbox 360"==L&&(F=null),"Xbox 360"==L&&/\bIEMobile\b/.test(e)&&C.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(j)||j&&!L&&!/Browser|Mobi/.test(j))&&("Windows CE"==F||/Mobi/i.test(e)))j+=" Mobile";else if("IE"==j&&M)try{null===a.external&&C.unshift("platform preview")}catch(e){C.unshift("embedded")}else(/\bBlackBerry\b/.test(L)||/\bBB10\b/.test(e))&&(o=(RegExp(L.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||N)?(F=((o=[o,/BB10/.test(e)])[1]?(L=null,U="BlackBerry"):"Device Software")+" "+o[0],N=null):this!=p&&"Wii"!=L&&(M&&R||/Opera/.test(j)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==j&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==j&&(F&&!/^Win/.test(F)&&N>5.5||/\bWindows XP\b/.test(F)&&N>8||8==N&&!/\bTrident\b/.test(e)))&&!l.test(o=b.call(p,e.replace(l,"")+";"))&&o.name&&(o="ing as "+o.name+((o=o.version)?" "+o:""),l.test(j)?(/\bIE\b/.test(o)&&"Mac OS"==F&&(F=null),o="identify"+o):(o="mask"+o,j=A?h(A.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(o)&&(F=null),M||(N=null)),I=["Presto"],C.push(o));(o=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(o=[parseFloat(o.replace(/\.(\d)$/,".0$1")),o],"Safari"==j&&"+"==o[1].slice(-1)?(j="WebKit Nightly",T="alpha",N=o[1].slice(0,-1)):(N==o[1]||N==(o[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(N=null),o[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==o[0]&&537.36==o[2]&&parseFloat(o[1])>=28&&"WebKit"==I&&(I=["Blink"]),M&&(_||o[1])?(I&&(I[1]="like Chrome"),o=o[1]||((o=o[0])<530?1:o<532?2:o<532.05?3:o<533?4:o<534.03?5:o<534.07?6:o<534.1?7:o<534.13?8:o<534.16?9:o<534.24?10:o<534.3?11:o<535.01?12:o<535.02?"13+":o<535.07?15:o<535.11?16:o<535.19?17:o<536.05?18:o<536.1?19:o<537.01?20:o<537.11?"21+":o<537.13?23:o<537.18?24:o<537.24?25:o<537.36?26:"Blink"!=I?"27":"28")):(I&&(I[1]="like Safari"),o=(o=o[0])<400?1:o<500?2:o<526?3:o<533?4:o<534?"4+":o<535?5:o<537?6:o<538?7:o<601?8:o<602?9:o<604?10:o<606?11:o<608?12:"12"),I&&(I[1]+=" "+(o+="number"==typeof o?".x":/[.+]/.test(o)?"":"+")),"Safari"==j&&(!N||parseInt(N)>45)?N=o:"Chrome"==j&&/\bHeadlessChrome/i.test(e)&&C.unshift("headless")),"Opera"==j&&(o=/\bzbov|zvav$/.exec(F))?(j+=" ",C.unshift("desktop mode"),"zvav"==o?(j+="Mini",N=null):j+="Mobile",F=F.replace(RegExp(" *"+o+"$"),"")):"Safari"==j&&/\bChrome\b/.exec(I&&I[1])?(C.unshift("desktop mode"),j="Chrome Mobile",N=null,/\bOS X\b/.test(F)?(U="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(j)&&!N&&(N=W("Chrome")),N&&0==N.indexOf(o=/[\d.]+$/.exec(F))&&e.indexOf("/"+o+"-")>-1&&(F=v(F.replace(o,""))),F&&-1!=F.indexOf(j)&&!RegExp(j+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(j)+" *"),"")),I&&!/\b(?:Avant|Nook)\b/.test(j)&&(/Browser|Lunascape|Maxthon/.test(j)||"Safari"!=j&&/^iOS/.test(F)&&/\bSafari\b/.test(I[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(j)&&I[1])&&(o=I[I.length-1])&&C.push(o),C.length&&(C=["("+C.join("; ")+")"]),U&&L&&0>L.indexOf(U)&&C.push("on "+U),L&&C.push((/^on /.test(C[C.length-1])?"":"on ")+L),F&&(s=(o=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-o[0].length-1),F={architecture:32,family:o&&!s?F.replace(o[0],""):F,version:o?o[1]:null,toString:function(){var e=this.version;return this.family+(e&&!s?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(o=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(D))&&!/\bi686\b/i.test(D)?(F&&(F.architecture=64,F.family=F.family.replace(RegExp(" *"+o),"")),j&&(/\bWOW64\b/i.test(e)||M&&/\w(?:86|32)$/.test(u.cpuClass||u.platform)&&!/\bWin64; x64\b/i.test(e))&&C.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==j&&parseFloat(N)>=39&&(F.architecture=64),e||(e=null);var V={};return V.description=e,V.layout=I&&I[0],V.manufacturer=U,V.name=j,V.prerelease=T,V.product=L,V.ua=e,V.version=j&&N,V.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},V.parse=b,V.toString=function(){return this.description||""},V.version&&C.unshift(N),V.name&&C.unshift(j),F&&j&&!(F==String(F).split(" ")[0]&&(F==j.split(" ")[0]||L))&&C.push(L?"("+F+")":"on "+F),C.length&&(V.description=C.join(" ")),V}var _=b();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(i.platform=_,define(function(){return _})):o&&s?p(_,function(e,t){o[t]=e}):i.platform=_}).call(this)},5539(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}},8183(e,t,r){"use strict";var n=r(6334),i=r(4816);e.exports={formats:r(5539),parse:i,stringify:n}},4816(e,t,r){"use strict";var n=r(1954),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t){var r={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c=1/0===t.parameterLimit?void 0:t.parameterLimit,u=l.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==c?c+1:c);if(t.throwOnLimitExceeded&&void 0!==c&&u.length>c)throw RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var d=-1,f=t.charset;if(t.charsetSentinel)for(h=0;h<u.length;++h)0===u[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[h]?f="utf-8":"utf8=%26%2310003%3B"===u[h]&&(f="iso-8859-1"),d=h,h=u.length);for(h=0;h<u.length;++h)if(h!==d){var h,p,g,y=u[h],m=y.indexOf("]="),v=-1===m?y.indexOf("="):m+1;if(-1===v?(p=t.decoder(y,s.decoder,f,"key"),g=t.strictNullHandling?null:""):null!==(p=t.decoder(y.slice(0,v),s.decoder,f,"key"))&&(g=n.maybeMap(a(y.slice(v+1),t,o(r[p])?r[p].length:0),function(e){return t.decoder(e,s.decoder,f,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=String(g).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),t.comma&&o(g)&&g.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");g=n.combine([],g,t.arrayLimit,t.plainObjects)}if(null!==p){var b=i.call(r,p);b&&("combine"===t.duplicates||y.indexOf("[]=")>-1)?r[p]=n.combine(r[p],g,t.arrayLimit,t.plainObjects):b&&"last"!==t.duplicates||(r[p]=g)}}return r},c=function(e,t,r,i){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var s=e.slice(0,-1).join("");o=Array.isArray(t)&&t[s]?t[s].length:0}for(var l=i?t:a(t,r,o),c=e.length-1;c>=0;--c){var u,d=e[c];if("[]"===d&&r.parseArrays)u=n.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:n.combine([],l,r.arrayLimit,r.plainObjects);else{u=r.plainObjects?{__proto__:null}:{};var f="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,h=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,p=parseInt(h,10),g=!isNaN(p)&&d!==h&&String(p)===h&&p>=0&&r.parseArrays;if(r.parseArrays||""!==h)if(g&&p<r.arrayLimit)(u=[])[p]=l;else if(g&&r.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");else g?(u[p]=l,n.markOverflow(u,p)):"__proto__"!==h&&(u[h]=l);else u={0:l}}l=u}return l},u=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&i.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=[],o=r.indexOf("["),s=o>=0?r.slice(0,o):r;if(s){if(!t.plainObjects&&i.call(Object.prototype,s)&&!t.allowPrototypes)return;n[n.length]=s}for(var a=r.length,l=o,c=0;l>=0&&c<t.depth;){for(var u=1,d=l+1,f=-1;d<a&&f<0;){var h=r.charCodeAt(d);91===h?u+=1:93===h&&0==(u-=1)&&(f=d),d+=1}if(f<0)return n[n.length]="["+r.slice(l)+"]",n;var p=r.slice(l,f+1),g=p.slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,g)&&!t.allowPrototypes)return;n[n.length]=p,c+=1,l=r.indexOf("[",f+1)}if(l>=0){if(!0===t.strictDepth)throw RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");n[n.length]="["+r.slice(l)+"]"}return n},d=function(e,t,r,n){if(e){var i=u(e,r);if(i)return c(i,t,r,n)}},f=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?s.charset:e.charset,r=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:s.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};e.exports=function(e,t){var r=f(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?l(e,r):e,o=r.plainObjects?{__proto__:null}:{},s=Object.keys(i),a=0;a<s.length;++a){var c=s[a],u=d(c,i[c],r,"string"==typeof e);o=n.merge(o,u,r)}return!0===r.allowSparse?o:n.compact(o)}},6334(e,t,r){"use strict";var n=r(6278),i=r(1954),o=r(5539),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,f=o.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},g=function e(t,r,o,s,a,c,d,f,g,y,m,v,b,_,w,S,k,O){for(var E,x,P=t,R=O,A=0,D=!1;void 0!==(R=R.get(p))&&!D;){var C=R.get(t);if(A+=1,void 0!==C)if(C===A)throw RangeError("Cyclic object value");else D=!0;void 0===R.get(p)&&(A=0)}if("function"==typeof y?P=y(r,P):P instanceof Date?P=b(P):"comma"===o&&l(P)&&(P=i.maybeMap(P,function(e){return e instanceof Date?b(e):e})),null===P){if(c)return w(g&&!S?g(r,h.encoder,k,"key",_):r);P=""}if("string"==typeof(E=P)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(P))return g?[w(S?r:g(r,h.encoder,k,"key",_))+"="+w(g(P,h.encoder,k,"value",_))]:[w(r)+"="+w(String(P))];var T=[];if(void 0===P)return T;if("comma"===o&&l(P))S&&g&&(P=i.maybeMap(P,function(e){return null==e?e:g(e)})),x=[{value:P.length>0?P.join(",")||null:void 0}];else if(l(y))x=y;else{var M=Object.keys(P);x=m?M.sort(m):M}var N=f?String(r).replace(/\./g,"%2E"):String(r),I=s&&l(P)&&1===P.length?N+"[]":N;if(a&&l(P)&&0===P.length)return I+"[]";for(var j=0;j<x.length;++j){var L=x[j],U="object"==typeof L&&L&&void 0!==L.value?L.value:P[L];if(!d||null!==U){var F=v&&f?String(L).replace(/\./g,"%2E"):String(L),Y=l(P)?"function"==typeof o?o(I,F):I:I+(v?"."+F:"["+F+"]");O.set(t,A);var W=n();W.set(p,O),u(T,e(U,Y,o,s,a,c,d,f,"comma"===o&&S&&l(P)?null:g,y,m,v,b,_,w,S,k,W))}}return T},y=function(e){if(!e)return h;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t,r=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 n=o.default;if(void 0!==e.format){if(!s.call(o.formatters,e.format))throw TypeError("Unknown format option provided.");n=e.format}var i=o.formatters[n],c=h.filter;if(("function"==typeof e.filter||l(e.filter))&&(c=e.filter),t=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||h.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:t,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:c,format:n,formatter:i,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,i=e,o=y(t);"function"==typeof o.filter?i=(0,o.filter)("",i):l(o.filter)&&(r=o.filter);var s=[];if("object"!=typeof i||null===i)return"";var c=a[o.arrayFormat],d="comma"===c&&o.commaRoundTrip;r||(r=Object.keys(i)),o.sort&&r.sort(o.sort);for(var f=n(),h=0;h<r.length;++h){var p=r[h];if(null!=p){var m=i[p];o.skipNulls&&null===m||u(s,g(m,p,c,d,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,f))}}var v=s.join(o.delimiter),b=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?b+="utf8=%26%2310003%3B"+o.delimiter:b+="utf8=%E2%9C%93"+o.delimiter),v.length>0?b+v:""}},1954(e,t,r){"use strict";var n=r(5539),i=r(6278),o=Object.prototype.hasOwnProperty,s=Array.isArray,a=i(),l=function(e,t){return a.set(e,t),e},c=function(e){return a.has(e)},u=function(e){return a.get(e)},d=function(e,t){a.set(e,t)},f=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),h=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&(n[n.length]=r[i]);t.obj[t.prop]=n}}},p=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:p,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t,r,n){if(c(e)){var i=u(e)+1;return e[i]=t,d(e,i),e}var o=[].concat(e,t);return o.length>r?l(p(o,{plainObjects:n}),o.length-1):o},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],s=Object.keys(o),a=0;a<s.length;++a){var l=s[a],c=o[l];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t[t.length]={obj:o,prop:l},r[r.length]=c)}return h(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,i,o){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 a="",l=0;l<s.length;l+=1024){for(var c=s.length>=1024?s.slice(l,l+1024):s,u=[],d=0;d<c.length;++d){var h=c.charCodeAt(d);if(45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===n.RFC1738&&(40===h||41===h)){u[u.length]=c.charAt(d);continue}if(h<128){u[u.length]=f[h];continue}if(h<2048){u[u.length]=f[192|h>>6]+f[128|63&h];continue}if(h<55296||h>=57344){u[u.length]=f[224|h>>12]+f[128|h>>6&63]+f[128|63&h];continue}d+=1,h=65536+((1023&h)<<10|1023&c.charCodeAt(d)),u[u.length]=f[240|h>>18]+f[128|h>>12&63]+f[128|h>>6&63]+f[128|63&h]}a+=u.join("")}return a},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:c,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:l,maybeMap:function(e,t){if(s(e)){for(var r=[],n=0;n<e.length;n+=1)r[r.length]=t(e[n]);return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t)){var i=t.length;if(n&&"number"==typeof n.arrayLimit&&i>n.arrayLimit)return l(p(t.concat(r),n),i);t[i]=r}else if(!t||"object"!=typeof t)return[t,r];else if(c(t)){var a=u(t)+1;t[a]=r,d(t,a)}else{if(n&&n.strictMerge)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(c(r)){for(var f=Object.keys(r),h=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<f.length;g++)h[parseInt(f[g],10)+1]=r[f[g]];return l(h,u(r)+1)}var y=[t].concat(r);return n&&"number"==typeof n.arrayLimit&&y.length>n.arrayLimit?l(p(y,n),y.length-1):y}var m=t;return(s(t)&&!s(r)&&(m=p(t,n)),s(t)&&s(r))?(r.forEach(function(r,i){if(o.call(t,i)){var s=t[i];s&&"object"==typeof s&&r&&"object"==typeof r?t[i]=e(s,r,n):t[t.length]=r}else t[i]=r}),t):Object.keys(r).reduce(function(t,i){var s=r[i];if(o.call(t,i)?t[i]=e(t[i],s,n):t[i]=s,c(r)&&!c(t)&&l(t,u(r)),c(t)){var a=parseInt(i,10);String(a)===i&&a>=0&&a>u(t)&&d(t,a)}return t},m)}}},6521(e,t,r){"use strict";var n=r(3109),i=r(6757),o=function(e,t,r){for(var n,i=e;null!=(n=i.next);i=n)if(n.key===t)return i.next=n.next,r||(n.next=e.next,e.next=n),n},s=function(e,t){if(e){var r=o(e,t);return r&&r.value}},a=function(e,t,r){var n=o(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},l=function(e,t){if(e)return o(e,t,!0)};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=l(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return s(e,t)},has:function(t){var r;return!!(r=e)&&!!o(r,t)},set:function(t,r){e||(e={next:void 0}),a(e,t,r)}};return t}},3977(e,t,r){"use strict";var n=r(4295),i=r(8682),o=r(3109),s=r(6757),a=n("%Map%",!0),l=i("Map.prototype.get",!0),c=i("Map.prototype.set",!0),u=i("Map.prototype.has",!0),d=i("Map.prototype.delete",!0),f=i("Map.prototype.size",!0);e.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new s("Side channel does not contain "+o(e))},delete:function(t){if(e){var r=d(e,t);return 0===f(e)&&(e=void 0),r}return!1},get:function(t){if(e)return l(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new a),c(e,t,r)}};return t}},8965(e,t,r){"use strict";var n=r(4295),i=r(8682),o=r(3109),s=r(3977),a=r(6757),l=n("%WeakMap%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),d=i("WeakMap.prototype.has",!0),f=i("WeakMap.prototype.delete",!0);e.exports=l?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},delete:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(s&&t)return t.delete(r);return!1},get:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):t&&t.get(r)},has:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?d(e,r):!!t&&t.has(r)},set:function(r,n){l&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new l),u(e,r,n)):s&&(t||(t=s()),t.set(r,n))}};return r}:s},6278(e,t,r){"use strict";var n=r(6757),i=r(3109),o=r(6521),s=r(3977),a=r(8965)||s||o;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},4532(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}(),i=n&&"a=1"===new n({a:1}).toString(),o=n&&"+"===new n("s=%2B").get("s"),s=n&&"size"in n.prototype,a="__URLSearchParams__",l=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),c=h.prototype,u=!!(e.Symbol&&e.Symbol.iterator);if(!n||!i||!o||!l||!s){c.append=function(e,t){v(this[a],e,t)},c.delete=function(e){delete this[a][e]},c.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},c.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},c.has=function(e){return _(this[a],e)},c.set=function(e,t){this[a][e]=[""+t]},c.toString=function(){var e,t,r,n,i=this[a],o=[];for(t in i)for(r=p(t),e=0,n=i[t];e<n.length;e++)o.push(r+"="+p(n[e]));return o.join("&")};var d=e.Proxy&&n&&(!o||!l||!i||!s);d?(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 f=e.URLSearchParams.prototype;f.polyfill=!0,!d&&e.Symbol&&(f[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in f||(f.forEach=function(e,t){var r=m(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){e.call(t,r,n,this)},this)},this)}),"sort"in f||(f.sort=function(){var e,t,r,n=m(this.toString()),i=[];for(e in n)i.push(e);for(i.sort(),t=0;t<i.length;t++)this.delete(i[t]);for(t=0;t<i.length;t++){var o=i[t],s=n[o];for(r=0;r<s.length;r++)this.append(o,s[r])}}),"keys"in f||(f.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),y(e)}),"values"in f||(f.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),y(e)}),"entries"in f||(f.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),y(e)}),u&&(f[e.Symbol.iterator]=f[e.Symbol.iterator]||f.entries),"size"in f||Object.defineProperty(f,"size",{get:function(){var e=m(this.toString());if(f===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[a]=m(e)}function p(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 u&&(r[e.Symbol.iterator]=function(){return r}),r}function m(e){var t={};if("object"==typeof e)if(b(e))for(var r=0;r<e.length;r++){var n=e[r];if(b(n)&&2===n.length)v(t,n[0],n[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var i in e)e.hasOwnProperty(i)&&v(t,i,e[i]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var o=e.split("&"),s=0;s<o.length;s++){var a=o[s],l=a.indexOf("=");-1<l?v(t,g(a.slice(0,l)),g(a.slice(l+1))):a&&v(t,g(a),"")}}return t}function v(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 b(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:"u">typeof window?window:this)},9368(e){"use strict";e.exports=__rspack_external__9368},650(e){"use strict";e.exports=__rspack_external__650},9207(e){"use strict";e.exports=__rspack_external__9207},5610(){},7791(){},6550(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t,n)=>{var i=(t,n)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[n]:t[i]})};i(t,"get"),i(n,"value")},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";let e;r.r(n),r.d(n,{Console:()=>tm,DEFAULT_ICONSET:()=>re,DEFAULT_LANGUAGES:()=>rn,DefaultBoxShadow:()=>t9,DefaultBoxShadowBottom:()=>t8,DefaultColor1:()=>tZ,DefaultColor10:()=>t6,DefaultColor11:()=>t4,DefaultColor2:()=>tQ,DefaultColor3:()=>t5,DefaultColor4:()=>tJ,DefaultColor5:()=>t0,DefaultColor6:()=>t1,DefaultColor7:()=>tX,DefaultColor8:()=>t2,DefaultColor9:()=>t3,DefaultDisabledOpacity:()=>"0.3",DefaultHeaderHeight:()=>"50px",EventProviderStatus:()=>s,I18NEXT_TO_MOMENT_LOCALE:()=>ri,Manager:()=>rs,OPENREMOTE_CLIENT_ID:()=>rt,ORError:()=>a,OREvent:()=>l,RESTRICTED_USER_REALM_ROLE:()=>rr,Util:()=>c,WebSocketEventProvider:()=>tx,default:()=>rl,manager:()=>ra,normaliseConfig:()=>ro,subscribe:()=>t$});var t,i,o,s,a,l,c={};r.r(c),r.d(c,{AssetQueryHelper:()=>tp,Deferred:()=>eS,arrayRemove:()=>eN,blobToBase64:()=>tf,camelCaseToSentenceCase:()=>ej,capitaliseFirstLetter:()=>eU,cronStringToISOString:()=>eB,dateToCronString:()=>eH,difference:()=>eM,dispatchCancellableEvent:()=>td,formatCronString:()=>eV,generateUniqueUUID:()=>th,getAllowedValueLabel:()=>eQ,getAssetTypeLabel:()=>eX,getAttributeLabel:()=>e1,getAttributeUnits:()=>tt,getAttributeValueAsString:()=>e3,getAttributeValueConstraints:()=>e7,getAttributeValueFormat:()=>tn,getBrowserLanguage:()=>ek,getComplexMetaItems:()=>eJ,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>ex,getMetaItemNameValueHolder:()=>e0,getMetaLabel:()=>e2,getMetaUnits:()=>tr,getMetaValue:()=>eG,getMetaValueAsString:()=>e6,getMetaValueConstraints:()=>te,getMetaValueFormat:()=>ti,getPrimitiveMetaItems:()=>e$,getQueryParameter:()=>eE,getQueryParameters:()=>eO,getValueAsString:()=>e8,getValueDescriptorLabel:()=>eZ,getWeekNumber:()=>eY,hasMetaItem:()=>eK,isComplexValueDescriptor:()=>eq,isObject:()=>eC,isPrimitiveValueDescriptor:()=>ez,isTimeDuration:()=>eR,isTimeDurationNegativeInfinity:()=>eD,isTimeDurationPositiveInfinity:()=>eA,loadJs:()=>tl,mergeObjects:()=>function e(t,r,n){if(t&&!r)return Object.assign({},t);if(r&&!t)return Object.assign({},r);let i=Object.assign({},t),o=[];return Object.entries(r).forEach(([t,r])=>{var s,a,l,c,u;let d;s=i,a=o,l=t,c=r,u=n,d=s,a.forEach(e=>{d.hasOwnProperty(e)||(d[e]={}),d=d[e]}),d&&(d.hasOwnProperty(l)?null==c?delete d[l]:Array.isArray(d[l])?u?d[l]=[...d[l],...c]:d[l]=[...c]:"object"==typeof c?d[l]=e(Object.assign({},d[l]),c,u):d[l]=c:null==c?delete d[l]:Array.isArray(c)?d[l]=[...c]:"object"==typeof c?d[l]=Object.assign({},c):d[l]=c)}),i},objectsEqual:()=>eT,resolveUnits:()=>e9,sentenceCaseToCamelCase:()=>eI,sortByNumber:()=>tc,sortByString:()=>tu,stringMatch:()=>eL,updateAsset:()=>ta}),r(4532);var u=r(650);function d(e){return(d="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 f(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function h(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t: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,h(n.key),n)}}function g(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return(m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(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&&m(e,t)}function b(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return y(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(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 k(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 O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var E={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)}},x=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),this.init(t,r)}return g(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||E,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,O(O({},{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}()),P=function(){function e(){f(this,e),this.observers={}}return g(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 R(){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 D(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=n(o.shift());!e[s]&&r&&(e[s]=new r),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function C(e,t,r){var n=D(e,t,Object);n.obj[n.k]=r}function T(e,t){var r=D(e,t),n=r.obj,i=r.k;if(n)return n[i]}function M(e,t,r){var n=T(e,r);return void 0!==n?n:T(t,r)}function N(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var I={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function j(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return I[e]}):e}var L="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=[" ",",","?","!",";"];function F(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 Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var W=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return f(this,n),t=r.call(this),L&&P.call(y(t)),t.data=e||{},t.options=i,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return g(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]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."));var a=T(this.data,s);return a||!o||"string"!=typeof r?a: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 i=r.split(n),o=t,s=0;s<i.length;++s){if(!o||"string"==typeof o[i[s]]&&s+1<i.length)return;if(void 0===o[i[s]]){for(var a=2,l=i.slice(s,s+a).join(n),c=o[l];void 0===c&&i.length>s+a;)a++,c=o[l=i.slice(s,s+a).join(n)];if(void 0===c)return;if(null===c)return null;if(r.endsWith(l)){if("string"==typeof c)return c;if(l&&"string"==typeof c[l])return c[l]}var u=i.slice(s+a).join(n);if(u)return e(c,u,n);return}o=o[i[s]]}return o}}(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];r&&(s=s.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),C(this.data,s,n),i.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 i in r)("string"==typeof r[i]||"[object Array]"===Object.prototype.toString.apply(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),n=r,r=t,t=s[1]),this.addNamespaces(t);var a=T(this.data,s)||{};n?function e(t,r,n){for(var i in r)"__proto__"!==i&&"constructor"!==i&&(i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof r[i]||r[i]instanceof String?n&&(t[i]=r[i]):e(t[i],r[i],n):t[i]=r[i]);return t}(a,r,i):a=Y(Y({},a),r),C(this.data,s,a),o.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)?Y(Y({},{}),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}(P),V={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))}),t}};function H(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 B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var G={},K=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(e){var t,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(this,n),o=r.call(this),L&&P.call(y(o)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=y(o),t.forEach(function(t){e[t]&&(i[t]=e[t])}),o.options=s,void 0===o.options.keySeparator&&(o.options.keySeparator="."),o.logger=x.create("translator"),o}return g(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,i=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,s=!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 i=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(r);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,r,n);if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==d(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],f=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?(g.res="".concat(u).concat(p).concat(l),g):"".concat(u).concat(p).concat(l)}return o?(g.res=l,g):l}var g=this.resolve(e,t),y=g&&g.res,m=g&&g.usedKey||l,v=g&&g.exactUsedKey||l,b=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(b)&&("string"!=typeof _||"[object Array]"!==b)){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(m,y,B(B({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(g.res=k,g):k}if(s){var O="[object Array]"===b,E=O?[]:{},x=O?v:m;for(var P in y)if(Object.prototype.hasOwnProperty.call(y,P)){var R="".concat(x).concat(s).concat(P);E[P]=this.translate(R,B(B({},t),{joinArrays:!1,ns:c})),E[P]===R&&(E[P]=y[P])}y=E}}else if(w&&"string"==typeof _&&"[object Array]"===b)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,r));else{var A=!1,D=!1,C=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),M=C?this.pluralResolver.getSuffix(f,t.count,t):"",N=t["defaultValue".concat(M)]||t.defaultValue;!this.isValidLookup(y)&&T&&(A=!0,y=N),this.isValidLookup(y)||(D=!0,y=l);var I=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:y,j=T&&N!==y&&this.options.updateMissing;if(D||A||j){if(this.logger.log(j?"updateKey":"missingKey",f,u,l,j?N:y),s){var L=this.resolve(l,B(B({},t),{},{keySeparator:!1}));L&&L.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 U=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var Y=0;Y<F.length;Y++)U.push(F[Y]);else"all"===this.options.saveMissingTo?U=this.languageUtils.toResolveHierarchy(t.lng||this.language):U.push(t.lng||this.language);var W=function(e,r,n){var o=T&&n!==y?n:I;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,r,o,j,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,r,o,j,t),i.emit("missingKey",e,u,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?U.forEach(function(e){i.pluralResolver.getSuffixes(e,t).forEach(function(r){W([e],l+r,t["defaultValue".concat(r)]||N)})}):W(U,l,N))}y=this.extendTranslation(y,e,t,g,r),D&&y===l&&this.options.appendNamespaceToMissingKey&&(y="".concat(u,":").concat(l)),(D||A)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,A?y:void 0):this.options.parseMissingKeyHandler(y))}return o?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,r,n,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,B(B({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(B(B({},r),{interpolation:B(B({},this.options.interpolation),r.interpolation)}));var s,a="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(c=B(B({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,r.lng||this.language,r),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return i&&i[0]===n[0]&&!r.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):o.translate.apply(o,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==r.applyPostProcessor&&(e=V.handle(f,e,t,this.options&&this.options.postProcessPassResolved?B({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;r=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,f=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),h=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach(function(e){s.isValidLookup(t)||(o=e,!G["".concat(p[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(G["".concat(p[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(r,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" 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!!!")),p.forEach(function(r){if(!s.isValidLookup(t)){i=r;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,r,e,a);else{d&&(u=s.pluralResolver.getSuffix(r,a.count,a));var u,p="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),f&&l.push(c+p)),h){var g="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(g),d&&(l.push(g+u),f&&l.push(g+p))}}for(;o=l.pop();)s.isValidLookup(t)||(n=o,t=s.getResource(r,e,o,a))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{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}(P);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var q=function(){function e(t){f(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return g(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),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.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&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach(function(e){0>i.indexOf(e)&&o(r.formatLanguageCode(e))}),i}}]),e}(),$=[{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}],J={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)}},X=["v1","v2","v3"],Z={zero:0,one:1,two:2,few:3,many:4,other:5},Q=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<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={},$.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:J[e.fc]}})}),r)}return g(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 Z[e]-Z[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)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!X.includes(this.options.compatibilityJSON)}}]),e}();function ee(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 et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var er=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return g(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:j,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?N(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?N(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?N(t.nestingPrefix):t.nestingPrefixEscaped||N("$t("),this.nestingSuffix=t.nestingSuffix?N(t.nestingSuffix):t.nestingSuffixEscaped||N(")"),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 i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(0>e.indexOf(a.formatSeparator)){var i=M(t,l,e);return a.alwaysFormat?a.format(i,void 0,r,et(et(et({},n),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(M(t,l,s),c,r,et(et(et({},n),t),{},{interpolationkey:s}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=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 a.escapeValue?c(a.escape(e)):c(e)}}].forEach(function(t){for(s=0;i=t.regex.exec(e);){var r=i[1].trim();if(void 0===(o=u(r)))if("function"==typeof d){var l=d(e,i,n);o="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))o="";else if(f){o=i[0];continue}else a.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),o="";else"string"==typeof o||a.useRawValueToEscape||(o=A(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),f?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=et({},o);function a(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=et(et({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var u=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=u.shift(),l=u,c=!0}if((n=t(a.call(this,r[1].trim(),s),s))&&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=l.reduce(function(e,t){return i.format(e,t,o.lng,et(et({},o),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function en(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 ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eo(e){var t={};return function(r,n,i){var o=n+JSON.stringify(i),s=t[o];return s||(s=e(n,i),t[o]=s),s(r)}}var es=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.logger=x.create("formatter"),this.options=t,this.formats={number:eo(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:eo(function(e,t){var r=new Intl.NumberFormat(e,ei(ei({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:eo(function(e,t){var r=new Intl.DateTimeFormat(e,ei({},t));return function(e){return r.format(e)}}),relativetime:eo(function(e,t){var r=new Intl.RelativeTimeFormat(e,ei({},t));return function(e){return r.format(e,t.range||"day")}}),list:eo(function(e,t){var r=new Intl.ListFormat(e,ei({},t));return function(e){return r.format(e)}})},this.init(t)}return g(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()]=eo(t)}},{key:"format",value:function(e,t,r,n){var i=this;return t.split(this.formatSeparator).reduce(function(e,t){var o=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);"currency"===t&&0>i.indexOf(":")?r.currency||(r.currency=i.trim()):"relativetime"===t&&0>i.indexOf(":")?r.range||(r.range=i.trim()):i.split(";").forEach(function(e){if(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return S(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,void 0):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.")}(),i=n[0],o=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[i.trim()]||(r[i.trim()]=o),"false"===o&&(r[i.trim()]=!1),"true"===o&&(r[i.trim()]=!0),isNaN(o)||(r[i.trim()]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}}(t),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=e;try{var c=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},u=c.locale||c.lng||n.locale||n.lng||r;l=i.formats[s](e,u,ei(ei(ei({},a),n),c))}catch(e){i.logger.warn(e)}return l}return i.logger.warn("there was no format function for ".concat(s)),e},e)}}]),e}();function ea(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?ea(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ea(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ec=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(e,t,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return f(this,n),o=r.call(this),L&&P.call(y(o)),o.backend=e,o.store=t,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=x.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return g(n,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o={},s={},a={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,n=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var s={};this.queue.forEach(function(r){var n,a,l,c;n=r.loaded,(l=(a=D(n,[i],Object)).obj)[c=a.k]=l[c]||[],l[c].push(o),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){s[e]||(s[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===s[e][t]&&(s[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=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:i,wait:o,callback:s}):(this.readingCalls++,this.backend[r](e,t,function(a,l){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)}a&&l&&i<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,i+1,2*o,s)},o):s(a,l)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=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."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.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("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,function(n,s){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&s&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,n,s)})}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?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,el(el({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(P);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 ed(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 ef(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eh(){}var ep=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(f(this,n),t=r.call(this),L&&P.call(y(t)),t.options=eu(i),t.services={},t.logger=x,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=y(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),o&&!t.isInitialized&&!i.isClone){if(!t.options.initImmediate)return t.init(i,o),b(t,y(t));setTimeout(function(){t.init(i,o)},0)}return t}return g(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"===d(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===d(e[2])||"object"===d(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 i(e){return e?"function"==typeof e?new e:e:null}if(this.options=ef(ef(ef({},n),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ef(ef({},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?x.init(i(this.modules.logger),this.options):x.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"u">typeof Intl&&(o=es);var o,s=new q(this.options);this.store=new W(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new Q(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new er(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new ec(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];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=eh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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 c=R(),u=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),c.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?u():setTimeout(u,0),c}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eh,n=r,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>o.indexOf(e)&&o.push(e)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return s(e)}),this.options.preload&&this.options.preload.forEach(function(e){return s(e)}),this.services.backendConnector.load(o,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=R();return e||(e=this.languages),t||(t=this.options.ns),r||(r=eh),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&&V.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=R();this.emit("languageChanging",e);var i=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},o=function(e,o){o?(i(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},s=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||i(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){o(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,i=function e(t,i){if("object"!==d(i)){for(var o,s=arguments.length,a=Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=n.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=ef({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||r||e.keyPrefix;var c=n.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(t):t;return n.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}},{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],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var s=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var a=r.precheck(this,s);if(void 0!==a)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!i||s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=R();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=R();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter(function(e){return 0>n.indexOf(e)});return i.length?(this.options.preload=n.concat(i),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]:eh,i=ef(ef(ef({},this.options),t),{isClone:!0}),o=new n(i);return(void 0!==t.debug||void 0!==t.prefix)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=ef({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new K(o.services,o.options),o.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];o.emit.apply(o,[e].concat(r))}),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(P);w(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 eg=ep.createInstance();eg.createInstance=ep.createInstance,eg.createInstance,eg.init,eg.loadResources,eg.reloadResources,eg.use,eg.changeLanguage,eg.getFixedT,eg.t,eg.exists,eg.setDefaultNamespace,eg.hasLoadedNamespace,eg.loadNamespaces,eg.loadLanguages;var ey=r(8183),em=r.n(ey),ev=r(4867),eb=r.n(ev),e_=r(3472),ew=r.n(e_);class eS{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 ek(){return navigator.language.split("-")[0]||"en"}function eO(e){return em().parse(e,{ignoreQueryPrefix:!0})}function eE(e){let t;if(location.search&&""!==location.search&&(t=eO(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eO(location.hash.substring(e+1)))}return t?t[e]:void 0}function ex(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){if(!e)return;let r=[];e.groups&&e.groups.forEach(e=>{e.items&&e.items.forEach(e=>{r.push(e)})}),e.items&&e.items.forEach(e=>{r.push(e)}),r&&r.forEach(e=>{if(e.assets&&e.assets.attributes){let r=[];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,r),r.length>0){let n=e.tag||"0";t.set(n,r)}}})}(e.when,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 eP=/([+-])?((\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 eR(e){return!!e&&(e=e.trim()).length>0&&(eP.test(e)||eA(e)||eD(e))}function eA(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eD(e){return"-*"===(e=null!=e?e.trim():void 0)}function eC(e){return!!e&&"object"==typeof e}function eT(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){if(Array.isArray(e))return e.every((e,r)=>eT(e,t[r]));let r=Object.keys(e);return Object.keys(t).every(e=>-1!==r.indexOf(e))&&r.every(r=>eT(e[r],t[r]))}return!1}function eM(e,t){let r=(e,t)=>ew()(e,function(e,n,i){eT(n,null==t?void 0:t[i])||(e[i]=eC(n)&&eC(null==t?void 0:t[i])?r(n,null==t?void 0:t[i]):n)});return r(e,t)}function eN(e,t){if(0===e.length)return;let r=e.indexOf(t);r>=0&&e.splice(r,1)}function eI(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 ej(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],i=r+1<n.length&&n[r+1]&&"_"!==n[r+1],o=r+3>n.length||!n[r+1]&&!n[r+3];(!t||i)&&(e=" "+e),!i&&(t||o)||(e=e.toLowerCase())}return e}).join("").trim()}function eL(e,t){if(t===e)return!0;let r=e.endsWith("*"),n=!r&&e.startsWith("*"),i=!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(i)try{return new RegExp(e).test(t)}catch(e){console.error("Failed to compile needle as a RegExp: "+e)}return!1}function eU(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eF(e,t){return Object.keys(e).find(r=>e[r]===t)}function eY(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,i,o,s){let a="";if(o?Array.isArray(o)?a+=o.toString().replace(" ",""):a+=o.toString():a+="0",a+=" ",i?Array.isArray(i)?a+=i.toString().replace(" ",""):a+=i.toString():a+="0",a+=" ",n?Array.isArray(n)?a+=n.toString().replace(" ",""):a+=n.toString():a+="0",a+=" ",r?Array.isArray(r)?a+=r.toString().replace(" ",""):a+=r.toString():a+="*",a+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eW[t].toString())}),a+=e.toString().replace(" ","")}else a+=t.toString().replace(" ","");else a+=t.toString();else a+="*";return a+=" ",s?a+=s.toString():a+="?",a+=" ",e?Array.isArray(e)?a+=e.toString().replace(" ",""):a+=e:a+="*",a}function eH(e){return eV(e.getFullYear(),eW[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eB(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 i=1==r[3].length&&"*"!=r[3]?"0"+r[3]:r[3].replace("*","01"),o=1==r[2].length&&"*"!=r[2]?"0"+r[2]:r[2].replace("*","00"),s=1==r[1].length&&"*"!=r[1]?"0"+r[1]:r[1].replace("*","00"),a=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(i),hour:Number(o),minute:Number(s),second:Number(a)}).toISOString();else return eb()({year:Number(e),month:Number(n),date:Number(i),hour:Number(o),minute:Number(s),second:Number(a)}).toISOString()}}function eG(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 ez(e){return!eq(e)}function eq(e){return!!((null==e?void 0:e.jsonType)==="object"||(null==e?void 0:e.arrayDimensions)&&e.arrayDimensions>0)}function e$(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>ez(u.AssetModelUtil.getValueDescriptor(e.type)))}function eJ(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>eq(u.AssetModelUtil.getValueDescriptor(e.type)))}function eX(e){return("string"==typeof e&&(e=u.AssetModelUtil.getAssetDescriptor(e)),e)?eg.t("label.asset."+e.name,{defaultValue:ej(e.name)}):""}function eZ(e){if(!e)return eg.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eg.t("label.value."+t,{defaultValue:ej(t||"")})}function eQ(e,t){if(e)return eg.t("label.allowedValue."+e,{defaultValue:t||ej(e||""),nsSeparator:!1})}function e0(e,t){let r="string"==typeof e?u.AssetModelUtil.getMetaItemDescriptor(e):e;return r?{name:r.name,type:r.type,value:t}:{name:typeof e,type:u.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function e1(e,t,r,n,i){return e5(e,t,r,n,!0,i)}function e2(e,t,r,n,i){return e5(e||e0(t,null),t,r,n,!1,i)}function e5(e,t,r,n,i,o){let s=ts("label",e,t,r,i),a="";if(s||(s=eG("label",e,t&&t.meta?t:void 0)),n&&(a=e9(to("units",e,t,r,i))),!s){let r=e?e.name:t?"string"==typeof t?t:t.name:void 0;s=o||(r?ej(r):void 0)}return s?s+(a?" ("+a+")":""):a}function e3(e,t,r,n,i){return e4(e,t,r,n,!0,i)}function e6(e,t,r,n,i){return e4(e||e0(t,null),t,r,n,!1,i)}function e4(e,t,r,n,i,o){let s=e8(e?e.value:void 0,()=>to("format",e,t,r,i),void 0,o),a=tt(e,t,r);return n&&a&&a.length&&(s=e9(to("units",e,t,r,i),s)),s}function e8(e,t,r,n){let i="";if(null==e)i=n||"";else if("string"==typeof e)i=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":i=new Intl.NumberFormat(r||eg.language,n).format(e);break;case"boolean":n.asOnOff&&(i=e?eg.t("on"):eg.t("off")),n.asOpenClosed&&(i=e?eg.t("open"):eg.t("closed")),n.asPressedReleased&&(i=e?eg.t("pressed"):eg.t("released"));break;case"object":if(n.momentJsFormat)i=eb()(e).format(n.momentJsFormat);else if(n.iso8601)i=e.toISOString();else if(n.week){let t=eY(e);i="2-digit"===n.week?String(t).padStart(2,"0"):Number(t).toString(10)}else i=new Intl.DateTimeFormat(r||eg.language,n).format(e)}else i=Object(e).toString()}return i}function e9(e,t){if(!e)return"";t||(t="");let r=e.map((e,r)=>{if(3!==e.length||e.toUpperCase()!==e)return eg.t(["units."+e,"or:units."+e]);{let n=new Intl.NumberFormat(eg.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 e7(e,t,r){return to("constraints",e,t,r,!0)}function te(e,t,r){return to("constraints",e||e0(t,null),t,r,!1)}function tt(e,t,r){return to("units",e,t,r,!0)}function tr(e,t,r){return to("units",e||e0(t,null),t,r,!1)}function tn(e,t,r){return to("format",e,t,r,!0)}function ti(e,t,r){return to("format",e||e0(t,null),t,r,!1)}function to(e,t,r,n,i){let o,s=[],a=ts(e,t&&"string"==typeof t?t:t?t.name:r?"string"==typeof r?r:r.name:void 0,r,n,i);if(a&&(o=JSON.parse(a)))if("format"!==e)return o;else s.push(o);if(t&&t.meta&&(o=eG(e,t,r)))if("format"!==e)return o;else s.push(o);if(r&&"string"!=typeof r&&r.hasOwnProperty(e)){if(o=r[e],"format"!==e)return o;s.push(o)}if(r&&r.type){if(o=u.AssetModelUtil.getValueDescriptor(r.type)[e],"format"!==e)return o;s.push(o)}if("format"!==e||0===s.length)return o;let l={};return s.reverse().forEach(e=>{l=Object.assign(Object.assign({},l),e)}),l}function ts(e,t,r,n,i,o){let s;if(t?s="string"==typeof t?t:t.name:r&&(s="string"==typeof r?r:r.name),!s)return;let a=[],l=e+"."+(i?"attribute":"meta")+".";if(n&&a.push(l+n+"."+s),r&&"string"!=typeof r&&(a.push(l+r.type+"."+s),a.push(l+r.type)),a.push(l+s),a.length>0)return eg.t(a,{defaultValue:o||""})}function ta(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 tl(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 tc(e){return(t,r)=>{let n=e(t),i=e(r);return n||i?n&&!i?1:!n&&i?-1:n-i:0}}function tu(e){return(t,r)=>{let n=e(t),i=e(r);return n||i?n&&!i?1:!n&&i?-1:n.localeCompare(i):0}}function td(e,t){let r=new eS;return e.dispatchEvent(t),window.setTimeout(()=>{r.resolve(t.detail)}),r.promise}function tf(e){return new Promise((t,r)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=e=>{r(e)}})}function th(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}class tp{constructor(e){e&&Object.assign(this,e)}matches(e){var t,r,n,i,o,s,a;if((null==(t=this.ids)?void 0:t.length)&&(!e.id||!this.ids.includes(e.id))||(null==(r=this.types)?void 0:r.length)&&(!e.type||!this.types.includes(e.type))||(null==(n=this.realm)?void 0:n.name)&&e.realm!==this.realm.name||(null==(i=this.parents)?void 0:i.length)&&!this.parents.some(t=>!t.id||e.parentId===t.id))return!1;if(null==(o=this.paths)?void 0:o.length){let t=null!=(s=e.path)?s:[];if(!this.paths.some(e=>{var r;return(null!=(r=e.path)?r:[]).every((e,r)=>t[r]===e)}))return!1}return(null==(a=this.names)||!a.length||!!this.names.every(t=>tp._evalValuePredicate(e.name,t)))&&(!this.attributes||tp._evalGroup(e,this.attributes))}static getUnsupportedFields(e){return Object.keys(e).filter(e=>!tp._SUPPORTED_FIELDS.has(e))}collectAttributeNames(){return this.attributes?tp._collectNames(this.attributes):[]}static _evalValuePredicate(e,t){var r;switch(t.predicateType){case"string":{let n;if(null==e)return!1;let i=!1!==t.caseSensitive?String(e):String(e).toLowerCase(),o=!1!==t.caseSensitive?t.value:null==(r=t.value)?void 0:r.toLowerCase();switch(t.match){case"BEGIN":n=i.startsWith(o);break;case"END":n=i.endsWith(o);break;case"CONTAINS":n=i.includes(o);break;default:n=i===o}return t.negate?!n:n}case"boolean":return e===t.value;case"number":{let r;if("number"!=typeof e)return!1;switch(t.operator){case"GREATER_THAN":r=e>t.value;break;case"GREATER_EQUALS":r=e>=t.value;break;case"LESS_THAN":r=e<t.value;break;case"LESS_EQUALS":r=e<=t.value;break;case"BETWEEN":r=e>=t.value&&e<=t.rangeValue;break;default:r=e===t.value}return t.negate?!r:r}}return!1}static _evalPredicate(e,t){var r,n;let i=null==(r=t.name)?void 0:r.value;if(!i)return!0;let o=null==(n=e.attributes)?void 0:n[i];if(!o)return!!t.negated;let s=!t.value||tp._evalValuePredicate(o.value,t.value);return t.negated?!s:s}static _evalGroup(e,t){var r,n,i;let o=null!=(r=t.operator)?r:"AND",s=[...(null!=(n=t.items)?n:[]).map(t=>tp._evalPredicate(e,t)),...(null!=(i=t.groups)?i:[]).map(t=>tp._evalGroup(e,t))];return!s.length||("OR"===o?s.some(Boolean):s.every(Boolean))}static _collectNames(e){var t,r;return[...(null!=(t=e.items)?t:[]).map(e=>{var t;return null==(t=e.name)?void 0:t.value}).filter(e=>!!e),...(null!=(r=e.groups)?r:[]).flatMap(e=>tp._collectNames(e))]}}tp._SUPPORTED_FIELDS=new Set(["ids","types","names","parents","paths","realm","attributes"]);var tg=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let ty=r(4461);class tm{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;const n=new URLSearchParams(window.location.search),i=n.get("consoleName"),o=n.get("consoleVersion"),s=n.get("consolePlatform"),a=n.get("consoleProviders"),l=n.get("consoleAutoEnable"),c=a&&a.length>0?a.split(" "):["push"];this._pendingProviderEnables=c;const u=tm._createConsoleRegistration(),d=window.localStorage.getItem(this._storageKey);if(d)try{const e=JSON.parse(d);e.id&&(u.id=e.id),e.name&&(u.name=e.name),e.providers&&(u.providers=e.providers),e.apps&&(u.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}const f=u.providers;for(const e of(u.providers={},c)){const t=f&&f.hasOwnProperty(e)?f[e]:{enabled:!1,disabled:!1};u.providers[e]=t}const h=rl.getAppName();h.length>0&&0>u.apps.indexOf(h)&&u.apps.push(h),this._registration=u,i&&(u.name=i),o&&(u.version=o),s&&(u.platform=s),l&&(this._autoEnable="TRUE"===l||"true"===l)}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 tg(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()),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 tg(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 tg(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 i=this._pendingProviderEnables.indexOf(e);return i>=0&&(this._pendingProviderEnables.splice(i,1),0===this._pendingProviderEnables.length&&(this.sendRegistration().catch(()=>void 0),this._callCompletedCallback())),n})}disableProvider(e){return tg(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 tg(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 eS,i=()=>{delete this._pendingProviderPromises[r],n.reject("No response from provider")};return this._pendingProviderPromises[r]=[n,window.setTimeout(i,5e3)],this._doSendProviderMessage(e),n.promise})}sendRegistration(){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>tg(this,void 0,void 0,function*(){this._registrationTimer=null,console.debug("Console: updating registration");try{yield this._sendRegistration(!0),e()}catch(e){console.error("Failed to register console",e),t(e)}}))})}_sendRegistration(e){return tg(this,void 0,void 0,function*(){this._normaliseRegistration();let t=!!this._registration.id;try{let e=yield rl.rest.api.ConsoleResource.register(this._registration);if(200!==e.status)throw Error("Failed to register console");this._registration=e.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem(this._storageKey,JSON.stringify(this._registration))}catch(r){if(e&&t&&tm._isStaleRegistrationResponse(r)){console.warn("Console registration ID is stale or cannot be claimed; creating a new console registration"),window.localStorage.removeItem(this._storageKey),delete this._registration.id,yield this._sendRegistration(!1);return}throw r}})}_normaliseRegistration(){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={})}get _storageKey(){return"OpenRemoteConsole:"+this._realm}static _isStaleRegistrationResponse(e){let t=e&&e.response?e.response.status:void 0;return 403===t||409===t}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tg(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,i=this._pendingProviderPromises[r+n];i&&(window.clearTimeout(i[1]),delete this._pendingProviderPromises[r+n],i[0].resolve(t));let o=this._providerMessageListeners[r+n];o&&o(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:ty.name,version:ty.version,platform:ty.os.toString(),apps:[],model:((ty.manufacturer?ty.manufacturer+" ":"")+(ty.product?ty.product:"")).trim()}}_initialiseProvider(e){return tg(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 tv=r(9207),tb=r.n(tv),t_=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};(t=s||(s={})).DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING";let tw="SUBSCRIBED:",tS="UNAUTHORIZED:",tk="TRIGGERED:",tO="EVENT:";class tE{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=s.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){eN(this._statusCallbacks,e)}connect(){return(console.debug("Attempting to connect to events:",this.endpointUrl),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===s.CONNECTED)?(console.debug("Already connected to events!"),Promise.resolve(!0)):((this._disconnectRequested=!1,this._connectingDeferred)?console.warn("Already connecting to events, continuing the previous one."):(this._onStatusChanged(s.CONNECTING),this._connectingDeferred=new eS,this._doConnect().then(e=>{if(this._connectingDeferred){let t=this._connectingDeferred;e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._onStatusChanged(s.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):console.debug("Failed to connect to event service: "+this.endpointUrl),t.resolve(e)}}).finally(()=>{this._connectingDeferred=null})),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!==s.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let r={eventSubscription:e,callback:t,deferred:new eS};return null!=this._pendingSubscription||this._status!==s.CONNECTED?(this._queuedSubscriptions.push(r),r.deferred.promise):(this._pendingSubscription=r,this._doSubscribe(e).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(console.error(e),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 t_(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)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}})}sendEvent(e){this._status===s.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==s.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,i="AssetEvent"+tE._subscriptionCounter++;if(!this._assetEventPromise){let e;rl.authenticated||(e={filterType:"asset",realm:rl.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(i,e=>{let t=e.asset.id;n?n.find(e=>t===e)&&r(e):e.asset.realm===rl.displayRealm&&r(e)}),this._assetEventPromise.then(()=>{try{if(n&&t){let e={messageID:"read-assets:"+n.join(",")+":"+i,eventType:"read-assets",assetQuery:{ids:n}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(i)&&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),i&&this.unsubscribe(i),t}return i})})}subscribeAttributeEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0],i=n?e.map(e=>e.id):e,o=n?e:void 0,s="AttributeEvent"+tE._subscriptionCounter++;if(!this._attributeEventPromise){let e;rl.authenticated||(e={filterType:"asset",realm:rl.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let a=t=>{let o=t.ref;n?e.forEach(e=>{o.id===e.id&&o.name===e.name&&r(t)}):i?i.find(e=>o.id===e)&&r(t):t.realm===rl.displayRealm&&r(t)};return this._attributeEventCallbackMap.set(s,a),this._attributeEventPromise.then(()=>{try{if(t&&i){let e={messageID:"read-assets:"+i.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(s)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,r])=>{(!o||o.find(r=>r.id===e.id&&r.name===t))&&a({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),s&&this.unsubscribe(s),t}return s})})}_processNextSubscription(){this._status===s.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===s.CONNECTED&&this._onStatusChanged(s.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(s.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<tx.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(tx.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tE.MIN_RECONNECT_DELAY=0,tE.MAX_RECONNECT_DELAY=3e4,tE._subscriptionCounter=0;class tx extends tE{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="+rl.config.realm;return this._connectDeferred=new eS,(rl.authenticated?rl.retrieveAuthorizationHeader().then(t=>{e+="&Authorization="+t}):Promise.resolve()).finally(()=>{this._webSocket=new WebSocket(e),this._webSocket.onopen=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(console.error("Event provider error:",e),this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onclose=()=>{if(console.warn("The WebSocket connection of the event provider has been closed."),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(tw)){let e=JSON.parse(t.substring(tw.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(e.subscriptionId)}else if(t.startsWith(tS)){let e=JSON.parse(t.substring(tS.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(tk)){let e=JSON.parse(t.substring(tk.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tO)){let e=JSON.parse(t.substring(tO.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 eS,e.subscriptionId||(e.subscriptionId=tx._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=tO+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 eS;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tO+JSON.stringify(e)),t.promise}}tx._subscriptionCounter=1;let tP=["__proto__","constructor","prototype"];function tR(e){return!("string"!=typeof e||0===e.length||e.length>128||tP.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function tA(e){return!(!tR(e)||e.indexOf("/")>-1)}let tD={lng:tA,ns:function(e){return tR(e)}};function tC(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function tT(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}let tM=/\{\{(.+?)\}\}/g;function tN(e,t){let r=!1,n=e.replace(tM,(e,n)=>{let i=n.trim();if(tP.indexOf(i)>-1)return e;let o=t[i];if(null==o)return e;let s=tD[i]||tA,a=String(o).split("+");for(let t of a)if(!s(t))return r=!0,e;return a.join("+")});return r?null:n}let tI="u">typeof globalThis?globalThis:"u">typeof global?global:"u">typeof window?window:void 0;"function"==typeof fetch?e=fetch:tI&&"function"==typeof tI.fetch&&(e=tI.fetch);let tj=tT()&&tI?tI.XMLHttpRequest:void 0,tL="function"==typeof ActiveXObject&&tI?tI.ActiveXObject:void 0,tU=["__proto__","constructor","prototype"],tF=(e,t)=>{if(t&&"object"==typeof t){let r="";for(let e of Object.keys(t))tU.indexOf(e)>-1||(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},tY=(t,r,n,i)=>{let o=e=>{if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(i){let e=i(t,r);if(e instanceof Promise)return void e.then(o).catch(n)}"function"==typeof fetch?fetch(t,r).then(o).catch(n):e(t,r).then(o).catch(n)},tW=(t,r,n,i)=>{if("function"==typeof n&&(i=n,n=void 0),i=i||(()=>{}),e&&0!==r.indexOf("file:")){var o=r,s=n,a=i;t.queryStringParams&&(o=tF(o,t.queryStringParams));let e={..."function"==typeof t.customHeaders?t.customHeaders():t.customHeaders};"u"<typeof window&&"u">typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(e["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),s&&(e["Content-Type"]="application/json");let l="function"==typeof t.requestOptions?t.requestOptions(s):t.requestOptions,c={method:s?"POST":"GET",body:s?t.stringify(s):void 0,headers:e,...t._omitFetchOptions?{}:l},u="function"==typeof t.alternateFetch&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{tY(o,c,a,u)}catch(e){if(!l||0===Object.keys(l).length||!e.message||0>e.message.indexOf("not implemented"))return a(e);try{Object.keys(l).forEach(e=>{delete c[e]}),tY(o,c,a,u),t._omitFetchOptions=!0}catch(e){a(e)}}return}if(tT()||"function"==typeof ActiveXObject){var l=r,c=n,u=i;c&&"object"==typeof c&&(c=tF("",c).slice(1)),t.queryStringParams&&(l=tF(l,t.queryStringParams));try{let e=tj?new tj:new tL("MSXML2.XMLHTTP.3.0");e.open(c?"POST":"GET",l,1),t.crossDomain||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=!!t.withCredentials,c&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.overrideMimeType&&e.overrideMimeType("application/json");let r=t.customHeaders;if(r="function"==typeof r?r():r)for(let t of Object.keys(r))tU.indexOf(t)>-1||e.setRequestHeader(t,r[t]);e.onreadystatechange=()=>{e.readyState>3&&u(e.status>=400?e.statusText:null,{status:e.status,data:e.responseText})},e.send(c)}catch(e){console&&console.log(e)}return}i(Error("No fetch and no xhr implementation found!"))};var tV=class{constructor(e,t={},r={}){this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}init(e,t={},r={}){if(this.services=e,this.options={...{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,r)=>({[t]:r||""}),parseLoadPayload:(e,t)=>void 0,request:tW,reloadInterval:"u"<typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}},...this.options||{},...t},this.allOptions=r,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,r){this._readAny(e,e,t,t,r)}read(e,t,r){this._readAny([e],e,[t],t,r)}_readAny(e,t,r,n,i){var o,s;let a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,r)),(a=(s=o=a)&&"function"==typeof s.then?o:Promise.resolve(o)).then(o=>{if(!o)return i(null,{});let s=tN(o,{lng:e.join("+"),ns:r.join("+")});if(null==s)return i(Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+e.map(tC).join(", ")+"] namespaces=["+r.map(tC).join(", ")+"]"),!1);this.loadUrl(s,i,t,n)})}loadUrl(e,t,r,n){let i=this.options.parseLoadPayload("string"==typeof r?[r]:r,"string"==typeof n?[n]:n),o=tC(function(e){if("string"!=typeof e||0===e.length)return e;try{let t=new URL(e);if(t.username||t.password)return t.username="",t.password="",t.toString();return e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,i,(e,i)=>{let s,a;if(i&&(i.status>=500&&i.status<600||!i.status))return t("failed loading "+o+"; status code: "+i.status,!0);if(i&&i.status>=400&&i.status<500)return t("failed loading "+o+"; status code: "+i.status,!1);if(!i&&e&&e.message){let r=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>r.indexOf(e)>-1))return t("failed loading "+o+": "+tC(e.message),!0)}if(e)return t(e,!1);try{s="string"==typeof i.data?this.options.parse(i.data,r,n):i.data}catch(e){a="failed parsing "+o+" to json"}if(a)return t(a,!1);t(null,s)})}create(e,t,r,n,i){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);let o=this.options.parsePayload(t,r,n),s=0,a=[],l=[];e.forEach(r=>{let n=this.options.addPath;"function"==typeof this.options.addPath&&(n=this.options.addPath(r,t));let c=tN(n,{lng:r,ns:t});if(null==c){s+=1,i&&s===e.length&&i(a,l);return}this.options.request(this.options,c,o,(t,r)=>{s+=1,a.push(t),l.push(r),s===e.length&&"function"==typeof i&&i(a,l)})})}reload(){let{backendConnector:e,languageUtils:t,logger:r}=this.services,n=e.language;if(n&&"cimode"===n.toLowerCase())return;let i=[],o=e=>{t.toResolveHierarchy(e).forEach(e=>{0>i.indexOf(e)&&i.push(e)})};o(n),this.allOptions.preload&&this.allOptions.preload.forEach(e=>o(e)),i.forEach(t=>{this.allOptions.ns.forEach(n=>{e.read(t,n,"read",null,null,(i,o)=>{i&&r.warn(`loading namespace ${n} for language ${t} failed`,i),!i&&o&&r.log(`loaded namespace ${n} for language ${t}`,o),e.loaded(`${t}|${n}`,i,o)})})})}};tV.type="backend";var tH=r(9368),tB=r(4954);class tG extends Error{}function tK(e,t){let r;if("string"!=typeof e)throw new tG("Invalid token specified: must be a string");t||(t={});let n=+(!0!==t.header),i=e.split(".")[n];if("string"!=typeof i)throw new tG(`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)}}(i)}catch(e){throw new tG(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new tG(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(tG.prototype.name="InvalidTokenError","u"<typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tz(e){if(!(this instanceof tz))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,r,n=this,i=[],o={enable:!0,callbackList:[],interval:5},s=document.getElementsByTagName("script"),a=0;a<s.length;a++)(-1!==s[a].src.indexOf("keycloak.js")||-1!==s[a].src.indexOf("keycloak.min.js"))&&-1!==s[a].src.indexOf("version=")&&(n.iframeVersion=s[a].src.substring(s[a].src.indexOf("version=")+8).split("&")[0]);var l=!0,c=P(console.info),u=P(console.warn);function d(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),i=0;i<e;i++)n[i]=t.charCodeAt(r[i]%t.length);return String.fromCharCode.apply(null,n)}function f(){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,i=e.error,o=e.prompt,s=new Date().getTime();if(e.kc_action_status&&n.onActionUpdate&&n.onActionUpdate(e.kc_action_status),i){if("none"!=o)if(e.error_description&&"authentication_expired"===e.error_description)n.login(e.loginOptions);else{var a={error:i,error_description:e.error_description};n.onAuthError&&n.onAuthError(a),t&&t.setError(a)}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 u="code="+r+"&grant_type=authorization_code",d=n.endpoints.token(),f=new XMLHttpRequest;f.open("POST",d,!0),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u+="&client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(u+="&code_verifier="+e.pkceCodeVerifier),f.withCredentials=!0,f.onreadystatechange=function(){if(4==f.readyState)if(200==f.status){var e=JSON.parse(f.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===n.flow),w()}else n.onAuthError&&n.onAuthError(),t&&t.setError()},f.send(u)}function h(r,i,o,a){g(r,i,o,s=(s+new Date().getTime())/2),l&&n.idTokenParsed&&n.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),n.clearToken(),t&&t.setError()):a&&(n.onAuthSuccess&&n.onAuthSuccess(),t&&t.setSuccess())}}function p(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,r,i){if(n.tokenTimeoutHandle&&(clearTimeout(n.tokenTimeoutHandle),n.tokenTimeoutHandle=null),t?(n.refreshToken=t,n.refreshTokenParsed=tK(t)):(delete n.refreshToken,delete n.refreshTokenParsed),r?(n.idToken=r,n.idTokenParsed=tK(r)):(delete n.idToken,delete n.idTokenParsed),e){if(n.token=e,n.tokenParsed=tK(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,i&&(n.timeSkew=Math.floor(i/1e3)-n.tokenParsed.iat),null!=n.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+n.timeSkew+" seconds"),n.onTokenExpired)){var o=(n.tokenParsed.exp-new Date().getTime()/1e3+n.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(o/1e3)+" s"),o<=0?n.onTokenExpired():n.tokenTimeoutHandle=setTimeout(n.onTokenExpired,o)}}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=d(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 m(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,i,o=e.indexOf("?"),s=e.indexOf("#");if("query"===n.responseMode&&-1!==o?(r=e.substring(0,o),""!==(i=v(e.substring(o+1,-1!==s?s:e.length),t)).paramsString&&(r+="?"+i.paramsString),-1!==s&&(r+=e.substring(s))):"fragment"===n.responseMode&&-1!==s&&(r=e.substring(0,s),""!==(i=v(e.substring(s+1),t)).paramsString&&(r+="#"+i.paramsString)),i&&i.oauthParams){if("standard"===n.flow||"hybrid"===n.flow){if((i.oauthParams.code||i.oauthParams.error)&&i.oauthParams.state)return i.oauthParams.newUrl=r,i.oauthParams}else if("implicit"===n.flow&&(i.oauthParams.access_token||i.oauthParams.error)&&i.oauthParams.state)return i.oauthParams.newUrl=r,i.oauthParams}}(e);if(t){var i=r.get(t.state);return i&&(t.valid=!0,t.redirectUri=i.redirectUri,t.storedNonce=i.nonce,t.prompt=i.prompt,t.pkceCodeVerifier=i.pkceCodeVerifier,t.loginOptions=i.loginOptions),t}}function v(e,t){for(var r=e.split("&"),n={paramsString:"",oauthParams:{}},i=0;i<r.length;i++){var o=r[i].indexOf("="),s=r[i].slice(0,o);-1!==t.indexOf(s)?n.oauthParams[s]=r[i].slice(o+1):(""!==n.paramsString&&(n.paramsString+="&"),n.paramsString+=r[i])}return n}function b(){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=b();if(!o.enable||o.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");o.iframe=t,t.onload=function(){var t=n.endpoints.authorize();"/"===t.charAt(0)?o.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):o.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===o.iframeOrigin&&o.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&n.clearToken();for(var t=o.callbackList.splice(0,o.callbackList.length),r=t.length-1;r>=0;--r){var i=t[r];"error"==e.data?i.setError():i.setSuccess("unchanged"==e.data)}}},!1),e.promise}function w(){o.enable&&n.token&&setTimeout(function(){S().then(function(e){e&&w()})},1e3*o.interval)}function S(){var e=b();if(o.iframe&&o.iframeOrigin){var t=n.clientId+" "+(n.sessionId?n.sessionId:"");o.callbackList.push(e);var r=o.iframeOrigin;1==o.callbackList.length&&o.iframe.contentWindow.postMessage(t,r)}else e.setSuccess();return e.promise}function k(){var e,t,r,i=b();if(o.enable||n.silentCheckSsoRedirectUri){var s=document.createElement("iframe");s.setAttribute("src",n.endpoints.thirdPartyCookiesIframe()),s.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),s.setAttribute("title","keycloak-3p-check-iframe"),s.style.display="none",document.body.appendChild(s);var a=function(e){s.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(u("[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"),o.enable=!1,n.silentCheckSsoFallback&&(n.silentCheckSsoRedirectUri=!1)),document.body.removeChild(s),window.removeEventListener("message",a),i.setSuccess())};window.addEventListener("message",a,!1)}else i.setSuccess();return e=i.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)),b().promise},logout:async function(e){if("GET"===(e?.logoutMethod??n.logoutMethod))return void window.location.replace(n.createLogoutUrl(e));let r=n.createLogoutUrl(e),i=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(i.redirected){window.location.href=i.url;return}if(i.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)),b().promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return b().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:location.href}};if("cordova"==e){o.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)},i=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(",")},s=function(){return n.redirectUri||"http://localhost"};return{login:function(e){var t=b(),o=i(e),a=r(n.createLoginUrl(e),"_blank",o),l=!1,c=!1,u=function(){c=!0,a.close()};return a.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(h(m(e.url),t),u(),l=!0)}),a.addEventListener("loaderror",function(e){l||(0==e.url.indexOf(s())?(h(m(e.url),t),u(),l=!0):(t.setError(),u()))}),a.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,i=b(),o=r(n.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return o.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&o.close()}),o.addEventListener("loaderror",function(e){0==e.url.indexOf(s())||(t=!0),o.close()}),o.addEventListener("exit",function(e){t?i.setError():(n.clearToken(),i.setSuccess())}),i.promise},register:function(e){var t=b(),o=r(n.createRegisterUrl(),"_blank",i(e));return o.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(o.close(),h(m(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(s())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return s()}}}if("cordova-native"==e)return o.enable=!1,{login:function(e){var t=b(),r=n.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(m(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},logout:function(e){var t=b(),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=b(),r=n.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(m(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(i){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=i&&["default","cordova","cordova-native"].indexOf(i.adapter)>-1?O(i.adapter):i&&"object"==typeof i.adapter?i.adapter:window.Cordova||window.cordova?O("cordova"):O(),i){if(void 0!==i.useNonce&&(l=i.useNonce),void 0!==i.checkLoginIframe&&(o.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(o.interval=i.checkLoginIframeInterval),"login-required"===i.onLoad&&(n.loginRequired=!0),i.responseMode)if("query"===i.responseMode||"fragment"===i.responseMode)n.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.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=i.flow}if(null!=i.timeSkew&&(n.timeSkew=i.timeSkew),i.redirectUri&&(n.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(n.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),"boolean"==typeof i.silentCheckSsoFallback?n.silentCheckSsoFallback=i.silentCheckSsoFallback:n.silentCheckSsoFallback=!0,void 0!==i.pkceMethod){if("S256"!==i.pkceMethod&&!1!==i.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${i.pkceMethod}.`);n.pkceMethod=i.pkceMethod}else n.pkceMethod="S256";"boolean"==typeof i.enableLogging?n.enableLogging=i.enableLogging:n.enableLogging=!1,"POST"===i.logoutMethod?n.logoutMethod="POST":n.logoutMethod="GET","string"==typeof i.scope&&(n.scope=i.scope),"string"==typeof i.acrValues&&(n.acrValues=i.acrValues),"number"==typeof i.messageReceiveTimeout&&i.messageReceiveTimeout>0?n.messageReceiveTimeout=i.messageReceiveTimeout:n.messageReceiveTimeout=1e4}n.responseMode||(n.responseMode="fragment"),n.responseType||(n.responseType="code",n.flow="standard");var s=b(),a=b();a.promise.then(function(){n.onReady&&n.onReady(n.authenticated),s.setSuccess(n.authenticated)}).catch(function(e){s.setError(e)});var c=function(){var t=b();function r(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 f()+"/protocol/openid-connect/auth"},token:function(){return f()+"/protocol/openid-connect/token"},logout:function(){return f()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=f()+"/protocol/openid-connect/login-status-iframe.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=f()+"/protocol/openid-connect/3p-cookies/step1.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},register:function(){return f()+"/protocol/openid-connect/registrations"},userinfo:function(){return f()+"/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||p(i)){var e=JSON.parse(i.responseText);n.authServerUrl=e["auth-server-url"],n.realm=e.realm,n.clientId=e.resource,r(null),t.setSuccess()}else t.setError()},i.send()}else{if(!e.clientId)throw"clientId missing";n.clientId=e.clientId;var o=e.oidcProvider;if(o)if("string"==typeof o){var s,a="/"==o.charAt(o.length-1)?o+".well-known/openid-configuration":o+"/.well-known/openid-configuration",i=new XMLHttpRequest;i.open("GET",a,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||p(i)?(r(JSON.parse(i.responseText)),t.setSuccess()):t.setError())},i.send()}else r(o),t.setSuccess();else{if(!e.url){for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++)if(l[c].src.match(/.*keycloak\.js/)){e.url=l[c].src.substr(0,l[c].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";n.authServerUrl=e.url,n.realm=e.realm,r(null),t.setSuccess()}}return t.promise}();function u(){var e=function(e){e||(r.prompt="none"),i&&i.locale&&(r.locale=i.locale),n.login(r).then(function(){a.setSuccess()}).catch(function(e){a.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(m(t.data),a),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},r={};switch(i.onLoad){case"check-sso":o.enable?_().then(function(){S().then(function(r){r?a.setSuccess():n.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){a.setError(e)})}):n.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function d(){var e=m(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then(function(){h(e,a)}).catch(function(e){a.setError(e)});i?i.token&&i.refreshToken?(g(i.token,i.refreshToken,i.idToken),o.enable?_().then(function(){S().then(function(e){e?(n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess(),w()):a.setSuccess()}).catch(function(e){a.setError(e)})}):n.updateToken(-1).then(function(){n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess()}).catch(function(e){n.onAuthError&&n.onAuthError(),i.onLoad?u():a.setError(e)})):i.onLoad?u():a.setSuccess():a.setSuccess()}return c.then(function(){var e,t;(e=b(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(k).then(d).catch(function(e){s.setError(e)})}),c.catch(function(e){s.setError(e)}),s.promise},n.login=function(e){return t.login(e)},n.createLoginUrl=function(e){var i,o=y(),s=y(),a=t.redirectUri(e),c={state:o,nonce:s,redirectUri:encodeURIComponent(a),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),i=e&&"register"==e.action?n.endpoints.register():n.endpoints.authorize();var u=e&&e.scope||n.scope;u?-1===u.indexOf("openid")&&(u="openid "+u):u="openid";var f=i+"?client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+encodeURIComponent(a)+"&state="+encodeURIComponent(o)+"&response_mode="+encodeURIComponent(n.responseMode)+"&response_type="+encodeURIComponent(n.responseType)+"&scope="+encodeURIComponent(u);if(l&&(f=f+"&nonce="+encodeURIComponent(s)),e&&e.prompt&&(f+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(f+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(f+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(f+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(f+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(f+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(f+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||n.acrValues)&&(f+="&acr_values="+encodeURIComponent(e.acrValues||n.acrValues)),n.pkceMethod){var h=d(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=h,f+="&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(tB.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(n.pkceMethod,h)+"&code_challenge_method="+n.pkceMethod}return r.add(c),f},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=f(),i=void 0;return void 0!==r&&(i=r+"/account?referrer="+encodeURIComponent(n.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),i},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=f()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=b();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=b();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=b();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 o="grant_type=refresh_token&refresh_token="+n.refreshToken,s=n.endpoints.token();if(i.push(t),1==i.length){var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.withCredentials=!0,o+="&client_id="+encodeURIComponent(n.clientId);var l=new Date().getTime();a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){c("[KEYCLOAK] Token refreshed"),l=(l+new Date().getTime())/2;var e=JSON.parse(a.responseText);g(e.access_token,e.refresh_token,e.id_token,l),n.onAuthRefreshSuccess&&n.onAuthRefreshSuccess();for(var t=i.pop();null!=t;t=i.pop())t.setSuccess(!0)}else{u("[KEYCLOAK] Failed to refresh token"),400==a.status&&n.clearToken(),n.onAuthRefreshError&&n.onAuthRefreshError();for(var t=i.pop();null!=t;t=i.pop())t.setError(!0)}},a.send(o)}}else t.setSuccess(!1)};return o.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 i=JSON.parse(n).expires;(!i||i<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 i=t("kc-callback-"+n);if(r("kc-callback-"+n,"",e(-100)),i)return JSON.parse(i)}},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 i=r[n];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return""},r=function(e,t,r){var n=e+"="+t+"; expires="+r.toUTCString()+"; ";document.cookie=n}};function P(e){return function(){n.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var tq=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let t$=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=s.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){e.getEventProvider()?this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return tq(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===s.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case s.DISCONNECTED:this._onEventsDisconnect();break;case s.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return tq(this,void 0,void 0,function*(){let t=!!this._attributeRefs,r=!!this._assetIds,n=this._attributeRefs?this._attributeRefs:this._assetIds;if(n&&n.length>0){if(this._subscriptionIds=[],r){let t=yield e.getEventProvider().subscribeAssetEvents(n,!0,e=>this._onEvent(e)),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eT(n,r))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}let i=yield e.getEventProvider().subscribeAttributeEvents(n,t,e=>this._onEvent(e)),o=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eT(n,o))return void e.getEventProvider().unsubscribe(i);this._subscriptionIds.push(i)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(t=>{e.getEventProvider().unsubscribe(t)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eT(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eT(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tJ="#4d9d2a",tX="#FFFFFF",tZ="#FFFFFF",tQ="#F9F9F9",t0="#CCCCCC",t1="#be0000",t2="#FFFFFF",t5="#4c4c4c",t3="#000000",t6="#000000",t4="#FFFFFF",t8="0 5px 5px -5px rgba(0,0,0,0.3)",t9="0 1px 3px 0 rgba(0,0,0,0.21)";var t7=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let re="mdi",rt="openremote",rr="restricted_user";(i=a||(a={})).MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",i.AUTH_FAILED="AUTH_FAILED",i.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",i.CONSOLE_ERROR="CONSOLE_INIT_ERROR",i.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",i.TRANSLATION_ERROR="TRANSLATION_ERROR",(o=l||(l={})).ERROR="ERROR",o.READY="READY",o.ONLINE="ONLINE",o.OFFLINE="OFFLINE",o.CONNECTING="CONNECTING",o.CONSOLE_INIT="CONSOLE_INIT",o.CONSOLE_READY="CONSOLE_READY",o.TRANSLATE_INIT="TRANSLATE_INIT",o.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",o.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED",o.LOGIN="LOGIN";let rn={en:"english",cn:"chinese",cs:"czech",nl:"dutch",fr:"french",de:"german",it:"italian",pl:"polish",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"},ri={cn:"zh-cn"};function ro(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=rt),t}class rs{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)}),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 tb()}get language(){return eg.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eg.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(l.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||rt}getEventProvider(){return this.events}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 t7(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=ro(e);let t=yield this.loadManagerInfo(),r=new tm(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(l.CONSOLE_READY)});if(this._console=r,"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()}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._ready=!0,this._emitEvent(l.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return t7(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(a.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return t7(this,void 0,void 0,function*(){if(eg.isInitialized)return!0;eg.on("initialized",e=>{this._emitEvent(l.TRANSLATE_INIT)}),eg.on("languageChanged",e=>{var t;eb().locale(null!=(t=ri[e])?t:e),this._emitEvent(l.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 eg.use(tV).init(e)}catch(e){return console.error(e),this._setError(a.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return t7(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield tb().api.AssetModelResource.getAssetInfos(),t=yield tb().api.AssetModelResource.getMetaItemDescriptors(),r=yield tb().api.AssetModelResource.getValueDescriptors();u.AssetModelUtil._assetTypeInfos=e.data,u.AssetModelUtil._metaItemDescriptors=Object.values(t.data),u.AssetModelUtil._valueDescriptors=Object.values(r.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return t7(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(a.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(tb().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return tb().setTimeout(2e4),tb().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return t7(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new tx(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(a.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var e;(null==(e=this.events)?void 0:e.status)===s.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(e){switch(e){case s.DISCONNECTED:this._onDisconnect();break;case s.CONNECTED:break;case s.CONNECTING:this._emitEvent(l.CONNECTING)}}doConsoleInit(){return t7(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(l.CONSOLE_INIT),!0}catch(e){return this._setError(a.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tH.IconSets.addIconSet("mdi",(0,tH.createMdiIconSet)(ra.managerUrl)),tH.IconSets.addIconSet("or",(0,tH.createSvgIconSet)(tH.OrIconSet.size,tH.OrIconSet.icons)))}getConsoleAppConfig(){return t7(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=ra.managerUrl)?e:"")+"/consoleappconfig/"+ra.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return t7(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return t7(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 t7(this,arguments,void 0,function*(e,t=this.rest){this.authenticated?t?yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}}):console.warn("Tried updating user language, but the REST API is not initialized yet."):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)))}login(e){if("KEYCLOAK"===this._config.auth&&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)}}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(rr)}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(){if(this.getKeycloakToken())return"Bearer "+this.getKeycloakToken()}retrieveAuthorizationHeader(){return t7(this,void 0,void 0,function*(){let e=yield this.retrieveKeycloakToken();if(e)return"Bearer "+e})}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}retrieveKeycloakToken(){return t7(this,void 0,void 0,function*(){if(this.isKeycloak())return yield this._updateKeycloakAccessToken(),this._keycloak.token})}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 t7(this,void 0,void 0,function*(){var e,t,r,n,i;try{this._keycloak=new tz({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),s=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!s&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,s=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(s){this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,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(),this._createTokenUpdateInterval();let o=null==(i=this._keycloak.tokenParsed)?void 0:i.session_state;o&&sessionStorage.getItem("or-session")!==o&&(sessionStorage.setItem("or-session",o),this._emitEvent(l.LOGIN))}else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(a.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._authenticated?this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>t7(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4)):console.warn("User is not authenticated; skipping token update interval creation.")}_updateKeycloakAccessToken(){return t7(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 t7(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(l.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return t7(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(l.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected to the Manager."),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(l.ONLINE)}reconnect(){return t7(this,arguments,void 0,function*(e=3e3){if(console.debug("Checking connection to the Manager..."),!this._disconnected)return void console.debug("Manager is still connected. No action necessary.");console.debug("Manager is disconnected!"),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>t7(this,void 0,void 0,function*(){var e,t;if(console.debug("Reconnecting to the Manager..."),!this._authenticated){console.debug("User is not authenticated, skipping token refresh");let t=()=>{var e;return(null==(e=this.events)?void 0:e.status)===s.CONNECTED};return t()||(yield null==(e=this.events)?void 0:e.connect()),t()}if(!(yield this.isKeycloakReachable()))return console.error("Keycloak is not reachable. Reconnect attempt failed."),!1;try{yield this._updateKeycloakAccessToken()}catch(t){console.error("Could not update Keycloak access token, attempting again using offline token...",t);let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e,e||console.warn("No offline token was found on this device.");try{yield this._updateKeycloakAccessToken()}catch(e){throw this.login(),Error("Cannot update access token so sending to login")}console.debug("Keycloak access token is valid")}let r=()=>{var e;return(null==(e=this.events)?void 0:e.status)===s.CONNECTED};return r()||(console.debug("Event provider offline, attempting to reconnect using latest auth token."),yield null==(t=this.events)?void 0:t.connect()),r()}),r=yield t();if(void 0!==r){if(!r){e=Math.min(rs.MAX_RECONNECT_DELAY,e+3e3),console.error(`Failed to reconnect to the Manager. Attempting again in ${e}...`),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return t7(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)}})}}rs.MAX_RECONNECT_DELAY=45e3;let ra=new rs,rl=ra})(),ORCore=n})();
1
+ var ORCore;(()=>{var e={3260(e){"use strict";let t=(async function(){}).constructor;e.exports=()=>t},7052(e){"use strict";let t=(async function*(){}).constructor;e.exports=()=>t},9630(e,t,r){"use strict";var n=r(469),i=r(24),o=r(1530);e.exports=r(7009)||n.call(o,i)},24(e){"use strict";e.exports=Function.prototype.apply},1530(e){"use strict";e.exports=Function.prototype.call},7196(e,t,r){"use strict";var n=r(469),i=r(6757),o=r(1530),s=r(9630);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return s(n,o,e)}},7009(e){"use strict";e.exports="u">typeof Reflect&&Reflect&&Reflect.apply},8682(e,t,r){"use strict";var n=r(4295),i=r(7196),o=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i([r]):r}},714(e,t,r){"use strict";var n,i=r(7196),o=r(1233);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&o&&o(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof l&&function(e){return l(null==e?e:a(e))}},9997(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},155(e){"use strict";e.exports=EvalError},593(e){"use strict";e.exports=Error},7180(e){"use strict";e.exports=RangeError},9304(e){"use strict";e.exports=ReferenceError},1742(e){"use strict";e.exports=SyntaxError},6757(e){"use strict";e.exports=TypeError},4923(e){"use strict";e.exports=URIError},802(e){"use strict";e.exports=Object},9691(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 i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r},i=function(e,t){for(var r=[],n=t||0,i=0;n<e.length;n+=1,i+=1)r[i]=e[n];return r},o=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 s,a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw TypeError("Function.prototype.bind called on incompatible "+a);for(var l=i(arguments,1),c=r(0,a.length-l.length),u=[],d=0;d<c;d++)u[d]="$"+d;if(s=Function("binder","return function ("+o(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof s){var t=a.apply(this,n(l,arguments));return Object(t)===t?t:this}return a.apply(e,n(l,arguments))}),a.prototype){var f=function(){};f.prototype=a.prototype,s.prototype=new f,f.prototype=null}return s}},469(e,t,r){"use strict";var n=r(9691);e.exports=Function.prototype.bind||n},5175(e){"use strict";let t=(function*(){}).constructor;e.exports=()=>t},4295(e,t,r){"use strict";var n,i=r(802),o=r(593),s=r(155),a=r(7180),l=r(9304),c=r(1742),u=r(6757),d=r(4923),f=r(7256),h=r(5414),p=r(7954),g=r(3452),y=r(1358),m=r(5720),v=r(3515),b=r(1233),_=r(9997),w=function(){throw new u},S=b?function(){try{return arguments.callee,w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,k=r(8573)(),O=r(7582),E=r(2170),x=r(9090),P=r(24),R=r(1530),A={},D="u">typeof Uint8Array&&O?O(Uint8Array):n,C={__proto__:null,"%AggregateError%":"u"<typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"u"<typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":k&&O?O([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"u"<typeof Atomics?n:Atomics,"%BigInt%":"u"<typeof BigInt?n:BigInt,"%BigInt64Array%":"u"<typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"u"<typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"u"<typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"u"<typeof Float16Array?n:Float16Array,"%Float32Array%":"u"<typeof Float32Array?n:Float32Array,"%Float64Array%":"u"<typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"u"<typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":Function,"%GeneratorFunction%":A,"%Int8Array%":"u"<typeof Int8Array?n:Int8Array,"%Int16Array%":"u"<typeof Int16Array?n:Int16Array,"%Int32Array%":"u"<typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&O?O(O([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"u"<typeof Map?n:Map,"%MapIteratorPrototype%":"u">typeof Map&&k&&O?O(new Map()[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"u"<typeof Promise?n:Promise,"%Proxy%":"u"<typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"u"<typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"u"<typeof Set?n:Set,"%SetIteratorPrototype%":"u">typeof Set&&k&&O?O(new Set()[Symbol.iterator]()):n,"%SharedArrayBuffer%":"u"<typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&O?O(""[Symbol.iterator]()):n,"%Symbol%":k?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":S,"%TypedArray%":D,"%TypeError%":u,"%Uint8Array%":"u"<typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"u"<typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"u"<typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"u"<typeof Uint32Array?n:Uint32Array,"%URIError%":d,"%WeakMap%":"u"<typeof WeakMap?n:WeakMap,"%WeakRef%":"u"<typeof WeakRef?n:WeakRef,"%WeakSet%":"u"<typeof WeakSet?n:WeakSet,"%Function.prototype.call%":R,"%Function.prototype.apply%":P,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":E,"%Math.abs%":f,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":v,"%Reflect.getPrototypeOf%":x};if(O)try{null.error}catch(e){var T=O(O(e));C["%Error.prototype%"]=T}var M=r(3260),N=r(5175),I=r(7052),j=function e(t){var r;if("%AsyncFunction%"===t)r=M()||void 0;else if("%GeneratorFunction%"===t)r=N()||void 0;else if("%AsyncGeneratorFunction%"===t)r=I()||void 0;else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&O&&(r=O(i.prototype))}return C[t]=r,r},L={__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"]},U=r(469),F=r(9731),Y=U.call(R,Array.prototype.concat),W=U.call(P,Array.prototype.splice),V=U.call(R,String.prototype.replace),H=U.call(R,String.prototype.slice),B=U.call(R,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,K=/\\(\\)?/g,z=function(e){var t=H(e,0,1),r=H(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return V(e,G,function(e,t,r,i){n[n.length]=r?V(i,K,"$1"):t||e}),n},q=function(e,t){var r,n=e;if(F(L,n)&&(n="%"+(r=L[n])[0]+"%"),F(C,n)){var i=C[n];if(i===A&&(i=j(n)),void 0===i&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=z(e),n=r.length>0?r[0]:"",i=q("%"+n+"%",t),o=i.name,s=i.value,a=!1,l=i.alias;l&&(n=l[0],W(r,Y([0,1],l)));for(var d=1,f=!0;d<r.length;d+=1){var h=r[d],p=H(h,0,1),g=H(h,-1);if(('"'===p||"'"===p||"`"===p||'"'===g||"'"===g||"`"===g)&&p!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&f||(a=!0),n+="."+h,F(C,o="%"+n+"%"))s=C[o];else if(null!=s){if(!(h in s)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&d+1>=r.length){var y=b(s,h);s=(f=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[h]}else f=F(s,h),s=s[h];f&&!a&&(C[o]=s)}}return s}},2170(e,t,r){"use strict";e.exports=r(802).getPrototypeOf||null},9090(e){"use strict";e.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null},7582(e,t,r){"use strict";var n=r(9090),i=r(2170),o=r(714);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},1067(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},1233(e,t,r){"use strict";var n=r(1067);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8573(e,t,r){"use strict";var n="u">typeof Symbol&&Symbol,i=r(9535);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},9535(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(var n 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 i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[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}},9731(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty;e.exports=r(469).call(n,i)},4954(e,t,r){!function(){"use strict";var t="input is invalid type",n="object"==typeof window,i=n?window:{};i.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&"object"==typeof self,s=!i.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;s?i=r.g:o&&(i=self);var a=!i.JS_SHA256_NO_COMMON_JS&&e.exports,l="function"==typeof define&&define.amd,c=!i.JS_SHA256_NO_ARRAY_BUFFER&&"u">typeof ArrayBuffer,u="0123456789abcdef".split(""),d=[-0x80000000,8388608,32768,128],f=[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],p=["hex","array","digest","arrayBuffer"],g=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),c&&(i.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]()}},m=function(e){var t=y("hex",e);s&&(t=v(t,e)),t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<p.length;++r){var n=p[r];t[n]=y(n,e)}return t},v=function(e,n){var o,s=r(7791),a=r(5610).Buffer,l=n?"sha224":"sha256";return o=a.from&&!i.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(r){if("string"==typeof r)return s.createHash(l).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===a?s.createHash(l).update(o(r)).digest("hex"):e(r)}},b=function(e,t){return function(r,n){return new S(r,t,!0).update(n)[e]()}},_=function(e){var t=b("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<p.length;++r){var n=p[r];t[n]=b(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 i,o=typeof e;if("string"===o){var s,a=[],l=e.length,u=0;for(i=0;i<l;++i)(s=e.charCodeAt(i))<128?a[u++]=s:(s<2048?a[u++]=192|s>>>6:(s<55296||s>=57344?a[u++]=224|s>>>12:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++i)),a[u++]=240|s>>>18,a[u++]=128|s>>>12&63),a[u++]=128|s>>>6&63),a[u++]=128|63&s);e=a}else if("object"===o){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 d=[],f=[];for(i=0;i<64;++i){var h=e[i]||0;d[i]=92^h,f[i]=54^h}w.call(this,r,n),this.update(f),this.oKeyPad=d,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 i,o,s=0,a=e.length,l=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,this.block=l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),r)for(o=this.start;s<a&&o<64;++s)l[o>>>2]|=e[s]<<f[3&o++];else for(o=this.start;s<a&&o<64;++s)(i=e.charCodeAt(s))<128?l[o>>>2]|=i<<f[3&o++]:(i<2048?l[o>>>2]|=(192|i>>>6)<<f[3&o++]:(i<55296||i>=57344?l[o>>>2]|=(224|i>>>12)<<f[3&o++]:(i=65536+((1023&i)<<10|1023&e.charCodeAt(++s)),l[o>>>2]|=(240|i>>>18)<<f[3&o++],l[o>>>2]|=(128|i>>>12&63)<<f[3&o++]),l[o>>>2]|=(128|i>>>6&63)<<f[3&o++]),l[o>>>2]|=(128|63&i)<<f[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=l[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}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]|=d[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,i,o,s,a,l,c,u=this.h0,d=this.h1,f=this.h2,p=this.h3,g=this.h4,y=this.h5,m=this.h6,v=this.h7,b=this.blocks;for(e=16;e<64;++e)t=((i=b[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,r=((i=b[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,b[e]=b[e-16]+t+b[e-7]+r|0;for(c=d&f,e=0;e<64;e+=4)this.first?(this.is224?(s=300032,v=(i=b[0]-0x543c9a5b)-0x8f1a6c7|0,p=i+0x170e9b5|0):(s=0x2a01a605,v=(i=b[0]-0xc881298)-0x5ab00ac6|0,p=i+0x8909ae5|0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),n=(s=u&d)^u&f^c,i=v+r+(g&y^~g&m)+h[e]+b[e],o=t+n,v=p+i|0,p=i+o|0),t=(p>>>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=(a=p&u)^p&d^s,i=m+r+(v&g^~v&y)+h[e+1]+b[e+1],o=t+n,m=f+i|0,t=((f=i+o|0)>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),n=(l=f&p)^f&u^a,i=y+r+(m&v^~m&g)+h[e+2]+b[e+2],o=t+n,y=d+i|0,t=((d=i+o|0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7),n=(c=d&f)^d&p^l,i=g+r+(y&m^~y&v)+h[e+3]+b[e+3],o=t+n,g=u+i|0,u=i+o|0,this.chromeBugWorkAround=!0;this.h0=this.h0+u|0,this.h1=this.h1+d|0,this.h2=this.h2+f|0,this.h3=this.h3+p|0,this.h4=this.h4+g|0,this.h5=this.h5+y|0,this.h6=this.h6+m|0,this.h7=this.h7+v|0},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,l=u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[15&e]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[15&t]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[15&r]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[15&n]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[15&i]+u[o>>>28&15]+u[o>>>24&15]+u[o>>>20&15]+u[o>>>16&15]+u[o>>>12&15]+u[o>>>8&15]+u[o>>>4&15]+u[15&o]+u[s>>>28&15]+u[s>>>24&15]+u[s>>>20&15]+u[s>>>16&15]+u[s>>>12&15]+u[s>>>8&15]+u[s>>>4&15]+u[15&s];return this.is224||(l+=u[a>>>28&15]+u[a>>>24&15]+u[a>>>20&15]+u[a>>>16&15]+u[a>>>12&15]+u[a>>>8&15]+u[a>>>4&15]+u[15&a]),l},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,i=this.h4,o=this.h5,s=this.h6,a=this.h7,l=[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,i>>>24&255,i>>>16&255,i>>>8&255,255&i,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||l.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),l},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=m();k.sha256=k,k.sha224=m(!0),k.sha256.hmac=_(),k.sha224.hmac=_(!0),a?e.exports=k:(i.sha256=k.sha256,i.sha224=k.sha224,l&&define(function(){return k}))}()},3472(e,t,r){e=r.nmd(e);var n,i="__lodash_hash_undefined__",o="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object Promise]",g="[object RegExp]",y="[object Set]",m="[object String]",v="[object Symbol]",b="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k=/^\w*$/,O=/^\./,E=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,P=/^\[object .+?Constructor\]$/,R=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[o]=A[s]=A[_]=A[a]=A[w]=A[l]=A[c]=A[u]=A[d]=A[f]=A[h]=A[g]=A[y]=A[m]=A[b]=!1;var D="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,C="object"==typeof self&&self&&self.Object===Object&&self,T=D||C||Function("return this")(),M=t&&!t.nodeType&&t,N=M&&e&&!e.nodeType&&e,I=N&&N.exports===M&&D.process,j=function(){try{return I&&I.binding("util")}catch(e){}}(),L=j&&j.isTypedArray;function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function F(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Y(e,t){return function(r){return e(t(r))}}function W(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var V=Array.prototype,H=Function.prototype,B=Object.prototype,G=T["__core-js_shared__"],K=(n=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",z=H.toString,q=B.hasOwnProperty,$=B.toString,J=RegExp("^"+z.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),X=T.Symbol,Z=T.Uint8Array,Q=Y(Object.getPrototypeOf,Object),ee=Object.create,et=B.propertyIsEnumerable,er=V.splice,en=Y(Object.keys,Object),ei=eD(T,"DataView"),eo=eD(T,"Map"),es=eD(T,"Promise"),ea=eD(T,"Set"),el=eD(T,"WeakMap"),ec=eD(Object,"create"),eu=eL(ei),ed=eL(eo),ef=eL(es),eh=eL(ea),ep=eL(el),eg=X?X.prototype:void 0,ey=eg?eg.valueOf:void 0,em=eg?eg.toString:void 0;function ev(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eb(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function e_(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ew(e){var t=-1,r=e?e.length:0;for(this.__data__=new e_;++t<r;)this.add(e[t])}function eS(e){this.__data__=new eb(e)}function ek(e,t){for(var r=e.length;r--;)if(eF(e[r][0],t))return r;return -1}ev.prototype.clear=function(){this.__data__=ec?ec(null):{}},ev.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ev.prototype.get=function(e){var t=this.__data__;if(ec){var r=t[e];return r===i?void 0:r}return q.call(t,e)?t[e]:void 0},ev.prototype.has=function(e){var t=this.__data__;return ec?void 0!==t[e]:q.call(t,e)},ev.prototype.set=function(e,t){return this.__data__[e]=ec&&void 0===t?i:t,this},eb.prototype.clear=function(){this.__data__=[]},eb.prototype.delete=function(e){var t=this.__data__,r=ek(t,e);return!(r<0)&&(r==t.length-1?t.pop():er.call(t,r,1),!0)},eb.prototype.get=function(e){var t=this.__data__,r=ek(t,e);return r<0?void 0:t[r][1]},eb.prototype.has=function(e){return ek(this.__data__,e)>-1},eb.prototype.set=function(e,t){var r=this.__data__,n=ek(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},e_.prototype.clear=function(){this.__data__={hash:new ev,map:new(eo||eb),string:new ev}},e_.prototype.delete=function(e){return eA(this,e).delete(e)},e_.prototype.get=function(e){return eA(this,e).get(e)},e_.prototype.has=function(e){return eA(this,e).has(e)},e_.prototype.set=function(e,t){return eA(this,e).set(e,t),this},ew.prototype.add=ew.prototype.push=function(e){return this.__data__.set(e,i),this},ew.prototype.has=function(e){return this.__data__.has(e)},eS.prototype.clear=function(){this.__data__=new eb},eS.prototype.delete=function(e){return this.__data__.delete(e)},eS.prototype.get=function(e){return this.__data__.get(e)},eS.prototype.has=function(e){return this.__data__.has(e)},eS.prototype.set=function(e,t){var r=this.__data__;if(r instanceof eb){var n=r.__data__;if(!eo||n.length<199)return n.push([e,t]),this;r=this.__data__=new e_(n)}return r.set(e,t),this};var eO=function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}return e};function eE(e,t){var r;t=eM(t,e)?[t]:eW(r=t)?r:eI(r);for(var n=0,i=t.length;null!=e&&n<i;)e=e[ej(t[n++])];return n&&n==i?e:void 0}function ex(e,t){return null!=e&&t in Object(e)}function eP(e,t,r,n,i){return e===t||(null!=e&&null!=t&&(eG(e)||eK(t))?function(e,t,r,n,i,u){var p=eW(e),b=eW(t),S=s,k=s;p||(S=(S=eC(e))==o?h:S),b||(k=(k=eC(t))==o?h:k);var O=S==h&&!U(e),E=k==h&&!U(t),x=S==k;if(x&&!O)return u||(u=new eS),p||eq(e)?eR(e,t,r,n,i,u):function(e,t,r,n,i,o,s){switch(r){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case _:if(e.byteLength!=t.byteLength||!n(new Z(e),new Z(t)))break;return!0;case a:case l:case f:return eF(+e,+t);case c:return e.name==t.name&&e.message==t.message;case g:case m:return e==t+"";case d:var u=F;case y:var h=2&o;if(u||(u=W),e.size!=t.size&&!h)break;var p=s.get(e);if(p)return p==t;o|=1,s.set(e,t);var b=eR(u(e),u(t),n,i,o,s);return s.delete(e),b;case v:if(ey)return ey.call(e)==ey.call(t)}return!1}(e,t,S,r,n,i,u);if(!(2&i)){var P=O&&q.call(e,"__wrapped__"),R=E&&q.call(t,"__wrapped__");if(P||R){var A=P?e.value():e,D=R?t.value():t;return u||(u=new eS),r(A,D,n,i,u)}}return!!x&&(u||(u=new eS),function(e,t,r,n,i,o){var s=2&i,a=e$(e),l=a.length;if(l!=e$(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:q.call(t,u)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var f=!0;o.set(e,t),o.set(t,e);for(var h=s;++c<l;){var p=e[u=a[c]],g=t[u];if(n)var y=s?n(g,p,u,t,e,o):n(p,g,u,e,t,o);if(!(void 0===y?p===g||r(p,g,n,i,o):y)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var m=e.constructor,v=t.constructor;m!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof v&&v instanceof v)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,r,n,i,u))}(e,t,eP,r,n,i):e!=e&&t!=t)}function eR(e,t,r,n,i,o){var s=2&i,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,f=1&i?new ew:void 0;for(o.set(e,t),o.set(t,e);++u<a;){var h=e[u],p=t[u];if(n)var g=s?n(p,h,u,t,e,o):n(h,p,u,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!function(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}(t,function(e,t){if(!f.has(t)&&(h===e||r(h,e,n,i,o)))return f.add(t)})){d=!1;break}}else if(!(h===p||r(h,p,n,i,o))){d=!1;break}}return o.delete(e),o.delete(t),d}function eA(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function eD(e,t){var r,n=null==e?void 0:e[t];return!(!eG(n)||(r=n,K&&K in r))&&(eH(n)||U(n)?J:P).test(eL(n))?n:void 0}var eC=function(e){return $.call(e)};function eT(e,t){return!!(t=null==t?0x1fffffffffffff:t)&&("number"==typeof e||R.test(e))&&e>-1&&e%1==0&&e<t}function eM(e,t){if(eW(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||ez(e))||k.test(e)||!S.test(e)||null!=t&&e in Object(t)}(ei&&eC(new ei(new ArrayBuffer(1)))!=w||eo&&eC(new eo)!=d||es&&eC(es.resolve())!=p||ea&&eC(new ea)!=y||el&&eC(new el)!=b)&&(eC=function(e){var t=$.call(e),r=t==h?e.constructor:void 0,n=r?eL(r):void 0;if(n)switch(n){case eu:return w;case ed:return d;case ef:return p;case eh:return y;case ep:return b}return t});function eN(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}var eI=eU(function(e){e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ez(e))return em?em.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var t,r=[];return O.test(e)&&r.push(""),e.replace(E,function(e,t,n,i){r.push(n?i.replace(x,"$1"):t||e)}),r});function ej(e){if("string"==typeof e||ez(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function eL(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eU(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(eU.Cache||e_),r}function eF(e,t){return e===t||e!=e&&t!=t}function eY(e){var t;return eK(t=e)&&eV(t)&&q.call(e,"callee")&&(!et.call(e,"callee")||$.call(e)==o)}eU.Cache=e_;var eW=Array.isArray;function eV(e){return null!=e&&eB(e.length)&&!eH(e)}function eH(e){var t=eG(e)?$.call(e):"";return t==u||"[object GeneratorFunction]"==t}function eB(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eG(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function eK(e){return!!e&&"object"==typeof e}function ez(e){return"symbol"==typeof e||eK(e)&&$.call(e)==v}var eq=L?function(e){return L(e)}:function(e){return eK(e)&&eB(e.length)&&!!A[$.call(e)]};function e$(e){return eV(e)?function(e){var t=eW(e)||eY(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],r=t.length,n=!!r;for(var i in e)q.call(e,i)&&!(n&&("length"==i||eT(i,r)))&&t.push(i);return t}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||B))return en(e);var t,r,n=[];for(var i in Object(e))q.call(e,i)&&"constructor"!=i&&n.push(i);return n}(e)}function eJ(e){return e}e.exports=function(e,t,r){var n=eW(e)||eq(e);if(t="function"==typeof(c=t)?c:null==c?eJ:"object"==typeof c?eW(c)?(i=c[0],o=c[1],eM(i)&&(s=o)==s&&!eG(s)?eN(ej(i),o):function(e){var t,r,n,s,a,l=(t=e,r=i,void 0===(n=null==t?void 0:eE(t,r))?void 0:n);return void 0===l&&l===o?(s=e,a=i,null!=s&&function(e,t,r){t=eM(t,e)?[t]:eW(n=t)?n:eI(n);for(var n,i,o=-1,s=t.length;++o<s;){var a=ej(t[o]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}if(i)return i;var s=e?e.length:0;return!!s&&eB(s)&&eT(a,s)&&(eW(e)||eY(e))}(s,a,ex)):eP(o,l,void 0,3)}):1==(l=function(e){for(var t=e$(e),r=t.length;r--;){var n,i=t[r],o=e[i];t[r]=[i,o,(n=o)==n&&!eG(n)]}return t}(a=c)).length&&l[0][2]?eN(l[0][0],l[0][1]):function(e){return e===a||function(e,t){var r=t.length,n=r;if(null==e)return!n;for(e=Object(e);r--;){var i=t[r];if((0,i[2])?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++r<n;){var o=(i=t[r])[0],s=e[o],a=i[1];if(0,i[2]){if(void 0===s&&!(o in e))return!1}else{var l,c=new eS;if(!(void 0===l?eP(a,s,void 0,3,c):l))return!1}}return!0}(e,l)}:function(e){var t;return eM(e)?(t=ej(e),function(e){return null==e?void 0:e[t]}):function(t){return eE(t,e)}}(c),null==r)if(n||eG(e)){var i,o,s,a,l,c,u,d=e.constructor;r=n?eW(e)?new d:[]:eH(d)&&eG(u=Q(e))?ee(u):{}}else r={};return(n?function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););return e}:function(e,t){return e&&eO(e,t,e$)})(e,function(e,n,i){return t(r,e,n,i)}),r}},7256(e){"use strict";e.exports=Math.abs},5414(e){"use strict";e.exports=Math.floor},981(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},7954(e){"use strict";e.exports=Math.max},3452(e){"use strict";e.exports=Math.min},1358(e){"use strict";e.exports=Math.pow},5720(e){"use strict";e.exports=Math.round},3515(e,t,r){"use strict";var n=r(981);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},4867(e,t,r){e=r.nmd(e),e.exports=function(){"use strict";function t(){return W.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t;if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(t in e)if(o(e,t))return!1;return!0}function a(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var r,n=[],i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function d(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return to(e,t,r,n,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());return(n&&(t=h(e),r=V.call(t.parsedDateParts,function(e){return null!=e}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e))?n:(e._isValid=n,e._isValid)}function g(e){var t=f(0/0);return null!=e?d(h(t),e):h(t).userInvalidated=!0,t}V=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var y,m,v=t.momentProperties=[],b=!1;function _(e,t){var r,n,i,o=v.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=h(t)),a(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)a(i=t[n=v[r]])||(e[n]=i);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():0/0),this.isValid()||(this._d=new Date(0/0)),!1===b&&(b=!0,t.updateOffset(this),b=!1)}function S(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function k(e){!1===t.suppressDeprecationWarnings&&"u">typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,r){var n=!0;return d(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),n){var i,s,a,l=[],c=arguments.length;for(s=0;s<c;s++){if(i="","object"==typeof arguments[s]){for(a in i+="\n["+s+"] ",arguments[0])o(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];l.push(i)}k(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+Error().stack),n=!1}return r.apply(this,arguments)},r)}var E={};function x(e,r){null!=t.deprecationHandler&&t.deprecationHandler(e,r),E[e]||(k(r),E[e]=!0)}function P(e){return"u">typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function R(e,t){var r,n=d({},e);for(r in t)o(t,r)&&(i(e[r])&&i(t[r])?(n[r]={},d(n[r],e[r]),d(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)o(e,r)&&!o(t,r)&&i(e[r])&&(n[r]=d({},n[r]));return n}function A(e){null!=e&&this.set(e)}function D(e,t,r){var n=""+Math.abs(e);return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,t-n.length)).toString().substr(1)+n}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var C=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,T=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,M={},N={};function I(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(N[e]=i),t&&(N[t[0]]=function(){return D(i.apply(this,arguments),t[1],t[2])}),r&&(N[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function j(e,t){return e.isValid()?(M[t=L(t,e.localeData())]=M[t]||function(e){var t,r,n,i=e.match(C);for(r=0,n=i.length;r<n;r++)N[i[r]]?i[r]=N[i[r]]:i[r]=(t=i[r]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=P(i[r])?i[r].call(t,e):i[r];return o}}(t),M[t](e)):e.localeData().invalidDate()}function L(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(T.lastIndex=0;r>=0&&T.test(e);)e=e.replace(T,n),T.lastIndex=0,r-=1;return e}var U={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function F(e){return"string"==typeof e?U[e]||U[e.toLowerCase()]:void 0}function Y(e){var t,r,n={};for(r in e)o(e,r)&&(t=F(r))&&(n[t]=e[r]);return n}var W,V,H,B={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},G=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r},K=/\d/,z=/\d\d/,q=/\d{3}/,$=/\d{4}/,J=/[+-]?\d{6}/,X=/\d\d?/,Z=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,ee=/\d{1,3}/,et=/\d{1,4}/,er=/[+-]?\d{1,6}/,en=/\d+/,ei=/[+-]?\d+/,eo=/Z|[+-]\d\d:?\d\d/gi,es=/Z|[+-]\d\d(?::?\d\d)?/gi,ea=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,el=/^[1-9]\d?/,ec=/^([1-9]\d|\d)/;function eu(e,t,r){H[e]=P(t)?t:function(e,n){return e&&r?r:t}}function ed(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ef(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function eh(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=ef(t)),r}H={};var ep={};function eg(e,t){var r,n,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,r){r[t]=eh(e)}),n=e.length,r=0;r<n;r++)ep[e[r]]=i}function ey(e,t){eg(e,function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function em(e){return e%4==0&&e%100!=0||e%400==0}function ev(e){return em(e)?366:365}I("Y",0,0,function(){var e=this.year();return e<=9999?D(e,4):"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),eu("Y",ei),eu("YY",X,z),eu("YYYY",et,$),eu("YYYYY",er,J),eu("YYYYYY",er,J),eg(["YYYYY","YYYYYY"],0),eg("YYYY",function(e,r){r[0]=2===e.length?t.parseTwoDigitYear(e):eh(e)}),eg("YY",function(e,r){r[0]=t.parseTwoDigitYear(e)}),eg("Y",function(e,t){t[0]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return eh(e)+(eh(e)>68?1900:2e3)};var eb=e_("FullYear",!0);function e_(e,r){return function(n){return null!=n?(eS(this,e,n),t.updateOffset(this,r),this):ew(this,e)}}function ew(e,t){if(!e.isValid())return 0/0;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return 0/0}}function eS(e,t,r){var n,i,o,s;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=e.month(),s=29!==(s=e.date())||1!==o||em(r)?s:28,i?n.setUTCFullYear(r,o,s):n.setFullYear(r,o,s)}}function ek(e,t){if(isNaN(e)||isNaN(t))return 0/0;var r=(t%12+12)%12;return e+=(t-r)/12,1===r?em(e)?29:28:31-r%7%2}eH=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return -1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),eu("M",X,el),eu("MM",X,z),eu("MMM",function(e,t){return t.monthsShortRegex(e)}),eu("MMMM",function(e,t){return t.monthsRegex(e)}),eg(["M","MM"],function(e,t){t[1]=eh(e)-1}),eg(["MMM","MMMM"],function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[1]=i:h(r).invalidMonth=e});var eO="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),eE=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;function ex(e,t,r){var n,i,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();if(r)if("MMM"===t)return -1!==(i=eH.call(this._shortMonthsParse,s))?i:null;else return -1!==(i=eH.call(this._longMonthsParse,s))?i:null;return"MMM"===t?-1!==(i=eH.call(this._shortMonthsParse,s))||-1!==(i=eH.call(this._longMonthsParse,s))?i:null:-1!==(i=eH.call(this._longMonthsParse,s))||-1!==(i=eH.call(this._shortMonthsParse,s))?i:null}function eP(e,t){if(!e.isValid())return e;if("string"==typeof t){if(/^\d+$/.test(t))t=eh(t);else if(!l(t=e.localeData().monthsParse(t)))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,ek(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function eR(e){return null!=e?(eP(this,e),t.updateOffset(this,!0),this):ew(this,"Month")}function eA(){function e(e,t){return t.length-e.length}var t,r,n,i,o=[],s=[],a=[];for(t=0;t<12;t++)r=f([2e3,t]),n=ed(this.monthsShort(r,"")),i=ed(this.months(r,"")),o.push(n),s.push(i),a.push(i),a.push(n);o.sort(e),s.sort(e),a.sort(e),this._monthsRegex=RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=RegExp("^("+o.join("|")+")","i")}function eD(e,t,r,n,i,o,s){var a;return e<100&&e>=0?isFinite((a=new Date(e+400,t,r,n,i,o,s)).getFullYear())&&a.setFullYear(e):a=new Date(e,t,r,n,i,o,s),a}function eC(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,isFinite((t=new Date(Date.UTC.apply(null,r))).getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function eT(e,t,r){var n=7+t-r;return-((7+eC(e,0,n).getUTCDay()-t)%7)+n-1}function eM(e,t,r,n,i){var o,s,a=1+7*(t-1)+(7+r-n)%7+eT(e,n,i);return a<=0?s=ev(o=e-1)+a:a>ev(e)?(o=e+1,s=a-ev(e)):(o=e,s=a),{year:o,dayOfYear:s}}function eN(e,t,r){var n,i,o=eT(e.year(),t,r),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?n=s+eI(i=e.year()-1,t,r):s>eI(e.year(),t,r)?(n=s-eI(e.year(),t,r),i=e.year()+1):(i=e.year(),n=s),{week:n,year:i}}function eI(e,t,r){var n=eT(e,t,r),i=eT(e+1,t,r);return(ev(e)-n+i)/7}function ej(e,t){return e.slice(t,7).concat(e.slice(0,t))}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),eu("w",X,el),eu("ww",X,z),eu("W",X,el),eu("WW",X,z),ey(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=eh(e)}),I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),eu("d",X),eu("e",X),eu("E",X),eu("dd",function(e,t){return t.weekdaysMinRegex(e)}),eu("ddd",function(e,t){return t.weekdaysShortRegex(e)}),eu("dddd",function(e,t){return t.weekdaysRegex(e)}),ey(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:h(r).invalidWeekday=e}),ey(["d","e","E"],function(e,t,r,n){t[n]=eh(e)});var eL="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function eU(e,t,r){var n,i,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();if(r)if("dddd"===t)return -1!==(i=eH.call(this._weekdaysParse,s))?i:null;else if("ddd"===t)return -1!==(i=eH.call(this._shortWeekdaysParse,s))?i:null;else return -1!==(i=eH.call(this._minWeekdaysParse,s))?i:null;return"dddd"===t?-1!==(i=eH.call(this._weekdaysParse,s))||-1!==(i=eH.call(this._shortWeekdaysParse,s))||-1!==(i=eH.call(this._minWeekdaysParse,s))?i:null:"ddd"===t?-1!==(i=eH.call(this._shortWeekdaysParse,s))||-1!==(i=eH.call(this._weekdaysParse,s))||-1!==(i=eH.call(this._minWeekdaysParse,s))?i:null:-1!==(i=eH.call(this._minWeekdaysParse,s))||-1!==(i=eH.call(this._weekdaysParse,s))||-1!==(i=eH.call(this._shortWeekdaysParse,s))?i:null}function eF(){function e(e,t){return t.length-e.length}var t,r,n,i,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)r=f([2e3,1]).day(t),n=ed(this.weekdaysMin(r,"")),i=ed(this.weekdaysShort(r,"")),o=ed(this.weekdays(r,"")),s.push(n),a.push(i),l.push(o),c.push(n),c.push(i),c.push(o);s.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=RegExp("^("+s.join("|")+")","i")}function eY(){return this.hours()%12||12}function eW(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function eV(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,eY),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+eY.apply(this)+D(this.minutes(),2)}),I("hmmss",0,0,function(){return""+eY.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+D(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)}),eW("a",!0),eW("A",!1),eu("a",eV),eu("A",eV),eu("H",X,ec),eu("h",X,el),eu("k",X,el),eu("HH",X,z),eu("hh",X,z),eu("kk",X,z),eu("hmm",Z),eu("hmmss",Q),eu("Hmm",Z),eu("Hmmss",Q),eg(["H","HH"],3),eg(["k","kk"],function(e,t,r){var n=eh(e);t[3]=24===n?0:n}),eg(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),eg(["h","hh"],function(e,t,r){t[3]=eh(e),h(r).bigHour=!0}),eg("hmm",function(e,t,r){var n=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n)),h(r).bigHour=!0}),eg("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n,2)),t[5]=eh(e.substr(i)),h(r).bigHour=!0}),eg("Hmm",function(e,t,r){var n=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n))}),eg("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[3]=eh(e.substr(0,n)),t[4]=eh(e.substr(n,2)),t[5]=eh(e.substr(i))});var eH,eB,eG=e_("Hours",!0),eK={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:eO,week:{dow:0,doy:6},weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysShort:eL,meridiemParse:/[ap]\.?m?\.?/i},ez={},eq={};function e$(e){return e?e.toLowerCase().replace("_","-"):e}function eJ(t){var n=null;if(void 0===ez[t]&&e&&e.exports&&t&&t.match("^[^/\\\\]*$"))try{n=eB._abbr,r(3118)("./locale/"+t),eX(n)}catch(e){ez[t]=null}return ez[t]}function eX(e,t){var r;return e&&((r=a(t)?eQ(e):eZ(e,t))?eB=r:"u">typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),eB._abbr}function eZ(e,t){if(null===t)return delete ez[e],null;var r,n=eK;if(t.abbr=e,null!=ez[e])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ez[e]._config;else if(null!=t.parentLocale)if(null!=ez[t.parentLocale])n=ez[t.parentLocale]._config;else{if(null==(r=eJ(t.parentLocale)))return eq[t.parentLocale]||(eq[t.parentLocale]=[]),eq[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ez[e]=new A(R(n,t)),eq[e]&&eq[e].forEach(function(e){eZ(e.name,e.config)}),eX(e),ez[e]}function eQ(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return eB;if(!n(e)){if(t=eJ(e))return t;e=[e]}return function(e){for(var t,r,n,i,o=0;o<e.length;){for(t=(i=e$(e[o]).split("-")).length,r=(r=e$(e[o+1]))?r.split("-"):null;t>0;){if(n=eJ(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}(i,r)>=t-1)break;t--}o++}return eB}(e)}function e0(e){var t,r=e._a;return r&&-2===h(e).overflow&&(t=r[1]<0||r[1]>11?1:r[2]<1||r[2]>ek(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}var e1=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e2=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,e5=/Z|[+-]\d\d(?::?\d\d)?/,e3=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],e6=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],e4=/^\/?Date\((-?\d+)/i,e8=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,e9={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function e7(e){var t,r,n,i,o,s,a=e._i,l=e1.exec(a)||e2.exec(a),c=e3.length,u=e6.length;if(l){for(h(e).iso=!0,t=0,r=c;t<r;t++)if(e3[t][1].exec(l[1])){i=e3[t][0],n=!1!==e3[t][2];break}if(null==i){e._isValid=!1;return}if(l[3]){for(t=0,r=u;t<r;t++)if(e6[t][1].exec(l[3])){o=(l[2]||" ")+e6[t][0];break}if(null==o){e._isValid=!1;return}}if(!n&&null!=o){e._isValid=!1;return}if(l[4])if(e5.exec(l[4]))s="Z";else{e._isValid=!1;return}e._f=i+(o||"")+(s||""),tn(e)}else e._isValid=!1}function te(e){var t,r,n,i,o,s,a,l,c,u,d,f=e8.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(f){if(o=f[4],s=f[3],a=f[2],l=f[5],c=f[6],u=f[7],d=[(t=parseInt(o,10))<=49?2e3+t:t<=999?1900+t:t,eO.indexOf(s),parseInt(a,10),parseInt(l,10),parseInt(c,10)],u&&d.push(parseInt(u,10)),r=f[1],n=d,i=e,r&&eL.indexOf(r)!==new Date(n[0],n[1],n[2]).getDay()&&(h(i).weekdayMismatch=!0,i._isValid=!1,1))return;e._a=d,e._tzm=function(e,t,r){if(e)return e9[e];if(t)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}(f[8],f[9],f[10]),e._d=eC.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function tt(e,t,r){return null!=e?e:null!=t?t:r}function tr(e){var r,n,i,o,s,a,l,c,u,d,f,p,g,y,m,v,b=[];if(!e._d){for(f=new Date(t.now()),y=e._useUTC?[f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()]:[f.getFullYear(),f.getMonth(),f.getDate()],e._w&&null==e._a[2]&&null==e._a[1]&&(null!=(n=(r=e)._w).GG||null!=n.W||null!=n.E?(a=1,l=4,i=tt(n.GG,r._a[0],eN(ts(),1,4).year),o=tt(n.W,1),((s=tt(n.E,1))<1||s>7)&&(u=!0)):(a=r._locale._week.dow,l=r._locale._week.doy,d=eN(ts(),a,l),i=tt(n.gg,r._a[0],d.year),o=tt(n.w,d.week),null!=n.d?((s=n.d)<0||s>6)&&(u=!0):null!=n.e?(s=n.e+a,(n.e<0||n.e>6)&&(u=!0)):s=a),o<1||o>eI(i,a,l)?h(r)._overflowWeeks=!0:null!=u?h(r)._overflowWeekday=!0:(c=eM(i,o,s,a,l),r._a[0]=c.year,r._dayOfYear=c.dayOfYear)),null!=e._dayOfYear&&(v=tt(e._a[0],y[0]),(e._dayOfYear>ev(v)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),g=eC(v,0,e._dayOfYear),e._a[1]=g.getUTCMonth(),e._a[2]=g.getUTCDate()),p=0;p<3&&null==e._a[p];++p)e._a[p]=b[p]=y[p];for(;p<7;p++)e._a[p]=b[p]=null==e._a[p]?+(2===p):e._a[p];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?eC:eD).apply(null,b),m=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==m&&(h(e).weekdayMismatch=!0)}}function tn(e){if(e._f===t.ISO_8601)return void e7(e);if(e._f===t.RFC_2822)return void te(e);e._a=[],h(e).empty=!0;var r,n,i,s,a,l,c,u,d,f,p,g=""+e._i,y=g.length,m=0;for(p=(c=L(e._f,e._locale).match(C)||[]).length,a=0;a<p;a++)if(u=c[a],(l=(g.match(!o(H,u)?new RegExp(ed(u.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))):H[u](e._strict,e._locale))||[])[0])&&((d=g.substr(0,g.indexOf(l))).length>0&&h(e).unusedInput.push(d),g=g.slice(g.indexOf(l)+l.length),m+=l.length),N[u])l?h(e).empty=!1:h(e).unusedTokens.push(u),null!=l&&o(ep,u)&&ep[u](l,e._a,e,u);else e._strict&&!l&&h(e).unusedTokens.push(u);h(e).charsLeftOver=y-m,g.length>0&&h(e).unusedInput.push(g),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=(r=e._locale,n=e._a[3],null==(i=e._meridiem)?n:null!=r.meridiemHour?r.meridiemHour(n,i):(null!=r.isPM&&((s=r.isPM(i))&&n<12&&(n+=12),s||12!==n||(n=0)),n)),null!==(f=h(e).era)&&(e._a[0]=e._locale.erasConvertYear(f,e._a[0])),tr(e),e0(e)}function ti(e){var r=e._i,o=e._f;return(e._locale=e._locale||eQ(e._l),null===r||void 0===o&&""===r)?g({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r))?new w(e0(r)):(c(r)?e._d=r:n(o)?!function(e){var t,r,n,i,o,s,a=!1,l=e._f.length;if(0===l){h(e).invalidFormat=!0,e._d=new Date(0/0);return}for(i=0;i<l;i++)o=0,s=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],tn(t),p(t)&&(s=!0),o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,a?o<n&&(n=o,r=t):(null==n||o<n||s)&&(n=o,r=t,s&&(a=!0));d(e,r||t)}(e):o?tn(e):function(e){var r=e._i;if(a(r))e._d=new Date(t.now());else if(c(r))e._d=new Date(r.valueOf());else if("string"==typeof r)!function(e){var r=e4.exec(e._i);if(null!==r){e._d=new Date(+r[1]);return}e7(e),!1!==e._isValid||(delete e._isValid,te(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:t.createFromInputFallback(e)))}(e);else if(n(r))e._a=u(r.slice(0),function(e){return parseInt(e,10)}),tr(e);else if(i(r)){if(!e._d){var o=Y(e._i),s=void 0===o.day?o.date:o.day;e._a=u([o.year,o.month,s,o.hour,o.minute,o.second,o.millisecond],function(e){return e&&parseInt(e,10)}),tr(e)}}else l(r)?e._d=new Date(r):t.createFromInputFallback(e)}(e),p(e)||(e._d=null),e)}function to(e,t,r,o,a){var l,c={};return(!0===t||!1===t)&&(o=t,t=void 0),(!0===r||!1===r)&&(o=r,r=void 0),(i(e)&&s(e)||n(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=a,c._l=r,c._i=e,c._f=t,c._strict=o,(l=new w(e0(ti(c))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function ts(e,t,r,n){return to(e,t,r,n,!1)}t.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var ta=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ts.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),tl=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=ts.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()});function tc(e,t){var r,i;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return ts();for(r=t[0],i=1;i<t.length;++i)(!t[i].isValid()||t[i][e](r))&&(r=t[i]);return r}var tu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function td(e){var t=Y(e),r=t.year||0,n=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,r,n=!1,i=tu.length;for(t in e)if(o(e,t)&&!(-1!==eH.call(tu,t)&&(null==e[t]||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[tu[r]]){if(n)return!1;parseFloat(e[tu[r]])!==eh(e[tu[r]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*3600,this._days=+a+7*s,this._months=+i+3*n+12*r,this._data={},this._locale=eQ(),this._bubble()}function tf(e){return e instanceof td}function th(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function tp(e,t){I(e,0,0,function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+D(~~(e/60),2)+t+D(~~e%60,2)})}tp("Z",":"),tp("ZZ",""),eu("Z",es),eu("ZZ",es),eg(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=ty(es,e)});var tg=/([\+\-]|\d\d)/gi;function ty(e,t){var r,n,i=(t||"").match(e);return null===i?null:0===(n=+(60*(r=((i[i.length-1]||[])+"").match(tg)||["-",0,0])[1])+eh(r[2]))?0:"+"===r[0]?n:-n}function tm(e,r){var n,i;return r._isUTC?(n=r.clone(),i=(S(e)||c(e)?e.valueOf():ts(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),t.updateOffset(n,!1),n):ts(e).local()}function tv(e){return-Math.round(e._d.getTimezoneOffset())}function tb(){return!!this.isValid()&&this._isUTC&&0===this._offset}t.updateOffset=function(){};var t_=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,tw=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function tS(e,t){var r,n,i,s,a,c,u=e,d=null;return tf(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(d=t_.exec(e))?(s="-"===d[1]?-1:1,u={y:0,d:eh(d[2])*s,h:eh(d[3])*s,m:eh(d[4])*s,s:eh(d[5])*s,ms:eh(th(1e3*d[6]))*s}):(d=tw.exec(e))?(s="-"===d[1]?-1:1,u={y:tk(d[2],s),M:tk(d[3],s),w:tk(d[4],s),d:tk(d[5],s),h:tk(d[6],s),m:tk(d[7],s),s:tk(d[8],s)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(r=ts(u.from),n=ts(u.to),c=r.isValid()&&n.isValid()?(n=tm(n,r),r.isBefore(n)?i=tO(r,n):((i=tO(n,r)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0},(u={}).ms=c.milliseconds,u.M=c.months),a=new td(u),tf(e)&&o(e,"_locale")&&(a._locale=e._locale),tf(e)&&o(e,"_isValid")&&(a._isValid=e._isValid),a}function tk(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function tO(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=t-e.clone().add(r.months,"M"),r}function tE(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(x(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),tx(this,tS(r,n),e),this}}function tx(e,r,n,i){var o=r._milliseconds,s=th(r._days),a=th(r._months);e.isValid()&&(i=null==i||i,a&&eP(e,ew(e,"Month")+a*n),s&&eS(e,"Date",ew(e,"Date")+s*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&t.updateOffset(e,s||a))}tS.fn=td.prototype,tS.invalid=function(){return tS(0/0)};var tP=tE(1,"add"),tR=tE(-1,"subtract");function tA(e){return"string"==typeof e||e instanceof String}function tD(e,t){if(e.date()<t.date())return-tD(t,e);var r,n=(t.year()-e.year())*12+(t.month()-e.month()),i=e.clone().add(n,"months");return r=t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i),-(n+r)||0}function tC(e){var t;return void 0===e?this._locale._abbr:(null!=(t=eQ(e))&&(this._locale=t),this)}t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tT=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function tM(){return this._locale}function tN(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-126227808e5:new Date(e,t,r).valueOf()}function tI(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-126227808e5:Date.UTC(e,t,r)}function tj(e,t){return t.erasAbbrRegex(e)}function tL(){var e,t,r,n,i,o=[],s=[],a=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)r=ed(c[e].name),n=ed(c[e].abbr),i=ed(c[e].narrow),s.push(r),o.push(n),a.push(i),l.push(r),l.push(n),l.push(i);this._erasRegex=RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=RegExp("^("+a.join("|")+")","i")}function tU(e,t){I(0,[e,e.length],0,t)}function tF(e,t,r,n,i){var o;return null==e?eN(this,n,i).year:(t>(o=eI(e,n,i))&&(t=o),tY.call(this,e,t,r,n,i))}function tY(e,t,r,n,i){var o=eM(e,t,r,n,i),s=eC(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}I("N",0,0,"eraAbbr"),I("NN",0,0,"eraAbbr"),I("NNN",0,0,"eraAbbr"),I("NNNN",0,0,"eraName"),I("NNNNN",0,0,"eraNarrow"),I("y",["y",1],"yo","eraYear"),I("y",["yy",2],0,"eraYear"),I("y",["yyy",3],0,"eraYear"),I("y",["yyyy",4],0,"eraYear"),eu("N",tj),eu("NN",tj),eu("NNN",tj),eu("NNNN",function(e,t){return t.erasNameRegex(e)}),eu("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),eg(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?h(r).era=i:h(r).invalidEra=e}),eu("y",en),eu("yy",en),eu("yyy",en),eu("yyyy",en),eu("yo",function(e,t){return t._eraYearOrdinalRegex||en}),eg(["y","yy","yyy","yyyy"],0),eg(["yo"],function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[0]=r._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)}),I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),tU("gggg","weekYear"),tU("ggggg","weekYear"),tU("GGGG","isoWeekYear"),tU("GGGGG","isoWeekYear"),eu("G",ei),eu("g",ei),eu("GG",X,z),eu("gg",X,z),eu("GGGG",et,$),eu("gggg",et,$),eu("GGGGG",er,J),eu("ggggg",er,J),ey(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=eh(e)}),ey(["gg","GG"],function(e,r,n,i){r[i]=t.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),eu("Q",K),eg("Q",function(e,t){t[1]=(eh(e)-1)*3}),I("D",["DD",2],"Do","date"),eu("D",X,el),eu("DD",X,z),eu("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),eg(["D","DD"],2),eg("Do",function(e,t){t[2]=eh(e.match(X)[0])});var tW=e_("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),eu("DDD",ee),eu("DDDD",q),eg(["DDD","DDDD"],function(e,t,r){r._dayOfYear=eh(e)}),I("m",["mm",2],0,"minute"),eu("m",X,ec),eu("mm",X,z),eg(["m","mm"],4);var tV=e_("Minutes",!1);I("s",["ss",2],0,"second"),eu("s",X,ec),eu("ss",X,z),eg(["s","ss"],5);var tH=e_("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),eu("S",ee,K),eu("SS",ee,z),eu("SSS",ee,q),y="SSSS";y.length<=9;y+="S")eu(y,en);function tB(e,t){t[6]=eh(("0."+e)*1e3)}for(y="S";y.length<=9;y+="S")eg(y,tB);m=e_("Milliseconds",!1),I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var tG=w.prototype;function tK(e){return e}tG.add=tP,tG.calendar=function(e,r){if(1==arguments.length)if(arguments[0]){var a,u,d,f;if(a=arguments[0],S(a)||c(a)||tA(a)||l(a)||(d=n(u=a),f=!1,d&&(f=0===u.filter(function(e){return!l(e)&&tA(u)}).length),d&&f)||function(e){var t,r,n=i(e)&&!s(e),a=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=l.length;for(t=0;t<c;t+=1)r=l[t],a=a||o(e,r);return n&&a}(a)||null==a)e=arguments[0],r=void 0;else(function(e){var t,r,n=i(e)&&!s(e),a=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<l.length;t+=1)r=l[t],a=a||o(e,r);return n&&a})(arguments[0])&&(r=arguments[0],e=void 0)}else e=void 0,r=void 0;var h=e||ts(),p=tm(h,this).startOf("day"),g=t.calendarFormat(this,p)||"sameElse",y=r&&(P(r[g])?r[g].call(this,h):r[g]);return this.format(y||this.localeData().calendar(g,this,ts(h)))},tG.clone=function(){return new w(this)},tG.diff=function(e,t,r){var n,i,o;if(!this.isValid()||!(n=tm(e,this)).isValid())return 0/0;switch(i=(n.utcOffset()-this.utcOffset())*6e4,t=F(t)){case"year":o=tD(this,n)/12;break;case"month":o=tD(this,n);break;case"quarter":o=tD(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-i)/864e5;break;case"week":o=(this-n-i)/6048e5;break;default:o=this-n}return r?o:ef(o)},tG.endOf=function(e){var r,n;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?tI:tN,e){case"year":r=n(this.year()+1,0,1)-1;break;case"quarter":r=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":r=n(this.year(),this.month()+1,1)-1;break;case"week":r=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":r=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":r=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":r=this._d.valueOf(),r+=36e5-((r+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5-1;break;case"minute":r=this._d.valueOf(),r+=6e4-(r%6e4+6e4)%6e4-1;break;case"second":r=this._d.valueOf(),r+=1e3-(r%1e3+1e3)%1e3-1}return this._d.setTime(r),t.updateOffset(this,!0),this},tG.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var r=j(this,e);return this.localeData().postformat(r)},tG.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||ts(e).isValid())?tS({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tG.fromNow=function(e){return this.from(ts(),e)},tG.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||ts(e).isValid())?tS({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},tG.toNow=function(e){return this.to(ts(),e)},tG.get=function(e){return P(this[e=F(e)])?this[e]():this},tG.invalidAt=function(){return h(this).overflow},tG.isAfter=function(e,t){var r=S(e)?e:ts(e);return!!(this.isValid()&&r.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())},tG.isBefore=function(e,t){var r=S(e)?e:ts(e);return!!(this.isValid()&&r.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())},tG.isBetween=function(e,t,r,n){var i=S(e)?e:ts(e),o=S(t)?t:ts(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(o,r):!this.isAfter(o,r))},tG.isSame=function(e,t){var r,n=S(e)?e:ts(e);return!!(this.isValid()&&n.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))},tG.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},tG.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},tG.isValid=function(){return p(this)},tG.lang=tT,tG.locale=tC,tG.localeData=tM,tG.max=tl,tG.min=ta,tG.parsingFlags=function(){return d({},h(this))},tG.set=function(e,t){if("object"==typeof e){var r,n=function(e){var t,r=[];for(t in e)o(e,t)&&r.push({unit:t,priority:B[t]});return r.sort(function(e,t){return e.priority-t.priority}),r}(e=Y(e)),i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(P(this[e=F(e)]))return this[e](t);return this},tG.startOf=function(e){var r,n;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?tI:tN,e){case"year":r=n(this.year(),0,1);break;case"quarter":r=n(this.year(),this.month()-this.month()%3,1);break;case"month":r=n(this.year(),this.month(),1);break;case"week":r=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":r=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":r=n(this.year(),this.month(),this.date());break;case"hour":r=this._d.valueOf(),r-=((r+(this._isUTC?0:6e4*this.utcOffset()))%36e5+36e5)%36e5;break;case"minute":r=this._d.valueOf(),r-=(r%6e4+6e4)%6e4;break;case"second":r=this._d.valueOf(),r-=(r%1e3+1e3)%1e3}return this._d.setTime(r),t.updateOffset(this,!0),this},tG.subtract=tR,tG.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},tG.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},tG.toDate=function(){return new Date(this.valueOf())},tG.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;if(0>r.year()||r.year()>9999)return j(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(P(Date.prototype.toISOString))if(t)return this.toDate().toISOString();else return new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",j(r,"Z"));return j(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},tG.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",i="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+n+'("]',t=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY",r=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"u">typeof Symbol&&null!=Symbol.for&&(tG[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),tG.toJSON=function(){return this.isValid()?this.toISOString():null},tG.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},tG.unix=function(){return Math.floor(this.valueOf()/1e3)},tG.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},tG.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},tG.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""},tG.eraNarrow=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""},tG.eraAbbr=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""},tG.eraYear=function(){var e,r,n,i,o=this.localeData().eras();for(e=0,r=o.length;e<r;++e)if(n=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-t(o[e].since).year())*n+o[e].offset;return this.year()},tG.year=eb,tG.isLeapYear=function(){return em(this.year())},tG.weekYear=function(e){return tF.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},tG.isoWeekYear=function(e){return tF.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},tG.quarter=tG.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)},tG.month=eR,tG.daysInMonth=function(){return ek(this.year(),this.month())},tG.week=tG.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add((e-t)*7,"d")},tG.isoWeek=tG.isoWeeks=function(e){var t=eN(this,1,4).week;return null==e?t:this.add((e-t)*7,"d")},tG.weeksInYear=function(){var e=this.localeData()._week;return eI(this.year(),e.dow,e.doy)},tG.weeksInWeekYear=function(){var e=this.localeData()._week;return eI(this.weekYear(),e.dow,e.doy)},tG.isoWeeksInYear=function(){return eI(this.year(),1,4)},tG.isoWeeksInISOWeekYear=function(){return eI(this.isoWeekYear(),1,4)},tG.date=tW,tG.day=tG.days=function(e){if(!this.isValid())return null!=e?this:0/0;var t,r,n=ew(this,"Day");return null==e?n:(t=e,r=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=r.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-n,"d"))},tG.weekday=function(e){if(!this.isValid())return null!=e?this:0/0;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},tG.isoWeekday=function(e){if(!this.isValid())return null!=e?this:0/0;if(null==e)return this.day()||7;var t,r=(t=this.localeData(),"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},tG.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},tG.hour=tG.hours=eG,tG.minute=tG.minutes=tV,tG.second=tG.seconds=tH,tG.millisecond=tG.milliseconds=m,tG.utcOffset=function(e,r,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:0/0;if(null==e)return this._isUTC?o:tv(this);if("string"==typeof e){if(null===(e=ty(es,e)))return this}else 16>Math.abs(e)&&!n&&(e*=60);return!this._isUTC&&r&&(i=tv(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!r||this._changeInProgress?tx(this,tS(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this},tG.utc=function(e){return this.utcOffset(0,e)},tG.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(tv(this),"m")),this},tG.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=ty(eo,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},tG.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ts(e).utcOffset():0,(this.utcOffset()-e)%60==0)},tG.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},tG.isLocal=function(){return!!this.isValid()&&!this._isUTC},tG.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},tG.isUtc=tb,tG.isUTC=tb,tG.zoneAbbr=function(){return this._isUTC?"UTC":""},tG.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},tG.dates=O("dates accessor is deprecated. Use date instead.",tW),tG.months=O("months accessor is deprecated. Use month instead",eR),tG.years=O("years accessor is deprecated. Use year instead",eb),tG.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),tG.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=ti(t))._a?(e=t._isUTC?f(t._a):ts(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var r,n=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<n;r++)eh(e[r])!==eh(t[r])&&o++;return o+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var tz=A.prototype;function tq(e,t,r,n){var i=eQ(),o=f().set(n,t);return i[r](o,e)}function t$(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return tq(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=tq(e,n,r,"month");return i}function tJ(e,t,r,n){"boolean"==typeof e||(r=t=e,e=!1),l(t)&&(r=t,t=void 0),t=t||"";var i,o=eQ(),s=e?o._week.dow:0,a=[];if(null!=r)return tq(t,(r+s)%7,n,"day");for(i=0;i<7;i++)a[i]=tq(t,(i+s)%7,n,"day");return a}tz.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return P(n)?n.call(t,r):n},tz.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(C).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},tz.invalidDate=function(){return this._invalidDate},tz.ordinal=function(e){return this._ordinal.replace("%d",e)},tz.preparse=tK,tz.postformat=tK,tz.relativeTime=function(e,t,r,n){var i=this._relativeTime[r];return P(i)?i(e,t,r,n):i.replace(/%d/i,e)},tz.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return P(r)?r(t):r.replace(/%s/i,t)},tz.set=function(e){var t,r;for(r in e)o(e,r)&&(P(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},tz.eras=function(e,r){var n,i,o,s=this._eras||eQ("en")._eras;for(n=0,i=s.length;n<i;++n)switch("string"==typeof s[n].since&&(o=t(s[n].since).startOf("day"),s[n].since=o.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":o=t(s[n].until).startOf("day").valueOf(),s[n].until=o.valueOf()}return s},tz.erasParse=function(e,t,r){var n,i,o,s,a,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(o=l[n].name.toUpperCase(),s=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[n];break;case"NNNN":if(o===e)return l[n];break;case"NNNNN":if(a===e)return l[n]}else if([o,s,a].indexOf(e)>=0)return l[n]},tz.erasConvertYear=function(e,r){var n=e.since<=e.until?1:-1;return void 0===r?t(e.since).year():t(e.since).year()+(r-e.offset)*n},tz.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||tL.call(this),e?this._erasAbbrRegex:this._erasRegex},tz.erasNameRegex=function(e){return o(this,"_erasNameRegex")||tL.call(this),e?this._erasNameRegex:this._erasRegex},tz.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||tL.call(this),e?this._erasNarrowRegex:this._erasRegex},tz.months=function(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||eE).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone},tz.monthsShort=function(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[eE.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},tz.monthsParse=function(e,t,r){var n,i,o;if(this._monthsParseExact)return ex.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},tz.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||eA.call(this),e)?this._monthsStrictRegex:this._monthsRegex:(o(this,"_monthsRegex")||(this._monthsRegex=ea),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},tz.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||eA.call(this),e)?this._monthsShortStrictRegex:this._monthsShortRegex:(o(this,"_monthsShortRegex")||(this._monthsShortRegex=ea),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},tz.week=function(e){return eN(e,this._week.dow,this._week.doy).week},tz.firstDayOfYear=function(){return this._week.doy},tz.firstDayOfWeek=function(){return this._week.dow},tz.weekdays=function(e,t){var r=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ej(r,this._week.dow):e?r[e.day()]:r},tz.weekdaysMin=function(e){return!0===e?ej(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},tz.weekdaysShort=function(e){return!0===e?ej(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},tz.weekdaysParse=function(e,t,r){var n,i,o;if(this._weekdaysParseExact)return eU.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;else if(!r&&this._weekdaysParse[n].test(e))return n}},tz.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysStrictRegex:this._weekdaysRegex:(o(this,"_weekdaysRegex")||(this._weekdaysRegex=ea),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},tz.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysShortStrictRegex:this._weekdaysShortRegex:(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ea),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},tz.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||eF.call(this),e)?this._weekdaysMinStrictRegex:this._weekdaysMinRegex:(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ea),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},tz.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tz.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},eX("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=1===eh(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+r}}),t.lang=O("moment.lang is deprecated. Use moment.locale instead.",eX),t.langData=O("moment.langData is deprecated. Use moment.localeData instead.",eQ);var tX=Math.abs;function tZ(e,t,r,n){var i=tS(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function tQ(e){return e<0?Math.floor(e):Math.ceil(e)}function t0(e){return 4800*e/146097}function t1(e){return 146097*e/4800}function t2(e){return function(){return this.as(e)}}var t5=t2("ms"),t3=t2("s"),t6=t2("m"),t4=t2("h"),t8=t2("d"),t9=t2("w"),t7=t2("M"),re=t2("Q"),rt=t2("y");function rr(e){return function(){return this.isValid()?this._data[e]:0/0}}var rn=rr("milliseconds"),ri=rr("seconds"),ro=rr("minutes"),rs=rr("hours"),ra=rr("days"),rl=rr("months"),rc=rr("years"),ru=Math.round,rd={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rf(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}var rh=Math.abs;function rp(e){return(e>0)-(e<0)||+e}function rg(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,s,a,l=rh(this._milliseconds)/1e3,c=rh(this._days),u=rh(this._months),d=this.asSeconds();return d?(e=ef(l/60),t=ef(e/60),l%=60,e%=60,r=ef(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=rp(this._months)!==rp(d)?"-":"",s=rp(this._days)!==rp(d)?"-":"",a=rp(this._milliseconds)!==rp(d)?"-":"",i+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?s+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+n+"S":"")):"P0D"}var ry=td.prototype;return ry.isValid=function(){return this._isValid},ry.abs=function(){var e=this._data;return this._milliseconds=tX(this._milliseconds),this._days=tX(this._days),this._months=tX(this._months),e.milliseconds=tX(e.milliseconds),e.seconds=tX(e.seconds),e.minutes=tX(e.minutes),e.hours=tX(e.hours),e.months=tX(e.months),e.years=tX(e.years),this},ry.add=function(e,t){return tZ(this,e,t,1)},ry.subtract=function(e,t){return tZ(this,e,t,-1)},ry.as=function(e){if(!this.isValid())return 0/0;var t,r,n=this._milliseconds;if("month"===(e=F(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+t0(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(t1(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw Error("Unknown unit "+e)}},ry.asMilliseconds=t5,ry.asSeconds=t3,ry.asMinutes=t6,ry.asHours=t4,ry.asDays=t8,ry.asWeeks=t9,ry.asMonths=t7,ry.asQuarters=re,ry.asYears=rt,ry.valueOf=t5,ry._bubble=function(){var e,t,r,n,i,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*tQ(t1(a)+s),s=0,a=0),l.milliseconds=o%1e3,l.seconds=(e=ef(o/1e3))%60,l.minutes=(t=ef(e/60))%60,l.hours=(r=ef(t/60))%24,s+=ef(r/24),a+=i=ef(t0(s)),s-=tQ(t1(i)),n=ef(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},ry.clone=function(){return tS(this)},ry.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():0/0},ry.milliseconds=rn,ry.seconds=ri,ry.minutes=ro,ry.hours=rs,ry.days=ra,ry.weeks=function(){return ef(this.days()/7)},ry.months=rl,ry.years=rc,ry.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i,o,s,a,l,c,u,d,f,h,p,g=!1,y=rd;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(g=e),"object"==typeof t&&(y=Object.assign({},rd,t),null!=t.s&&null==t.ss&&(y.ss=t.s-1)),h=this.localeData(),r=!g,n=y,i=tS(this).abs(),o=ru(i.as("s")),s=ru(i.as("m")),a=ru(i.as("h")),l=ru(i.as("d")),c=ru(i.as("M")),u=ru(i.as("w")),d=ru(i.as("y")),f=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l],null!=n.w&&(f=f||u<=1&&["w"]||u<n.w&&["ww",u]),(f=f||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=r,f[3]=+this>0,f[4]=h,p=rf.apply(null,f),g&&(p=h.pastFuture(+this,p)),h.postformat(p)},ry.toISOString=rg,ry.toString=rg,ry.toJSON=rg,ry.locale=tC,ry.localeData=tM,ry.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",rg),ry.lang=tT,I("X",0,0,"unix"),I("x",0,0,"valueOf"),eu("x",ei),eu("X",/[+-]?\d+(\.\d{1,3})?/),eg("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e))}),eg("x",function(e,t,r){r._d=new Date(eh(e))}),t.version="2.30.1",W=ts,t.fn=tG,t.min=function(){var e=[].slice.call(arguments,0);return tc("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return tc("isAfter",e)},t.now=function(){return Date.now?Date.now():+new Date},t.utc=f,t.unix=function(e){return ts(1e3*e)},t.months=function(e,t){return t$(e,t,"months")},t.isDate=c,t.locale=eX,t.invalid=g,t.duration=tS,t.isMoment=S,t.weekdays=function(e,t,r){return tJ(e,t,r,"weekdays")},t.parseZone=function(){return ts.apply(null,arguments).parseZone()},t.localeData=eQ,t.isDuration=tf,t.monthsShort=function(e,t){return t$(e,t,"monthsShort")},t.weekdaysMin=function(e,t,r){return tJ(e,t,r,"weekdaysMin")},t.defineLocale=eZ,t.updateLocale=function(e,t){if(null!=t){var r,n,i=eK;null!=ez[e]&&null!=ez[e].parentLocale?ez[e].set(R(ez[e]._config,t)):(null!=(n=eJ(e))&&(i=n._config),t=R(i,t),null==n&&(t.abbr=e),(r=new A(t)).parentLocale=ez[e],ez[e]=r),eX(e)}else null!=ez[e]&&(null!=ez[e].parentLocale?(ez[e]=ez[e].parentLocale,e===eX()&&eX(e)):null!=ez[e]&&delete ez[e]);return ez[e]},t.locales=function(){return G(ez)},t.weekdaysShort=function(e,t,r){return tJ(e,t,r,"weekdaysShort")},t.normalizeUnits=F,t.relativeTimeRounding=function(e){return void 0===e?ru:"function"==typeof e&&(ru=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==rd[e]&&(void 0===t?rd[e]:(rd[e]=t,"s"===e&&(rd.ss=t-1),!0))},t.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},t.prototype=tG,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t}()},3118(e){function t(e){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=3118,e.exports=t},3109(e,t,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&l&&"function"==typeof l.get?l.get:null,u=a&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,b=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,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,R=Object.getOwnPropertySymbols,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D?"object":"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(1/0===e||-1/0===e||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 i=String(n),o=v.call(t,i.length+1);return b.call(i,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var I=r(6550),j=I.custom,L=B(j)?j:null,U={__proto__:null,double:'"',single:"'"},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function Y(e,t,r){var n=U[r.quoteStyle||t];return n+e+n}function W(e){return!C||!("object"==typeof e&&(C in e||void 0!==e[C]))}function V(e){return"[object Array]"===z(e)&&W(e)}function H(e){return"[object RegExp]"===z(e)&&W(e)}function B(e){if(D)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,i,a){var l,g,_,S,x,R=n||{};if(K(R,"quoteStyle")&&!K(U,R.quoteStyle))throw TypeError('option "quoteStyle" must be "single" or "double"');if(K(R,"maxStringLength")&&("number"==typeof R.maxStringLength?R.maxStringLength<0&&1/0!==R.maxStringLength:null!==R.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var j=!K(R,"customInspect")||R.customInspect;if("boolean"!=typeof j&&"symbol"!==j)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(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(K(R,"numericSeparator")&&"boolean"!=typeof R.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var G=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(v.call(t,0,r.maxStringLength),r)+("... "+n)+" more character"+(n>1?"s":"")}var i=F[r.quoteStyle||"single"];return i.lastIndex=0,Y(b.call(b.call(t,i,"\\$1"),/[\x00-\x1f]/g,$),"single",r)}(t,R);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var et=String(t);return G?N(t,et):et}if("bigint"==typeof t){var er=String(t)+"n";return G?N(t,er):er}var en=void 0===R.depth?5:R.depth;if(void 0===i&&(i=0),i>=en&&en>0&&"object"==typeof t)return V(t)?"[Array]":"[Object]";var ei=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,i);if(void 0===a)a=[];else if(q(a,t)>=0)return"[Circular]";function eo(t,r,n){if(r&&(a=E.call(a)).push(r),n){var o={depth:R.depth};return K(R,"quoteStyle")&&(o.quoteStyle=R.quoteStyle),e(t,o,i+1,a)}return e(t,R,i+1,a)}if("function"==typeof t&&!H(t)){var es=function(e){if(e.name)return e.name;var t=m.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ea=ee(t,eo);return"[Function"+(es?": "+es:" (anonymous)")+"]"+(ea.length>0?" { "+O.call(ea,", ")+" }":"")}if(B(t)){var el=D?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(t);return"object"!=typeof t||D?el:J(el)}if((ec=t)&&"object"==typeof ec&&("u">typeof HTMLElement&&ec instanceof HTMLElement||"string"==typeof ec.nodeName&&"function"==typeof ec.getAttribute)){for(var ec,eu,ed="<"+w.call(String(t.nodeName)),ef=t.attributes||[],eh=0;eh<ef.length;eh++){ed+=" "+ef[eh].name+"="+Y((eu=ef[eh].value,b.call(String(eu),/"/g,"&quot;")),"double",R)}return ed+=">",t.childNodes&&t.childNodes.length&&(ed+="..."),ed+="</"+w.call(String(t.nodeName))+">"}if(V(t)){if(0===t.length)return"[]";var ep=ee(t,eo);return ei&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ep)?"["+Q(ep,ei)+"]":"[ "+O.call(ep,", ")+" ]"}if("[object Error]"===z(l=t)&&W(l)){var eg=ee(t,eo);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===eg.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(eg,", ")+" }":"{ ["+String(t)+"] "+O.call(k.call("[cause]: "+eo(t.cause),eg),", ")+" }"}if("object"==typeof t&&j){if(L&&"function"==typeof t[L]&&I)return I(t,{depth:en-i});else if("symbol"!==j&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ey=[];return s&&s.call(t,function(e,r){ey.push(eo(r,t,!0)+" => "+eo(e,t))}),Z("Map",o.call(t),ey,ei)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var em=[];return u&&u.call(t,function(e){em.push(eo(e,t))}),Z("Set",c.call(t),em,ei)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if("[object Number]"===z(g=t)&&W(g))return J(eo(Number(t)));if(function(e){if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}(t))return J(eo(P.call(t)));if("[object Boolean]"===z(_=t)&&W(_))return J(p.call(t));if("[object String]"===z(S=t)&&W(S))return J(eo(String(t)));if("u">typeof window&&t===window)return"{ [object Window] }";if("u">typeof globalThis&&t===globalThis||void 0!==r.g&&t===r.g)return"{ [object globalThis] }";if(!("[object Date]"===z(x=t)&&W(x))&&!H(t)){var ev=ee(t,eo),eb=M?M(t)===Object.prototype:t instanceof Object||t.constructor===Object,e_=t instanceof Object?"":"null prototype",ew=!eb&&C&&Object(t)===t&&C in t?v.call(z(t),8,-1):e_?"Object":"",eS=(eb||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ew||e_?"["+O.call(k.call([],ew||[],e_||[]),": ")+"] ":"");return 0===ev.length?eS+"{}":ei?eS+"{"+Q(ev,ei)+"}":eS+"{ "+O.call(ev,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function z(e){return g.call(e)}function q(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 $(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 J(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Z(e,t,r,n){return e+" ("+t+") {"+(n?Q(r,n):O.call(r,", "))+"}"}function Q(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function ee(e,t){var r,n=V(e),i=[];if(n){i.length=e.length;for(var o=0;o<e.length;o++)i[o]=K(e,o)?t(e[o],e):""}var s="function"==typeof R?R(e):[];if(D){r={};for(var a=0;a<s.length;a++)r["$"+s[a]]=s[a]}for(var l in e)if(K(e,l)&&(!n||String(Number(l))!==l||!(l<e.length)))if(D&&r["$"+l]instanceof Symbol)continue;else S.call(/[^\w$]/,l)?i.push(t(l,e)+": "+t(e[l],e)):i.push(l+": "+t(e[l],e));if("function"==typeof R)for(var c=0;c<s.length;c++)T.call(e,s[c])&&i.push("["+t(s[c])+"]: "+t(e[s[c]],e));return i}},4461(e,t,r){e=r.nmd(e),(function(){"use strict";var n={function:!0,object:!0},i=n[typeof window]&&window||this,o=n[typeof t]&&t,s=n.object&&e&&!e.nodeType&&e,a=o&&s&&"object"==typeof r.g&&r.g;a&&(a.global===a||a.window===a||a.self===a)&&(i=a);var l=/\bOpera/,c=Object.prototype,u=c.hasOwnProperty,d=c.toString;function f(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function h(e){return e=v(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:f(e)}function p(e,t){for(var r in e)u.call(e,r)&&t(e[r],r,e)}function g(e){return null==e?f(e):d.call(e).slice(8,-1)}function y(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function m(e,t){var r=null,n=function(n,i){r=t(r,n,i,e)},i=-1,o=e?e.length:0;if("number"==typeof o&&o>-1&&o<=0x1fffffffffffff)for(;++i<o;)n(e[i],i);else p(e,n);return r}function v(e){return String(e).replace(/^ +| +$/g,"")}function b(e){var t,r,n,o,s,a=i,c=e&&"object"==typeof e&&"String"!=g(e);c&&(a=e,e=null);var u=a.navigator||{},f=u.userAgent||"";e||(e=f);var _=c?!!u.likeChrome:/\bChrome\b/.test(e)&&!/internal|\n/i.test(d.toString()),w="Object",S=c&&a.java?"JavaPackage":g(a.java),k=/\bJava/.test(S)&&a.java,O=k&&g(a.environment)==(c?w:"Environment"),E=k?"a":"α",x=k?"b":"β",P=a.document||{},R=a.operamini||a.opera,A=l.test(A=c&&R?R["[[Class]]"]:g(R))?A:R=null,D=e,C=[],T=null,M=e==f,N=M&&R&&"function"==typeof R.version&&R.version(),I=m([{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)}),j=m(["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)}),L=Y([{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"]),U=m({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[L]||r[/^[a-z]+(?: +[a-z]+\b)*/i.exec(L)]||RegExp("\\b"+y(n)+"(?:\\b|\\w*\\d)","i").exec(e))&&n}),F=m(["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,i,o,s=r.pattern||y(r);return!t&&(t=RegExp("\\b"+s+"(?:/[\\d.]+|[ \\w.]*)","i").exec(e))&&(n=t,i=r.label||r,o={"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"},s&&i&&/^Win/i.test(n)&&!/^Windows Phone /i.test(n)&&(o=o[/[\d.]+$/.exec(n)])&&(n="Windows "+o),n=String(n),s&&i&&(n=n.replace(RegExp(s,"i"),i)),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 Y(t){return m(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 m(t,function(t,r){return t||(RegExp(r+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(e)||0)[1]||null})}if(I&&(I=[I]),/\bAndroid\b/.test(F)&&!L&&(o=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(e))&&(L=v(o[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),U&&!L?L=Y([U]):U&&L&&(L=L.replace(RegExp("^("+y(U)+")[-_.\\s]","i"),U+" ").replace(RegExp("^("+y(U)+")[-_.]?(\\w)","i"),U+" $2")),(o=/\bGoogle TV\b/.exec(L))&&(L=o[0]),/\bSimulator\b/i.test(e)&&(L=(L?L+" ":"")+"Simulator"),"Opera Mini"==j&&/\bOPiOS\b/.test(e)&&C.push("running in Turbo/Uncompressed mode"),"IE"==j&&/\blike iPhone OS\b/.test(e)?(U=(o=b(e.replace(/like iPhone OS/,""))).manufacturer,L=o.product):/^iP/.test(L)?(j||(j="Safari"),F="iOS"+((o=/ OS ([\d_]+)/i.exec(e))?" "+o[1].replace(/_/g,"."):"")):"Konqueror"==j&&/^Linux\b/i.test(F)?F="Kubuntu":U&&"Google"!=U&&(/Chrome/.test(j)&&!/\bMobile Safari\b/i.test(e)||/\bVita\b/.test(L))||/\bAndroid\b/.test(F)&&/^Chrome/.test(j)&&/\bVersion\//i.test(e)?(j="Android Browser",F=/\bAndroid\b/.test(F)?F:"Android"):"Silk"==j?(/\bMobi/i.test(e)||(F="Android",C.unshift("desktop mode")),/Accelerated *= *true/i.test(e)&&C.unshift("accelerated")):"UC Browser"==j&&/\bUCWEB\b/.test(e)?C.push("speed mode"):"PaleMoon"==j&&(o=/\bFirefox\/([\d.]+)\b/.exec(e))?C.push("identifying as Firefox "+o[1]):"Firefox"==j&&(o=/\b(Mobile|Tablet|TV)\b/i.exec(e))?(F||(F="Firefox OS"),L||(L=o[1])):!j||(o=!/\bMinefield\b/i.test(e)&&/\b(?:Firefox|Safari)\b/.exec(j))?(j&&!L&&/[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(o+"/")+8))&&(j=null),(o=L||U||F)&&(L||U||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(F))&&(j=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(F)?F:o)+" Browser")):"Electron"==j&&(o=(/\bChrome\/([\d.]+)\b/.exec(e)||0)[1])&&C.push("Chromium "+o),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(j),"(?:Firefox|Minefield|NetFront)"])),(o="iCab"==I&&parseFloat(N)>3&&"WebKit"||/\bOpera\b/.test(j)&&(/\bOPR\b/.test(e)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(I)&&"WebKit"||!I&&/\bMSIE\b/i.test(e)&&("Mac OS"==F?"Tasman":"Trident")||"WebKit"==I&&/\bPlayStation\b(?! Vita\b)/i.test(j)&&"NetFront")&&(I=[o]),"IE"==j&&(o=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e)||0)[1])?(j+=" Mobile",F="Windows Phone "+(/\+$/.test(o)?o:o+".x"),C.unshift("desktop mode")):/\bWPDesktop\b/i.test(e)?(j="IE Mobile",F="Windows Phone 8.x",C.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(e)||0)[1])):"IE"!=j&&"Trident"==I&&(o=/\brv:([\d.]+)/.exec(e))&&(j&&C.push("identifying as "+j+(N?" "+N:"")),j="IE",N=o[1]),M){if(r="global",n=null!=(t=a)?typeof t[r]:"number",/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!t[r])g(o=a.runtime)==(c?w:"ScriptBridgingProxyObject")?(j="Adobe AIR",F=o.flash.system.Capabilities.os):g(o=a.phantom)==(c?w:"RuntimeObject")?(j="PhantomJS",N=(o=o.version||null)&&o.major+"."+o.minor+"."+o.patch):"number"==typeof P.documentMode&&(o=/\bTrident\/(\d+)/i.exec(e))?(N=[N,P.documentMode],(o=+o[1]+4)!=N[1]&&(C.push("IE "+N[1]+" mode"),I&&(I[1]=""),N[1]=o),N="IE"==j?String(N[1].toFixed(1)):N[0]):"number"==typeof P.documentMode&&/^(?:Chrome|Firefox)\b/.test(j)&&(C.push("masking as "+j+" "+N),j="IE",N="11.0",I=["Trident"],F="Windows");else if(k&&(D=(o=k.lang.System).getProperty("os.arch"),F=F||o.getProperty("os.name")+" "+o.getProperty("os.version")),O){try{N=a.require("ringo/engine").version.join("."),j="RingoJS"}catch(e){(o=a.system)&&o.global.system==a.system&&(j="Narwhal",F||(F=o[0].os||null))}j||(j="Rhino")}else"object"==typeof a.process&&!a.process.browser&&(o=a.process)&&("object"==typeof o.versions&&("string"==typeof o.versions.electron?(C.push("Node "+o.versions.node),j="Electron",N=o.versions.electron):"string"==typeof o.versions.nw&&(C.push("Chromium "+N,"Node "+o.versions.node),j="NW.js",N=o.versions.nw)),j||(j="Node.js",D=o.arch,F=o.platform,N=(N=/[\d.]+/.exec(o.version))?N[0]:null));F=F&&h(F)}if(N&&(o=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(e+";"+(M&&u.appMinorVersion))||/\bMinefield\b/i.test(e)&&"a")&&(T=/b/i.test(o)?"beta":"alpha",N=N.replace(RegExp(o+"\\+?$"),"")+("beta"==T?x:E)+(/\d+\+?/.exec(o)||"")),"Fennec"==j||"Firefox"==j&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(F))j="Firefox Mobile";else if("Maxthon"==j&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(L))"Xbox 360"==L&&(F=null),"Xbox 360"==L&&/\bIEMobile\b/.test(e)&&C.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(j)||j&&!L&&!/Browser|Mobi/.test(j))&&("Windows CE"==F||/Mobi/i.test(e)))j+=" Mobile";else if("IE"==j&&M)try{null===a.external&&C.unshift("platform preview")}catch(e){C.unshift("embedded")}else(/\bBlackBerry\b/.test(L)||/\bBB10\b/.test(e))&&(o=(RegExp(L.replace(/ +/g," *")+"/([.\\d]+)","i").exec(e)||0)[1]||N)?(F=((o=[o,/BB10/.test(e)])[1]?(L=null,U="BlackBerry"):"Device Software")+" "+o[0],N=null):this!=p&&"Wii"!=L&&(M&&R||/Opera/.test(j)&&/\b(?:MSIE|Firefox)\b/i.test(e)||"Firefox"==j&&/\bOS X (?:\d+\.){2,}/.test(F)||"IE"==j&&(F&&!/^Win/.test(F)&&N>5.5||/\bWindows XP\b/.test(F)&&N>8||8==N&&!/\bTrident\b/.test(e)))&&!l.test(o=b.call(p,e.replace(l,"")+";"))&&o.name&&(o="ing as "+o.name+((o=o.version)?" "+o:""),l.test(j)?(/\bIE\b/.test(o)&&"Mac OS"==F&&(F=null),o="identify"+o):(o="mask"+o,j=A?h(A.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(o)&&(F=null),M||(N=null)),I=["Presto"],C.push(o));(o=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(e)||0)[1])&&(o=[parseFloat(o.replace(/\.(\d)$/,".0$1")),o],"Safari"==j&&"+"==o[1].slice(-1)?(j="WebKit Nightly",T="alpha",N=o[1].slice(0,-1)):(N==o[1]||N==(o[2]=(/\bSafari\/([\d.]+\+?)/i.exec(e)||0)[1]))&&(N=null),o[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(e)||0)[1],537.36==o[0]&&537.36==o[2]&&parseFloat(o[1])>=28&&"WebKit"==I&&(I=["Blink"]),M&&(_||o[1])?(I&&(I[1]="like Chrome"),o=o[1]||((o=o[0])<530?1:o<532?2:o<532.05?3:o<533?4:o<534.03?5:o<534.07?6:o<534.1?7:o<534.13?8:o<534.16?9:o<534.24?10:o<534.3?11:o<535.01?12:o<535.02?"13+":o<535.07?15:o<535.11?16:o<535.19?17:o<536.05?18:o<536.1?19:o<537.01?20:o<537.11?"21+":o<537.13?23:o<537.18?24:o<537.24?25:o<537.36?26:"Blink"!=I?"27":"28")):(I&&(I[1]="like Safari"),o=(o=o[0])<400?1:o<500?2:o<526?3:o<533?4:o<534?"4+":o<535?5:o<537?6:o<538?7:o<601?8:o<602?9:o<604?10:o<606?11:o<608?12:"12"),I&&(I[1]+=" "+(o+="number"==typeof o?".x":/[.+]/.test(o)?"":"+")),"Safari"==j&&(!N||parseInt(N)>45)?N=o:"Chrome"==j&&/\bHeadlessChrome/i.test(e)&&C.unshift("headless")),"Opera"==j&&(o=/\bzbov|zvav$/.exec(F))?(j+=" ",C.unshift("desktop mode"),"zvav"==o?(j+="Mini",N=null):j+="Mobile",F=F.replace(RegExp(" *"+o+"$"),"")):"Safari"==j&&/\bChrome\b/.exec(I&&I[1])?(C.unshift("desktop mode"),j="Chrome Mobile",N=null,/\bOS X\b/.test(F)?(U="Apple",F="iOS 4.3+"):F=null):/\bSRWare Iron\b/.test(j)&&!N&&(N=W("Chrome")),N&&0==N.indexOf(o=/[\d.]+$/.exec(F))&&e.indexOf("/"+o+"-")>-1&&(F=v(F.replace(o,""))),F&&-1!=F.indexOf(j)&&!RegExp(j+" OS").test(F)&&(F=F.replace(RegExp(" *"+y(j)+" *"),"")),I&&!/\b(?:Avant|Nook)\b/.test(j)&&(/Browser|Lunascape|Maxthon/.test(j)||"Safari"!=j&&/^iOS/.test(F)&&/\bSafari\b/.test(I[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(j)&&I[1])&&(o=I[I.length-1])&&C.push(o),C.length&&(C=["("+C.join("; ")+")"]),U&&L&&0>L.indexOf(U)&&C.push("on "+U),L&&C.push((/^on /.test(C[C.length-1])?"":"on ")+L),F&&(s=(o=/ ([\d.+]+)$/.exec(F))&&"/"==F.charAt(F.length-o[0].length-1),F={architecture:32,family:o&&!s?F.replace(o[0],""):F,version:o?o[1]:null,toString:function(){var e=this.version;return this.family+(e&&!s?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(o=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(D))&&!/\bi686\b/i.test(D)?(F&&(F.architecture=64,F.family=F.family.replace(RegExp(" *"+o),"")),j&&(/\bWOW64\b/i.test(e)||M&&/\w(?:86|32)$/.test(u.cpuClass||u.platform)&&!/\bWin64; x64\b/i.test(e))&&C.unshift("32-bit")):F&&/^OS X/.test(F.family)&&"Chrome"==j&&parseFloat(N)>=39&&(F.architecture=64),e||(e=null);var V={};return V.description=e,V.layout=I&&I[0],V.manufacturer=U,V.name=j,V.prerelease=T,V.product=L,V.ua=e,V.version=j&&N,V.os=F||{architecture:null,family:null,version:null,toString:function(){return"null"}},V.parse=b,V.toString=function(){return this.description||""},V.version&&C.unshift(N),V.name&&C.unshift(j),F&&j&&!(F==String(F).split(" ")[0]&&(F==j.split(" ")[0]||L))&&C.push(L?"("+F+")":"on "+F),C.length&&(V.description=C.join(" ")),V}var _=b();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(i.platform=_,define(function(){return _})):o&&s?p(_,function(e,t){o[t]=e}):i.platform=_}).call(this)},5539(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}},8183(e,t,r){"use strict";var n=r(6334),i=r(4816);e.exports={formats:r(5539),parse:i,stringify:n}},4816(e,t,r){"use strict";var n=r(1954),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},l=function(e,t){var r={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c=1/0===t.parameterLimit?void 0:t.parameterLimit,u=l.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==c?c+1:c);if(t.throwOnLimitExceeded&&void 0!==c&&u.length>c)throw RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var d=-1,f=t.charset;if(t.charsetSentinel)for(h=0;h<u.length;++h)0===u[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[h]?f="utf-8":"utf8=%26%2310003%3B"===u[h]&&(f="iso-8859-1"),d=h,h=u.length);for(h=0;h<u.length;++h)if(h!==d){var h,p,g,y=u[h],m=y.indexOf("]="),v=-1===m?y.indexOf("="):m+1;if(-1===v?(p=t.decoder(y,s.decoder,f,"key"),g=t.strictNullHandling?null:""):null!==(p=t.decoder(y.slice(0,v),s.decoder,f,"key"))&&(g=n.maybeMap(a(y.slice(v+1),t,o(r[p])?r[p].length:0),function(e){return t.decoder(e,s.decoder,f,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=String(g).replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),t.comma&&o(g)&&g.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");g=n.combine([],g,t.arrayLimit,t.plainObjects)}if(null!==p){var b=i.call(r,p);b&&("combine"===t.duplicates||y.indexOf("[]=")>-1)?r[p]=n.combine(r[p],g,t.arrayLimit,t.plainObjects):b&&"last"!==t.duplicates||(r[p]=g)}}return r},c=function(e,t,r,i){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var s=e.slice(0,-1).join("");o=Array.isArray(t)&&t[s]?t[s].length:0}for(var l=i?t:a(t,r,o),c=e.length-1;c>=0;--c){var u,d=e[c];if("[]"===d&&r.parseArrays)u=n.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:n.combine([],l,r.arrayLimit,r.plainObjects);else{u=r.plainObjects?{__proto__:null}:{};var f="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,h=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,p=parseInt(h,10),g=!isNaN(p)&&d!==h&&String(p)===h&&p>=0&&r.parseArrays;if(r.parseArrays||""!==h)if(g&&p<r.arrayLimit)(u=[])[p]=l;else if(g&&r.throwOnLimitExceeded)throw RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");else g?(u[p]=l,n.markOverflow(u,p)):"__proto__"!==h&&(u[h]=l);else u={0:l}}l=u}return l},u=function(e,t){var r=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&i.call(Object.prototype,r)&&!t.allowPrototypes)return;return[r]}var n=[],o=r.indexOf("["),s=o>=0?r.slice(0,o):r;if(s){if(!t.plainObjects&&i.call(Object.prototype,s)&&!t.allowPrototypes)return;n[n.length]=s}for(var a=r.length,l=o,c=0;l>=0&&c<t.depth;){for(var u=1,d=l+1,f=-1;d<a&&f<0;){var h=r.charCodeAt(d);91===h?u+=1:93===h&&0==(u-=1)&&(f=d),d+=1}if(f<0)return n[n.length]="["+r.slice(l)+"]",n;var p=r.slice(l,f+1),g=p.slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,g)&&!t.allowPrototypes)return;n[n.length]=p,c+=1,l=r.indexOf("[",f+1)}if(l>=0){if(!0===t.strictDepth)throw RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");n[n.length]="["+r.slice(l)+"]"}return n},d=function(e,t,r,n){if(e){var i=u(e,r);if(i)return c(i,t,r,n)}},f=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?s.charset:e.charset,r=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:s.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}};e.exports=function(e,t){var r=f(t);if(""===e||null==e)return r.plainObjects?{__proto__:null}:{};for(var i="string"==typeof e?l(e,r):e,o=r.plainObjects?{__proto__:null}:{},s=Object.keys(i),a=0;a<s.length;++a){var c=s[a],u=d(c,i[c],r,"string"==typeof e);o=n.merge(o,u,r)}return!0===r.allowSparse?o:n.compact(o)}},6334(e,t,r){"use strict";var n=r(6278),i=r(1954),o=r(5539),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,f=o.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},g=function e(t,r,o,s,a,c,d,f,g,y,m,v,b,_,w,S,k,O){for(var E,x,P=t,R=O,A=0,D=!1;void 0!==(R=R.get(p))&&!D;){var C=R.get(t);if(A+=1,void 0!==C)if(C===A)throw RangeError("Cyclic object value");else D=!0;void 0===R.get(p)&&(A=0)}if("function"==typeof y?P=y(r,P):P instanceof Date?P=b(P):"comma"===o&&l(P)&&(P=i.maybeMap(P,function(e){return e instanceof Date?b(e):e})),null===P){if(c)return w(g&&!S?g(r,h.encoder,k,"key",_):r);P=""}if("string"==typeof(E=P)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(P))return g?[w(S?r:g(r,h.encoder,k,"key",_))+"="+w(g(P,h.encoder,k,"value",_))]:[w(r)+"="+w(String(P))];var T=[];if(void 0===P)return T;if("comma"===o&&l(P))S&&g&&(P=i.maybeMap(P,function(e){return null==e?e:g(e)})),x=[{value:P.length>0?P.join(",")||null:void 0}];else if(l(y))x=y;else{var M=Object.keys(P);x=m?M.sort(m):M}var N=f?String(r).replace(/\./g,"%2E"):String(r),I=s&&l(P)&&1===P.length?N+"[]":N;if(a&&l(P)&&0===P.length)return I+"[]";for(var j=0;j<x.length;++j){var L=x[j],U="object"==typeof L&&L&&void 0!==L.value?L.value:P[L];if(!d||null!==U){var F=v&&f?String(L).replace(/\./g,"%2E"):String(L),Y=l(P)?"function"==typeof o?o(I,F):I:I+(v?"."+F:"["+F+"]");O.set(t,A);var W=n();W.set(p,O),u(T,e(U,Y,o,s,a,c,d,f,"comma"===o&&S&&l(P)?null:g,y,m,v,b,_,w,S,k,W))}}return T},y=function(e){if(!e)return h;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t,r=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 n=o.default;if(void 0!==e.format){if(!s.call(o.formatters,e.format))throw TypeError("Unknown format option provided.");n=e.format}var i=o.formatters[n],c=h.filter;if(("function"==typeof e.filter||l(e.filter))&&(c=e.filter),t=e.arrayFormat in a?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||h.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:t,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:c,format:n,formatter:i,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,i=e,o=y(t);"function"==typeof o.filter?i=(0,o.filter)("",i):l(o.filter)&&(r=o.filter);var s=[];if("object"!=typeof i||null===i)return"";var c=a[o.arrayFormat],d="comma"===c&&o.commaRoundTrip;r||(r=Object.keys(i)),o.sort&&r.sort(o.sort);for(var f=n(),h=0;h<r.length;++h){var p=r[h];if(null!=p){var m=i[p];o.skipNulls&&null===m||u(s,g(m,p,c,d,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,f))}}var v=s.join(o.delimiter),b=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?b+="utf8=%26%2310003%3B"+o.delimiter:b+="utf8=%E2%9C%93"+o.delimiter),v.length>0?b+v:""}},1954(e,t,r){"use strict";var n=r(5539),i=r(6278),o=Object.prototype.hasOwnProperty,s=Array.isArray,a=i(),l=function(e,t){return a.set(e,t),e},c=function(e){return a.has(e)},u=function(e){return a.get(e)},d=function(e,t){a.set(e,t)},f=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),h=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(s(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&(n[n.length]=r[i]);t.obj[t.prop]=n}}},p=function(e,t){for(var r=t&&t.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:p,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t,r,n){if(c(e)){var i=u(e)+1;return e[i]=t,d(e,i),e}var o=[].concat(e,t);return o.length>r?l(p(o,{plainObjects:n}),o.length-1):o},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],s=Object.keys(o),a=0;a<s.length;++a){var l=s[a],c=o[l];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(t[t.length]={obj:o,prop:l},r[r.length]=c)}return h(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,i,o){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 a="",l=0;l<s.length;l+=1024){for(var c=s.length>=1024?s.slice(l,l+1024):s,u=[],d=0;d<c.length;++d){var h=c.charCodeAt(d);if(45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===n.RFC1738&&(40===h||41===h)){u[u.length]=c.charAt(d);continue}if(h<128){u[u.length]=f[h];continue}if(h<2048){u[u.length]=f[192|h>>6]+f[128|63&h];continue}if(h<55296||h>=57344){u[u.length]=f[224|h>>12]+f[128|h>>6&63]+f[128|63&h];continue}d+=1,h=65536+((1023&h)<<10|1023&c.charCodeAt(d)),u[u.length]=f[240|h>>18]+f[128|h>>12&63]+f[128|h>>6&63]+f[128|63&h]}a+=u.join("")}return a},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isOverflow:c,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:l,maybeMap:function(e,t){if(s(e)){for(var r=[],n=0;n<e.length;n+=1)r[r.length]=t(e[n]);return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r&&"function"!=typeof r){if(s(t)){var i=t.length;if(n&&"number"==typeof n.arrayLimit&&i>n.arrayLimit)return l(p(t.concat(r),n),i);t[i]=r}else if(!t||"object"!=typeof t)return[t,r];else if(c(t)){var a=u(t)+1;t[a]=r,d(t,a)}else{if(n&&n.strictMerge)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t){if(c(r)){for(var f=Object.keys(r),h=n&&n.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<f.length;g++)h[parseInt(f[g],10)+1]=r[f[g]];return l(h,u(r)+1)}var y=[t].concat(r);return n&&"number"==typeof n.arrayLimit&&y.length>n.arrayLimit?l(p(y,n),y.length-1):y}var m=t;return(s(t)&&!s(r)&&(m=p(t,n)),s(t)&&s(r))?(r.forEach(function(r,i){if(o.call(t,i)){var s=t[i];s&&"object"==typeof s&&r&&"object"==typeof r?t[i]=e(s,r,n):t[t.length]=r}else t[i]=r}),t):Object.keys(r).reduce(function(t,i){var s=r[i];if(o.call(t,i)?t[i]=e(t[i],s,n):t[i]=s,c(r)&&!c(t)&&l(t,u(r)),c(t)){var a=parseInt(i,10);String(a)===i&&a>=0&&a>u(t)&&d(t,a)}return t},m)}}},6521(e,t,r){"use strict";var n=r(3109),i=r(6757),o=function(e,t,r){for(var n,i=e;null!=(n=i.next);i=n)if(n.key===t)return i.next=n.next,r||(n.next=e.next,e.next=n),n},s=function(e,t){if(e){var r=o(e,t);return r&&r.value}},a=function(e,t,r){var n=o(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},l=function(e,t){if(e)return o(e,t,!0)};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new i("Side channel does not contain "+n(e))},delete:function(t){var r=e&&e.next,n=l(e,t);return n&&r&&r===n&&(e=void 0),!!n},get:function(t){return s(e,t)},has:function(t){var r;return!!(r=e)&&!!o(r,t)},set:function(t,r){e||(e={next:void 0}),a(e,t,r)}};return t}},3977(e,t,r){"use strict";var n=r(4295),i=r(8682),o=r(3109),s=r(6757),a=n("%Map%",!0),l=i("Map.prototype.get",!0),c=i("Map.prototype.set",!0),u=i("Map.prototype.has",!0),d=i("Map.prototype.delete",!0),f=i("Map.prototype.size",!0);e.exports=!!a&&function(){var e,t={assert:function(e){if(!t.has(e))throw new s("Side channel does not contain "+o(e))},delete:function(t){if(e){var r=d(e,t);return 0===f(e)&&(e=void 0),r}return!1},get:function(t){if(e)return l(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new a),c(e,t,r)}};return t}},8965(e,t,r){"use strict";var n=r(4295),i=r(8682),o=r(3109),s=r(3977),a=r(6757),l=n("%WeakMap%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),d=i("WeakMap.prototype.has",!0),f=i("WeakMap.prototype.delete",!0);e.exports=l?function(){var e,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},delete:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(s&&t)return t.delete(r);return!1},get:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?c(e,r):t&&t.get(r)},has:function(r){return l&&r&&("object"==typeof r||"function"==typeof r)&&e?d(e,r):!!t&&t.has(r)},set:function(r,n){l&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new l),u(e,r,n)):s&&(t||(t=s()),t.set(r,n))}};return r}:s},6278(e,t,r){"use strict";var n=r(6757),i=r(3109),o=r(6521),s=r(3977),a=r(8965)||s||o;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+i(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,r){e||(e=a()),e.set(t,r)}};return t}},4532(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}(),i=n&&"a=1"===new n({a:1}).toString(),o=n&&"+"===new n("s=%2B").get("s"),s=n&&"size"in n.prototype,a="__URLSearchParams__",l=!n||((t=new n).append("s"," &"),"s=+%26"===t.toString()),c=h.prototype,u=!!(e.Symbol&&e.Symbol.iterator);if(!n||!i||!o||!l||!s){c.append=function(e,t){v(this[a],e,t)},c.delete=function(e){delete this[a][e]},c.get=function(e){var t=this[a];return this.has(e)?t[e][0]:null},c.getAll=function(e){var t=this[a];return this.has(e)?t[e].slice(0):[]},c.has=function(e){return _(this[a],e)},c.set=function(e,t){this[a][e]=[""+t]},c.toString=function(){var e,t,r,n,i=this[a],o=[];for(t in i)for(r=p(t),e=0,n=i[t];e<n.length;e++)o.push(r+"="+p(n[e]));return o.join("&")};var d=e.Proxy&&n&&(!o||!l||!i||!s);d?(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 f=e.URLSearchParams.prototype;f.polyfill=!0,!d&&e.Symbol&&(f[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in f||(f.forEach=function(e,t){var r=m(this.toString());Object.getOwnPropertyNames(r).forEach(function(n){r[n].forEach(function(r){e.call(t,r,n,this)},this)},this)}),"sort"in f||(f.sort=function(){var e,t,r,n=m(this.toString()),i=[];for(e in n)i.push(e);for(i.sort(),t=0;t<i.length;t++)this.delete(i[t]);for(t=0;t<i.length;t++){var o=i[t],s=n[o];for(r=0;r<s.length;r++)this.append(o,s[r])}}),"keys"in f||(f.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),y(e)}),"values"in f||(f.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),y(e)}),"entries"in f||(f.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),y(e)}),u&&(f[e.Symbol.iterator]=f[e.Symbol.iterator]||f.entries),"size"in f||Object.defineProperty(f,"size",{get:function(){var e=m(this.toString());if(f===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[a]=m(e)}function p(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 u&&(r[e.Symbol.iterator]=function(){return r}),r}function m(e){var t={};if("object"==typeof e)if(b(e))for(var r=0;r<e.length;r++){var n=e[r];if(b(n)&&2===n.length)v(t,n[0],n[1]);else throw TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var i in e)e.hasOwnProperty(i)&&v(t,i,e[i]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var o=e.split("&"),s=0;s<o.length;s++){var a=o[s],l=a.indexOf("=");-1<l?v(t,g(a.slice(0,l)),g(a.slice(l+1))):a&&v(t,g(a),"")}}return t}function v(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 b(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:"u">typeof window?window:this)},9368(e){"use strict";e.exports=__rspack_external__9368},650(e){"use strict";e.exports=__rspack_external__650},9207(e){"use strict";e.exports=__rspack_external__9207},5610(){},7791(){},6550(){}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t,n)=>{var i=(t,n)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,[n]:t[i]})};i(t,"get"),i(n,"value")},r.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";let e;r.r(n),r.d(n,{Console:()=>tm,DEFAULT_ICONSET:()=>re,DEFAULT_LANGUAGES:()=>rn,DefaultBoxShadow:()=>t9,DefaultBoxShadowBottom:()=>t8,DefaultColor1:()=>tZ,DefaultColor10:()=>t6,DefaultColor11:()=>t4,DefaultColor2:()=>tQ,DefaultColor3:()=>t5,DefaultColor4:()=>tJ,DefaultColor5:()=>t0,DefaultColor6:()=>t1,DefaultColor7:()=>tX,DefaultColor8:()=>t2,DefaultColor9:()=>t3,DefaultDisabledOpacity:()=>"0.3",DefaultHeaderHeight:()=>"50px",EventProviderStatus:()=>s,I18NEXT_TO_MOMENT_LOCALE:()=>ri,Manager:()=>rs,OPENREMOTE_CLIENT_ID:()=>rt,ORError:()=>a,OREvent:()=>l,RESTRICTED_USER_REALM_ROLE:()=>rr,Util:()=>c,WebSocketEventProvider:()=>tx,default:()=>rl,manager:()=>ra,normaliseConfig:()=>ro,subscribe:()=>t$});var t,i,o,s,a,l,c={};r.r(c),r.d(c,{AssetQueryHelper:()=>tp,Deferred:()=>eS,arrayRemove:()=>eN,blobToBase64:()=>tf,camelCaseToSentenceCase:()=>ej,capitaliseFirstLetter:()=>eU,cronStringToISOString:()=>eB,dateToCronString:()=>eH,difference:()=>eM,dispatchCancellableEvent:()=>td,formatCronString:()=>eV,generateUniqueUUID:()=>th,getAllowedValueLabel:()=>eQ,getAssetTypeLabel:()=>eX,getAttributeLabel:()=>e1,getAttributeUnits:()=>tt,getAttributeValueAsString:()=>e3,getAttributeValueConstraints:()=>e7,getAttributeValueFormat:()=>tn,getBrowserLanguage:()=>ek,getComplexMetaItems:()=>eJ,getEnumKeyAsString:()=>eF,getGeoNotificationsFromRulesSet:()=>ex,getMetaItemNameValueHolder:()=>e0,getMetaLabel:()=>e2,getMetaUnits:()=>tr,getMetaValue:()=>eG,getMetaValueAsString:()=>e6,getMetaValueConstraints:()=>te,getMetaValueFormat:()=>ti,getPrimitiveMetaItems:()=>e$,getQueryParameter:()=>eE,getQueryParameters:()=>eO,getValueAsString:()=>e8,getValueDescriptorLabel:()=>eZ,getWeekNumber:()=>eY,hasMetaItem:()=>eK,isComplexValueDescriptor:()=>eq,isObject:()=>eC,isPrimitiveValueDescriptor:()=>ez,isTimeDuration:()=>eR,isTimeDurationNegativeInfinity:()=>eD,isTimeDurationPositiveInfinity:()=>eA,loadJs:()=>tl,mergeObjects:()=>function e(t,r,n){if(t&&!r)return Object.assign({},t);if(r&&!t)return Object.assign({},r);let i=Object.assign({},t),o=[];return Object.entries(r).forEach(([t,r])=>{var s,a,l,c,u;let d;s=i,a=o,l=t,c=r,u=n,d=s,a.forEach(e=>{d.hasOwnProperty(e)||(d[e]={}),d=d[e]}),d&&(d.hasOwnProperty(l)?null==c?delete d[l]:Array.isArray(d[l])?u?d[l]=[...d[l],...c]:d[l]=[...c]:"object"==typeof c?d[l]=e(Object.assign({},d[l]),c,u):d[l]=c:null==c?delete d[l]:Array.isArray(c)?d[l]=[...c]:"object"==typeof c?d[l]=Object.assign({},c):d[l]=c)}),i},objectsEqual:()=>eT,resolveUnits:()=>e9,sentenceCaseToCamelCase:()=>eI,sortByNumber:()=>tc,sortByString:()=>tu,stringMatch:()=>eL,updateAsset:()=>ta}),r(4532);var u=r(650);function d(e){return(d="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 f(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function h(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t: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,h(n.key),n)}}function g(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return(m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(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&&m(e,t)}function b(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return y(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t,r){return(t=h(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(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 k(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 O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var E={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)}},x=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),this.init(t,r)}return g(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||E,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,O(O({},{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}()),P=function(){function e(){f(this,e),this.observers={}}return g(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 R(){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 D(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=n(o.shift());!e[s]&&r&&(e[s]=new r),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function C(e,t,r){var n=D(e,t,Object);n.obj[n.k]=r}function T(e,t){var r=D(e,t),n=r.obj,i=r.k;if(n)return n[i]}function M(e,t,r){var n=T(e,r);return void 0!==n?n:T(t,r)}function N(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var I={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function j(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return I[e]}):e}var L="u">typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,U=[" ",",","?","!",";"];function F(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 Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var W=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return f(this,n),t=r.call(this),L&&P.call(y(t)),t.data=e||{},t.options=i,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return g(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]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."));var a=T(this.data,s);return a||!o||"string"!=typeof r?a: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 i=r.split(n),o=t,s=0;s<i.length;++s){if(!o||"string"==typeof o[i[s]]&&s+1<i.length)return;if(void 0===o[i[s]]){for(var a=2,l=i.slice(s,s+a).join(n),c=o[l];void 0===c&&i.length>s+a;)a++,c=o[l=i.slice(s,s+a).join(n)];if(void 0===c)return;if(null===c)return null;if(r.endsWith(l)){if("string"==typeof c)return c;if(l&&"string"==typeof c[l])return c[l]}var u=i.slice(s+a).join(n);if(u)return e(c,u,n);return}o=o[i[s]]}return o}}(this.data&&this.data[e]&&this.data[e][t],r,i)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];r&&(s=s.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(s=e.split("."),n=t,t=s[1]),this.addNamespaces(t),C(this.data,s,n),i.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 i in r)("string"==typeof r[i]||"[object Array]"===Object.prototype.toString.apply(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),n=r,r=t,t=s[1]),this.addNamespaces(t);var a=T(this.data,s)||{};n?function e(t,r,n){for(var i in r)"__proto__"!==i&&"constructor"!==i&&(i in t?"string"==typeof t[i]||t[i]instanceof String||"string"==typeof r[i]||r[i]instanceof String?n&&(t[i]=r[i]):e(t[i],r[i],n):t[i]=r[i]);return t}(a,r,i):a=Y(Y({},a),r),C(this.data,s,a),o.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)?Y(Y({},{}),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}(P),V={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))}),t}};function H(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 B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var G={},K=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(e){var t,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return f(this,n),o=r.call(this),L&&P.call(y(o)),t=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=y(o),t.forEach(function(t){e[t]&&(i[t]=e[t])}),o.options=s,void 0===o.options.keySeparator&&(o.options.keySeparator="."),o.logger=x.create("translator"),o}return g(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,i=t.ns||this.options.defaultNS||[],o=r&&e.indexOf(r)>-1,s=!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 i=new RegExp("(".concat(n.map(function(e){return"?"===e?"\\?":e}).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(r);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,r,n);if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==d(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],f=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?(g.res="".concat(u).concat(p).concat(l),g):"".concat(u).concat(p).concat(l)}return o?(g.res=l,g):l}var g=this.resolve(e,t),y=g&&g.res,m=g&&g.usedKey||l,v=g&&g.exactUsedKey||l,b=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(b)&&("string"!=typeof _||"[object Array]"!==b)){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(m,y,B(B({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(g.res=k,g):k}if(s){var O="[object Array]"===b,E=O?[]:{},x=O?v:m;for(var P in y)if(Object.prototype.hasOwnProperty.call(y,P)){var R="".concat(x).concat(s).concat(P);E[P]=this.translate(R,B(B({},t),{joinArrays:!1,ns:c})),E[P]===R&&(E[P]=y[P])}y=E}}else if(w&&"string"==typeof _&&"[object Array]"===b)(y=y.join(_))&&(y=this.extendTranslation(y,e,t,r));else{var A=!1,D=!1,C=void 0!==t.count&&"string"!=typeof t.count,T=n.hasDefaultValue(t),M=C?this.pluralResolver.getSuffix(f,t.count,t):"",N=t["defaultValue".concat(M)]||t.defaultValue;!this.isValidLookup(y)&&T&&(A=!0,y=N),this.isValidLookup(y)||(D=!0,y=l);var I=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:y,j=T&&N!==y&&this.options.updateMissing;if(D||A||j){if(this.logger.log(j?"updateKey":"missingKey",f,u,l,j?N:y),s){var L=this.resolve(l,B(B({},t),{},{keySeparator:!1}));L&&L.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 U=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var Y=0;Y<F.length;Y++)U.push(F[Y]);else"all"===this.options.saveMissingTo?U=this.languageUtils.toResolveHierarchy(t.lng||this.language):U.push(t.lng||this.language);var W=function(e,r,n){var o=T&&n!==y?n:I;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,r,o,j,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,r,o,j,t),i.emit("missingKey",e,u,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?U.forEach(function(e){i.pluralResolver.getSuffixes(e,t).forEach(function(r){W([e],l+r,t["defaultValue".concat(r)]||N)})}):W(U,l,N))}y=this.extendTranslation(y,e,t,g,r),D&&y===l&&this.options.appendNamespaceToMissingKey&&(y="".concat(u,":").concat(l)),(D||A)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,A?y:void 0):this.options.parseMissingKeyHandler(y))}return o?(g.res=y,g):y}},{key:"extendTranslation",value:function(e,t,r,n,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,B(B({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(B(B({},r),{interpolation:B(B({},this.options.interpolation),r.interpolation)}));var s,a="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(c=B(B({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,r.lng||this.language,r),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return i&&i[0]===n[0]&&!r.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):o.translate.apply(o,n.concat([t]))},r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==r.applyPostProcessor&&(e=V.handle(f,e,t,this.options&&this.options.postProcessPassResolved?B({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;r=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,f=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),h=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach(function(e){s.isValidLookup(t)||(o=e,!G["".concat(p[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(G["".concat(p[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(r,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" 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!!!")),p.forEach(function(r){if(!s.isValidLookup(t)){i=r;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,r,e,a);else{d&&(u=s.pluralResolver.getSuffix(r,a.count,a));var u,p="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),f&&l.push(c+p)),h){var g="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(g),d&&(l.push(g+u),f&&l.push(g+p))}}for(;o=l.pop();)s.isValidLookup(t)||(n=o,t=s.getResource(r,e,o,a))}}))})}}),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{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}(P);function z(e){return e.charAt(0).toUpperCase()+e.slice(1)}var q=function(){function e(t){f(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return g(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),i=[],o=function(e){e&&(r.isSupportedCode(e)?i.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&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach(function(e){0>i.indexOf(e)&&o(r.formatLanguageCode(e))}),i}}]),e}(),$=[{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}],J={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)}},X=["v1","v2","v3"],Z={zero:0,one:1,two:2,few:3,many:4,other:5},Q=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),(!this.options.compatibilityJSON||"v4"===this.options.compatibilityJSON)&&("u"<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={},$.forEach(function(e){e.lngs.forEach(function(t){r[t]={numbers:e.nr,plurals:J[e.fc]}})}),r)}return g(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 Z[e]-Z[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)),i=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!X.includes(this.options.compatibilityJSON)}}]),e}();function ee(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 et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var er=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return g(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:j,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?N(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?N(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?N(t.nestingPrefix):t.nestingPrefixEscaped||N("$t("),this.nestingSuffix=t.nestingSuffix?N(t.nestingSuffix):t.nestingSuffixEscaped||N(")"),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 i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(0>e.indexOf(a.formatSeparator)){var i=M(t,l,e);return a.alwaysFormat?a.format(i,void 0,r,et(et(et({},n),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(M(t,l,s),c,r,et(et(et({},n),t),{},{interpolationkey:s}))};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=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 a.escapeValue?c(a.escape(e)):c(e)}}].forEach(function(t){for(s=0;i=t.regex.exec(e);){var r=i[1].trim();if(void 0===(o=u(r)))if("function"==typeof d){var l=d(e,i,n);o="string"==typeof l?l:""}else if(n&&n.hasOwnProperty(r))o="";else if(f){o=i[0];continue}else a.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),o="";else"string"==typeof o||a.useRawValueToEscape||(o=A(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),f?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var r,n,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=et({},o);function a(e,t){var r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=et(et({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;r=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var u=r[1].split(this.formatSeparator).map(function(e){return e.trim()});r[1]=u.shift(),l=u,c=!0}if((n=t(a.call(this,r[1].trim(),s),s))&&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=l.reduce(function(e,t){return i.format(e,t,o.lng,et(et({},o),{},{interpolationkey:r[1].trim()}))},n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function en(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 ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eo(e){var t={};return function(r,n,i){var o=n+JSON.stringify(i),s=t[o];return s||(s=e(n,i),t[o]=s),s(r)}}var es=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this.logger=x.create("formatter"),this.options=t,this.formats={number:eo(function(e,t){var r=new Intl.NumberFormat(e,t);return function(e){return r.format(e)}}),currency:eo(function(e,t){var r=new Intl.NumberFormat(e,ei(ei({},t),{},{style:"currency"}));return function(e){return r.format(e)}}),datetime:eo(function(e,t){var r=new Intl.DateTimeFormat(e,ei({},t));return function(e){return r.format(e)}}),relativetime:eo(function(e,t){var r=new Intl.RelativeTimeFormat(e,ei({},t));return function(e){return r.format(e,t.range||"day")}}),list:eo(function(e,t){var r=new Intl.ListFormat(e,ei({},t));return function(e){return r.format(e)}})},this.init(t)}return g(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()]=eo(t)}},{key:"format",value:function(e,t,r,n){var i=this;return t.split(this.formatSeparator).reduce(function(e,t){var o=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);"currency"===t&&0>i.indexOf(":")?r.currency||(r.currency=i.trim()):"relativetime"===t&&0>i.indexOf(":")?r.range||(r.range=i.trim()):i.split(";").forEach(function(e){if(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(":"))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return S(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,void 0):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.")}(),i=n[0],o=n.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[i.trim()]||(r[i.trim()]=o),"false"===o&&(r[i.trim()]=!1),"true"===o&&(r[i.trim()]=!0),isNaN(o)||(r[i.trim()]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}}(t),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=e;try{var c=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},u=c.locale||c.lng||n.locale||n.lng||r;l=i.formats[s](e,u,ei(ei(ei({},a),n),c))}catch(e){i.logger.warn(e)}return l}return i.logger.warn("there was no format function for ".concat(s)),e},e)}}]),e}();function ea(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?ea(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ea(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ec=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(e,t,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return f(this,n),o=r.call(this),L&&P.call(y(o)),o.backend=e,o.store=t,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=x.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return g(n,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o={},s={},a={},l={};return e.forEach(function(e){var n=!0;t.forEach(function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,n=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=n[0],o=n[1];t&&this.emit("failedLoading",i,o,t),r&&this.store.addResourceBundle(i,o,r),this.state[e]=t?-1:2;var s={};this.queue.forEach(function(r){var n,a,l,c;n=r.loaded,(l=(a=D(n,[i],Object)).obj)[c=a.k]=l[c]||[],l[c].push(o),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){s[e]||(s[e]={});var t=r.loaded[e];t.length&&t.forEach(function(t){void 0===s[e][t]&&(s[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=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:i,wait:o,callback:s}):(this.readingCalls++,this.backend[r](e,t,function(a,l){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)}a&&l&&i<n.maxRetries?setTimeout(function(){n.read.call(n,e,t,r,i+1,2*o,s)},o):s(a,l)})):s(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=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."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.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("|"),i=n[0],o=n[1];this.read(i,o,"read",void 0,void 0,function(n,s){n&&t.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),n),!n&&s&&t.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,n,s)})}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?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,el(el({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),n}(P);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 ed(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 ef(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(r),!0).forEach(function(t){w(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eh(){}var ep=function(e){v(n,e);var t,r=(t=function(){if("u"<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=_(n);return e=t?Reflect.construct(r,arguments,_(this).constructor):r.apply(this,arguments),b(this,e)});function n(){var e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(f(this,n),t=r.call(this),L&&P.call(y(t)),t.options=eu(i),t.services={},t.logger=x,t.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(e=y(t))).forEach(function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}),o&&!t.isInitialized&&!i.isClone){if(!t.options.initImmediate)return t.init(i,o),b(t,y(t));setTimeout(function(){t.init(i,o)},0)}return t}return g(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"===d(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===d(e[2])||"object"===d(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 i(e){return e?"function"==typeof e?new e:e:null}if(this.options=ef(ef(ef({},n),this.options),eu(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ef(ef({},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?x.init(i(this.modules.logger),this.options):x.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"u">typeof Intl&&(o=es);var o,s=new q(this.options);this.store=new W(this.options.resources,this.options);var a=this.services;a.logger=x,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new Q(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new er(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new ec(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))}),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];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=eh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[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 c=R(),u=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),c.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?u():setTimeout(u,0),c}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eh,n=r,i="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return n();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){0>o.indexOf(e)&&o.push(e)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return s(e)}),this.options.preload&&this.options.preload.forEach(function(e){return s(e)}),this.services.backendConnector.load(o,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=R();return e||(e=this.languages),t||(t=this.options.ns),r||(r=eh),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&&V.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=R();this.emit("languageChanging",e);var i=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},o=function(e,o){o?(i(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve(function(){return r.t.apply(r,arguments)}),t&&t(e,function(){return r.t.apply(r,arguments)})},s=function(t){e||t||!r.services.languageDetector||(t=[]);var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||i(n),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,function(e){o(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var n=this,i=function e(t,i){if("object"!==d(i)){for(var o,s=arguments.length,a=Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=n.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=ef({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||r||e.keyPrefix;var c=n.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(t):t;return n.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}},{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],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var s=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return -1===n||2===n};if(r.precheck){var a=r.precheck(this,s);if(void 0!==a)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!i||s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=R();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=R();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter(function(e){return 0>n.indexOf(e)});return i.length?(this.options.preload=n.concat(i),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]:eh,i=ef(ef(ef({},this.options),t),{isClone:!0}),o=new n(i);return(void 0!==t.debug||void 0!==t.prefix)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(function(t){o[t]=e[t]}),o.services=ef({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new K(o.services,o.options),o.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];o.emit.apply(o,[e].concat(r))}),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(P);w(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 eg=ep.createInstance();eg.createInstance=ep.createInstance,eg.createInstance,eg.init,eg.loadResources,eg.reloadResources,eg.use,eg.changeLanguage,eg.getFixedT,eg.t,eg.exists,eg.setDefaultNamespace,eg.hasLoadedNamespace,eg.loadNamespaces,eg.loadLanguages;var ey=r(8183),em=r.n(ey),ev=r(4867),eb=r.n(ev),e_=r(3472),ew=r.n(e_);class eS{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 ek(){return navigator.language.split("-")[0]||"en"}function eO(e){return em().parse(e,{ignoreQueryPrefix:!0})}function eE(e){let t;if(location.search&&""!==location.search&&(t=eO(location.search)),location.hash){let e=location.hash.indexOf("?");e>-1&&(t=eO(location.hash.substring(e+1)))}return t?t[e]:void 0}function ex(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){if(!e)return;let r=[];e.groups&&e.groups.forEach(e=>{e.items&&e.items.forEach(e=>{r.push(e)})}),e.items&&e.items.forEach(e=>{r.push(e)}),r&&r.forEach(e=>{if(e.assets&&e.assets.attributes){let r=[];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,r),r.length>0){let n=e.tag||"0";t.set(n,r)}}})}(e.when,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 eP=/([+-])?((\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 eR(e){return!!e&&(e=e.trim()).length>0&&(eP.test(e)||eA(e)||eD(e))}function eA(e){return"*"===(e=null!=e?e.trim():void 0)||"+*"===e}function eD(e){return"-*"===(e=null!=e?e.trim():void 0)}function eC(e){return!!e&&"object"==typeof e}function eT(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){if(Array.isArray(e))return e.every((e,r)=>eT(e,t[r]));let r=Object.keys(e);return Object.keys(t).every(e=>-1!==r.indexOf(e))&&r.every(r=>eT(e[r],t[r]))}return!1}function eM(e,t){let r=(e,t)=>ew()(e,function(e,n,i){eT(n,null==t?void 0:t[i])||(e[i]=eC(n)&&eC(null==t?void 0:t[i])?r(n,null==t?void 0:t[i]):n)});return r(e,t)}function eN(e,t){if(0===e.length)return;let r=e.indexOf(t);r>=0&&e.splice(r,1)}function eI(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 ej(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],i=r+1<n.length&&n[r+1]&&"_"!==n[r+1],o=r+3>n.length||!n[r+1]&&!n[r+3];(!t||i)&&(e=" "+e),!i&&(t||o)||(e=e.toLowerCase())}return e}).join("").trim()}function eL(e,t){if(t===e)return!0;let r=e.endsWith("*"),n=!r&&e.startsWith("*"),i=!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(i)try{return new RegExp(e).test(t)}catch(e){console.error("Failed to compile needle as a RegExp: "+e)}return!1}function eU(e){if(e)return 1===e.length?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)}function eF(e,t){return Object.keys(e).find(r=>e[r]===t)}function eY(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,i,o,s){let a="";if(o?Array.isArray(o)?a+=o.toString().replace(" ",""):a+=o.toString():a+="0",a+=" ",i?Array.isArray(i)?a+=i.toString().replace(" ",""):a+=i.toString():a+="0",a+=" ",n?Array.isArray(n)?a+=n.toString().replace(" ",""):a+=n.toString():a+="0",a+=" ",r?Array.isArray(r)?a+=r.toString().replace(" ",""):a+=r.toString():a+="*",a+=" ",t)if(Array.isArray(t))if("number"==typeof t[0]){let e=[];t.forEach(t=>{e.push(eW[t].toString())}),a+=e.toString().replace(" ","")}else a+=t.toString().replace(" ","");else a+=t.toString();else a+="*";return a+=" ",s?a+=s.toString():a+="?",a+=" ",e?Array.isArray(e)?a+=e.toString().replace(" ",""):a+=e:a+="*",a}function eH(e){return eV(e.getFullYear(),eW[e.getMonth()],[e.getDate()],[e.getHours()],[e.getMinutes()])}function eB(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 i=1==r[3].length&&"*"!=r[3]?"0"+r[3]:r[3].replace("*","01"),o=1==r[2].length&&"*"!=r[2]?"0"+r[2]:r[2].replace("*","00"),s=1==r[1].length&&"*"!=r[1]?"0"+r[1]:r[1].replace("*","00"),a=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(i),hour:Number(o),minute:Number(s),second:Number(a)}).toISOString();else return eb()({year:Number(e),month:Number(n),date:Number(i),hour:Number(o),minute:Number(s),second:Number(a)}).toISOString()}}function eG(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 ez(e){return!eq(e)}function eq(e){return!!((null==e?void 0:e.jsonType)==="object"||(null==e?void 0:e.arrayDimensions)&&e.arrayDimensions>0)}function e$(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>ez(u.AssetModelUtil.getValueDescriptor(e.type)))}function eJ(){return u.AssetModelUtil.getMetaItemDescriptors().filter(e=>eq(u.AssetModelUtil.getValueDescriptor(e.type)))}function eX(e){return("string"==typeof e&&(e=u.AssetModelUtil.getAssetDescriptor(e)),e)?eg.t("label.asset."+e.name,{defaultValue:ej(e.name)}):""}function eZ(e){if(!e)return eg.t("label.value.unknown",{defaultValue:"Unknown"});let t="string"==typeof e?e:e.name;return eg.t("label.value."+t,{defaultValue:ej(t||"")})}function eQ(e,t){if(e)return eg.t("label.allowedValue."+e,{defaultValue:t||ej(e||""),nsSeparator:!1})}function e0(e,t){let r="string"==typeof e?u.AssetModelUtil.getMetaItemDescriptor(e):e;return r?{name:r.name,type:r.type,value:t}:{name:typeof e,type:u.AssetModelUtil.resolveValueTypeFromValue(t),value:t}}function e1(e,t,r,n,i){return e5(e,t,r,n,!0,i)}function e2(e,t,r,n,i){return e5(e||e0(t,null),t,r,n,!1,i)}function e5(e,t,r,n,i,o){let s=ts("label",e,t,r,i),a="";if(s||(s=eG("label",e,t&&t.meta?t:void 0)),n&&(a=e9(to("units",e,t,r,i))),!s){let r=e?e.name:t?"string"==typeof t?t:t.name:void 0;s=o||(r?ej(r):void 0)}return s?s+(a?" ("+a+")":""):a}function e3(e,t,r,n,i){return e4(e,t,r,n,!0,i)}function e6(e,t,r,n,i){return e4(e||e0(t,null),t,r,n,!1,i)}function e4(e,t,r,n,i,o){let s=e8(e?e.value:void 0,()=>to("format",e,t,r,i),void 0,o),a=tt(e,t,r);return n&&a&&a.length&&(s=e9(to("units",e,t,r,i),s)),s}function e8(e,t,r,n){let i="";if(null==e)i=n||"";else if("string"==typeof e)i=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":i=new Intl.NumberFormat(r||eg.language,n).format(e);break;case"boolean":n.asOnOff&&(i=e?eg.t("on"):eg.t("off")),n.asOpenClosed&&(i=e?eg.t("open"):eg.t("closed")),n.asPressedReleased&&(i=e?eg.t("pressed"):eg.t("released"));break;case"object":if(n.momentJsFormat)i=eb()(e).format(n.momentJsFormat);else if(n.iso8601)i=e.toISOString();else if(n.week){let t=eY(e);i="2-digit"===n.week?String(t).padStart(2,"0"):Number(t).toString(10)}else i=new Intl.DateTimeFormat(r||eg.language,n).format(e)}else i=Object(e).toString()}return i}function e9(e,t){if(!e)return"";t||(t="");let r=e.map((e,r)=>{if(3!==e.length||e.toUpperCase()!==e)return eg.t(["units."+e,"or:units."+e]);{let n=new Intl.NumberFormat(eg.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 e7(e,t,r){return to("constraints",e,t,r,!0)}function te(e,t,r){return to("constraints",e||e0(t,null),t,r,!1)}function tt(e,t,r){return to("units",e,t,r,!0)}function tr(e,t,r){return to("units",e||e0(t,null),t,r,!1)}function tn(e,t,r){return to("format",e,t,r,!0)}function ti(e,t,r){return to("format",e||e0(t,null),t,r,!1)}function to(e,t,r,n,i){let o,s=[],a=ts(e,t&&"string"==typeof t?t:t?t.name:r?"string"==typeof r?r:r.name:void 0,r,n,i);if(a&&(o=JSON.parse(a)))if("format"!==e)return o;else s.push(o);if(t&&t.meta&&(o=eG(e,t,r)))if("format"!==e)return o;else s.push(o);if(r&&"string"!=typeof r&&r.hasOwnProperty(e)){if(o=r[e],"format"!==e)return o;s.push(o)}if(r&&r.type){if(o=u.AssetModelUtil.getValueDescriptor(r.type)[e],"format"!==e)return o;s.push(o)}if("format"!==e||0===s.length)return o;let l={};return s.reverse().forEach(e=>{l=Object.assign(Object.assign({},l),e)}),l}function ts(e,t,r,n,i,o){let s;if(t?s="string"==typeof t?t:t.name:r&&(s="string"==typeof r?r:r.name),!s)return;let a=[],l=e+"."+(i?"attribute":"meta")+".";if(n&&a.push(l+n+"."+s),r&&"string"!=typeof r&&(a.push(l+r.type+"."+s),a.push(l+r.type)),a.push(l+s),a.length>0)return eg.t(a,{defaultValue:o||""})}function ta(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 tl(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 tc(e){return(t,r)=>{let n=e(t),i=e(r);return n||i?n&&!i?1:!n&&i?-1:n-i:0}}function tu(e){return(t,r)=>{let n=e(t),i=e(r);return n||i?n&&!i?1:!n&&i?-1:n.localeCompare(i):0}}function td(e,t){let r=new eS;return e.dispatchEvent(t),window.setTimeout(()=>{r.resolve(t.detail)}),r.promise}function tf(e){return new Promise((t,r)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>{t(n.result)},n.onerror=e=>{r(e)}})}function th(){return"function"==typeof crypto.randomUUID?crypto.randomUUID():"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}class tp{constructor(e){e&&Object.assign(this,e)}matches(e){var t,r,n,i,o,s,a;if((null==(t=this.ids)?void 0:t.length)&&(!e.id||!this.ids.includes(e.id))||(null==(r=this.types)?void 0:r.length)&&(!e.type||!this.types.includes(e.type))||(null==(n=this.realm)?void 0:n.name)&&e.realm!==this.realm.name||(null==(i=this.parents)?void 0:i.length)&&!this.parents.some(t=>!t.id||e.parentId===t.id))return!1;if(null==(o=this.paths)?void 0:o.length){let t=null!=(s=e.path)?s:[];if(!this.paths.some(e=>{var r;return(null!=(r=e.path)?r:[]).every((e,r)=>t[r]===e)}))return!1}return(null==(a=this.names)||!a.length||!!this.names.every(t=>tp._evalValuePredicate(e.name,t)))&&(!this.attributes||tp._evalGroup(e,this.attributes))}static getUnsupportedFields(e){return Object.keys(e).filter(e=>!tp._SUPPORTED_FIELDS.has(e))}collectAttributeNames(){return this.attributes?tp._collectNames(this.attributes):[]}static _evalValuePredicate(e,t){var r;switch(t.predicateType){case"string":{let n;if(null==e)return!1;let i=!1!==t.caseSensitive?String(e):String(e).toLowerCase(),o=!1!==t.caseSensitive?t.value:null==(r=t.value)?void 0:r.toLowerCase();switch(t.match){case"BEGIN":n=i.startsWith(o);break;case"END":n=i.endsWith(o);break;case"CONTAINS":n=i.includes(o);break;default:n=i===o}return t.negate?!n:n}case"boolean":return e===t.value;case"number":{let r;if("number"!=typeof e)return!1;switch(t.operator){case"GREATER_THAN":r=e>t.value;break;case"GREATER_EQUALS":r=e>=t.value;break;case"LESS_THAN":r=e<t.value;break;case"LESS_EQUALS":r=e<=t.value;break;case"BETWEEN":r=e>=t.value&&e<=t.rangeValue;break;default:r=e===t.value}return t.negate?!r:r}}return!1}static _evalPredicate(e,t){var r,n;let i=null==(r=t.name)?void 0:r.value;if(!i)return!0;let o=null==(n=e.attributes)?void 0:n[i];if(!o)return!!t.negated;let s=!t.value||tp._evalValuePredicate(o.value,t.value);return t.negated?!s:s}static _evalGroup(e,t){var r,n,i;let o=null!=(r=t.operator)?r:"AND",s=[...(null!=(n=t.items)?n:[]).map(t=>tp._evalPredicate(e,t)),...(null!=(i=t.groups)?i:[]).map(t=>tp._evalGroup(e,t))];return!s.length||("OR"===o?s.some(Boolean):s.every(Boolean))}static _collectNames(e){var t,r;return[...(null!=(t=e.items)?t:[]).map(e=>{var t;return null==(t=e.name)?void 0:t.value}).filter(e=>!!e),...(null!=(r=e.groups)?r:[]).flatMap(e=>tp._collectNames(e))]}}tp._SUPPORTED_FIELDS=new Set(["ids","types","names","parents","paths","realm","attributes"]);var tg=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let ty=r(4461);class tm{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;const n=new URLSearchParams(window.location.search),i=n.get("consoleName"),o=n.get("consoleVersion"),s=n.get("consolePlatform"),a=n.get("consoleProviders"),l=n.get("consoleAutoEnable"),c=a&&a.length>0?a.split(" "):["push"];this._pendingProviderEnables=c;const u=tm._createConsoleRegistration(),d=window.localStorage.getItem(this._storageKey);if(d)try{const e=JSON.parse(d);e.id&&(u.id=e.id),e.name&&(u.name=e.name),e.providers&&(u.providers=e.providers),e.apps&&(u.apps=e.apps)}catch(e){console.error("Failed to deserialise console registration")}const f=u.providers;for(const e of(u.providers={},c)){const t=f&&f.hasOwnProperty(e)?f[e]:{enabled:!1,disabled:!1};u.providers[e]=t}const h=rl.getAppName();h.length>0&&0>u.apps.indexOf(h)&&u.apps.push(h),this._registration=u,i&&(u.name=i),o&&(u.version=o),s&&(u.platform=s),l&&(this._autoEnable="TRUE"===l||"true"===l)}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 tg(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()),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 tg(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 tg(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 i=this._pendingProviderEnables.indexOf(e);return i>=0&&(this._pendingProviderEnables.splice(i,1),0===this._pendingProviderEnables.length&&(this.sendRegistration().catch(()=>void 0),this._callCompletedCallback())),n})}disableProvider(e){return tg(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 tg(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 eS,i=()=>{delete this._pendingProviderPromises[r],n.reject("No response from provider")};return this._pendingProviderPromises[r]=[n,window.setTimeout(i,5e3)],this._doSendProviderMessage(e),n.promise})}sendRegistration(){return this._registrationTimer&&(window.clearTimeout(this._registrationTimer),this._registrationTimer=null),new Promise((e,t)=>{this._registrationTimer=window.setTimeout(()=>tg(this,void 0,void 0,function*(){this._registrationTimer=null,console.debug("Console: updating registration");try{yield this._sendRegistration(!0),e()}catch(e){console.error("Failed to register console",e),t(e)}}))})}_sendRegistration(e){return tg(this,void 0,void 0,function*(){this._normaliseRegistration();let t=!!this._registration.id;try{let e=yield rl.rest.api.ConsoleResource.register(this._registration);if(200!==e.status)throw Error("Failed to register console");this._registration=e.data,console.debug("Console: registration successful"),console.debug("Console: updating locally stored registration"),window.localStorage.setItem(this._storageKey,JSON.stringify(this._registration))}catch(r){if(e&&t&&tm._isStaleRegistrationResponse(r)){console.warn("Console registration ID is stale or cannot be claimed; creating a new console registration"),window.localStorage.removeItem(this._storageKey),delete this._registration.id,yield this._sendRegistration(!1);return}throw r}})}_normaliseRegistration(){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={})}get _storageKey(){return"OpenRemoteConsole:"+this._realm}static _isStaleRegistrationResponse(e){let t=e&&e.response?e.response.status:void 0;return 403===t||409===t}storeData(e,t){this.sendProviderMessage({provider:"storage",action:"STORE",key:e,value:t},!1)}retrieveData(e){return tg(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,i=this._pendingProviderPromises[r+n];i&&(window.clearTimeout(i[1]),delete this._pendingProviderPromises[r+n],i[0].resolve(t));let o=this._providerMessageListeners[r+n];o&&o(t)}_callCompletedCallback(){let e=this._enableCompleteCallback;this._enableCompleteCallback=null,e&&window.setTimeout(()=>{e()},0)}static _createConsoleRegistration(){return{name:ty.name,version:ty.version,platform:ty.os.toString(),apps:[],model:((ty.manufacturer?ty.manufacturer+" ":"")+(ty.product?ty.product:"")).trim()}}_initialiseProvider(e){return tg(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 tv=r(9207),tb=r.n(tv),t_=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};(t=s||(s={})).DISCONNECTED="DISCONNECTED",t.CONNECTED="CONNECTED",t.CONNECTING="CONNECTING";let tw="SUBSCRIBED:",tS="UNAUTHORIZED:",tk="TRIGGERED:",tO="EVENT:";class tE{constructor(){this._disconnectRequested=!1,this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._reconnectTimer=null,this._status=s.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){eN(this._statusCallbacks,e)}connect(){return(console.debug("Attempting to connect to events:",this.endpointUrl),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._status===s.CONNECTED)?(console.debug("Already connected to events!"),Promise.resolve(!0)):((this._disconnectRequested=!1,this._connectingDeferred)?console.warn("Already connecting to events, continuing the previous one."):(this._onStatusChanged(s.CONNECTING),this._connectingDeferred=new eS,this._doConnect().then(e=>{if(this._connectingDeferred){let t=this._connectingDeferred;e?(console.debug("Connected to event service: "+this.endpointUrl),this._reconnectDelayMillis=tx.MIN_RECONNECT_DELAY,this._onStatusChanged(s.CONNECTED),window.setTimeout(()=>{this._onConnect()},0)):console.debug("Failed to connect to event service: "+this.endpointUrl),t.resolve(e)}}).finally(()=>{this._connectingDeferred=null})),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!==s.DISCONNECTED&&this._doDisconnect())}subscribe(e,t){let r={eventSubscription:e,callback:t,deferred:new eS};return null!=this._pendingSubscription||this._status!==s.CONNECTED?(this._queuedSubscriptions.push(r),r.deferred.promise):(this._pendingSubscription=r,this._doSubscribe(e).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(console.error(e),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 t_(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)&&this._attributeEventPromise&&0===this._attributeEventCallbackMap.size){let e=yield this._attributeEventPromise;this._attributeEventPromise=void 0,this.unsubscribe(e)}})}sendEvent(e){this._status===s.CONNECTED&&this._doSend(e)}sendEventWithReply(e){return this._status!==s.CONNECTED?Promise.reject("Not connected"):this._doSendWithReply(e)}subscribeAssetEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0]?e.map(e=>e.id):e,i="AssetEvent"+tE._subscriptionCounter++;if(!this._assetEventPromise){let e;rl.authenticated||(e={filterType:"asset",realm:rl.displayRealm});let t={eventType:"asset",filter:e};this._assetEventPromise=this.subscribe(t,e=>{this._assetEventCallbackMap.forEach(t=>t(e))})}return this._assetEventCallbackMap.set(i,e=>{let t=e.asset.id;n?n.find(e=>t===e)&&r(e):e.asset.realm===rl.displayRealm&&r(e)}),this._assetEventPromise.then(()=>{try{if(n&&t){let e={messageID:"read-assets:"+n.join(",")+":"+i,eventType:"read-assets",assetQuery:{ids:n}};this.sendEventWithReply(e).then(e=>{e.assets&&this._assetEventCallbackMap.has(i)&&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),i&&this.unsubscribe(i),t}return i})})}subscribeAttributeEvents(e,t,r){return t_(this,void 0,void 0,function*(){let n=e&&"string"!=typeof e[0],i=n?e.map(e=>e.id):e,o=n?e:void 0,s="AttributeEvent"+tE._subscriptionCounter++;if(!this._attributeEventPromise){let e;rl.authenticated||(e={filterType:"asset",realm:rl.displayRealm});let t={eventType:"attribute",filter:e};this._attributeEventPromise=this.subscribe(t,e=>{this._attributeEventCallbackMap.forEach(t=>t(e))})}let a=t=>{let o=t.ref;n?e.forEach(e=>{o.id===e.id&&o.name===e.name&&r(t)}):i?i.find(e=>o.id===e)&&r(t):t.realm===rl.displayRealm&&r(t)};return this._attributeEventCallbackMap.set(s,a),this._attributeEventPromise.then(()=>{try{if(t&&i){let e={messageID:"read-assets:"+i.join(",")+":"+s,eventType:"read-assets",assetQuery:{ids:i}};this.sendEventWithReply(e).then(e=>{e.assets&&this._attributeEventCallbackMap.has(s)&&e.assets.forEach(e=>{e.attributes&&Object.entries(e.attributes).forEach(([t,r])=>{(!o||o.find(r=>r.id===e.id&&r.name===t))&&a({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),s&&this.unsubscribe(s),t}return s})})}_processNextSubscription(){this._status===s.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===s.CONNECTED&&this._onStatusChanged(s.DISCONNECTED),this._pendingSubscription&&(this._queuedSubscriptions.unshift(this._pendingSubscription),this._pendingSubscription=null),this._onStatusChanged(s.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<tx.MAX_RECONNECT_DELAY&&(this._reconnectDelayMillis=Math.min(tx.MAX_RECONNECT_DELAY,this._reconnectDelayMillis+3e3)))}}tE.MIN_RECONNECT_DELAY=0,tE.MAX_RECONNECT_DELAY=3e4,tE._subscriptionCounter=0;class tx extends tE{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="+rl.config.realm;return this._connectDeferred=new eS,(rl.authenticated?rl.retrieveAuthorizationHeader().then(t=>{e+="&Authorization="+t}):Promise.resolve()).finally(()=>{this._webSocket=new WebSocket(e),this._webSocket.onopen=e=>{if(this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!0)}},this._webSocket.onerror=e=>{if(console.error("Event provider error:",e),this._connectDeferred){let e=this._connectDeferred;this._connectDeferred=null,e.resolve(!1)}else this._beforeDisconnect()},this._webSocket.onclose=()=>{if(console.warn("The WebSocket connection of the event provider has been closed."),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(tw)){let e=JSON.parse(t.substring(tw.length)),r=this._subscribeDeferred;this._subscribeDeferred=null,r&&r.resolve(e.subscriptionId)}else if(t.startsWith(tS)){let e=JSON.parse(t.substring(tS.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(tk)){let e=JSON.parse(t.substring(tk.length));e.events&&e.events.forEach(t=>{this._onMessageReceived(e.subscriptionId,t)})}else if(t.startsWith(tO)){let e=JSON.parse(t.substring(tO.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 eS,e.subscriptionId||(e.subscriptionId=tx._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=tO+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 eS;return this._repliesDeferred.set(e.messageID,t),this._webSocket.send(tO+JSON.stringify(e)),t.promise}}tx._subscriptionCounter=1;let tP=["__proto__","constructor","prototype"];function tR(e){return!("string"!=typeof e||0===e.length||e.length>128||tP.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function tA(e){return!(!tR(e)||e.indexOf("/")>-1)}let tD={lng:tA,ns:function(e){return tR(e)}};function tC(e){return"string"!=typeof e?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function tT(){return"function"==typeof XMLHttpRequest||"object"==typeof XMLHttpRequest}let tM=/\{\{(.+?)\}\}/g;function tN(e,t){let r=!1,n=e.replace(tM,(e,n)=>{let i=n.trim();if(tP.indexOf(i)>-1)return e;let o=t[i];if(null==o)return e;let s=tD[i]||tA,a=String(o).split("+");for(let t of a)if(!s(t))return r=!0,e;return a.join("+")});return r?null:n}let tI="u">typeof globalThis?globalThis:"u">typeof global?global:"u">typeof window?window:void 0;"function"==typeof fetch?e=fetch:tI&&"function"==typeof tI.fetch&&(e=tI.fetch);let tj=tT()&&tI?tI.XMLHttpRequest:void 0,tL="function"==typeof ActiveXObject&&tI?tI.ActiveXObject:void 0,tU=["__proto__","constructor","prototype"],tF=(e,t)=>{if(t&&"object"==typeof t){let r="";for(let e of Object.keys(t))tU.indexOf(e)>-1||(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t[e]));if(!r)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+r.slice(1)}return e},tY=(t,r,n,i)=>{let o=e=>{if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(i){let e=i(t,r);if(e instanceof Promise)return void e.then(o).catch(n)}"function"==typeof fetch?fetch(t,r).then(o).catch(n):e(t,r).then(o).catch(n)},tW=(t,r,n,i)=>{if("function"==typeof n&&(i=n,n=void 0),i=i||(()=>{}),e&&0!==r.indexOf("file:")){var o=r,s=n,a=i;t.queryStringParams&&(o=tF(o,t.queryStringParams));let e={..."function"==typeof t.customHeaders?t.customHeaders():t.customHeaders};"u"<typeof window&&"u">typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(e["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),s&&(e["Content-Type"]="application/json");let l="function"==typeof t.requestOptions?t.requestOptions(s):t.requestOptions,c={method:s?"POST":"GET",body:s?t.stringify(s):void 0,headers:e,...t._omitFetchOptions?{}:l},u="function"==typeof t.alternateFetch&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{tY(o,c,a,u)}catch(e){if(!l||0===Object.keys(l).length||!e.message||0>e.message.indexOf("not implemented"))return a(e);try{Object.keys(l).forEach(e=>{delete c[e]}),tY(o,c,a,u),t._omitFetchOptions=!0}catch(e){a(e)}}return}if(tT()||"function"==typeof ActiveXObject){var l=r,c=n,u=i;c&&"object"==typeof c&&(c=tF("",c).slice(1)),t.queryStringParams&&(l=tF(l,t.queryStringParams));try{let e=tj?new tj:new tL("MSXML2.XMLHTTP.3.0");e.open(c?"POST":"GET",l,1),t.crossDomain||e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.withCredentials=!!t.withCredentials,c&&e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.overrideMimeType&&e.overrideMimeType("application/json");let r=t.customHeaders;if(r="function"==typeof r?r():r)for(let t of Object.keys(r))tU.indexOf(t)>-1||e.setRequestHeader(t,r[t]);e.onreadystatechange=()=>{e.readyState>3&&u(e.status>=400?e.statusText:null,{status:e.status,data:e.responseText})},e.send(c)}catch(e){console&&console.log(e)}return}i(Error("No fetch and no xhr implementation found!"))};var tV=class{constructor(e,t={},r={}){this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}init(e,t={},r={}){if(this.services=e,this.options={...{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,r)=>({[t]:r||""}),parseLoadPayload:(e,t)=>void 0,request:tW,reloadInterval:"u"<typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}},...this.options||{},...t},this.allOptions=r,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);"object"==typeof e&&"function"==typeof e.unref&&e.unref()}}readMulti(e,t,r){this._readAny(e,e,t,t,r)}read(e,t,r){this._readAny([e],e,[t],t,r)}_readAny(e,t,r,n,i){var o,s;let a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,r)),(a=(s=o=a)&&"function"==typeof s.then?o:Promise.resolve(o)).then(o=>{if(!o)return i(null,{});let s=tN(o,{lng:e.join("+"),ns:r.join("+")});if(null==s)return i(Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+e.map(tC).join(", ")+"] namespaces=["+r.map(tC).join(", ")+"]"),!1);this.loadUrl(s,i,t,n)})}loadUrl(e,t,r,n){let i=this.options.parseLoadPayload("string"==typeof r?[r]:r,"string"==typeof n?[n]:n),o=tC(function(e){if("string"!=typeof e||0===e.length)return e;try{let t=new URL(e);if(t.username||t.password)return t.username="",t.password="",t.toString();return e}catch(t){return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}(e));this.options.request(this.options,e,i,(e,i)=>{let s,a;if(i&&(i.status>=500&&i.status<600||!i.status))return t("failed loading "+o+"; status code: "+i.status,!0);if(i&&i.status>=400&&i.status<500)return t("failed loading "+o+"; status code: "+i.status,!1);if(!i&&e&&e.message){let r=e.message.toLowerCase();if(["failed","fetch","network","load"].find(e=>r.indexOf(e)>-1))return t("failed loading "+o+": "+tC(e.message),!0)}if(e)return t(e,!1);try{s="string"==typeof i.data?this.options.parse(i.data,r,n):i.data}catch(e){a="failed parsing "+o+" to json"}if(a)return t(a,!1);t(null,s)})}create(e,t,r,n,i){if(!this.options.addPath)return;"string"==typeof e&&(e=[e]);let o=this.options.parsePayload(t,r,n),s=0,a=[],l=[];e.forEach(r=>{let n=this.options.addPath;"function"==typeof this.options.addPath&&(n=this.options.addPath(r,t));let c=tN(n,{lng:r,ns:t});if(null==c){s+=1,i&&s===e.length&&i(a,l);return}this.options.request(this.options,c,o,(t,r)=>{s+=1,a.push(t),l.push(r),s===e.length&&"function"==typeof i&&i(a,l)})})}reload(){let{backendConnector:e,languageUtils:t,logger:r}=this.services,n=e.language;if(n&&"cimode"===n.toLowerCase())return;let i=[],o=e=>{t.toResolveHierarchy(e).forEach(e=>{0>i.indexOf(e)&&i.push(e)})};o(n),this.allOptions.preload&&this.allOptions.preload.forEach(e=>o(e)),i.forEach(t=>{this.allOptions.ns.forEach(n=>{e.read(t,n,"read",null,null,(i,o)=>{i&&r.warn(`loading namespace ${n} for language ${t} failed`,i),!i&&o&&r.log(`loaded namespace ${n} for language ${t}`,o),e.loaded(`${t}|${n}`,i,o)})})})}};tV.type="backend";var tH=r(9368),tB=r(4954);class tG extends Error{}function tK(e,t){let r;if("string"!=typeof e)throw new tG("Invalid token specified: must be a string");t||(t={});let n=+(!0!==t.header),i=e.split(".")[n];if("string"!=typeof i)throw new tG(`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)}}(i)}catch(e){throw new tG(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new tG(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}if(tG.prototype.name="InvalidTokenError","u"<typeof Promise)throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function tz(e){if(!(this instanceof tz))throw Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var t,r,n=this,i=[],o={enable:!0,callbackList:[],interval:5},s=document.getElementsByTagName("script"),a=0;a<s.length;a++)(-1!==s[a].src.indexOf("keycloak.js")||-1!==s[a].src.indexOf("keycloak.min.js"))&&-1!==s[a].src.indexOf("version=")&&(n.iframeVersion=s[a].src.substring(s[a].src.indexOf("version=")+8).split("&")[0]);var l=!0,c=P(console.info),u=P(console.warn);function d(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),i=0;i<e;i++)n[i]=t.charCodeAt(r[i]%t.length);return String.fromCharCode.apply(null,n)}function f(){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,i=e.error,o=e.prompt,s=new Date().getTime();if(e.kc_action_status&&n.onActionUpdate&&n.onActionUpdate(e.kc_action_status),i){if("none"!=o)if(e.error_description&&"authentication_expired"===e.error_description)n.login(e.loginOptions);else{var a={error:i,error_description:e.error_description};n.onAuthError&&n.onAuthError(a),t&&t.setError(a)}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 u="code="+r+"&grant_type=authorization_code",d=n.endpoints.token(),f=new XMLHttpRequest;f.open("POST",d,!0),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u+="&client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+e.redirectUri,e.pkceCodeVerifier&&(u+="&code_verifier="+e.pkceCodeVerifier),f.withCredentials=!0,f.onreadystatechange=function(){if(4==f.readyState)if(200==f.status){var e=JSON.parse(f.responseText);h(e.access_token,e.refresh_token,e.id_token,"standard"===n.flow),w()}else n.onAuthError&&n.onAuthError(),t&&t.setError()},f.send(u)}function h(r,i,o,a){g(r,i,o,s=(s+new Date().getTime())/2),l&&n.idTokenParsed&&n.idTokenParsed.nonce!=e.storedNonce?(c("[KEYCLOAK] Invalid nonce, clearing token"),n.clearToken(),t&&t.setError()):a&&(n.onAuthSuccess&&n.onAuthSuccess(),t&&t.setSuccess())}}function p(e){return 0==e.status&&e.responseText&&e.responseURL.startsWith("file:")}function g(e,t,r,i){if(n.tokenTimeoutHandle&&(clearTimeout(n.tokenTimeoutHandle),n.tokenTimeoutHandle=null),t?(n.refreshToken=t,n.refreshTokenParsed=tK(t)):(delete n.refreshToken,delete n.refreshTokenParsed),r?(n.idToken=r,n.idTokenParsed=tK(r)):(delete n.idToken,delete n.idTokenParsed),e){if(n.token=e,n.tokenParsed=tK(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,i&&(n.timeSkew=Math.floor(i/1e3)-n.tokenParsed.iat),null!=n.timeSkew&&(c("[KEYCLOAK] Estimated time difference between browser and server is "+n.timeSkew+" seconds"),n.onTokenExpired)){var o=(n.tokenParsed.exp-new Date().getTime()/1e3+n.timeSkew)*1e3;c("[KEYCLOAK] Token expires in "+Math.round(o/1e3)+" s"),o<=0?n.onTokenExpired():n.tokenTimeoutHandle=setTimeout(n.onTokenExpired,o)}}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=d(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 m(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,i,o=e.indexOf("?"),s=e.indexOf("#");if("query"===n.responseMode&&-1!==o?(r=e.substring(0,o),""!==(i=v(e.substring(o+1,-1!==s?s:e.length),t)).paramsString&&(r+="?"+i.paramsString),-1!==s&&(r+=e.substring(s))):"fragment"===n.responseMode&&-1!==s&&(r=e.substring(0,s),""!==(i=v(e.substring(s+1),t)).paramsString&&(r+="#"+i.paramsString)),i&&i.oauthParams){if("standard"===n.flow||"hybrid"===n.flow){if((i.oauthParams.code||i.oauthParams.error)&&i.oauthParams.state)return i.oauthParams.newUrl=r,i.oauthParams}else if("implicit"===n.flow&&(i.oauthParams.access_token||i.oauthParams.error)&&i.oauthParams.state)return i.oauthParams.newUrl=r,i.oauthParams}}(e);if(t){var i=r.get(t.state);return i&&(t.valid=!0,t.redirectUri=i.redirectUri,t.storedNonce=i.nonce,t.prompt=i.prompt,t.pkceCodeVerifier=i.pkceCodeVerifier,t.loginOptions=i.loginOptions),t}}function v(e,t){for(var r=e.split("&"),n={paramsString:"",oauthParams:{}},i=0;i<r.length;i++){var o=r[i].indexOf("="),s=r[i].slice(0,o);-1!==t.indexOf(s)?n.oauthParams[s]=r[i].slice(o+1):(""!==n.paramsString&&(n.paramsString+="&"),n.paramsString+=r[i])}return n}function b(){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=b();if(!o.enable||o.iframe)return e.setSuccess(),e.promise;var t=document.createElement("iframe");o.iframe=t,t.onload=function(){var t=n.endpoints.authorize();"/"===t.charAt(0)?o.iframeOrigin=window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""):o.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===o.iframeOrigin&&o.iframe.contentWindow===e.source&&("unchanged"==e.data||"changed"==e.data||"error"==e.data)){"unchanged"!=e.data&&n.clearToken();for(var t=o.callbackList.splice(0,o.callbackList.length),r=t.length-1;r>=0;--r){var i=t[r];"error"==e.data?i.setError():i.setSuccess("unchanged"==e.data)}}},!1),e.promise}function w(){o.enable&&n.token&&setTimeout(function(){S().then(function(e){e&&w()})},1e3*o.interval)}function S(){var e=b();if(o.iframe&&o.iframeOrigin){var t=n.clientId+" "+(n.sessionId?n.sessionId:"");o.callbackList.push(e);var r=o.iframeOrigin;1==o.callbackList.length&&o.iframe.contentWindow.postMessage(t,r)}else e.setSuccess();return e.promise}function k(){var e,t,r,i=b();if(o.enable||n.silentCheckSsoRedirectUri){var s=document.createElement("iframe");s.setAttribute("src",n.endpoints.thirdPartyCookiesIframe()),s.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),s.setAttribute("title","keycloak-3p-check-iframe"),s.style.display="none",document.body.appendChild(s);var a=function(e){s.contentWindow===e.source&&("supported"===e.data||"unsupported"===e.data)&&("unsupported"===e.data&&(u("[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"),o.enable=!1,n.silentCheckSsoFallback&&(n.silentCheckSsoRedirectUri=!1)),document.body.removeChild(s),window.removeEventListener("message",a),i.setSuccess())};window.addEventListener("message",a,!1)}else i.setSuccess();return e=i.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)),b().promise},logout:async function(e){if("GET"===(e?.logoutMethod??n.logoutMethod))return void window.location.replace(n.createLogoutUrl(e));let r=n.createLogoutUrl(e),i=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(i.redirected){window.location.href=i.url;return}if(i.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)),b().promise},accountManagement:function(){var e=n.createAccountUrl();if(void 0!==e)window.location.href=e;else throw"Not supported by the OIDC server";return b().promise},redirectUri:function(e,t){return e&&e.redirectUri?e.redirectUri:n.redirectUri?n.redirectUri:location.href}};if("cordova"==e){o.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)},i=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(",")},s=function(){return n.redirectUri||"http://localhost"};return{login:function(e){var t=b(),o=i(e),a=r(n.createLoginUrl(e),"_blank",o),l=!1,c=!1,u=function(){c=!0,a.close()};return a.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(h(m(e.url),t),u(),l=!0)}),a.addEventListener("loaderror",function(e){l||(0==e.url.indexOf(s())?(h(m(e.url),t),u(),l=!0):(t.setError(),u()))}),a.addEventListener("exit",function(e){c||t.setError({reason:"closed_by_user"})}),t.promise},logout:function(e){var t,i=b(),o=r(n.createLogoutUrl(e),"_blank","location=no,hidden=yes,clearcache=yes");return o.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&o.close()}),o.addEventListener("loaderror",function(e){0==e.url.indexOf(s())||(t=!0),o.close()}),o.addEventListener("exit",function(e){t?i.setError():(n.clearToken(),i.setSuccess())}),i.promise},register:function(e){var t=b(),o=r(n.createRegisterUrl(),"_blank",i(e));return o.addEventListener("loadstart",function(e){0==e.url.indexOf(s())&&(o.close(),h(m(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(s())&&t.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(e){return s()}}}if("cordova-native"==e)return o.enable=!1,{login:function(e){var t=b(),r=n.createLoginUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(m(e.url),t)}),window.cordova.plugins.browsertab.openUrl(r),t.promise},logout:function(e){var t=b(),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=b(),r=n.createRegisterUrl(e);return universalLinks.subscribe("keycloak",function(e){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),h(m(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(i){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=i&&["default","cordova","cordova-native"].indexOf(i.adapter)>-1?O(i.adapter):i&&"object"==typeof i.adapter?i.adapter:window.Cordova||window.cordova?O("cordova"):O(),i){if(void 0!==i.useNonce&&(l=i.useNonce),void 0!==i.checkLoginIframe&&(o.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(o.interval=i.checkLoginIframeInterval),"login-required"===i.onLoad&&(n.loginRequired=!0),i.responseMode)if("query"===i.responseMode||"fragment"===i.responseMode)n.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.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=i.flow}if(null!=i.timeSkew&&(n.timeSkew=i.timeSkew),i.redirectUri&&(n.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(n.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),"boolean"==typeof i.silentCheckSsoFallback?n.silentCheckSsoFallback=i.silentCheckSsoFallback:n.silentCheckSsoFallback=!0,void 0!==i.pkceMethod){if("S256"!==i.pkceMethod&&!1!==i.pkceMethod)throw TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${i.pkceMethod}.`);n.pkceMethod=i.pkceMethod}else n.pkceMethod="S256";"boolean"==typeof i.enableLogging?n.enableLogging=i.enableLogging:n.enableLogging=!1,"POST"===i.logoutMethod?n.logoutMethod="POST":n.logoutMethod="GET","string"==typeof i.scope&&(n.scope=i.scope),"string"==typeof i.acrValues&&(n.acrValues=i.acrValues),"number"==typeof i.messageReceiveTimeout&&i.messageReceiveTimeout>0?n.messageReceiveTimeout=i.messageReceiveTimeout:n.messageReceiveTimeout=1e4}n.responseMode||(n.responseMode="fragment"),n.responseType||(n.responseType="code",n.flow="standard");var s=b(),a=b();a.promise.then(function(){n.onReady&&n.onReady(n.authenticated),s.setSuccess(n.authenticated)}).catch(function(e){s.setError(e)});var c=function(){var t=b();function r(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 f()+"/protocol/openid-connect/auth"},token:function(){return f()+"/protocol/openid-connect/token"},logout:function(){return f()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var e=f()+"/protocol/openid-connect/login-status-iframe.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},thirdPartyCookiesIframe:function(){var e=f()+"/protocol/openid-connect/3p-cookies/step1.html";return n.iframeVersion&&(e=e+"?version="+n.iframeVersion),e},register:function(){return f()+"/protocol/openid-connect/registrations"},userinfo:function(){return f()+"/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||p(i)){var e=JSON.parse(i.responseText);n.authServerUrl=e["auth-server-url"],n.realm=e.realm,n.clientId=e.resource,r(null),t.setSuccess()}else t.setError()},i.send()}else{if(!e.clientId)throw"clientId missing";n.clientId=e.clientId;var o=e.oidcProvider;if(o)if("string"==typeof o){var s,a="/"==o.charAt(o.length-1)?o+".well-known/openid-configuration":o+"/.well-known/openid-configuration",i=new XMLHttpRequest;i.open("GET",a,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){4==i.readyState&&(200==i.status||p(i)?(r(JSON.parse(i.responseText)),t.setSuccess()):t.setError())},i.send()}else r(o),t.setSuccess();else{if(!e.url){for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++)if(l[c].src.match(/.*keycloak\.js/)){e.url=l[c].src.substr(0,l[c].src.indexOf("/js/keycloak.js"));break}}if(!e.realm)throw"realm missing";n.authServerUrl=e.url,n.realm=e.realm,r(null),t.setSuccess()}}return t.promise}();function u(){var e=function(e){e||(r.prompt="none"),i&&i.locale&&(r.locale=i.locale),n.login(r).then(function(){a.setSuccess()}).catch(function(e){a.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(m(t.data),a),document.body.removeChild(e),window.removeEventListener("message",r))};window.addEventListener("message",r)},r={};switch(i.onLoad){case"check-sso":o.enable?_().then(function(){S().then(function(r){r?a.setSuccess():n.silentCheckSsoRedirectUri?t():e(!1)}).catch(function(e){a.setError(e)})}):n.silentCheckSsoRedirectUri?t():e(!1);break;case"login-required":e(!0);break;default:throw"Invalid value for onLoad"}}function d(){var e=m(window.location.href);if(e&&window.history.replaceState(window.history.state,null,e.newUrl),e&&e.valid)return _().then(function(){h(e,a)}).catch(function(e){a.setError(e)});i?i.token&&i.refreshToken?(g(i.token,i.refreshToken,i.idToken),o.enable?_().then(function(){S().then(function(e){e?(n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess(),w()):a.setSuccess()}).catch(function(e){a.setError(e)})}):n.updateToken(-1).then(function(){n.onAuthSuccess&&n.onAuthSuccess(),a.setSuccess()}).catch(function(e){n.onAuthError&&n.onAuthError(),i.onLoad?u():a.setError(e)})):i.onLoad?u():a.setSuccess():a.setSuccess()}return c.then(function(){var e,t;(e=b(),t=function(){("interactive"===document.readyState||"complete"===document.readyState)&&(document.removeEventListener("readystatechange",t),e.setSuccess())},document.addEventListener("readystatechange",t),t(),e.promise).then(k).then(d).catch(function(e){s.setError(e)})}),c.catch(function(e){s.setError(e)}),s.promise},n.login=function(e){return t.login(e)},n.createLoginUrl=function(e){var i,o=y(),s=y(),a=t.redirectUri(e),c={state:o,nonce:s,redirectUri:encodeURIComponent(a),loginOptions:e};e&&e.prompt&&(c.prompt=e.prompt),i=e&&"register"==e.action?n.endpoints.register():n.endpoints.authorize();var u=e&&e.scope||n.scope;u?-1===u.indexOf("openid")&&(u="openid "+u):u="openid";var f=i+"?client_id="+encodeURIComponent(n.clientId)+"&redirect_uri="+encodeURIComponent(a)+"&state="+encodeURIComponent(o)+"&response_mode="+encodeURIComponent(n.responseMode)+"&response_type="+encodeURIComponent(n.responseType)+"&scope="+encodeURIComponent(u);if(l&&(f=f+"&nonce="+encodeURIComponent(s)),e&&e.prompt&&(f+="&prompt="+encodeURIComponent(e.prompt)),e&&e.maxAge&&(f+="&max_age="+encodeURIComponent(e.maxAge)),e&&e.loginHint&&(f+="&login_hint="+encodeURIComponent(e.loginHint)),e&&e.idpHint&&(f+="&kc_idp_hint="+encodeURIComponent(e.idpHint)),e&&e.action&&"register"!=e.action&&(f+="&kc_action="+encodeURIComponent(e.action)),e&&e.locale&&(f+="&ui_locales="+encodeURIComponent(e.locale)),e&&e.acr&&(f+="&claims="+encodeURIComponent(JSON.stringify({id_token:{acr:e.acr}}))),(e&&e.acrValues||n.acrValues)&&(f+="&acr_values="+encodeURIComponent(e.acrValues||n.acrValues)),n.pkceMethod){var h=d(96,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");c.pkceCodeVerifier=h,f+="&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(tB.arrayBuffer(t)))).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}(n.pkceMethod,h)+"&code_challenge_method="+n.pkceMethod}return r.add(c),f},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=f(),i=void 0;return void 0!==r&&(i=r+"/account?referrer="+encodeURIComponent(n.clientId)+"&referrer_uri="+encodeURIComponent(t.redirectUri(e))),i},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=f()+"/account",t=new XMLHttpRequest;t.open("GET",e,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+n.token);var r=b();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=b();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=b();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 o="grant_type=refresh_token&refresh_token="+n.refreshToken,s=n.endpoints.token();if(i.push(t),1==i.length){var a=new XMLHttpRequest;a.open("POST",s,!0),a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.withCredentials=!0,o+="&client_id="+encodeURIComponent(n.clientId);var l=new Date().getTime();a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){c("[KEYCLOAK] Token refreshed"),l=(l+new Date().getTime())/2;var e=JSON.parse(a.responseText);g(e.access_token,e.refresh_token,e.id_token,l),n.onAuthRefreshSuccess&&n.onAuthRefreshSuccess();for(var t=i.pop();null!=t;t=i.pop())t.setSuccess(!0)}else{u("[KEYCLOAK] Failed to refresh token"),400==a.status&&n.clearToken(),n.onAuthRefreshError&&n.onAuthRefreshError();for(var t=i.pop();null!=t;t=i.pop())t.setError(!0)}},a.send(o)}}else t.setSuccess(!1)};return o.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 i=JSON.parse(n).expires;(!i||i<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 i=t("kc-callback-"+n);if(r("kc-callback-"+n,"",e(-100)),i)return JSON.parse(i)}},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 i=r[n];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return""},r=function(e,t,r){var n=e+"="+t+"; expires="+r.toUTCString()+"; ";document.cookie=n}};function P(e){return function(){n.enableLogging&&e.apply(console,Array.prototype.slice.call(arguments))}}}var tq=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let t$=e=>t=>class extends t{constructor(){super(...arguments),this._connectRequested=!1,this._status=s.DISCONNECTED,this._statusCallback=e=>this._onEventProviderStatusChanged(e)}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this.connectEvents()}disconnectedCallback(){this.disconnectEvents(),super.disconnectedCallback&&super.disconnectedCallback()}connectEvents(){e.getEventProvider()?this._connectRequested||(this._connectRequested=!0,e.getEventProvider().subscribeStatusChange(this._statusCallback),this._doConnect()):console.log("No event provider available so cannot subscribe")}disconnectEvents(){this._connectRequested&&(this._connectRequested=!1,e.getEventProvider().unsubscribeStatusChange(this._statusCallback),this._onEventsDisconnect())}_doConnect(){return tq(this,void 0,void 0,function*(){this.eventsConnected&&this._onEventsConnect()})}get eventsConnected(){return this._connectRequested&&e.getEventProvider().status===s.CONNECTED}_onEventProviderStatusChanged(e){switch(e){case s.DISCONNECTED:this._onEventsDisconnect();break;case s.CONNECTED:this._doConnect()}}_onEventsConnect(){this._addEventSubscriptions(),this.onEventsConnect()}_onEventsDisconnect(){this._removeEventSubscriptions(),this.onEventsDisconnect()}_addEventSubscriptions(){return tq(this,void 0,void 0,function*(){let t=!!this._attributeRefs,r=!!this._assetIds,n=this._attributeRefs?this._attributeRefs:this._assetIds;if(n&&n.length>0){if(this._subscriptionIds=[],r){let t=yield e.getEventProvider().subscribeAssetEvents(n,!0,e=>this._onEvent(e)),r=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eT(n,r))return void e.getEventProvider().unsubscribe(t);this._subscriptionIds.push(t)}let i=yield e.getEventProvider().subscribeAttributeEvents(n,t,e=>this._onEvent(e)),o=this._attributeRefs?this._attributeRefs:this._assetIds;if(!this._subscriptionIds||!eT(n,o))return void e.getEventProvider().unsubscribe(i);this._subscriptionIds.push(i)}})}_removeEventSubscriptions(){this._subscriptionIds&&(this._subscriptionIds.forEach(t=>{e.getEventProvider().unsubscribe(t)}),this._subscriptionIds=void 0)}_refreshEventSubscriptions(){this._removeEventSubscriptions(),this._addEventSubscriptions()}set assetIds(e){eT(this._assetIds,e)||(this._assetIds=e,this._refreshEventSubscriptions(),this.requestUpdate("assetIds"))}get assetIds(){return this._assetIds}set attributeRefs(e){eT(this._attributeRefs,e)||(this._attributeRefs=e,this._refreshEventSubscriptions())}get attributeRefs(){return this._attributeRefs}_sendEvent(t){e.getEventProvider().sendEvent(t)}_sendEventWithReply(t){return e.getEventProvider().sendEventWithReply(t)}onEventsConnect(){}onEventsDisconnect(){}_onEvent(e){}},tJ="#4d9d2a",tX="#FFFFFF",tZ="#FFFFFF",tQ="#F9F9F9",t0="#CCCCCC",t1="#be0000",t2="#FFFFFF",t5="#4c4c4c",t3="#000000",t6="#000000",t4="#FFFFFF",t8="0 5px 5px -5px rgba(0,0,0,0.3)",t9="0 1px 3px 0 rgba(0,0,0,0.21)";var t7=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})};let re="mdi",rt="openremote",rr="restricted_user";(i=a||(a={})).MANAGER_FAILED_TO_LOAD="MANAGER_FAILED_TO_LOAD",i.AUTH_FAILED="AUTH_FAILED",i.AUTH_TYPE_UNSUPPORTED="AUTH_TYPE_UNSUPPORTED",i.CONSOLE_ERROR="CONSOLE_INIT_ERROR",i.EVENTS_CONNECTION_ERROR="EVENTS_CONNECTION_ERROR",i.TRANSLATION_ERROR="TRANSLATION_ERROR",(o=l||(l={})).ERROR="ERROR",o.READY="READY",o.ONLINE="ONLINE",o.OFFLINE="OFFLINE",o.CONNECTING="CONNECTING",o.CONSOLE_INIT="CONSOLE_INIT",o.CONSOLE_READY="CONSOLE_READY",o.TRANSLATE_INIT="TRANSLATE_INIT",o.TRANSLATE_LANGUAGE_CHANGED="TRANSLATE_LANGUAGE_CHANGED",o.DISPLAY_REALM_CHANGED="DISPLAY_REALM_CHANGED",o.LOGIN="LOGIN";let rn={en:"english",cn:"chinese",cs:"czech",nl:"dutch",fr:"french",de:"german",it:"italian",pl:"polish",pt:"portuguese",ro:"romanian",es:"spanish",uk:"ukrainian"},ri={cn:"zh-cn"};function ro(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=rt),t}class rs{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)}),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 tb()}get language(){return eg.language}set language(e){console.debug(`Changing language to ${e}.`),e&&(eg.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(l.DISPLAY_REALM_CHANGED))}get clientId(){return this._config.clientId||rt}getEventProvider(){return this.events}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 t7(this,void 0,void 0,function*(){this._config&&console.debug("Already initialised"),this._config=ro(e);let t=yield this.loadManagerInfo(),r=new tm(this._config.realm,this._config.consoleAutoEnable,()=>{this._emitEvent(l.CONSOLE_READY)});if(this._console=r,"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,this._config.keycloakUrl=this._authServerUrl):this._authServerUrl.startsWith("http")?this._config.keycloakUrl=this._authServerUrl:((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()}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._ready=!0,this._emitEvent(l.READY)):(this._config=void 0,console.warn("Failed to initialise the manager")),this.displayRealm=e.realm||"master",t)})}loadManagerInfo(){return t7(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(a.MANAGER_FAILED_TO_LOAD),!1}})}doTranslateInit(){return t7(this,void 0,void 0,function*(){if(eg.isInitialized)return!0;eg.on("initialized",e=>{this._emitEvent(l.TRANSLATE_INIT)}),eg.on("languageChanged",e=>{var t;eb().locale(null!=(t=ri[e])?t:e),this._emitEvent(l.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 eg.use(tV).init(e)}catch(e){return console.error(e),this._setError(a.TRANSLATION_ERROR),!1}return!0})}doDescriptorsInit(){return t7(this,void 0,void 0,function*(){if(!this.config.loadDescriptors)return!0;try{let e=yield tb().api.AssetModelResource.getAssetInfos(),t=yield tb().api.AssetModelResource.getMetaItemDescriptors(),r=yield tb().api.AssetModelResource.getValueDescriptors();u.AssetModelUtil._assetTypeInfos=e.data,u.AssetModelUtil._metaItemDescriptors=Object.values(t.data),u.AssetModelUtil._valueDescriptors=Object.values(r.data)}catch(e){return console.error(e),!1}return!0})}doAuthInit(){return t7(this,void 0,void 0,function*(){let e=!0;switch(this._config.auth){case"KEYCLOAK":e=yield this.loadAndInitialiseKeycloak();break;case"NONE":return!0;default:return this._setError(a.AUTH_TYPE_UNSUPPORTED),!1}return!!e&&(tb().addRequestInterceptor(e=>{if(!e.headers.Authorization){let t=this.getAuthorizationHeader();t&&(e.headers.Authorization=t)}return e}),e)})}doRestApiInit(){return tb().setTimeout(2e4),tb().initialise(this.getApiBaseUrl()),!0}doEventsSubscriptionInit(){return t7(this,void 0,void 0,function*(){let e=!1;return"WEBSOCKET"===this._config.eventProviderType&&(this._events=new tx(this._config.managerUrl),this._events.subscribeStatusChange(e=>this._onEventProviderStatusChanged(e)),e=yield this._events.connect()),e||this._setError(a.EVENTS_CONNECTION_ERROR),e})}_connectEvents(){var e;(null==(e=this.events)?void 0:e.status)===s.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(e){switch(e){case s.DISCONNECTED:this._onDisconnect();break;case s.CONNECTED:break;case s.CONNECTING:this._emitEvent(l.CONNECTING)}}doConsoleInit(){return t7(this,void 0,void 0,function*(){try{return yield this.console.initialise(),this._emitEvent(l.CONSOLE_INIT),!0}catch(e){return this._setError(a.CONSOLE_ERROR),!1}})}doIconInit(){this._config.loadIcons&&(tH.IconSets.addIconSet("mdi",(0,tH.createMdiIconSet)(ra.managerUrl)),tH.IconSets.addIconSet("or",(0,tH.createSvgIconSet)(tH.OrIconSet.size,tH.OrIconSet.icons)))}getConsoleAppConfig(){return t7(this,void 0,void 0,function*(){var e;try{let t=yield fetch((null!=(e=ra.managerUrl)?e:"")+"/consoleappconfig/"+ra.displayRealm+".json");return this._consoleAppConfig=yield t.json(),!0}catch(e){return!0}})}getConsolePreferredLanguage(){return t7(this,arguments,void 0,function*(e=this.console){return e.retrieveData("LANGUAGE")})}getUserPreferredLanguage(){return t7(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 t7(this,arguments,void 0,function*(e,t=this.rest){this.authenticated?t?yield t.api.UserResource.updateCurrentUserLocale(e,{headers:{"Content-Type":"application/json"}}):console.warn("Tried updating user language, but the REST API is not initialized yet."):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)))}login(e){if("KEYCLOAK"===this._config.auth&&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)}}isSuperUser(){return!!(this.getRealm()&&"master"===this.getRealm()&&this.hasRealmRole("admin"))}isRestrictedUser(){return!!this.hasRealmRole(rr)}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(){if(this.getKeycloakToken())return"Bearer "+this.getKeycloakToken()}retrieveAuthorizationHeader(){return t7(this,void 0,void 0,function*(){let e=yield this.retrieveKeycloakToken();if(e)return"Bearer "+e})}getKeycloakToken(){if(this.isKeycloak())return this._keycloak.token}retrieveKeycloakToken(){return t7(this,void 0,void 0,function*(){if(this.isKeycloak())return yield this._updateKeycloakAccessToken(),this._keycloak.token})}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 t7(this,void 0,void 0,function*(){var e,t,r,n,i;try{this._keycloak=new tz({clientId:this._config.clientId,realm:this._config.realm,url:this._config.keycloakUrl});let o=yield this._getNativeOfflineRefreshToken(),s=yield this._keycloak.init({checkLoginIframe:!1,onLoad:"check-sso"});if(!s&&o)try{console.error("SETTING OFFLINE TOKEN"),this._keycloak.refreshToken=o,s=yield this._updateKeycloakAccessToken()}catch(e){console.error("Failed to authenticate using offline token")}if(s){this._name=null==(e=this._keycloak.tokenParsed)?void 0:e.name,this._username=null==(t=this._keycloak.tokenParsed)?void 0:t.preferred_username,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(),this._createTokenUpdateInterval();let o=null==(i=this._keycloak.tokenParsed)?void 0:i.session_state;o&&sessionStorage.getItem("or-session")!==o&&(sessionStorage.setItem("or-session",o),this._emitEvent(l.LOGIN))}else if(this.config.autoLogin)return this.login(),!1;return!0}catch(e){return this._authenticated=!1,this._setError(a.AUTH_FAILED),console.error("Failed to initialise Keycloak: "+e),!1}})}_createTokenUpdateInterval(){this._authenticated?this._keycloakUpdateTokenInterval||(this._keycloakUpdateTokenInterval=window.setInterval(()=>t7(this,void 0,void 0,function*(){yield this._updateKeycloakAccessToken().catch(()=>{console.debug("Keycloak failed to refresh the access token"),this._onDisconnect()})}),1e4)):console.warn("User is not authenticated; skipping token update interval creation.")}_updateKeycloakAccessToken(){return t7(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 t7(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(l.ERROR),console.warn("Error set: "+e)}_clearWebHistory(){var e;this.isMobile()&&(null==(e=this.console)||e._doSendGenericMessage("CLEAR_WEB_HISTORY",void 0))}_onDisconnect(){return t7(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(l.OFFLINE),this.reconnect())})}_onReconnected(){console.debug("Reconnected to the Manager."),this._disconnected=!1,this._createTokenUpdateInterval(),this._emitEvent(l.ONLINE)}reconnect(){return t7(this,arguments,void 0,function*(e=3e3){if(console.debug("Checking connection to the Manager..."),!this._disconnected)return void console.debug("Manager is still connected. No action necessary.");console.debug("Manager is disconnected!"),this._reconnectTimer&&(window.clearTimeout(this._reconnectTimer),this._reconnectTimer=void 0);let t=()=>t7(this,void 0,void 0,function*(){var e,t;if(console.debug("Reconnecting to the Manager..."),!this._authenticated){console.debug("User is not authenticated, skipping token refresh");let t=()=>{var e;return(null==(e=this.events)?void 0:e.status)===s.CONNECTED};return t()||(yield null==(e=this.events)?void 0:e.connect()),t()}if(!(yield this.isKeycloakReachable()))return console.error("Keycloak is not reachable. Reconnect attempt failed."),!1;try{yield this._updateKeycloakAccessToken()}catch(t){console.error("Could not update Keycloak access token, attempting again using offline token...",t);let e=yield this._getNativeOfflineRefreshToken();this._keycloak.refreshToken=e,e||console.warn("No offline token was found on this device.");try{yield this._updateKeycloakAccessToken()}catch(e){throw this.login(),Error("Cannot update access token so sending to login")}console.debug("Keycloak access token is valid")}let r=()=>{var e;return(null==(e=this.events)?void 0:e.status)===s.CONNECTED};return r()||(console.debug("Event provider offline, attempting to reconnect using latest auth token."),yield null==(t=this.events)?void 0:t.connect()),r()}),r=yield t();if(void 0!==r){if(!r){e=Math.min(rs.MAX_RECONNECT_DELAY,e+3e3),console.error(`Failed to reconnect to the Manager. Attempting again in ${e}...`),this._reconnectTimer=window.setTimeout(()=>this.reconnect(e),e);return}this._onReconnected()}})}isKeycloakReachable(){return t7(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)}})}}rs.MAX_RECONNECT_DELAY=45e3;let ra=new rs,rl=ra})(),ORCore=n})();