/*! For license information please see web-mone-api.js.LICENSE.txt */ (()=>{var e={736:(e,t,r)=>{var s;e=r.nmd(e);var n=function(e){"use strict";var t=1e7,r=7,s=9007199254740992,o=g(s),i="0123456789abcdefghijklmnopqrstuvwxyz",a="function"==typeof BigInt;function l(e,t,r,s){return void 0===e?l[0]:void 0===t||10==+t&&!r?J(e):z(e,t,r,s)}function c(e,t){this.value=e,this.sign=t,this.isSmall=!1}function u(e){this.value=e,this.sign=e<0,this.isSmall=!0}function h(e){this.value=e}function d(e){return-s0?Math.floor(e):Math.ceil(e)}function b(e,r){var s,n,o=e.length,i=r.length,a=new Array(o),l=0,c=t;for(n=0;n=c?1:0,a[n]=s-l*c;for(;n0&&a.push(l),a}function v(e,t){return e.length>=t.length?b(e,t):b(t,e)}function _(e,r){var s,n,o=e.length,i=new Array(o),a=t;for(n=0;n0;)i[n++]=r%a,r=Math.floor(r/a);return i}function w(e,r){var s,n,o=e.length,i=r.length,a=new Array(o),l=0,c=t;for(s=0;s0;)i[n++]=l%a,l=Math.floor(l/a);return i}function L(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function E(e,t){var r=Math.max(e.length,t.length);if(r<=30)return S(e,t);r=Math.ceil(r/2);var s=e.slice(r),n=e.slice(0,r),o=t.slice(r),i=t.slice(0,r),a=E(n,i),l=E(s,o),c=E(v(n,s),v(i,o)),u=v(v(a,L(w(w(c,a),l),r)),L(l,2*r));return f(u),u}function P(e,r,s){return new c(e=0;--s)o=(i=o*c+e[s])-(n=y(i/r))*r,l[s]=0|n;return[l,0|o]}function C(e,r){var s,n=J(r);if(a)return[new h(e.value/n.value),new h(e.value%n.value)];var o,i=e.value,d=n.value;if(0===d)throw new Error("Cannot divide by zero");if(e.isSmall)return n.isSmall?[new u(y(i/d)),new u(i%d)]:[l[0],e];if(n.isSmall){if(1===d)return[e,l[0]];if(-1==d)return[e.negate(),l[0]];var b=Math.abs(d);if(b=0;n--){for(s=d-1,b[n+h]!==f&&(s=Math.floor((b[n+h]*d+b[n+h-1])/f)),o=0,i=0,l=v.length,a=0;ac&&(o=(o+1)*d),s=Math.ceil(o/i);do{if(j(a=U(r,s),h)<=0)break;s--}while(s);u.push(s),h=w(h,a)}return u.reverse(),[p(u),p(h)]}(i,d),o=s[0];var R=e.sign!==n.sign,S=s[1],L=e.sign;return"number"==typeof o?(R&&(o=-o),o=new u(o)):o=new c(o,R),"number"==typeof S?(L&&(S=-S),S=new u(S)):S=new c(S,L),[o,S]}function j(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function O(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function M(e,t){for(var r,s,o,i=e.prev(),a=i,l=0;a.isEven();)a=a.divide(2),l++;e:for(s=0;s=0?s=w(e,t):(s=w(t,e),r=!r),"number"==typeof(s=p(s))?(r&&(s=-s),new u(s)):new c(s,r)}(r,s,this.sign)},c.prototype.minus=c.prototype.subtract,u.prototype.subtract=function(e){var t=J(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var s=t.value;return t.isSmall?new u(r-s):R(s,Math.abs(r),r>=0)},u.prototype.minus=u.prototype.subtract,h.prototype.subtract=function(e){return new h(this.value-J(e).value)},h.prototype.minus=h.prototype.subtract,c.prototype.negate=function(){return new c(this.value,!this.sign)},u.prototype.negate=function(){var e=this.sign,t=new u(-this.value);return t.sign=!e,t},h.prototype.negate=function(){return new h(-this.value)},c.prototype.abs=function(){return new c(this.value,!1)},u.prototype.abs=function(){return new u(Math.abs(this.value))},h.prototype.abs=function(){return new h(this.value>=0?this.value:-this.value)},c.prototype.multiply=function(e){var r,s,n,o=J(e),i=this.value,a=o.value,u=this.sign!==o.sign;if(o.isSmall){if(0===a)return l[0];if(1===a)return this;if(-1===a)return this.negate();if((r=Math.abs(a))0?E(i,a):S(i,a),u)},c.prototype.times=c.prototype.multiply,u.prototype._multiplyBySmall=function(e){return d(e.value*this.value)?new u(e.value*this.value):P(Math.abs(e.value),g(Math.abs(this.value)),this.sign!==e.sign)},c.prototype._multiplyBySmall=function(e){return 0===e.value?l[0]:1===e.value?this:-1===e.value?this.negate():P(Math.abs(e.value),this.value,this.sign!==e.sign)},u.prototype.multiply=function(e){return J(e)._multiplyBySmall(this)},u.prototype.times=u.prototype.multiply,h.prototype.multiply=function(e){return new h(this.value*J(e).value)},h.prototype.times=h.prototype.multiply,c.prototype.square=function(){return new c(k(this.value),!1)},u.prototype.square=function(){var e=this.value*this.value;return d(e)?new u(e):new c(k(g(Math.abs(this.value))),!1)},h.prototype.square=function(e){return new h(this.value*this.value)},c.prototype.divmod=function(e){var t=C(this,e);return{quotient:t[0],remainder:t[1]}},h.prototype.divmod=u.prototype.divmod=c.prototype.divmod,c.prototype.divide=function(e){return C(this,e)[0]},h.prototype.over=h.prototype.divide=function(e){return new h(this.value/J(e).value)},u.prototype.over=u.prototype.divide=c.prototype.over=c.prototype.divide,c.prototype.mod=function(e){return C(this,e)[1]},h.prototype.mod=h.prototype.remainder=function(e){return new h(this.value%J(e).value)},u.prototype.remainder=u.prototype.mod=c.prototype.remainder=c.prototype.mod,c.prototype.pow=function(e){var t,r,s,n=J(e),o=this.value,i=n.value;if(0===i)return l[1];if(0===o)return l[0];if(1===o)return l[1];if(-1===o)return n.isEven()?l[1]:l[-1];if(n.sign)return l[0];if(!n.isSmall)throw new Error("The exponent "+n.toString()+" is too large.");if(this.isSmall&&d(t=Math.pow(o,i)))return new u(y(t));for(r=this,s=l[1];!0&i&&(s=s.times(r),--i),0!==i;)i/=2,r=r.square();return s},u.prototype.pow=c.prototype.pow,h.prototype.pow=function(e){var t=J(e),r=this.value,s=t.value,n=BigInt(0),o=BigInt(1),i=BigInt(2);if(s===n)return l[1];if(r===n)return l[0];if(r===o)return l[1];if(r===BigInt(-1))return t.isEven()?l[1]:l[-1];if(t.isNegative())return new h(n);for(var a=this,c=l[1];(s&o)===o&&(c=c.times(a),--s),s!==n;)s/=i,a=a.square();return c},c.prototype.modPow=function(e,t){if(e=J(e),(t=J(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=l[1],s=this.mod(t);for(e.isNegative()&&(e=e.multiply(l[-1]),s=s.modInv(t));e.isPositive();){if(s.isZero())return l[0];e.isOdd()&&(r=r.multiply(s).mod(t)),e=e.divide(2),s=s.square().mod(t)}return r},h.prototype.modPow=u.prototype.modPow=c.prototype.modPow,c.prototype.compareAbs=function(e){var t=J(e),r=this.value,s=t.value;return t.isSmall?1:j(r,s)},u.prototype.compareAbs=function(e){var t=J(e),r=Math.abs(this.value),s=t.value;return t.isSmall?r===(s=Math.abs(s))?0:r>s?1:-1:-1},h.prototype.compareAbs=function(e){var t=this.value,r=J(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},c.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=J(e),r=this.value,s=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:j(r,s)*(this.sign?-1:1)},c.prototype.compareTo=c.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=J(e),r=this.value,s=t.value;return t.isSmall?r==s?0:r>s?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},u.prototype.compareTo=u.prototype.compare,h.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=J(e).value;return t===r?0:t>r?1:-1},h.prototype.compareTo=h.prototype.compare,c.prototype.equals=function(e){return 0===this.compare(e)},h.prototype.eq=h.prototype.equals=u.prototype.eq=u.prototype.equals=c.prototype.eq=c.prototype.equals,c.prototype.notEquals=function(e){return 0!==this.compare(e)},h.prototype.neq=h.prototype.notEquals=u.prototype.neq=u.prototype.notEquals=c.prototype.neq=c.prototype.notEquals,c.prototype.greater=function(e){return this.compare(e)>0},h.prototype.gt=h.prototype.greater=u.prototype.gt=u.prototype.greater=c.prototype.gt=c.prototype.greater,c.prototype.lesser=function(e){return this.compare(e)<0},h.prototype.lt=h.prototype.lesser=u.prototype.lt=u.prototype.lesser=c.prototype.lt=c.prototype.lesser,c.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},h.prototype.geq=h.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals,c.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},h.prototype.leq=h.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals,c.prototype.isEven=function(){return 0==(1&this.value[0])},u.prototype.isEven=function(){return 0==(1&this.value)},h.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},c.prototype.isOdd=function(){return 1==(1&this.value[0])},u.prototype.isOdd=function(){return 1==(1&this.value)},h.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},c.prototype.isPositive=function(){return!this.sign},u.prototype.isPositive=function(){return this.value>0},h.prototype.isPositive=u.prototype.isPositive,c.prototype.isNegative=function(){return this.sign},u.prototype.isNegative=function(){return this.value<0},h.prototype.isNegative=u.prototype.isNegative,c.prototype.isUnit=function(){return!1},u.prototype.isUnit=function(){return 1===Math.abs(this.value)},h.prototype.isUnit=function(){return this.abs().value===BigInt(1)},c.prototype.isZero=function(){return!1},u.prototype.isZero=function(){return 0===this.value},h.prototype.isZero=function(){return this.value===BigInt(0)},c.prototype.isDivisibleBy=function(e){var t=J(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},h.prototype.isDivisibleBy=u.prototype.isDivisibleBy=c.prototype.isDivisibleBy,c.prototype.isPrime=function(t){var r=O(this);if(r!==e)return r;var s=this.abs(),o=s.bitLength();if(o<=64)return M(s,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var i=Math.log(2)*o.toJSNumber(),a=Math.ceil(!0===t?2*Math.pow(i,2):i),l=[],c=0;c-s?new u(e-1):new c(o,!0)},h.prototype.prev=function(){return new h(this.value-BigInt(1))};for(var A=[1];2*A[A.length-1]<=t;)A.push(2*A[A.length-1]);var D=A.length,$=A[D-1];function N(e){return Math.abs(e)<=t}function I(e,t,r){t=J(t);for(var s=e.isNegative(),o=t.isNegative(),i=s?e.not():e,a=o?t.not():t,l=0,c=0,u=null,h=null,d=[];!i.isZero()||!a.isZero();)l=(u=C(i,$))[1].toJSNumber(),s&&(l=$-1-l),c=(h=C(a,$))[1].toJSNumber(),o&&(c=$-1-c),i=u[0],a=h[0],d.push(r(l,c));for(var g=0!==r(s?1:0,o?1:0)?n(-1):n(0),p=d.length-1;p>=0;p-=1)g=g.multiply($).add(n(d[p]));return g}c.prototype.shiftLeft=function(e){var t=J(e).toJSNumber();if(!N(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=D;)r=r.multiply($),t-=D-1;return r.multiply(A[t])},h.prototype.shiftLeft=u.prototype.shiftLeft=c.prototype.shiftLeft,c.prototype.shiftRight=function(e){var t,r=J(e).toJSNumber();if(!N(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var s=this;r>=D;){if(s.isZero()||s.isNegative()&&s.isUnit())return s;s=(t=C(s,$))[1].isNegative()?t[0].prev():t[0],r-=D-1}return(t=C(s,A[r]))[1].isNegative()?t[0].prev():t[0]},h.prototype.shiftRight=u.prototype.shiftRight=c.prototype.shiftRight,c.prototype.not=function(){return this.negate().prev()},h.prototype.not=u.prototype.not=c.prototype.not,c.prototype.and=function(e){return I(this,e,(function(e,t){return e&t}))},h.prototype.and=u.prototype.and=c.prototype.and,c.prototype.or=function(e){return I(this,e,(function(e,t){return e|t}))},h.prototype.or=u.prototype.or=c.prototype.or,c.prototype.xor=function(e){return I(this,e,(function(e,t){return e^t}))},h.prototype.xor=u.prototype.xor=c.prototype.xor;var W=1<<30,x=(t&-t)*(t&-t)|W;function Y(e){var r=e.value,s="number"==typeof r?r|W:"bigint"==typeof r?r|BigInt(W):r[0]+r[1]*t|x;return s&-s}function B(e,t){if(t.compareTo(e)<=0){var r=B(e,t.square(t)),s=r.p,o=r.e,i=s.multiply(t);return i.compareTo(e)<=0?{p:i,e:2*o+1}:{p:s,e:2*o}}return{p:n(1),e:0}}function G(e,t){return e=J(e),t=J(t),e.greater(t)?e:t}function F(e,t){return e=J(e),t=J(t),e.lesser(t)?e:t}function H(e,t){if(e=J(e).abs(),t=J(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,s,n=l[1];e.isEven()&&t.isEven();)r=F(Y(e),Y(t)),e=e.divide(r),t=t.divide(r),n=n.multiply(r);for(;e.isEven();)e=e.divide(Y(e));do{for(;t.isEven();)t=t.divide(Y(t));e.greater(t)&&(s=t,t=e,e=s),t=t.subtract(e)}while(!t.isZero());return n.isUnit()?e:e.multiply(n)}c.prototype.bitLength=function(){var e=this;return e.compareTo(n(0))<0&&(e=e.negate().subtract(n(1))),0===e.compareTo(n(0))?n(0):n(B(e,n(2)).e).add(n(1))},h.prototype.bitLength=u.prototype.bitLength=c.prototype.bitLength;var z=function(e,t,r,s){r=r||i,e=String(e),s||(e=e.toLowerCase(),r=r.toLowerCase());var n,o=e.length,a=Math.abs(t),l={};for(n=0;n=a){if("1"===h&&1===a)continue;throw new Error(h+" is not a valid digit in base "+t+".")}t=J(t);var c=[],u="-"===e[0];for(n=u?1:0;n"!==e[n]&&n=0;s--)n=n.add(e[s].times(o)),o=o.times(t);return r?n.negate():n}function V(e,t){if((t=n(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var s=!1;if(e.isNegative()&&t.isPositive()&&(s=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:s};for(var o,i=[],a=e;a.isNegative()||a.compareAbs(t)>=0;){o=a.divmod(t),a=o.quotient;var l=o.remainder;l.isNegative()&&(l=t.minus(l).abs(),a=a.next()),i.push(l.toJSNumber())}return i.push(a.toJSNumber()),{value:i.reverse(),isNegative:s}}function Z(e,t,r){var s=V(e,t);return(s.isNegative?"-":"")+s.value.map((function(e){return function(e,t){return e<(t=t||i).length?t[e]:"<"+e+">"}(e,r)})).join("")}function K(e){if(d(+e)){var t=+e;if(t===y(t))return a?new h(BigInt(t)):new u(t);throw new Error("Invalid integer: "+e)}var s="-"===e[0];s&&(e=e.slice(1));var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var o=n[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==y(o)||!d(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var i=n[0],l=i.indexOf(".");if(l>=0&&(o-=i.length-l-1,i=i.slice(0,l)+i.slice(l+1)),o<0)throw new Error("Cannot include negative exponent part for integers");e=i+=new Array(o+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(a)return new h(BigInt(s?"-"+e:e));for(var g=[],p=e.length,m=r,b=p-m;p>0;)g.push(+e.slice(b,p)),(b-=m)<0&&(b=0),p-=m;return f(g),new c(g,s)}function J(e){return"number"==typeof e?function(e){if(a)return new h(BigInt(e));if(d(e)){if(e!==y(e))throw new Error(e+" is not an integer.");return new u(e)}return K(e.toString())}(e):"string"==typeof e?K(e):"bigint"==typeof e?new h(e):e}c.prototype.toArray=function(e){return V(this,e)},u.prototype.toArray=function(e){return V(this,e)},h.prototype.toArray=function(e){return V(this,e)},c.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t)return Z(this,t,r);for(var s,n=this.value,o=n.length,i=String(n[--o]);--o>=0;)s=String(n[o]),i+="0000000".slice(s.length)+s;return(this.sign?"-":"")+i},u.prototype.toString=function(t,r){return t===e&&(t=10),10!=t?Z(this,t,r):String(this.value)},h.prototype.toString=u.prototype.toString,h.prototype.toJSON=c.prototype.toJSON=u.prototype.toJSON=function(){return this.toString()},c.prototype.valueOf=function(){return parseInt(this.toString(),10)},c.prototype.toJSNumber=c.prototype.valueOf,u.prototype.valueOf=function(){return this.value},u.prototype.toJSNumber=u.prototype.valueOf,h.prototype.valueOf=h.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var X=0;X<1e3;X++)l[X]=J(X),X>0&&(l[-X]=J(-X));return l.one=l[1],l.zero=l[0],l.minusOne=l[-1],l.max=G,l.min=F,l.gcd=H,l.lcm=function(e,t){return e=J(e).abs(),t=J(t).abs(),e.divide(H(e,t)).multiply(t)},l.isInstance=function(e){return e instanceof c||e instanceof u||e instanceof h},l.randBetween=function(e,r,s){e=J(e),r=J(r);var n=s||Math.random,o=F(e,r),i=G(e,r).subtract(o).add(1);if(i.isSmall)return o.add(Math.floor(n()*i));for(var a=V(i,t).value,c=[],u=!0,h=0;h>>2];e.sigBytes-=t}},o.BlockCipher=d.extend({cfg:d.cfg.extend({mode:f,padding:m}),reset:function(){var e;d.reset.call(this);var t=this.cfg,r=t.iv,s=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=s.createEncryptor:(e=s.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(s,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),y=o.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),b=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),s=r.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a.create(s.slice(2,4)),s.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},v=o.SerializableCipher=i.extend({cfg:i.extend({format:b}),encrypt:function(e,t,r,s){s=this.cfg.extend(s);var n=e.createEncryptor(r,s),o=n.finalize(t),i=n.cfg;return y.create({ciphertext:o,key:r,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:s.format})},decrypt:function(e,t,r,s){return s=this.cfg.extend(s),t=this._parse(t,s.format),e.createDecryptor(r,s).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(n.kdf={}).OpenSSL={execute:function(e,t,r,s){s||(s=a.random(8));var n=h.create({keySize:t+r}).compute(e,s),o=a.create(n.words.slice(t),4*r);return n.sigBytes=4*t,y.create({key:n,iv:o,salt:s})}},w=o.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:_}),encrypt:function(e,t,r,s){var n=(s=this.cfg.extend(s)).kdf.execute(r,e.keySize,e.ivSize);s.iv=n.iv;var o=v.encrypt.call(this,e,t,n.key,s);return o.mixIn(n),o},decrypt:function(e,t,r,s){s=this.cfg.extend(s),t=this._parse(t,s.format);var n=s.kdf.execute(r,e.keySize,e.ivSize,t.salt);return s.iv=n.iv,v.decrypt.call(this,e,t,n.key,s)}}))))},249:function(e,t,r){var s;e.exports=(s=s||function(e,t){var s;if("undefined"!=typeof window&&window.crypto&&(s=window.crypto),"undefined"!=typeof self&&self.crypto&&(s=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(s=globalThis.crypto),!s&&"undefined"!=typeof window&&window.msCrypto&&(s=window.msCrypto),!s&&void 0!==r.g&&r.g.crypto&&(s=r.g.crypto),!s)try{s=r(480)}catch(e){}var n=function(){if(s){if("function"==typeof s.getRandomValues)try{return s.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof s.randomBytes)try{return s.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},l=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=l.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,r=e.words,s=this.sigBytes,n=e.sigBytes;if(this.clamp(),s%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[s+o>>>2]|=i<<24-(s+o)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;s.push((o>>>4).toString(16)),s.push((15&o).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,r=[],s=0;s>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new c.init(r,t/2)}},d=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,s=[],n=0;n>>2]>>>24-n%4*8&255;s.push(String.fromCharCode(o))}return s.join("")},parse:function(e){for(var t=e.length,r=[],s=0;s>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new c.init(r,t)}},g=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=g.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,s=this._data,n=s.words,o=s.sigBytes,i=this.blockSize,a=o/(4*i),l=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*i,u=e.min(4*l,o);if(l){for(var h=0;h>>7)^(p<<14|p>>>18)^p>>>3,m=c[g-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[g]=f+c[g-7]+y+c[g-16]}var b=s&n^s&o^n&o,v=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),_=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&h)+l[g]+c[g];d=h,h=u,u=a,a=i+_|0,i=o,o=n,n=s,s=_+(v+b)|0}r[0]=r[0]+s|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+i|0,r[4]=r[4]+a|0,r[5]=r[5]+u|0,r[6]=r[6]+h|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,s=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(s/4294967296),r[15+(n+64>>>9<<4)]=s,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),s.SHA256)},253:function(e,t,r){var s;e.exports=(s=r(249),r(18),r(491),r(851),r(109),function(){var e=s,t=e.lib,r=t.WordArray,n=t.BlockCipher,o=e.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=n.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var s=i[r]-1;t[r]=e[s>>>5]>>>31-s%32&1}for(var n=this._subKeys=[],o=0;o<16;o++){var c=n[o]=[],u=l[o];for(r=0;r<24;r++)c[r/6|0]|=t[(a[r]-1+u)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(a[r+24]-1+u)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=n[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),d.call(this,1,1431655765);for(var s=0;s<16;s++){for(var n=r[s],o=this._lBlock,i=this._rBlock,a=0,l=0;l<8;l++)a|=c[l][((i^n[l])&u[l])>>>0];this._lBlock=i,this._rBlock=o^a}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),s=e.length<4?e.slice(0,2):e.slice(2,4),n=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(r.create(t)),this._des2=h.createEncryptor(r.create(s)),this._des3=h.createEncryptor(r.create(n))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=n._createHelper(p)}(),s.TripleDES)},938:function(e,t,r){var s,n,o,i,a,l;e.exports=(s=r(249),o=(n=s).lib,i=o.Base,a=o.WordArray,(l=n.x64={}).Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),l.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],s=0;s{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=674,e.exports=t},381:function(e,t,r){(e=r.nmd(e)).exports=function(){"use strict";var t,s;function n(){return t.apply(null,arguments)}function o(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 a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var r,s=[],n=e.length;for(r=0;r>>0;for(t=0;t0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var O=/(\[[^\[]*\])|(\\)?([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,M=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},D={};function $(e,t,r,s){var n=s;"string"==typeof s&&(n=function(){return this[s]()}),e&&(D[e]=n),t&&(D[t[0]]=function(){return j(n.apply(this,arguments),t[1],t[2])}),r&&(D[r]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function N(e,t){return e.isValid()?(t=I(t,e.localeData()),A[t]=A[t]||function(e){var t,r,s,n=e.match(O);for(t=0,r=n.length;t=0&&M.test(e);)e=e.replace(M,s),M.lastIndex=0,r-=1;return e}var W={};function x(e,t){var r=e.toLowerCase();W[r]=W[r+"s"]=W[t]=e}function Y(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function B(e){var t,r,s={};for(r in e)a(e,r)&&(t=Y(r))&&(s[t]=e[r]);return s}var G={};function F(e,t){G[e]=t}function H(e){return e%4==0&&e%100!=0||e%400==0}function z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=z(t)),r}function V(e,t){return function(r){return null!=r?(K(this,e,r),n.updateOffset(this,t),this):Z(this,e)}}function Z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&H(e.year())&&1===e.month()&&29===e.date()?(r=q(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),je(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}var J,X=/\d/,Q=/\d\d/,ee=/\d{3}/,te=/\d{4}/,re=/[+-]?\d{6}/,se=/\d\d?/,ne=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,ae=/\d{1,4}/,le=/[+-]?\d{1,6}/,ce=/\d+/,ue=/[+-]?\d+/,he=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,ge=/[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;function pe(e,t,r){J[e]=k(t)?t:function(e,s){return e&&r?r:t}}function fe(e,t){return a(J,e)?J[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,s,n){return t||r||s||n}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}J={};var ye={};function be(e,t){var r,s,n=t;for("string"==typeof e&&(e=[e]),u(t)&&(n=function(e,r){r[t]=q(e)}),s=e.length,r=0;r68?1900:2e3)};var Be=V("FullYear",!0);function Ge(e,t,r,s,n,o,i){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,s,n,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,s,n,o,i),a}function Fe(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function He(e,t,r){var s=7+t-r;return-(7+Fe(e,0,s).getUTCDay()-t)%7+s-1}function ze(e,t,r,s,n){var o,i,a=1+7*(t-1)+(7+r-s)%7+He(e,s,n);return a<=0?i=Ye(o=e-1)+a:a>Ye(e)?(o=e+1,i=a-Ye(e)):(o=e,i=a),{year:o,dayOfYear:i}}function qe(e,t,r){var s,n,o=He(e.year(),t,r),i=Math.floor((e.dayOfYear()-o-1)/7)+1;return i<1?s=i+Ve(n=e.year()-1,t,r):i>Ve(e.year(),t,r)?(s=i-Ve(e.year(),t,r),n=e.year()+1):(n=e.year(),s=i),{week:s,year:n}}function Ve(e,t,r){var s=He(e,t,r),n=He(e+1,t,r);return(Ye(e)-s+n)/7}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),x("week","w"),x("isoWeek","W"),F("week",5),F("isoWeek",5),pe("w",se),pe("ww",se,Q),pe("W",se),pe("WW",se,Q),ve(["w","ww","W","WW"],(function(e,t,r,s){t[s.substr(0,1)]=q(e)}));function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("d",0,"do","day"),$("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),$("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),$("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),x("day","d"),x("weekday","e"),x("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),pe("d",se),pe("e",se),pe("E",se),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,r,s){var n=r._locale.weekdaysParse(e,s,r._strict);null!=n?t.d=n:f(r).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,r,s){t[s]=q(e)}));var Ke="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qe=ge,et=ge,tt=ge;function rt(e,t,r){var s,n,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)o=p([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(n=we.call(this._weekdaysParse,i))?n:null:"ddd"===t?-1!==(n=we.call(this._shortWeekdaysParse,i))?n:null:-1!==(n=we.call(this._minWeekdaysParse,i))?n:null:"dddd"===t?-1!==(n=we.call(this._weekdaysParse,i))||-1!==(n=we.call(this._shortWeekdaysParse,i))||-1!==(n=we.call(this._minWeekdaysParse,i))?n:null:"ddd"===t?-1!==(n=we.call(this._shortWeekdaysParse,i))||-1!==(n=we.call(this._weekdaysParse,i))||-1!==(n=we.call(this._minWeekdaysParse,i))?n:null:-1!==(n=we.call(this._minWeekdaysParse,i))||-1!==(n=we.call(this._weekdaysParse,i))||-1!==(n=we.call(this._shortWeekdaysParse,i))?n:null}function st(){function e(e,t){return t.length-e.length}var t,r,s,n,o,i=[],a=[],l=[],c=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),s=me(this.weekdaysMin(r,"")),n=me(this.weekdaysShort(r,"")),o=me(this.weekdays(r,"")),i.push(s),a.push(n),l.push(o),c.push(s),c.push(n),c.push(o);i.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function nt(){return this.hours()%12||12}function ot(e,t){$(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,nt),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+nt.apply(this)+j(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+nt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),ot("a",!0),ot("A",!1),x("hour","h"),F("hour",13),pe("a",it),pe("A",it),pe("H",se),pe("h",se),pe("k",se),pe("HH",se,Q),pe("hh",se,Q),pe("kk",se,Q),pe("hmm",ne),pe("hmmss",oe),pe("Hmm",ne),pe("Hmmss",oe),be(["H","HH"],Le),be(["k","kk"],(function(e,t,r){var s=q(e);t[Le]=24===s?0:s})),be(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),be(["h","hh"],(function(e,t,r){t[Le]=q(e),f(r).bigHour=!0})),be("hmm",(function(e,t,r){var s=e.length-2;t[Le]=q(e.substr(0,s)),t[Ee]=q(e.substr(s)),f(r).bigHour=!0})),be("hmmss",(function(e,t,r){var s=e.length-4,n=e.length-2;t[Le]=q(e.substr(0,s)),t[Ee]=q(e.substr(s,2)),t[Pe]=q(e.substr(n)),f(r).bigHour=!0})),be("Hmm",(function(e,t,r){var s=e.length-2;t[Le]=q(e.substr(0,s)),t[Ee]=q(e.substr(s))})),be("Hmmss",(function(e,t,r){var s=e.length-4,n=e.length-2;t[Le]=q(e.substr(0,s)),t[Ee]=q(e.substr(s,2)),t[Pe]=q(e.substr(n))}));var at=V("Hours",!0);var lt,ct={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:Oe,monthsShort:Me,week:{dow:0,doy:6},weekdays:Ke,weekdaysMin:Xe,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},ut={},ht={};function dt(e,t){var r,s=Math.min(e.length,t.length);for(r=0;r0;){if(s=pt(n.slice(0,t).join("-")))return s;if(r&&r.length>=t&&dt(n,r)>=t-1)break;t--}o++}return lt}(e)}function bt(e){var t,r=e._a;return r&&-2===f(e).overflow&&(t=r[Se]<0||r[Se]>11?Se:r[Ue]<1||r[Ue]>je(r[Re],r[Se])?Ue:r[Le]<0||r[Le]>24||24===r[Le]&&(0!==r[Ee]||0!==r[Pe]||0!==r[ke])?Le:r[Ee]<0||r[Ee]>59?Ee:r[Pe]<0||r[Pe]>59?Pe:r[ke]<0||r[ke]>999?ke:-1,f(e)._overflowDayOfYear&&(tUe)&&(t=Ue),f(e)._overflowWeeks&&-1===t&&(t=Te),f(e)._overflowWeekday&&-1===t&&(t=Ce),f(e).overflow=t),e}var vt=/^\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)?)?$/,_t=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,Rt=[["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]],St=[["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/]],Ut=/^\/?Date\((-?\d+)/i,Lt=/^(?:(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}))$/,Et={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pt(e){var t,r,s,n,o,i,a=e._i,l=vt.exec(a)||_t.exec(a),c=Rt.length,u=St.length;if(l){for(f(e).iso=!0,t=0,r=c;t7)&&(l=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,c=qe(Dt(),o,i),r=Ct(t.gg,e._a[Re],c.year),s=Ct(t.w,c.week),null!=t.d?((n=t.d)<0||n>6)&&(l=!0):null!=t.e?(n=t.e+o,(t.e<0||t.e>6)&&(l=!0)):n=o),s<1||s>Ve(r,o,i)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(a=ze(r,s,n,o,i),e._a[Re]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(i=Ct(e._a[Re],s[Re]),(e._dayOfYear>Ye(i)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),r=Fe(i,0,e._dayOfYear),e._a[Se]=r.getUTCMonth(),e._a[Ue]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Le]&&0===e._a[Ee]&&0===e._a[Pe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Le]=0),e._d=(e._useUTC?Fe:Ge).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Le]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(f(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],f(e).empty=!0;var t,r,s,o,i,a,l,c=""+e._i,u=c.length,h=0;for(l=(s=I(e._f,e._locale).match(O)||[]).length,t=0;t0&&f(e).unusedInput.push(i),c=c.slice(c.indexOf(r)+r.length),h+=r.length),D[o]?(r?f(e).empty=!1:f(e).unusedTokens.push(o),_e(o,r,e)):e._strict&&!r&&f(e).unusedTokens.push(o);f(e).charsLeftOver=u-h,c.length>0&&f(e).unusedInput.push(c),e._a[Le]<=12&&!0===f(e).bigHour&&e._a[Le]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Le]=function(e,t,r){var s;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((s=e.isPM(r))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[Le],e._meridiem),null!==(a=f(e).era)&&(e._a[Re]=e._locale.erasConvertYear(a,e._a[Re])),jt(e),bt(e)}else Tt(e);else Pt(e)}function Mt(e){var t=e._i,r=e._f;return e._locale=e._locale||yt(e._l),null===t||void 0===r&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),R(t)?new w(bt(t)):(h(t)?e._d=t:o(r)?function(e){var t,r,s,n,o,i,a=!1,l=e._f.length;if(0===l)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;nthis?this:e:y()}));function It(e,t){var r,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Dt();for(r=t[0],s=1;s=0?new Date(e+400,t,r)-gr:new Date(e,t,r).valueOf()}function mr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-gr:Date.UTC(e,t,r)}function yr(e,t){return t.erasAbbrRegex(e)}function br(){var e,t,r=[],s=[],n=[],o=[],i=this.eras();for(e=0,t=i.length;e(o=Ve(e,s,n))&&(t=o),wr.call(this,e,t,r,s,n))}function wr(e,t,r,s,n){var o=ze(e,t,r,s,n),i=Fe(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),pe("N",yr),pe("NN",yr),pe("NNN",yr),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,s){var n=r._locale.erasParse(e,s,r._strict);n?f(r).era=n:f(r).invalidEra=e})),pe("y",ce),pe("yy",ce),pe("yyy",ce),pe("yyyy",ce),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||ce})),be(["y","yy","yyy","yyyy"],Re),be(["yo"],(function(e,t,r,s){var n;r._locale._eraYearOrdinalRegex&&(n=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Re]=r._locale.eraYearOrdinalParse(e,n):t[Re]=parseInt(e,10)})),$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),vr("gggg","weekYear"),vr("ggggg","weekYear"),vr("GGGG","isoWeekYear"),vr("GGGGG","isoWeekYear"),x("weekYear","gg"),x("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),pe("G",ue),pe("g",ue),pe("GG",se,Q),pe("gg",se,Q),pe("GGGG",ae,te),pe("gggg",ae,te),pe("GGGGG",le,re),pe("ggggg",le,re),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,s){t[s.substr(0,2)]=q(e)})),ve(["gg","GG"],(function(e,t,r,s){t[s]=n.parseTwoDigitYear(e)})),$("Q",0,"Qo","quarter"),x("quarter","Q"),F("quarter",7),pe("Q",X),be("Q",(function(e,t){t[Se]=3*(q(e)-1)})),$("D",["DD",2],"Do","date"),x("date","D"),F("date",9),pe("D",se),pe("DD",se,Q),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],Ue),be("Do",(function(e,t){t[Ue]=q(e.match(se)[0])}));var Rr=V("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),x("dayOfYear","DDD"),F("dayOfYear",4),pe("DDD",ie),pe("DDDD",ee),be(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=q(e)})),$("m",["mm",2],0,"minute"),x("minute","m"),F("minute",14),pe("m",se),pe("mm",se,Q),be(["m","mm"],Ee);var Sr=V("Minutes",!1);$("s",["ss",2],0,"second"),x("second","s"),F("second",15),pe("s",se),pe("ss",se,Q),be(["s","ss"],Pe);var Ur,Lr,Er=V("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),x("millisecond","ms"),F("millisecond",16),pe("S",ie,X),pe("SS",ie,Q),pe("SSS",ie,ee),Ur="SSSS";Ur.length<=9;Ur+="S")pe(Ur,ce);function Pr(e,t){t[ke]=q(1e3*("0."+e))}for(Ur="S";Ur.length<=9;Ur+="S")be(Ur,Pr);Lr=V("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var kr=w.prototype;function Tr(e){return e}kr.add=rr,kr.calendar=function(e,t){1===arguments.length&&(arguments[0]?or(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,r=i(e)&&!l(e),s=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;tr.valueOf():r.valueOf()9999?N(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",N(r,"Z")):N(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},kr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,s="moment",n="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",r=n+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(kr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),kr.toJSON=function(){return this.isValid()?this.toISOString():null},kr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},kr.unix=function(){return Math.floor(this.valueOf()/1e3)},kr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},kr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},kr.eraName=function(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},kr.isLocal=function(){return!!this.isValid()&&!this._isUTC},kr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},kr.isUtc=Vt,kr.isUTC=Vt,kr.zoneAbbr=function(){return this._isUTC?"UTC":""},kr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},kr.dates=U("dates accessor is deprecated. Use date instead.",Rr),kr.months=U("months accessor is deprecated. Use month instead",We),kr.years=U("years accessor is deprecated. Use year instead",Be),kr.zone=U("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()})),kr.isDSTShifted=U("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Mt(t))._a?(e=t._isUTC?p(t._a):Dt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,r){var s,n=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(s=0;s0):this._isDSTShifted=!1,this._isDSTShifted}));var Cr=C.prototype;function jr(e,t,r,s){var n=yt(),o=p().set(s,t);return n[r](o,e)}function Or(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return jr(e,t,r,"month");var s,n=[];for(s=0;s<12;s++)n[s]=jr(e,s,r,"month");return n}function Mr(e,t,r,s){"boolean"==typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var n,o=yt(),i=e?o._week.dow:0,a=[];if(null!=r)return jr(t,(r+i)%7,s,"day");for(n=0;n<7;n++)a[n]=jr(t,(n+i)%7,s,"day");return a}Cr.calendar=function(e,t,r){var s=this._calendar[e]||this._calendar.sameElse;return k(s)?s.call(t,r):s},Cr.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Cr.invalidDate=function(){return this._invalidDate},Cr.ordinal=function(e){return this._ordinal.replace("%d",e)},Cr.preparse=Tr,Cr.postformat=Tr,Cr.relativeTime=function(e,t,r,s){var n=this._relativeTime[r];return k(n)?n(e,t,r,s):n.replace(/%d/i,e)},Cr.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return k(r)?r(t):r.replace(/%s/i,t)},Cr.set=function(e){var t,r;for(r in e)a(e,r)&&(k(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Cr.eras=function(e,t){var r,s,o,i=this._eras||yt("en")._eras;for(r=0,s=i.length;r=0)return l[s]},Cr.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r},Cr.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||br.call(this),e?this._erasAbbrRegex:this._erasRegex},Cr.erasNameRegex=function(e){return a(this,"_erasNameRegex")||br.call(this),e?this._erasNameRegex:this._erasRegex},Cr.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||br.call(this),e?this._erasNarrowRegex:this._erasRegex},Cr.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ae).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},Cr.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ae.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Cr.monthsParse=function(e,t,r){var s,n,o;if(this._monthsParseExact)return Ne.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=p([2e3,s]),r&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),r||this._monthsParse[s]||(o="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(r&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!r&&this._monthsParse[s].test(e))return s}},Cr.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||xe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=$e),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Cr.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||xe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=De),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Cr.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Cr.firstDayOfYear=function(){return this._week.doy},Cr.firstDayOfWeek=function(){return this._week.dow},Cr.weekdays=function(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ze(r,this._week.dow):e?r[e.day()]:r},Cr.weekdaysMin=function(e){return!0===e?Ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Cr.weekdaysShort=function(e){return!0===e?Ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Cr.weekdaysParse=function(e,t,r){var s,n,o;if(this._weekdaysParseExact)return rt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=p([2e3,1]).day(s),r&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(o="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(r&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(r&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!r&&this._weekdaysParse[s].test(e))return s}},Cr.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Cr.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Cr.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Cr.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Cr.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},ft("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;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=U("moment.lang is deprecated. Use moment.locale instead.",ft),n.langData=U("moment.langData is deprecated. Use moment.localeData instead.",yt);var Ar=Math.abs;function Dr(e,t,r,s){var n=Jt(t,r);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function $r(e){return e<0?Math.floor(e):Math.ceil(e)}function Nr(e){return 4800*e/146097}function Ir(e){return 146097*e/4800}function Wr(e){return function(){return this.as(e)}}var xr=Wr("ms"),Yr=Wr("s"),Br=Wr("m"),Gr=Wr("h"),Fr=Wr("d"),Hr=Wr("w"),zr=Wr("M"),qr=Wr("Q"),Vr=Wr("y");function Zr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Kr=Zr("milliseconds"),Jr=Zr("seconds"),Xr=Zr("minutes"),Qr=Zr("hours"),es=Zr("days"),ts=Zr("months"),rs=Zr("years");var ss=Math.round,ns={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function os(e,t,r,s,n){return n.relativeTime(t||1,!!r,e,s)}var is=Math.abs;function as(e){return(e>0)-(e<0)||+e}function ls(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,s,n,o,i,a,l=is(this._milliseconds)/1e3,c=is(this._days),u=is(this._months),h=this.asSeconds();return h?(e=z(l/60),t=z(e/60),l%=60,e%=60,r=z(u/12),u%=12,s=l?l.toFixed(3).replace(/\.?0+$/,""):"",n=h<0?"-":"",o=as(this._months)!==as(h)?"-":"",i=as(this._days)!==as(h)?"-":"",a=as(this._milliseconds)!==as(h)?"-":"",n+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+s+"S":"")):"P0D"}var cs=xt.prototype;return cs.isValid=function(){return this._isValid},cs.abs=function(){var e=this._data;return this._milliseconds=Ar(this._milliseconds),this._days=Ar(this._days),this._months=Ar(this._months),e.milliseconds=Ar(e.milliseconds),e.seconds=Ar(e.seconds),e.minutes=Ar(e.minutes),e.hours=Ar(e.hours),e.months=Ar(e.months),e.years=Ar(e.years),this},cs.add=function(e,t){return Dr(this,e,t,1)},cs.subtract=function(e,t){return Dr(this,e,t,-1)},cs.as=function(e){if(!this.isValid())return NaN;var t,r,s=this._milliseconds;if("month"===(e=Y(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,r=this._months+Nr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Ir(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},cs.asMilliseconds=xr,cs.asSeconds=Yr,cs.asMinutes=Br,cs.asHours=Gr,cs.asDays=Fr,cs.asWeeks=Hr,cs.asMonths=zr,cs.asQuarters=qr,cs.asYears=Vr,cs.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},cs._bubble=function(){var e,t,r,s,n,o=this._milliseconds,i=this._days,a=this._months,l=this._data;return o>=0&&i>=0&&a>=0||o<=0&&i<=0&&a<=0||(o+=864e5*$r(Ir(a)+i),i=0,a=0),l.milliseconds=o%1e3,e=z(o/1e3),l.seconds=e%60,t=z(e/60),l.minutes=t%60,r=z(t/60),l.hours=r%24,i+=z(r/24),a+=n=z(Nr(i)),i-=$r(Ir(n)),s=z(a/12),a%=12,l.days=i,l.months=a,l.years=s,this},cs.clone=function(){return Jt(this)},cs.get=function(e){return e=Y(e),this.isValid()?this[e+"s"]():NaN},cs.milliseconds=Kr,cs.seconds=Jr,cs.minutes=Xr,cs.hours=Qr,cs.days=es,cs.weeks=function(){return z(this.days()/7)},cs.months=ts,cs.years=rs,cs.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,s,n=!1,o=ns;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(o=Object.assign({},ns,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),s=function(e,t,r,s){var n=Jt(e).abs(),o=ss(n.as("s")),i=ss(n.as("m")),a=ss(n.as("h")),l=ss(n.as("d")),c=ss(n.as("M")),u=ss(n.as("w")),h=ss(n.as("y")),d=o<=r.ss&&["s",o]||o0,d[4]=s,os.apply(null,d)}(this,!n,o,r=this.localeData()),n&&(s=r.pastFuture(+this,s)),r.postformat(s)},cs.toISOString=ls,cs.toString=ls,cs.toJSON=ls,cs.locale=ar,cs.localeData=cr,cs.toIsoString=U("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ls),cs.lang=lr,$("X",0,0,"unix"),$("x",0,0,"valueOf"),pe("x",ue),pe("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,r){r._d=new Date(q(e))})),n.version="2.29.4",t=Dt,n.fn=kr,n.min=function(){return It("isBefore",[].slice.call(arguments,0))},n.max=function(){return It("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=p,n.unix=function(e){return Dt(1e3*e)},n.months=function(e,t){return Or(e,t,"months")},n.isDate=h,n.locale=ft,n.invalid=y,n.duration=Jt,n.isMoment=R,n.weekdays=function(e,t,r){return Mr(e,t,r,"weekdays")},n.parseZone=function(){return Dt.apply(null,arguments).parseZone()},n.localeData=yt,n.isDuration=Yt,n.monthsShort=function(e,t){return Or(e,t,"monthsShort")},n.weekdaysMin=function(e,t,r){return Mr(e,t,r,"weekdaysMin")},n.defineLocale=mt,n.updateLocale=function(e,t){if(null!=t){var r,s,n=ct;null!=ut[e]&&null!=ut[e].parentLocale?ut[e].set(T(ut[e]._config,t)):(null!=(s=pt(e))&&(n=s._config),t=T(n,t),null==s&&(t.abbr=e),(r=new C(t)).parentLocale=ut[e],ut[e]=r),ft(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?(ut[e]=ut[e].parentLocale,e===ft()&&ft(e)):null!=ut[e]&&delete ut[e]);return ut[e]},n.locales=function(){return L(ut)},n.weekdaysShort=function(e,t,r){return Mr(e,t,r,"weekdaysShort")},n.normalizeUnits=Y,n.relativeTimeRounding=function(e){return void 0===e?ss:"function"==typeof e&&(ss=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==ns[e]&&(void 0===t?ns[e]:(ns[e]=t,"s"===e&&(ns.ss=t-1),!0))},n.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"},n.prototype=kr,n.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"},n}()},24:()=>{},18:()=>{},140:()=>{},570:()=>{},851:()=>{},952:()=>{},50:()=>{},603:()=>{},491:()=>{},125:()=>{},490:()=>{},73:()=>{},106:()=>{},166:()=>{},891:()=>{},619:()=>{},461:()=>{},275:()=>{},17:()=>{},359:()=>{},511:()=>{},620:()=>{},437:()=>{},331:()=>{},484:()=>{},917:()=>{},745:()=>{},426:()=>{},480:()=>{}},t={};function r(s){var n=t[s];if(void 0!==n)return n.exports;var o=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e,t,s=((e=s||{}).KnowIt="KNOW_IT",e.OwnIt="OWN_IT",e);(e=>{let t;var r;let s;var n;let o;var i;let a;var l;let c;var u;let h,d,g,p;e.itemIsRoot=function(e){return"ROOT"===e.type},e.itemIsUnitLesson=function(e){return"UNITLESSON"===e.type},e.itemIsList=function(e){return"LIST"===e.type},e.itemIsUnit=function(e){return"UNIT"===e.type},e.itemIsCourse=function(e){return"COURSE"===e.type},(r=t=e.CourseType||={}).External="EXTERNAL",r.PIF="PIF",r.PIFLite="PIF_LITE",(n=s=e.ContainerType||={}).Course="COURSE",n.Unit="UNIT",n.Category="CATEGORY",n.Class="CLASS",n.Root="ROOT",(i=o=e.FlexibleCategoryType||={}).Assigned="ASSIGNED",i.CatchAll="CATCH_ALL",i.UserPublic="USER_PUBLIC",i.UserPrivate="USER_PRIVATE",i.UserPublicLessons="USER_PUBLIC_LESSONS",i.UserPrivateLessons="USER_PRIVATE_LESSONS",i.Community="COMMUNITY",i.CommunityLessons="COMMUNITY_LESSONS",(l=a=e.LessonType||={}).List="LIST",l.Course="COURSE",l.Unit="UNIT",l.UnitLesson="UNITLESSON",l.Document="DOCUMENT",l.PdfDocument="PDF_DOCUMENT",l.Reference="REFERENCE",l.ExternalDocument="EXTERNAL_DOCUMENT",l.DownloadLink="DOWNLOAD_LINK",(u=c=e.MaterialType||={}).CourseMaterial="COURSE_MATERIAL",u.FlexibleCategoryMaterial="FLEXIBLE_CATEGORY_MATERIAL",(e=>{e.Age="AGE",e.Level="LEVEL",e.Regular="REGULAR"})(h=e.ContentTagType||={}),(e=>{e.LIST="LIST",e.COURSEWARE_LESSON="COURSEWARE_LESSON",e.LESSON_GIN="LESSON_GIN"})(d=e.AssignmentType||={}),(e=>{e.Public="PUBLIC",e.Private="PRIVATE",e.TL="TL"})(g=e.LessonScope||={}),(e=>{e.Available="AVAILABLE",e.Missing="MISSING"})(p=e.SuggestionStatus||={})})(t||={});var n,o,i,a=((o=a||{}).System="SYSTEM",o.Regular="REGULAR",o.Parent="PARENT",o),l=(e=>(e.Class="cls",e.ReportingGroup="rpt",e.Cohort="cht",e))(l||{}),c=(e=>(e.Read="READ",e.Unread="UNREAD",e))(c||{}),u=((n=u||{}).DeepLink="DEEPLINK",n.Manual="MANUAL",n.Ip="IP",n.Barcode="BARCODE",n);(e=>{e.Course=class{id;uuid;unitCount;name;displayName;description;product;category;productDescription;knownLanguage;language;type;accessLevel;defaultEnabled;copyright;legacy;government;ownerId;buildRef;useEmbeddedAlphabet;pdfPath;bookmarks;tags;author;units;completionStatus;currentUnit;learningTime;percentCompleted;externalCompletionStatus;userCreated;leveled;defaultDisabled;lesson;customAssignment;pdfAccessible;showCompletionDialog;path},e.Unit=class{id;courseId;position;uuid;name;path;totalTime;learnedSkill;minScore;maxScore;lessons;cards;score;status;learningTime;completionStatus;assessmentScore;externalCompletionStatus;percentCompleted;hasAssessment}})(i||={});var h,d,g,p,f,m=((d=m||{}).NotStarted="NOT_STARTED",d.Completed="COMPLETED",d.InProgress="IN_PROGRESS",d.Failed="FAILED",d.Passed="PASSED",d),y=((h=y||{}).PASSED="passed",h.INCOMPLETE="incomplete",h.COMPLETED="completed",h.FAILED="failed",h.BROWSED="browsed",h.NOT_ATTEMPTED="not attempted",h),b=(e=>(e.Learning="LEARNING",e.Quiz="QUIZ",e.Practice="PRACTICE",e))(b||{}),v=(e=>(e.GoalMet="GOAL_MET",e.GoalMissed="GOAL_MISSED",e.StreakBroken="STREAK_BROKEN",e.Protected="PROTECTED",e.Pending="PENDING",e))(v||{}),_=(e=>(e.Weekly="WEEKLY",e.Monthly="MONTHLY",e))(_||{}),w=((g=w||{}).Blog="blog",g.Facebook="facebook",g.Twitter="twitter",g.YouTube="youtube",g.ProficiencyTest="proficiencyTest",g.WhichIsEnglish="whichIs",g.WordOfTheDay="wotd",g),R=(e=>(e.Add="ADD",e.Remove="REMOVE",e.Touched="TOUCHED",e))(R||{});(e=>{let t;var r;let s,n;(r=t=e.AssessmentStatus||={}).PASSED="PASSED",r.FAILED="FAILED",r.NOT_STARTED="NOT_STARTED",(e=>{e.INCOMPLETE="INCOMPLETE",e.COMPLETED="COMPLETED",e.NOT_STARTED="NOT_STARTED"})(s=e.CompletionStatus||={}),(e=>{e.NO_CHANGES="NO_CHANGES",e.UNIT_COMPLETED="UNIT_COMPLETED",e.COURSE_COMPLETED="COURSE_COMPLETED"})(n=e.CompletionInfo||={}),e.SyncRequest=class{lastSynchronized;statuses}})(p||={}),(e=>{e.ActivityTemplate=class{description;lessons;name},e.Activity=class{dataUrl;isB4u;isSpeech;moduleUrl;name;numItems;showSkill},e.Lesson=class{activities;isAssessment;name;number}})(f||={});var S,U,L,E=(e=>(e.Created="CREATED",e.Extended="EXTENDED",e.Duplicate="DUPLICATE",e.Pending="PENDING",e))(E||{});(e=>{class t{locked;online;logged_in;active;offline_session}let r;var s;e.ApplicationStatus=t,e.ApplicationStatusChange=class extends t{timestamp;previous},(s=r=e.ActionType||={}).Login="login",s.Refresh="refresh",s.Assignment="assignment",s.GroupMessage="groupMessage",s.ClassMessage="classMessage"})(S||={}),(e=>{e.Head=class{id;aaid;uuid;version;creator;creator_url;creator_application;is_ordered;is_transliteration_shown;LearningFeatures;side1_language_key;side2_language_key;side1_title;side2_title;name;description},e.LearningFeatures=class{is_PreviewIt;is_SR_RecognizeIt;is_Written_RecognizeIt;is_SR_ProduceIt;is_Written_ProduceIt},e.List=class{head;cards;downloaded}})(U||={}),(e=>{let t;var r;e.Item=class{bucket;expires;hid;sideOnePhrase;sideTwoPhrase},(r=t=e.Bucket||={}).U="U",r.L="L",r.A="A",r.H="H",r.D="D",e.MoveRequest=class{target;cards},e.Statistics=class{timestamp;total;stale;fresh;archive;sound;text;bothSounds},e.History=class{base;history},e.Request=class{languageSelector;orderBy;orderDir;limit},e.RefreshQuery=class{filter;hids;limit},e.LearningHistoryItem=class{bucket;comment;expires;hasPicture;hasSideOneSound;hasSideTwoSound;hid;picture;pictureAttribution;sideOnePhrase;sideTwoPhrase;sideOneSound;sideTwoSound},e.ExtendedCardSummary=class{comment;hid;hideExportPdf;picture;pictureAttribution;position;sideOnePhrase;sideTwoPhrase;sideOneSound;sideTwoSound;sideTwoWordsCount},e.RefreshCard=class{card;mli;expires},e.SyncRequest=class{lastSynchronized;includeUpToDate;items},e.EditSession=class{uuid;cards}})(L||={});var P,k,T=((P=T||{}).NewClassMessage="NEW_CLASS_MESSAGE",P.NewGroupMessage="NEW_GROUP_MESSAGE",P.NewClassAssignment="NEW_CLASS_ASSIGNMENT",P.EngagementAssignments="ENGAGEMENT_ASSIGNMENTS",P.EngagementDue="ENGAGEMENT_DUE",P.EngagementIncomplete="ENGAGEMENT_INCOMPLETE",P.AddedToGroup="ADDED_TO_GROUP",P.LoginNotification="LOGIN_NOTIFICATION",P.ClassUnenrolled="CLASS_UNENROLLED",P.TimezoneMismatch="TIMEZONE_MISMATCH",P.NodeNotification="NODE_NOTIFICATION",P.DailyGoals="DAILY_GOALS",P.Refresher="REFRESHER",P),C=(e=>(e.Class="cls",e.ReportingGroup="grp",e.Cohort="cht",e))(C||{}),j=(e=>(e.Cellular="CELLULAR",e.Wifi="WIFI",e.None="NONE",e))(j||{}),O=(e=>(e.Company="COMPANY",e.K12="K12",e.HigherEducation="HIGH",e.Homeschooling="HOME",e.Librarian="LIB",e.Personal="INTEREST",e))(O||{});(e=>{let t;var r;let s;var n;let o,i;var a;let l;(r=t=e.ReportStatus||={}).Complete="COMPLETE",r.InProgress="IN_PROGRESS",r.Failure="FAILURE",(n=s=e.ReportType||={}).MyActivity="MY_ACTIVITY",n.MyJournalEntry="MY_JOURNAL_ENTRY",(e=>{e.MyActivity="my-activity-request",e.MyJournalEntry="journal-entry-request"})(o=e.LegacyReportType||={}),(a=i=e.RecurringFrequency||={}).Daily="DAILY",a.Weekly="WEEKLY",a.BiWeekly="BI_WEEKLY",a.Monthly="MONTHLY",(e=>{e.HTML="HTML",e.PDF="PDF",e.CSV="CSV"})(l=e.ArtifactReportType||={})})(k||={});var M,A,D,$=((M=$||{}).Any="any",M.Title="title",M.Description="descriptions",M.Author="author",M.Tags="tags",M.Comment="comment",M.SideTwoPhrase="sideTwoPhrase",M.SideTwoHint="sideTwoHint",M.SideTwoTranslit="sideTwoTranslit",M.SideOnePhrase="sideOnePhrase",M.SideOnHint="sideOneHint",M),N=(e=>(e.OK="OK",e.NO_EXACT_MATCH="NO_EXACT_MATCH",e.PARSE_ERROR="PARSE_ERROR",e))(N||{}),I=(e=>(e.NONE="NONE",e.NATIVE="NATIVE",e.PWA_AVAILABLE="PWA_AVAILABLE",e.PWA="PWA",e))(I||{}),W=(e=>(e.Disabled="DISABLED",e.Shared="SHARED",e.SharedFull="SHARED_FULL",e.Individual="INDIVIDUAL",e.IndividualFull="INDIVIDUAL_FULL",e))(W||{}),x=(e=>(e.STUDENT="STUDENT",e.EDUADMIN="EDUADMIN",e.ITADMIN="ITADMIN",e))(x||{}),Y=((A=Y||{}).CLUSTER="CLUSTER",A.DIRSI="DIRSI",A.OTRIAL="OTRIAL",A.PTV="PTV",A.REGULAR="REGULAR",A.SELFREG="SELFREG",A.SSO="SSO",A.TRIAL="TRIAL",A.INCOMPLETE_PURCHASE="INCOMPLETE_PURCHASE",A.GUEST="GUEST",A),B=(e=>(e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE",e.INVALID="INVALID",e))(B||{}),G=(e=>(e.N_A="N_A",e.REPORTER="REPORTER",e.RESELLER="RESELLER",e.CONTENT_MGR="CONTENT_MGR",e.ORGADMIN="ORGADMIN",e.TLADMIN="TLADMIN",e))(G||{}),F=(e=>(e.MALE="MALE",e.FEMALE="FEMALE",e.UNSPECIFIED="UNSPECIFIED",e))(F||{}),H=(e=>(e.NoSubscriptions="no.subscriptions",e.NoContent="no.content",e.PendingSubscription="pending.subscription",e))(H||{}),z=(e=>(e.ACTFL="ACTFL",e.ADLPRS="ADLPRS",e.CEFR="CEFR",e.ILR="ILR",e))(z||{}),q=(e=>(e.LEARNER="LEARNER",e.INSTRUCTOR="INSTRUCTOR",e.CLPM="CLPM",e.OTHER="OTHER",e))(q||{}),V=(e=>(e.TLO_LE="TLO_LE",e.TLO_EE="TLO_EE",e.TLO_RR="TLO_RR",e))(V||{}),Z=(e=>(e.BWEDU="bwedu",e.BW4l="bw4l",e.RR5="rr5",e))(Z||{}),K=(e=>(e.WEBPUSH="WEBPUSH",e.APN="APN",e.FCM="FCM",e.ADM="ADM",e.GCM="GCM",e))(K||{}),J=(e=>(e.Unknown="UNKNOWN",e.Reading="READING",e.Writing="WRITING",e.Listening="LISTENING",e.Speaking="SPEAKING",e))(J||{}),X=(e=>(e.Unknown="UNKNOWN",e.Failed="FAILED",e.Passed="PASSED",e))(X||{}),Q=(e=>(e.Lesson="LESSON",e.List="LIST",e.Mli="MLI",e))(Q||{}),ee=(e=>(e.Twitter="twitter",e.Facebook="facebook",e.Instagram="instagram",e))(ee||{}),te=class{MODULE=re;version="1.0.309";getModule(e){switch(e){case"com.transparent.mon-e.api.altanswer#v1":return this.altAnswer;case"com.transparent.mon-e.api.authentication#v1":return this.authentication;case"com.transparent.mon-e.api.classes#v1":return this.classes;case"com.transparent.mon-e.api.contentbrowser#v1":return this.contentBrowse;case"com.transparent.mon-e.api.courses#v1":return this.courses;case"com.transparent.mon-e.api.cwactivity#v1":return this.cwactivity;case"com.transparent.mon-e.api.dailygoal#v1":return this.dailyGoal;case"com.transparent.mon-e.api.eventtracker#v1":return this.eventTracker;case"com.transparent.mon-e.api.handsfreeplayer#v1":return this.handsFreePlayer;case"com.transparent.mon-e.api.languages#v1":return this.languages;case"com.transparent.mon-e.api.learningpath#v1":return this.learningPath;case"com.transparent.mon-e.api.learningorder#v1":return this.learningOrder;case"com.transparent.mon-e.api.learningstate#v1":return this.learningState;case"com.transparent.mon-e.api.learningstatus#v1":return this.learningStatus;case"com.transparent.mon-e.api.licenses#v1":return this.licenses;case"com.transparent.mon-e.api.lifecycle#v1":return this.lifecycle;case"com.transparent.mon-e.api.list#v1":return this.listRepository;case"com.transparent.mon-e.api.misc#v1":return this.misc;case"com.transparent.mon-e.api.mli#v1":return this.mli;case"com.transparent.mon-e.api.notification#v1":return this.notification;case"com.transparent.mon-e.api.offline#v1":return this.offlineSupport;case"com.transparent.mon-e.api.platform#v1":return this.platform;case"com.transparent.mon-e.api.registration#v1":return this.registration;case"com.transparent.mon-e.api.reporting#v1":return this.reporting;case"com.transparent.mon-e.api.restorepassword#v1":return this.restorePassword;case"com.transparent.mon-e.api.search#v1":return this.search;case"com.transparent.mon-e.api.settings#v1":return this.settings;case"com.transparent.mon-e.api.stick-e":return this.sticke;case"com.transparent.mon-e.api.soundrecorder#v1":return this.soundRecorder;case"com.transparent.mon-e.api.timetracker#v1":return this.timeTracker;case"com.transparent.mon-e.api.userdata#v1":return this.userData;case"com.transparent.mon-e.api.userprofile#v1":return this.userProfile;default:return null}}},re=((D=re||{}).ALTANSWER="com.transparent.mon-e.api.altanswer#v1",D.AUTHENTICATION="com.transparent.mon-e.api.authentication#v1",D.CLASSES="com.transparent.mon-e.api.classes#v1",D.CONTENT_BROWSER="com.transparent.mon-e.api.contentbrowser#v1",D.COURSES="com.transparent.mon-e.api.courses#v1",D.CWACTIVITY="com.transparent.mon-e.api.cwactivity#v1",D.DAILY_GOAL="com.transparent.mon-e.api.dailygoal#v1",D.EVENT_TRACKER="com.transparent.mon-e.api.eventtracker#v1",D.HANDSFREE_PLAYER="com.transparent.mon-e.api.handsfreeplayer#v1",D.LANGUAGES="com.transparent.mon-e.api.languages#v1",D.LEARNING_ORDER="com.transparent.mon-e.api.learningorder#v1",D.LEARNING_PATH="com.transparent.mon-e.api.learningpath#v1",D.LEARNING_STATE="com.transparent.mon-e.api.learningstate#v1",D.LEARNING_STATUS="com.transparent.mon-e.api.learningstatus#v1",D.LICENSES="com.transparent.mon-e.api.licenses#v1",D.LIFECYCLE="com.transparent.mon-e.api.lifecycle#v1",D.LIST_REPOSITORY="com.transparent.mon-e.api.list#v1",D.MISC="com.transparent.mon-e.api.misc#v1",D.MLI="com.transparent.mon-e.api.mli#v1",D.NOTIFICATION="com.transparent.mon-e.api.notification#v1",D.OFFLINE_SUPPORT="com.transparent.mon-e.api.offline#v1",D.PLATFORM="com.transparent.mon-e.api.platform#v1",D.REGISTRATION="com.transparent.mon-e.api.registration#v1",D.REPORTING="com.transparent.mon-e.api.reporting#v1",D.RESTORE_PASSWORD="com.transparent.mon-e.api.restorepassword#v1",D.SEARCH="com.transparent.mon-e.api.search#v1",D.SETTINGS="com.transparent.mon-e.api.settings#v1",D.SOUND_RECORDER="com.transparent.mon-e.api.soundrecorder#v1",D.STICKE="com.transparent.mon-e.api.stick-e",D.TIMETRACKER="com.transparent.mon-e.api.timetracker#v1",D.USER_DATA="com.transparent.mon-e.api.userdata#v1",D.USER_PROFILE="com.transparent.mon-e.api.userprofile#v1",D);class se extends Error{constructor(e,t,r){const s=`${e.status||0===e.status?e.status:""} ${e.statusText||""}`.trim();super("Request failed with "+(s?`status code ${s}`:"an unknown error")),this.name="HTTPError",this.response=e,this.request=t,this.options=r}}class ne extends Error{constructor(e){super("Request timed out"),this.name="TimeoutError",this.request=e}}const oe=e=>null!==e&&"object"==typeof e,ie=(...e)=>{for(const t of e)if((!oe(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return le({},...e)},ae=(e={},t={})=>{const r=new globalThis.Headers(e),s=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(const[e,t]of n.entries())s&&"undefined"===t||void 0===t?r.delete(e):r.set(e,t);return r},le=(...e)=>{let t={},r={};for(const s of e)if(Array.isArray(s))Array.isArray(t)||(t=[]),t=[...t,...s];else if(oe(s)){for(let[e,r]of Object.entries(s))oe(r)&&e in t&&(r=le(t[e],r)),t={...t,[e]:r};oe(s.headers)&&(r=ae(r,s.headers),t.headers=r)}return t},ce="function"==typeof globalThis.AbortController,ue="function"==typeof globalThis.ReadableStream,he="function"==typeof globalThis.FormData,de=["get","post","put","patch","head","delete"],ge={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},pe=2147483647,fe=Symbol("stop"),me=e=>de.includes(e)?e.toUpperCase():e,ye=[413,429,503],be={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:ye,maxRetryAfter:Number.POSITIVE_INFINITY},ve=(e={})=>{if("number"==typeof e)return{...be,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...be,...e,afterStatusCodes:ye}};class _e{constructor(e,t={}){var r,s,n;if(this._retryCount=0,this._input=e,this._options={credentials:this._input.credentials||"same-origin",...t,headers:ae(this._input.headers,t.headers),hooks:le({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:me(null!==(r=t.method)&&void 0!==r?r:this._input.method),prefixUrl:String(t.prefixUrl||""),retry:ve(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:void 0===t.timeout?1e4:t.timeout,fetch:null!==(s=t.fetch)&&void 0!==s?s:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(ce&&(this.abortController=new globalThis.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const e="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,e);!(he&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(t,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",null!==(n=this._options.headers.get("content-type"))&&void 0!==n?n:"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}static create(e,t){const r=new _e(e,t),s=async()=>{if(r._options.timeout>pe)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await r._fetch();for(const t of r._options.hooks.afterResponse){const s=await t(r.request,r._options,r._decorateResponse(e.clone()));s instanceof globalThis.Response&&(e=s)}if(r._decorateResponse(e),!e.ok&&r._options.throwHttpErrors){let t=new se(e,r.request,r._options);for(const e of r._options.hooks.beforeError)t=await e(t);throw t}if(r._options.onDownloadProgress){if("function"!=typeof r._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!ue)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return r._stream(e.clone(),r._options.onDownloadProgress)}return e},n=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(s):s();for(const[e,s]of Object.entries(ge))n[e]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||s);const o=(await n).clone();if("json"===e){if(204===o.status)return"";if(t.parseJson)return t.parseJson(await o.text())}return o[e]()};return n}_calculateRetryDelay(e){if(this._retryCount++,this._retryCountthis._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),pe);if(0!==r&&this._retryCount>0){await(async e=>new Promise((t=>{setTimeout(t,e)})))(r);for(const e of this._options.hooks.beforeRetry)if(await e({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===fe)return;return this._retry(e)}throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}return!1===this._options.timeout?this._options.fetch(this.request.clone()):(async(e,t,r)=>new Promise(((s,n)=>{const o=setTimeout((()=>{t&&t.abort(),n(new ne(e))}),r.timeout);r.fetch(e).then(s).catch(n).then((()=>{clearTimeout(o)}))})))(this.request.clone(),this.abortController,this._options)}_stream(e,t){const r=Number(e.headers.get("content-length"))||0;let s=0;return new globalThis.Response(new globalThis.ReadableStream({async start(n){const o=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await async function e(){const{done:i,value:a}=await o.read();i?n.close():(t&&(s+=a.byteLength,t({percent:0===r?0:s/r,transferredBytes:s,totalBytes:r},a)),n.enqueue(a),await e())}()}}))}}const we=e=>{const t=(t,r)=>_e.create(t,ie(e,r));for(const r of de)t[r]=(t,s)=>_e.create(t,ie(e,s,{method:r}));return t.create=e=>we(ie(e)),t.extend=t=>we(ie(e,t)),t.stop=fe,t},Re=we(),Se=[],Ue=[],Le=(e,t,r)=>{Ue.forEach((function(s){s.call(this,e,t,r)}))};function Ee(e){Se.push(e)}function Pe(e){Ue.push(e)}const ke=Re.create({hooks:{beforeRequest:[(e,t)=>{((e,t)=>{Se.forEach((r=>{r.call(void 0,e,t)}))})(e.url,t);const r=t.headers;for(const t of r)e.headers.set(t[0],t[1])}],afterResponse:[(e,t,r)=>Le(e.url,t,r)]}});class Te{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest/notifications`,this.publicBaseUrl=`${e.apiEndpoint}/rest/public/notifications`,this.stickeBaseUrl=`${e.apiEndpoint}/rest/ng/sticke`,this.seenShutdown=!1,this.lastSeenTimestamp=0,this.observers=[],Pe(((e,t,r)=>{const s=+r.headers.get("X-Next-Shutdown-Millis");s&&!this.seenShutdown?(this.seenShutdown=!0,this.observers.forEach((e=>{e.call(self,self,{type:"shutdown",payload:{nextShutdown:s}})}))):this.seenShutdown&&!s&&(this.seenShutdown=!1,this.observers.forEach((e=>{e.call(self,self,{type:"shutdown",payload:{nextShutdown:0}})}))),s||(this.seenShutdown=!1);const n=+r.headers.get("X-Last-Notification-Timestamp");console.log("checking notifications...",this.lastSeenTimestamp,n,this.lastSeenTimestamp{console.log("actual notifications...",e),this.observers.forEach((t=>{t.call(this,this,{set:e})}))})))}))}subscribe(e){console.log("WebNotification.subscribe"),this.observers.push(e),this.seenShutdown=!1,this.lastSeenTimestamp=0}unsubscribe(e){console.log("WebNotification.unsubscribe");const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}getShutdownNotification(){return console.log("WebNotification.getShutdownNotification"),ke.get(`${this.publicBaseUrl}/shutdown`).json().catch((e=>(console.log("WebNotification.getShutdownNotification:",e),Promise.reject([{code:"error.critical",message:e}]))))}getPendingNotifications(e){return console.log("WebNotification.getPendingNotifications",e),ke.get(`${this.baseUrl}/pending`,{searchParams:{resetNotifications:!!e}}).json().catch((e=>(console.log("WebNotification.getPendingNotifications:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLoginNotifications(){return console.log("WebNotification.getLoginNotifications"),ke.get(`${this.publicBaseUrl}/login`).json().catch((e=>(console.log("WebNotification.getLoginNotifications:",e),Promise.reject([{code:"error.critical",message:e}]))))}resetAllNotifications(){return console.log("WebNotification.resetAllNotifications"),ke.delete(`${this.baseUrl}/pending`).json().catch((e=>(console.log("WebNotification.resetAllNotifications:",e),Promise.reject([{code:"error.critical",message:e}]))))}resetNotifications(e){return console.log("WebNotification.resetNotifications"),ke.post(`${this.baseUrl}/pending/reset`,{json:e}).json().catch((e=>(console.log("WebNotification.resetNotifications:",e),Promise.reject([{code:"error.critical",message:e}]))))}subscribePush(e){let t;return e.type?(t=e,t.service=t.type,t.type=void 0):t={service:"WEBPUSH",token:JSON.stringify(e)},ke.post(`${this.stickeBaseUrl}/subscriptions/pns/register`,{json:t}).json().catch((e=>(console.log("WebNotification.subscribePush: ${error}",e),Promise.reject([{code:"error.critical",message:e}]))))}unsubscribePush(e){let t;return e.type?(t=e,t.service=t.type,t.type=void 0):t={service:"WEBPUSH",token:JSON.stringify(e)},ke.post(`${this.stickeBaseUrl}/subscriptions/pns/unregister`,{json:t}).json().catch((e=>(console.log("WebNotification.unsubscribePush:",e),Promise.reject([{code:"error.critical",message:e}]))))}getNotificationSettings(){return ke.get(`${this.stickeBaseUrl}/notifications`).json().then((e=>{for(const t in e){const r=e[t],s=["adm","apn","fcm","gcm"];e[t]={email:r.email,webpush:r.webpush,push:s.some((e=>!!r[e]))}}return e}))}updateNotificationSettings(e){for(const t in e){const r=e[t];void 0!==r.push&&(e[t]={email:r.email,webpush:r.webpush,adm:r.push,apn:r.push,fcm:r.push,gcm:r.push})}return ke.put(`${this.stickeBaseUrl}/notifications`,{json:e}).then((()=>{}))}}var Ce=r(381);class je{static isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}static normalizeUrl(e){return e&&e.length?e+("/"===e.slice(-1)?"":"/"):e}static protocolLessUrl(e){return e&&e.length?e.replace(/^https?:/i,""):e}static protocolifyUrl(e){if(!e||!e.length)return e;const t=document.createElement("a");return t.setAttribute("href",e),t.href}static getPlatform(){const e=null!=navigator.userAgent.match(/WebApp.*Android/i),t=null!=navigator.userAgent.match(/WebApp.*iOS/i);return e||t?"MOBILE":"WEB"}static timeout(e){return new Promise((t=>setTimeout(t,e)))}static getLeadingPathSegments(e,t){return e.split("/").slice(0,t+1).join("/")}static getCookie(e){const t=("; "+document.cookie).split("; "+e+"=");if(2==t.length)return t.pop().split(";").shift()}static setCookie(e,t){const r=je.getLeadingPathSegments(window.location.pathname,1)+"/game/";document.cookie=`${e}=${t}; path=${r}`}static toKyFormData(e){const t=Object.keys(e).map((t=>`${t}=${encodeURIComponent(e[t])}`)).join("&");return new URLSearchParams(t)}static getSearchQueryVariable(e){const t=window.location.search.substring(1).split("&");for(let r=0;r{"cors"!==r.mode&&r.headers.set("X-Referrer",t)})),this.baseUrl=`${this.settings.applicationLink}game/rest`}addErrorListener(e){Pe(((t,r,s)=>{let n;403===s.status&&s.url&&"/auth"!==s.url.substr(-5)?n="unauthorized":s.headers&&s.headers.get("X-Node-Inactive")&&(n="node_inactive"),n&&e.call(null,n)}))}setClientInfo(e){Ee(((t,r)=>{if("cors"!=r.mode){const t=r.headers;t.set("X-Client-Version",e.version),t.set("X-Client-Name",e.name)}}))}getContainerName(){return`${this.settings.nameLong} Mon-E API Web Container v${MoneAPI.version}`}getLocale(){return this.settings.locale}getAvailableLocales(){return ke.get(`${this.baseUrl}/public/locales`).json().catch((e=>(console.log("ERROR WebSettings.getAvailableLocales:",e),Promise.reject([{code:"error.critical",message:e}]))))}getSessionTimeout(){return+this.settings.sessionTimeout}getServerPath(){return this.settings.applicationLink}getCanonicalLink(){return this.settings.canonicalLink}getCoursesContentPath(){return je.protocolLessUrl(`${je.normalizeUrl(this.settings.applicationLink)}../lmss/content`)}getUnitPlayerPath(){return`${je.normalizeUrl(this.settings.applicationLink)}game/cwproxy/cw2`}getSoundServer(){return je.normalizeUrl(this.settings.soundServer)}getLDSUrl(){return je.protocolLessUrl(je.normalizeUrl(this.settings.ldsServer))}getFontsUrl(){const e=`${this.settings.applicationLink}game/ng/assets/webfonts/`;return je.protocolLessUrl(je.normalizeUrl(this.settings.webfontsUrl||e))}getCWBuildRefBaseUrl(){return je.normalizeUrl(je.normalizeUrl(this.settings.cwBuildRefBaseUrl))}getCWDefaultBuildRef(){return this.settings.cwDefaultBuildRef}getLessonGinUrl(){return je.protocolLessUrl(this.settings.lessonGinUrl)}getSymphoneLessonGinUrl(){return je.protocolLessUrl(je.normalizeUrl(this.settings.symphoneLessonGinUrl))}async getPortalSettings(){return{backgroundUrl:this.settings.backgroundUrl,isLearningCustomBackground:this.settings.isLearningCustomBackground,learningCustomBackgroundNeverCutOff:this.settings.learningCustomBackgroundNeverCutOff,loginBackgroundUrl:this.settings.loginBackgroundUrl,isLoginCustomBackground:this.settings.isLoginCustomBackground,loginCustomBackgroundNeverCutOff:this.settings.loginCustomBackgroundNeverCutOff,headerLogoUrl:this.settings.headerLogoUrl,headerLogoLink:this.settings.headerLogoLink,mobileHeaderLogoUrl:this.settings.mobileHeaderLogoUrl,node:this.settings.node,serverUuid:this.settings.serverUuid,ctestSetting:this.settings.ctestSetting,organizationOfficialName:this.settings.organizationOfficialName,organizationPhone:this.settings.organizationPhone,organizationLogoUrl:this.settings.organizationLogoUrl,trustedNetwork:this.trustedNetwork,selfRegister:this.settings.selfRegister,activationCodeRegistration:this.settings.activationCodeRegistration,userIdRegistration:this.settings.userIdRegistration,enableTrialMode:this.settings.enableTrialMode,enableTrialModeMobile:this.settings.enableTrialModeMobile,enableTransparentComTrial:this.settings.enableTransparentComTrial,transparentComTrialUrl:this.settings.transparentComTrialUrl,trialInitialLength:this.settings.trialInitialLength,trialActivation:this.settings.trialActivation,enablePersonalTrials:this.settings.enablePersonalTrials,enableOrganizationalTrials:this.settings.enableOrganizationalTrials,enableGovernmentTrials:this.settings.enableGovernmentTrials,enableHandsFreeAutoplay:this.settings.enableHandsFreeAutoplay,loginNotification:this.settings.loginNotification,newUserNotification:this.settings.newUserNotification,authenticateAlways:this.settings.authenticateAlways,redirectTimeout:5e3,classes:this.settings.classes,maintenanceMessage:this.settings.maintenanceMessage,disableLearnersEmails:this.settings.disableLearnersEmails,requireEmail:this.settings.requireEmail,goMobile:this.settings.goMobile,goMobileUrl:this.settings.goMobileUrl,enableResourceTab:this.settings.enableResourceTab,homePageUrl:this.settings.homePageUrl,iosAppstoreId:this.settings.iosAppstoreId,mobileAppUriScheme:this.settings.mobileAppUriScheme,mobileAppUriSchemeIpad:this.settings.mobileAppUriSchemeIpad,gaAccountId:this.settings.gaAccountId,gtmId:this.settings.gtmId,enableClasses:this.settings.enableClasses,enableCohorts:this.settings.enableCohorts,enableReportingGroups:this.settings.enableReportingGroups,connectClassOffers:this.settings.connectClassOffers,enableWhichIsEnglish:this.settings.enableWhichIsEnglish,enableBrowserCheck:this.settings.enableBrowserCheck,supportContacts:this.settings.supportContacts,useCustomSupportContacts:this.settings.useCustomSupportContacts,disableLocalization:this.settings.disableLocalization,classCodeRequire:this.settings.classCodeRequire,logoutRedirect:this.settings.logoutRedirect,enableEditAccount:this.settings.enableEditAccount,enableHelpOverlayAdditionalInfo:this.settings.enableHelpOverlayAdditionalInfo,disableHelpOverlays:this.settings.disableHelpOverlays,enablePurchaseFromTL:this.settings.enablePurchaseFromTL,enableListDownload:this.settings.enableListDownload,enforceAuthorPrivacy:this.settings.enforceAuthorPrivacy,enableUsg:this.settings.enableUsg,enableNewSpeechAnalysisActivities:this.settings.enableNewSpeechAnalysisActivities,enableMobileUniversalLogin:this.settings.enableMobileUniversalLogin,enableMergeLevelTags:this.settings.enableMergeLevelTags,isHardMode:this.settings.isHardMode,disableEveryvoice:this.settings.disableEveryvoice,disableRightClickMenu:this.settings.disableRightClickMenu,enableRemovalAssignmentsLpath:this.settings.enableRemovalAssignmentsLpath,enableMarkingLearned:this.settings.enableMarkingLearned,enableBriefle:this.settings.enableBriefle,reserveTTSUrl:this.settings.reserveTTSUrl,enableKidSpeak:this.settings.enableKidSpeak,kidSpeakUrl:this.settings.kidSpeakUrl,kidSpeakOnly:this.settings.kidSpeakOnly,kidSpeakOriginUrl:this.settings.kidSpeakOriginUrl,whichIsEnglishUrl:this.settings.whichIsEnglishUrl,selfeUrl:this.settings.selfeUrl,classCodeRequest:this.settings.classCodeRequest,graylogUrl:this.settings.graylogUrl,enableLessonginRssLink:this.settings.enableLessonginRssLink,lessonginUserAgent:this.settings.lessonginUserAgent,enableFeedbackLink:this.settings.enableFeedbackLink,enableContactSupportLink:this.settings.enableContactSupportLink,enableShareableContentLinks:this.settings.enableShareableContentLinks,messageIdle:this.settings.messageIdle,organizationEmail:this.settings.organizationEmail,disableThirdPartyScripts:this.settings.disableThirdPartyScripts,enableParlor:this.settings.enableParlor,enableDownloadLessonGinPdf:this.settings.enableDownloadLessonGinPdf,enableDailyRefresher:this.settings.enableDailyRefresher,enableWebPushSubscriptions:this.settings.enableWebPushSubscriptions,webPushPublicKey:this.settings.webPushPublicKey,helpUrl:this.settings.helpUrl,pageFooterLogoUrl:this.settings.pageFooterLogoUrl,pageFooterText:this.settings.pageFooterText,logoutPageUrl:this.settings.logoutPageUrl,recaptchaSiteKey:this.settings.recaptchaSiteKey,offlineMode:this.settings.offlineMode,requireTermsAgreement:this.settings.requireTermsAgreement,requireUpdatedTermsAgreement:this.settings.requireUpdatedTermsAgreement,requirePrivacyPolicyAgreement:this.settings.requirePrivacyPolicyAgreement,requireUpdatedPrivacyPolicyAgreement:this.settings.requireUpdatedPrivacyPolicyAgreement,forgetMeEnabled:this.settings.forgetMeEnabled,forgetMeGracePeriod:this.settings.forgetMeGracePeriod,termsOfUseURL:this.settings.termsOfUseURL,privacyPolicyURL:this.settings.privacyPolicyURL,cwBaseHelpUrl:this.settings.cwBaseHelpUrl,laBaseHelpUrl:this.settings.laBaseHelpUrl,lgBaseHelpUrl:this.settings.lgBaseHelpUrl,externalCwBuildRefBaseUrl:this.settings.externalCwBuildRefBaseUrl,hideLearningPortalClassesTab:this.settings.hideLearningPortalClassesTab,moneBaseUrl:`${this.settings.applicationLink}game/ng/`,licensesChangeUrl:this.settings.licensesChangeUrl,licensesShopUrl:this.settings.licensesShopUrl,opgUrl:this.settings.opgUrl,hubspot:this.settings.hubspot,enableGuestAccounts:this.settings.enableGuestAccounts,allowGuestAccountsEnrollReportingGroups:this.settings.allowGuestAccountsEnrollReportingGroups,enableLoginPageAboutTab:this.settings.enableLoginPageAboutTab,baseHelpUrl:null,enableAppSettings:!1,enableSupportWidget:!1,requireAgeRange:!1,useHeartbeatForTimetracking:!0,activeYearInReview:this.settings.activeYearInReview,yearInReviewYear:this.settings.yearInReviewYear,enableSocialSharingForYearInReview:this.settings.enableSocialSharingForYearInReview,facebookHandleYearInReview:this.settings.facebookHandleYearInReview,twitterHandleYearInReview:this.settings.twitterHandleYearInReview,instagramHandleYearInReview:this.settings.instagramHandleYearInReview,yearInReviewSocialUrl:this.settings.yearInReviewSocialUrl,forYourOrganizationUrl:this.settings.forYourOrganizationUrl,forIndividualsUrl:this.settings.forIndividualsUrl,disableTestResultInstructorEmails:this.settings.disableTestResultInstructorEmails,disableStudentCreationDuringRegistration:this.settings.disableStudentCreationDuringRegistration,contactSupportUrl:this.settings.contactSupportUrl,feedbackUrl:this.settings.feedbackUrl,productChooserUrl:this.settings.productChooserUrl,mlnServerUrl:this.settings.mlnServerUrl,cl150Settings:this.settings.cl150Settings,mlnServerKey:this.settings.mlnServerKey,googleSsoEnabled:this.settings.googleSsoEnabled,googleSsoClientId:this.settings.googleSsoClientId,enableWebappStoreReviewPrompt:this.settings.enableWebappStoreReviewPrompt,webappStorePromptPeriod:this.settings.webappStorePromptPeriod}}async getReferenceResources(){return{overview:this.settings.referenceResources.overview,alphabetExplorer:this.settings.referenceResources.alphabetExplorer,grammarReference:this.settings.referenceResources.grammarReference,languageTips:this.settings.referenceResources.languageTips,grammarTips:this.settings.referenceResources.grammarTips,alphabetLearner:this.settings.referenceResources.alphabetLearner,grammarRules:this.settings.referenceResources.grammarRules}}async getBrandingSettings(){return{name:this.settings.nameLiteral,nameLong:this.settings.nameLong,nameFormal:this.settings.nameFormal,helpProfile:this.settings.helpProfile}}getTimestamp(){return ke.get(`${this.baseUrl}/timestamp`).json().catch((e=>(console.log("ERROR WebSettings.getTimestamp:",e),Promise.reject([{code:"error.critical",message:e}]))))}getSessionStatus(e){return console.log("WebSettings.getSessionStatus"),ke.get(`${this.baseUrl}/public/session/status`,{timeout:e}).json().catch((e=>(console.log("ERROR WebSettings.getStatus:",e),Promise.reject([{code:"error.critical",message:e}]))))}getUIConfig(){return console.log("WebSettings.getUIConfig"),ke.get(`${this.baseUrl}/ng/uiconfig`).json().catch((e=>(console.log("ERROR WebSettings.getUIConfig:",e),Promise.reject([{code:"error.critical",message:e}]))))}getUIConfigForLanguage(e){return console.log("WebSettings.getUIConfigForLanguage"),ke.get(`${this.baseUrl}/ng/uiconfig/languages/${e.known}/${e.target}`).json()}getSelfEReportConfig(){return console.log("WebSettings.getSelfEReportConfig"),ke.get(`${this.baseUrl}/ng/report/selfe`).json().catch((e=>(console.log("ERROR WebSettings.getSelfEReportConfig:",e),Promise.reject([{code:"error.critical",message:e}]))))}setBrandingGroupCode(e){je.setCookie("branding.group.code",e),je.setCookie("original.referrer",encodeURIComponent(window.originalReferrer))}getLocalizedSettings(e){return console.log("WebSettings.getLocalizedSettings"),ke.get(`${this.baseUrl}/public/localizedSettings`,{searchParams:{locale:e}}).json().catch((e=>(console.log("ERROR WebSettings.getLocalizedSettings:",e),Promise.reject([{code:"error.critical",message:e}]))))}getCustomerPortals(e){return console.log("WebSettings.getCustomerPortals"),ke.get(`${this.baseUrl}/public/customerPortals`,{searchParams:{locale:e}}).json().catch((e=>(console.log("ERROR WebSettings.getCustomerPortals:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class Me{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest/cwactivity`}saveAssessment(e,t,r){const s=JSON.parse(e);return ke.post(`${this.baseUrl}/saveAssessment`,{json:s,keepalive:!0,mode:"same-origin"}).then(null,(e=>(console.log("ERROR WebCWActivity.saveAssessment:",e),Promise.reject("WebCWActivity.saveAssessment: "+e))))}saveActivityResult(e,t){const r=JSON.parse(t),s=r.completionStatus.toUpperCase().split(" ").join("_");return ke.post(`${this.baseUrl}/saveActivityResult`,{json:{day:Math.floor((new Date).getTime()/1e3),skill:r.skill,name:r.name,moduleName:r.moduleName,timeSpent:r.timeSpent,heartbeatTime:r.heartbeatTime,challenges:r.challenges,correctAnswers:r.correctAnswers,incorrectAnswers:r.incorrectAnswers,acceptAsCorrects:r.acceptAsCorrects,completionStatus:s,playerType:e,listIds:r.listIds,lessonIds:r.lessonIds,mliHids:r.mliHids,attemptMicOn:r.attemptMicOn,attemptMicOff:r.attemptMicOff},keepalive:!0,mode:"same-origin"}).then(null,(e=>(console.log("ERROR WebCWActivity.saveActivityResult:",e),Promise.reject([{code:"error.critical",message:e}]))))}saveCompleteItActivityResult(e){return ke.post(`${this.baseUrl}/saveCompleteItActivityResult`,{json:JSON.parse(e)}).then(null,(e=>(console.log("ERROR WebCWActivity.saveCompleteItActivityResult:",e),Promise.reject([{code:"error.critical",message:e}]))))}saveMlnActivityResult(e){return ke.post(`${this.baseUrl}/saveMlnActivityResult`,{json:JSON.parse(e)}).then(null,(e=>(console.log("ERROR WebCWActivity.saveMlnActivityResult:",e),Promise.reject([{code:"error.critical",message:e}]))))}sendResultsToInstructor(e,t){return ke.post(`${this.baseUrl}/sendResultsToInstructor/${e}`,{json:t,mode:"same-origin"}).then(null,(e=>(console.log("ERROR WebCWActivity.sendResultsToInstructor:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class Ae{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest/dailygoal`,this.classesUrl=`${e.apiEndpoint}/rest/classes`,this.tapeUrl=e.tapeUrl,this.tapeUrlApiKey=e.tapeUrlApiKey}getDailyGoalStatus(){return ke.get(`${this.baseUrl}/status`).json().catch((e=>(console.log("WebDailyGoal.getDailyGoalStatus:",e),Promise.reject(`WebDailyGoal.getDailyGoalStatus: ${e}`))))}getDailyGoal(){return ke.get(`${this.baseUrl}/goal`).json().catch((e=>(console.log("WebDailyGoal.getDailyGoal:",e),Promise.reject(`WebDailyGoal.getDailyGoal: ${e}`))))}setDailyGoal(e){return ke.put(`${this.baseUrl}/update`,{json:e}).then().catch((e=>(console.log("WebDailyGoal.setDailyGoal:",e),Promise.reject(`WebDailyGoal.setDailyGoal: ${e}`))))}getDailyGoalHistory(e,t){return ke.get(`${this.baseUrl}/history`,{searchParams:{from:e,to:t}}).json().then((e=>e.reduce(((e,t)=>({...e,[Ce(t.day).format("YYYY-MM-DD")]:{state:t.state}})),{}))).catch((e=>(console.log("WebDailyGoal.getDailyGoalHistory:",e),Promise.reject(`WebDailyGoal.getDailyGoalHistory: ${e}`))))}getGoalStatus(e,t,r){return Promise.all([this.queryGoals(e.target,t,r),this.queryUserGroupGoals(t,e.target,[_.Weekly,_.Monthly])]).then((([e,t])=>{const s={};return t.forEach((t=>{const n=t.value.interval.toLowerCase();s[n]=s[n]||{learningTime:"weekly"===n?e.weeklyTotalTime:e.monthlyTotalTime,goalInterval:t.value.interval},(!s[n].currentGoal||t.value.minutes>s[n].currentGoal)&&(s[n].currentGoal=t.value.minutes);const o=Ae.getGroupGoalDueDate(t.value,r);s[n].dueDate&&!s[n].dueDate.isBefore(o)||(s[n].dueDate=o)})),s}))}getGroupGoalSource(e,t,r,s){return this.queryUserGroupGoals(r,e.target,[t]).then((e=>e.map((e=>({name:e.groupName,owner:e.groupOwner,code:e.groupCode,goal:e.value.minutes,dueDate:Ae.getGroupGoalDueDate(e.value,s)})))))}queryUserGroupGoals(e,t,r){return ke.post(`${this.classesUrl}/userGroupGoals/${e}/${t}`,{json:r}).json()}queryGoals(e,t,r){return ke.post(`${this.tapeUrl}/reports/clpm/user-time`,{json:{isoDate:Ce().utcOffset(r).endOf("day").format(),user:t,language:e},mode:"cors",headers:{Authorization:`tlAuth ${this.tapeUrlApiKey}`}}).json()}static getGroupGoalDueDate(e,t){const r=e.interval.toLowerCase().slice(0,-2);return Ce().utcOffset(e.timezoneOffset).endOf(r).utcOffset(t)}}class De{constructor(e){this.platform=je.getPlatform(),this.baseURL=`${e.apiEndpoint}/rest/event-tracking`,this.publicURL=`${e.apiEndpoint}/rest/public/event-tracking`}onListAccess(e,t){return ke.post(`${this.baseURL}/list/access/${this.platform}`,{json:[{aaid:e,knownLanguageCode:t.known,targetLanguageCode:t.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onLessonAccess(e,t){return ke.post(`${this.baseURL}/lesson/access/${this.platform}`,{json:[{uuid:e,knownLanguageCode:t.known,targetLanguageCode:t.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onLessonPdfDownload(e,t){return ke.post(`${this.baseURL}/lesson/pdf/download/${this.platform}`,{json:{uuid:e,knownLanguageCode:t.known,targetLanguageCode:t.target,day:Math.floor((new Date).getTime()/1e3)}}).json()}onSupplementAccess(e){return ke.post(`${this.baseURL}/supplement/access/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onGrammarReferenceAccess(e){return ke.post(`${this.baseURL}/grammar-reference/access/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onKidSpeakAccess(e){return ke.post(`${this.baseURL}/kidspeak/access/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onMetadataView(e){return ke.post(`${this.baseURL}/metadata/view/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onBrowseSearch(e){return ke.post(`${this.baseURL}/user/search/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onSelectorChanged(e){return ke.post(`${this.baseURL}/selector/access/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,day:Math.floor((new Date).getTime()/1e3)}]}).json()}onSignUpFiltered(){return ke.post(`${this.publicURL}/signup/filtered`).json()}onResourceAccess(e,t,r){const s=t==w.WordOfTheDay,n=s?`${this.baseURL}/wotd/access/${this.platform}`:`${this.baseURL}/resource/access/${this.platform}/${t}`,o={targetLanguageCode:e.target,knownLanguageCode:e.known,day:Math.floor((new Date).getTime()/1e3)};return s&&Object.assign(o,r),ke.post(n,{json:[o]}).json()}onIdleMessage(e,t,r){const s=Object.assign({knownLanguageCode:t.known,targetLanguageCode:t.target,day:Math.floor((new Date).getTime()/1e3),displayed:e,playerType:r.playerType,activityType:r.activityType},r.data);return ke.post(`${this.baseURL}/idle-message`,{json:[s]}).json().catch((e=>(console.log("ERROR WebEventTracker.onIdleMessage:",e),Promise.reject([{code:"error.critical",message:e}]))))}onYearInReviewSocialShare(e,t,r,s){const n={targetLanguageCode:e.target,knownLanguageCode:e.known,day:Math.floor((new Date).getTime()/1e3),application:r,year:t};return Object.assign(n,s),ke.post(`${this.baseURL}/year-in-review/share/${this.platform}`,{json:[n]}).json()}onYearInReviewModalOpen(e,t,r){const s={targetLanguageCode:e.target,knownLanguageCode:e.known,day:Math.floor((new Date).getTime()/1e3),auto:r,year:t};return ke.post(`${this.baseURL}/year-in-review/access/${this.platform}`,{json:[s]}).json()}onListDownload(e){return ke.post(`${this.baseURL}/list/download/${this.platform}`,{json:{aaid:e,day:Math.floor((new Date).getTime()/1e3)}}).json()}onCourseDownload(e){return ke.post(`${this.baseURL}/course/download/${this.platform}`,{json:{uuid:e,day:Math.floor((new Date).getTime()/1e3)}}).json()}}class $e{constructor(e){this.platform=je.getPlatform(),this.baseUrl=`${e.apiEndpoint}/rest/time-tracker`}reportLearningTime(e,t,r){return console.log("WebTimeTracker.reportLearningTime",e,t),ke.post(`${this.baseUrl}/${this.platform}`,{json:[{aaid:e,learningTime:t,day:je.toZonedDateTime(r||new Date)}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportLearningTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportLessonLearningTime(e,t,r){return console.log("WebTimeTracker.reportLessonLearningTime",e,t),ke.post(`${this.baseUrl}/unitlesson/${this.platform}`,{json:[{lessonUuid:e,learningTime:t,day:je.toZonedDateTime(r||new Date)}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportLessonLearningTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportRefreshTime(e,t,r){return console.log("WebTimeTracker.reportRefreshTime",e.known,e.target,t),ke.post(`${this.baseUrl}/refresh/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,learningTime:t,day:je.toZonedDateTime(r||new Date)}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportRefreshTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportReferenceTime(e,t,r){return console.log("WebTimeTracker.reportReferenceTime",e.known,e.target,t),ke.post(`${this.baseUrl}/reference/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,learningTime:t,day:je.toZonedDateTime(r||new Date)}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportReferenceTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportHandsFreeTime(e,t){console.log("WebTimeTracker.reportHandsFreeTime",e.known,e.target,t.length);const r=[];for(let s=0;s(console.log("ERROR WebTimeTracker.reportHandsFreeTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportPracticeTime(e,t,r){return console.log("WebTimeTracker.reportPracticeTime",e.known,e.target,t.time),ke.post(`${this.baseUrl}/practice/${t.data?"status/":""}${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,learningTime:t.time,day:je.toZonedDateTime(r||new Date),activityType:t.type,listIds:t.data.listIds,lessonIds:t.data.lessonIds,mliHids:t.data.mliHids}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportPracticeTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportQuizTime(e,t,r){return console.log("WebTimeTracker.reportQuizTime",e.known,e.target,t.time),ke.post(`${this.baseUrl}/quiz/${t.data?"status/":""}${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,learningTime:t.time,day:je.toZonedDateTime(r||new Date),activityType:t.type,listIds:t.data.listIds,lessonIds:t.data.lessonIds,mliHids:t.data.mliHids,completionStatus:t.lessonStatus,successStatus:t.successStatus,score:t.score}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportQuizTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportKidSpeakTime(e,t,r){return console.log("WebTimeTracker.reportKidSpeakTime",e.known,e.target,t),ke.post(`${this.baseUrl}/kidspeak/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,learningTime:t,day:je.toZonedDateTime(r||new Date)}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportKidSpeakTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}reportSelfLearningTime(e,t,r){return console.log("WebTimeTracker.reportSelfLearningTime",e.known,e.target,t),ke.post(`${this.baseUrl}/self-reported/${this.platform}`,{json:[{knownLanguageCode:e.known,targetLanguageCode:e.target,learningTime:t,day:je.toZonedDateTime(r||new Date)}],keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebTimeTracker.reportKidSpeakTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}flushCache(){return ke.get(`${this.baseUrl}/flushCache`,{mode:"same-origin",keepalive:!0}).json().catch((e=>(console.log("ERROR WebTimeTracker.flushCache:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLearningTime(e,t){const r=t?`/${t.known}/${t.target}`:"";return ke.get(`${this.baseUrl}/learningtime/${e}${r}`).json().catch((e=>(console.log("ERROR WebTimeTracker.getLearningTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}getRefreshTime(e,t){const r=t?`/${t.known}/${t.target}`:"";return ke.get(`${this.baseUrl}/refreshtime/${e}${r}`).json().catch((e=>(console.log("ERROR WebTimeTracker.getRefreshTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}getTotalTime(e,t){const r=t?`/${t.known}/${t.target}`:"";return ke.get(`${this.baseUrl}/totaltime/${e}${r}`).json().catch((e=>(console.log("ERROR WebTimeTracker.getTotalTime:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class Ne{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest/profile`}setUserData(e){return console.log("WebUserData.setUserData",e),ke.post(`${this.baseUrl}/data`,{body:e,headers:{"Content-Type":"application/json; charset=utf-8"},keepalive:!0,mode:"same-origin"}).json().catch((e=>(console.log("ERROR WebUserData.setUserData:",e),Promise.reject(`WebUserData.setUserData: ${e}`))))}getUserData(){return console.log("WebUserData.getUserData"),ke.get(`${this.baseUrl}/data`).then((e=>e.text())).catch((e=>(console.log("ERROR WebUserData.getUserData:",e),Promise.reject(`WebUserData.getUserData: ${e}`))))}setUserListData(e,t){return console.log("WebUserData.setUserListData",e,t),ke.post(`${this.baseUrl}/data/lists/${e}`,{body:t,headers:{"Content-Type":"application/json; charset=utf-8"},keepalive:!0,mode:"same-origin"}).json().then(null,(e=>(console.log("ERROR WebUserData.setUserListData:",e),Promise.reject(`WebUserData.setUserListData: ${e}`))))}getUserListData(e){return console.log("WebUserData.getUserListData",e),ke.get(`${this.baseUrl}/data/lists/${e}`).then((e=>e.text())).catch((e=>(console.log("ERROR WebUserData.getUserListData:",e),Promise.reject(`WebUserData.getUserListData: ${e}`))))}getUserMultipleListData(e){return console.log("WebUserData.getUserMultipleListData",e),ke.post(`${this.baseUrl}/data/lists`,{json:e}).json().catch((e=>(console.log("ERROR WebUserData.getUserMultipleListData:",e),Promise.reject(`WebUserData.getUserMultipleListData: ${e}`))))}}class Ie{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest/ng/profile`,this.publicApiUrl=`${e.applicationLink}rest/public`,this.gssoURL=`${e.apiEndpoint}/rest/gsso`}getMobileCredentials(){return console.log("WebUserProfile.getMobileCredentials"),ke.get(`${this.baseUrl}/mobile`).json().catch((e=>(console.log("ERROR WebUserProfile.getMobileCredentials:",e),Promise.reject([{code:"error.critical",message:e}]))))}updateUserProfile(e){return delete e.password,delete e.passwordRetype,this.updateUserProfileInternal(e)}updateUserProfileInternal(e){return void 0!==e.allowOfflineMode&&(je.setCookie("allowOfflineMode",`${e.allowOfflineMode}`),delete e.allowOfflineMode),ke.post(this.baseUrl,{json:e}).json().catch((e=>(console.log("ERROR WebUserProfile.updateUserProfile:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.updateUserProfile:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}getProfile(){return console.log("WebUserProfile.getProfile"),ke.get(this.baseUrl,{timeout:!1}).json().then((e=>(e.allowOfflineMode="true"==je.getCookie("allowOfflineMode"),this.userUuid=e.uuid,e))).catch((e=>(console.log("ERROR WebProfile.getUserProfile:",e),Promise.reject([{code:"error.critical",message:e}]))))}getUserProfileStats(){return console.log("WebUserProfile.getProfileStats"),ke.get(`${this.baseUrl}/stats`,{timeout:!1}).json().catch((e=>(console.log("ERROR WebProfile.getProfileStats:",e),Promise.reject([{code:"error.critical",message:e}]))))}updateUserLocale(e){return console.log("WebUserProfile.updateUserLocale",e),ke.post(`${this.baseUrl}/locale/${e}`).json().catch((e=>(console.log("ERROR WebUserProfile.updateUserLocale:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.updateUserLocale:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}getUserLocale(){return console.log("WebUserProfile.getUserLocale"),ke.get(`${this.baseUrl}/locale`).json().catch((e=>(console.log("ERROR WebUserProfile.getUserLocale:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebUserProfile.getUserLocale:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}]))))}hasDuplicatedEmail(){return console.log("WebUserProfile.hasDuplicatedEmail"),ke.get(`${this.baseUrl}/email/duplicated`).json().catch((e=>(console.log("ERROR WebUserProfile.hasDuplicatedEmail:",e),Promise.reject([{code:"error.critical",message:e}]))))}getGroupCodesInfo(){return console.log("WebUserProfile.getGroupCodesInfo"),ke.get(`${this.publicApiUrl}/ng/groupcodes`).json().catch((e=>(console.log("ERROR WebUserProfile.getGroupCodesInfo:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebUserProfile.getGroupCodesInfo:",e.message),Promise.reject([{code:e.message}]))))}updateUserOrgCodes(e){return ke.post(`${this.baseUrl}/orgcodes/update`,{json:e}).json().catch((e=>(console.log("ERROR WebUserProfile.updateUserOrgCodes:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.updateUserOrgCodes:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}updateFirstTimeUser(e){return ke.post(`${this.baseUrl}/firstTimeUser/${e?"ON":"OFF"}`).json().catch((e=>(console.log("ERROR WebUserProfile.updateFirstTimeUser:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.updateFirstTimeUser:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}findLearnedLanguages(){return ke.get(`${this.baseUrl}/certificates/languages`).json().catch((e=>(console.log("ERROR WebUserProfile.findLearnedLanguages:",e),Promise.reject(`WebUserProfile.findLearnedLanguages: ${e}`))))}findLearnedCourses(e,t){return ke.get(`${this.baseUrl}/certificates/languages/${e}/${t}/courses`).json().catch((e=>(console.log("ERROR WebUserProfile.findLearnedCourses:",e),Promise.reject(`WebUserProfile.findLearnedCourses: ${e}`))))}forgetMe(){return ke.post(`${this.baseUrl}/forgetMe`).json().catch((e=>(console.log("ERROR WebUserProfile.forgetMe:",e),Promise.reject([{code:"error.critical",message:e}]))))}approveTermsAndPolicy(e){return ke.post(`${this.baseUrl}/approveTermsAndPolicy`,{json:e}).json().catch((e=>(console.log("ERROR WebUserProfile.approveTermsAndPolicy:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.approveTermsAndPolicy:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}getAllTimeZones(){return ke.get(`${this.baseUrl}/time-zones-list`).json().catch((e=>(console.log("ERROR WebUserProfile.getAllTimeZones:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebUserProfile.getAllTimeZones:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}]))))}updateUserTimeZoneId(e){return console.log("WebUserProfile.updateUserTimeZoneId",e),ke.post(`${this.baseUrl}/updateTimeZone`,{body:e}).json().catch((e=>(console.log("ERROR WebUserProfile.updateUserTimeZoneId:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.updateUserTimeZoneId:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}async getMyDataLink(){return`${this.baseUrl}/download`}async changeUserPassword(e,t,r){return ke.post(`${this.baseUrl}/changePassword`,{json:{oldPassword:t,newPassword:r}}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}]))).then((e=>{if(e.error)return Promise.reject([{code:e.message,value:e.value}])}))}async resetUserPassword(e,t){return ke.post(`${this.baseUrl}/changeTempPassword`,{json:{newPassword:t}}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}]))).then((e=>{if(e.error)return Promise.reject([{code:e.message,value:e.value}])}))}sendClientTimezone(e){return ke.post(`${this.baseUrl}/sendClientTimezone`,{body:e}).json().catch((e=>(console.log("ERROR WebUserProfile.sendClientTimezone:",e),Promise.reject([{code:"error.critical",message:e}]))))}upgradeGuestAccount(e){return void 0!==e.allowOfflineMode&&(je.setCookie("allowOfflineMode",`${e.allowOfflineMode}`),delete e.allowOfflineMode),Object.assign(e,{validateEmail:Boolean(e.email)}),ke.post(`${this.baseUrl}/guest/upgrade`,{json:e}).json().then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.upgradeGuestAccount:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}upgradeGuestAccountWithGoogle(e){return console.log("WebUserProfile.upgradeGuestAccountWithGoogle"),ke.post(`${this.baseUrl}/guest/google/upgrade`,{json:{credential:e}}).json().then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.upgradeGuestAccountWithGoogle:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}getAllProficiencyLevels(){return console.log("WebUserProfile.getAllProficiencyLevels"),ke.get(`${this.baseUrl}/proficiencyLevels/all`).json().catch((e=>(console.log("ERROR WebUserProfile.getAllProficiencyLevels:",e),Promise.reject([{code:"error.critical",message:e}]))))}getUserPreference(e){return console.log("WebUserProfile.getUserPreference"),ke.get(`${this.baseUrl}/userPreference`,{searchParams:{key:e}}).text().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}setUserPreference(e,t){return console.log("WebUserProfile.setUserPreference"),ke.post(`${this.baseUrl}/userPreference`,{json:{key:e,value:t}}).then((()=>{})).catch((e=>Promise.reject([{code:"error.critical",message:e}])))}getYearInReview(e,t){return console.log("WebUserProfile.getYearInReview"),ke.get(`${this.baseUrl}/yir/${t}/${e.known}/${e.target}`).json().then((r=>(r.imageUrl=je.protocolifyUrl(`${this.publicApiUrl}/yir/${this.userUuid}/${t}/${e.known}/${e.target}/image.png?action=DOWNLOAD`),r))).catch((e=>Promise.reject([{code:"error.critical",message:e}])))}getTutoringTile(){return ke.get(`${this.baseUrl}/tutoring`).json().catch((e=>(console.log("ERROR WebUserProfile.getTutoringTile:",e),Promise.reject(`WebUserProfile.getTutoringTile: ${e.message}`))))}rolloverAccount(e){return console.log("WebUserProfile.rolloverAccount for: ",e),ke.post(`${this.baseUrl}/rollover/${e}`,{timeout:!1}).json().then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.rolloverAccount:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}subscribeHubspotEmails(e,t){return ke.post(`${this.baseUrl}/hubspotEmails`,{json:t}).then((()=>{})).catch((e=>Promise.reject([{code:"error.critical",message:e}])))}async linkGoogleAccount(e){console.log("WebUserProfile.linkGoogleAccount"),await ke.post(`${this.gssoURL}/link`,{json:{credential:e}})}importLearningHistory(e,t,r){return console.log("WebUserProfile.importLearningHistory for: ",e),ke.post(`${this.baseUrl}/rollover/`,{json:{username:e,password:t,nodeName:r.nickname}}).json().then((e=>{if(!1!==e.error)return console.log("ERROR WebUserProfile.importLearningHistory:",e.message,e.addition),Promise.reject([{code:e.message,message:e.addition}])}))}}class We{constructor(e,t){this.srpSupport=t,this.authURL=`${e.apiEndpoint}/ng/auth`,this.logoutLink=`${e.apiEndpoint}/ng/logout`,this.gssoURL=`${e.applicationLink}rest/public/gsso`,this.jwtSsoURL=`${e.apiEndpoint}/ssoTicketLogin`}async login(e,t){const r={cKey:await this.srpSupport.srpValidate(e,t),I:e};return ke.post(this.authURL,{body:je.toKyFormData(r)}).catch((e=>{const t=e.response.headers.get("X-Error-Message")||We.loginErrorMessage,r=e.response.headers.get("X-Error-Value"),s=e.response.headers.get("X-User-Uuid"),n=e.response.headers.get("X-User-Email");return s&&n?Promise.reject({errorMessage:t,userUuid:s,userEmail:n,value:r}):Promise.reject({errorMessage:t,value:r})})).then((e=>e.error?Promise.reject({errorMessage:e.message}):e))}ticketLogin(){return ke.post(this.authURL).json().catch((()=>Promise.reject(We.loginErrorMessage))).then((e=>e?1==e.error?Promise.reject(e.message):void 0:Promise.reject(We.loginErrorMessage)))}logout(){return ke.post(this.logoutLink).json().catch((e=>e?Promise.reject(`Error WebAuthentication.logout: ${e}`):Promise.reject(We.logoutErrorMessage)))}guestLogin(e){return console.log("WebAuthentication.guestLogin"),ke.post(`${this.authURL}/guest`,{searchParams:{barCode:e}}).then().catch((e=>{const t=e.response.headers.get("X-Error-Message")||We.loginErrorMessage;return Promise.reject({errorMessage:t})}))}async googleSsoLogin(e){console.log("WebAuthentication.googleSsoLogin");const t=await ke.post(`${this.gssoURL}/login`,{json:{credential:e}}).json().then((e=>e.error?Promise.reject({errorMessage:e.message}):e.value));await ke.get(this.jwtSsoURL,{searchParams:{jwt:t}})}async googleSsoSignup(e,t){console.log("WebAuthentication.googleSsoSignup");const r=await ke.post(`${this.gssoURL}/signup`,{json:{credential:e,barCode:t}}).json().then((e=>e.error?Promise.reject({errorMessage:e.message}):e.value));await ke.get(this.jwtSsoURL,{searchParams:{jwt:r}})}}We.loginErrorMessage="error.login.invalid",We.loginAttemptsLeft="error.login.invalid.attempts",We.loginBlockedMessage="error.login.invalid.blocked",We.logoutErrorMessage="ERROR WebAuthentication.logout: logout failed";class xe{constructor(e,t){this.resolver=t,this.baseURL=`${e.apiEndpoint}/rest/mli`,this.briefleBaseURL=`${e.apiEndpoint}/rest/briefle`,this.listMediaBaseURL=`${e.apiEndpoint}/media`}synchronize(e){return ke.post(`${this.baseURL}/synchronize/v2`,{json:e,keepalive:!0}).json()}getByList(e){return ke.get(`${this.baseURL}/data/aaid/v2/${e}`).json()}getByHids(e){return ke.post(`${this.baseURL}/data/query/v2`,{json:e}).json()}moveToBucket(e){return ke.post(`${this.baseURL}/move`,{json:e}).json()}restoreItems(e){return ke.post(`${this.baseURL}/restore`,{json:e}).json()}getStatistics(e){return ke.get(`${this.baseURL}/statistics/${e.known}/${e.target}`).json()}getHistory(e,t){return ke.get(`${this.baseURL}/history/${e.known}/${e.target}/${t}`).json()}async getAllItems(e){const t=`${this.baseURL}/items/all/${e.languageSelector.known}/${e.languageSelector.target}`;return(await ke.get(t,{searchParams:{orderBy:e.orderBy,orderDir:e.orderDir,limit:e.limit}}).json()).map((e=>this.resolver.resolveMLI(e)))}getStaleItems(e){const t=`${this.baseURL}/items/stale/${e.languageSelector.known}/${e.languageSelector.target}`;return ke.get(t,{searchParams:{limit:e.limit}}).json()}getFreshItems(e){const t=`${this.baseURL}/items/fresh/${e.languageSelector.known}/${e.languageSelector.target}`;return ke.get(t,{searchParams:{limit:e.limit}}).json()}async getItemsToRefreshList(e,t){const r=`${this.baseURL}/refresh/items/${e.known}/${e.target}`;return(await ke.post(r,{json:t||{}}).json()).map((e=>this.resolver.resolveRefreshCard(e)))}async getSelectedItemsToRefreshList(e,t){const r=`${this.baseURL}/refresh/items/selected/${e.known}/${e.target}`;return(await ke.post(r,{json:t||{}}).json()).map((e=>this.resolver.resolveRefreshCard(e)))}async getRandomItemsList(e,t){const r=`${this.baseURL}/refresh/items/random/${e.known}/${e.target}`;return(await ke.post(r,{json:t||{}}).json()).map((e=>this.resolver.resolveRefreshCard(e)))}startMLIEditingSession(e,t){return Promise.all([ke.post(`${this.briefleBaseURL}/startEdit/${e.known}/${e.target}`,{json:t}).json(),ke.post(`${this.baseURL}/refresh/items/selected/${e.known}/${e.target}`,{json:{hids:t,filter:{archived:!0},limit:t.length}}).json()]).then((([e,t])=>({uuid:e,cards:t.map((e=>{const{card:t}=e;return t.sideOneSound&&0===t.sideOneSound.indexOf("tts://")&&(t.sideOneSound=null),this.resolver.resolveCard(t)}))})))}}class Ye{constructor(e){this.apiEndpoint=e.apiEndpoint,this.baseUrl=`${e.apiEndpoint}/api/lmss`}saveCourseCompletionStatus(e,t){return console.log("WebCourses.saveCourseCompletionStatus",e,t),ke.post(`${this.baseUrl}/learning/course/uuid/saveStatus`,{body:je.toKyFormData({courseUuid:e,completionStatus:t}),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},keepalive:!0,mode:"same-origin"}).then(null,(e=>(console.log("WebCourses.saveCourseCompletionStatus:",e),Promise.reject(`WebCourses.saveCourseCompletionStatus: ${e}`))))}saveUnitCompletionStatus(e){return ke.post(`${this.baseUrl}/learning/unit/saveStatusObject`,{json:{unitId:e.unitId,targetLesson:e.targetLesson,completionStatus:e.externalCompletionStatus,score:e.percentCompleted,status:e.status,time:1,assessmentScore:e.assessmentScore},keepalive:!0,mode:"same-origin"}).then(null,(e=>(console.log("WebCourses.saveUnitCompletionStatus:",e),Promise.reject(`WebCourses.saveUnitCompletionStatus: ${e}`))))}onLessonOpen(e){return console.log("WebCourses.onLessonOpen",e),ke.post(`${this.baseUrl}/ext/unit/lesson/${e}/open`).json().catch((e=>(console.log("ERROR WebCourses.onLessonOpen:",e),Promise.reject([{code:"error.critical",message:e}]))))}async getCompletionCertificate(e){return`${this.apiEndpoint}/rest/courses/${e}/certificate.pdf`}async getPlacementTestCertificate(e){return`${this.apiEndpoint}/rest/courses/${e}/placementResult.pdf`}async getUnitCompletionCertificate(e,t){return`${this.apiEndpoint}/rest/courses/${e}/units/${t}/certificate.pdf`}async getLessonGinPdfUrl(e){return e.pdfPath}getPlacementTestResultLink(e){return ke.get(`${this.apiEndpoint}/rest/courses/${e}/placementResultLink`,{mode:"same-origin"}).then((e=>e.text())).catch((e=>(console.log("WebCourses.getPlacementTestResultLink:",e),Promise.reject(`WebCourses.getPlacementTestResultLink: ${e}`))))}getCourse(e){return ke.get(`${this.baseUrl}/learning/course.json`,{searchParams:e}).json().then((e=>{if(e)return e.path=e.path.replace(/^https?:/,""),e;throw new Error("Course not found")}))}}class Be{constructor(e){this.settings=e,this._learningPath=[],this.baseURL=`${this.settings.apiEndpoint}/rest/learningpath`}getLearningPath(e){return ke.get(`${this.baseURL}/${e.known}/${e.target}`).json().then((e=>(this._learningPath=e,e)))}purgeLearningPath(e){return ke.delete(`${this.baseURL}/byLanguages/${e.known}/${e.target}`).then((()=>{this._learningPath=[]}))}addLesson(e,t,r){return ke.put(`${this.baseURL}/${r.known}/${r.target}/${e}/${t}`).json().then((e=>(this._learningPath.push(e),e)))}addAllLessons(e,t){return ke.put(`${this.baseURL}/${t.known}/${t.target}/addLessons`,{json:e}).json().then((e=>(this._learningPath=this._learningPath.concat(e),e)))}removeLesson(e,t,r){return ke.delete(`${this.baseURL}/${r.known}/${r.target}/${e}/${t}`).then((()=>{const r=this.findLessonIndex(e,t);-1!==r&&this._learningPath.splice(r,1)}))}removeLessons(e,t){return ke.post(`${this.baseURL}/${t.known}/${t.target}/delete`,{json:e}).then((()=>{e.forEach((e=>{const t=this.findLessonIndex(e.type,e.id);-1!==t&&this._learningPath.splice(t,1)}))}))}moveBefore(e,t){const r=this.findLessonIndex(e.type,e.id),s=this.findLessonIndex(t.type,t.id);if(-1===r)return Promise.reject(`Specified Lesson does not exist: ${e.type}:${e.id}`);const n=this._learningPath[r];if(-1===s)return Promise.reject(`Specified Lesson does not exist: ${t.type}:${t.id}`);const o=this._learningPath[s];return ke.put(`${this.baseURL}/${n.type}/${n.id}/${o.position}`).then((()=>{const e=o.position;for(let e=s;e<=r;e++)this._learningPath[e].position+=1;n.position=e,this.sort()}))}moveAfter(e,t){const r=this.findLessonIndex(e.type,e.id),s=this.findLessonIndex(t.type,t.id);if(-1===r)return Promise.reject(`Specified Lesson does not exist: ${e.type}:${e.id}`);const n=this._learningPath[r];if(-1===s)return Promise.reject(`Specified Lesson does not exist: ${t.type}:${t.id}`);const o=this._learningPath[s];return ke.put(`${this.baseURL}/${n.type}/${n.id}/${o.position}`).then((()=>{const e=o.position;for(let e=r+1;e<=s;e++)this._learningPath[e].position-=1;n.position=e,this.sort()}))}markLearned(e,t){const r=this.findLessonIndex(e,t);return ke.put(`${this.baseURL}/markLearned/${e}/${t}`).json().then((e=>(-1!=r&&this._learningPath.splice(r,1),e)))}addRandomLesson(e,t){return ke.put(`${this.baseURL}/addRandom/${e.known}/${e.target}/${t}`).json().then((e=>(e&&this._learningPath.push(e),e)))}synchronize(e,t){return ke.post(`${this.baseURL}/synchronize/${e.known}/${e.target}`,{json:t}).json()}findLessonIndex(e,t){return this._learningPath.findIndex((r=>r.type.toUpperCase()===e.toUpperCase()&&r.id==t))}sort(){this._learningPath.sort(((e,t)=>e.position>t.position?1:e.position(console.log("ERROR WebMisc.getNodesByUsername:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>0===e.length?Promise.reject([{code:"error.user.not.found"}]):e))}}var He=t.ContainerType,ze=t.FlexibleCategoryType,qe=t.LessonType;class Ve{constructor(e,t){this.resolver=t,this.baseURL=`${e.apiEndpoint}/rest`}static isUUID(e){return 36==e.length}getItems(e,t){return null==t?this.getRootItems(e):"ASSIGNMENTS"===t.id?this.getClassesWithAssignments(e):"USER_CREATED_CONTENT"===t.id?this.getUserCreatedMetaCategories(e):t.type===He.Course?this.getCourseUnits(e,t):t.type===He.Unit?this.getUnitLessons(t):t.type===He.Category?this.getListsAndCoursesByCategory(e,t):t.type===He.Class?this.getAssignedLessons(e,t):void 0}getLessonAncestors(e,t,r){return ke.get(`${this.baseURL}/v2/content/ancestors/languages/${e.known}/${e.target}/${t}/${r}`).json()}_isCategoryUserCreated(e){return[ze.Community,ze.CommunityLessons,ze.UserPublic,ze.UserPrivate,ze.UserPublicLessons,ze.UserPrivateLessons].includes(e)}_processContentItem(e){if(e.type==He.Category)return Object.assign({},e.object,{id:e.id,type:He.Category,isContainer:!0,fcType:e.object.type,isVocabulary:!1,userCreated:this._isCategoryUserCreated(e.object.type),description:e.object.description,cardCounts:e.cardCounts,tags:e.tags});if(e.type==He.Course){const t={type:He.Course,isContainer:!0,id:e.id,title:e.title||e.object.name,cardCounts:e.cardCounts,tags:e.tags};return e.object&&Object.assign(t,{description:e.object.description,rawid:e.object.id,courseType:e.object.type,sideOneLanguageCode:e.object.sideOneLanguageName,sideTwoLanguageCode:e.object.sideTwoLanguageName,pc:e.object.percentCompleted,progress:e.object.percentCompleted}),t}return e.type===qe.UnitLesson||e.type===qe.List?e.object:e.type===He.Unit?e:e.type===He.Class?{type:He.Class,isContainer:!0,id:e.id,title:e.title}:{type:He.Root,id:e.type,isContainer:!0,cardCounts:e.cardCounts}}getLessonAncestorsChains(e,t,r){return(t==He.Root||t===He.Category&&!Ve.isUUID(r))&&(t=r),ke.get(`${this.baseURL}/v2/content/breadcrumbs/languages/${e.known}/${e.target}/${t}/${r}`).json().then((e=>{const t=[];for(let r=0;re.map((e=>this.resolver.resolveCard(e)))))}getItemsContent(e){return Promise.all(e.map((e=>this.getItemContent(e)))).then((t=>e.reduce(((e,r,s)=>({...e,[r.id]:t[s]})),{})))}getAllNestedLessons(e,t){return ke.get(`${this.baseURL}/v2/content/nested/${e.type.toUpperCase()}/${e.id}/${t.known}/${t.target}`).json()}bulkAddToPath(e,t,r){return ke.get(`${this.baseURL}/v2/content/bulk/addToLP/${e.type.toUpperCase()}/${e.id}/${t.known}/${t.target}`,{searchParams:{dryRun:r}}).json().then((e=>({lessons:e})))}bulkMarkLearned(e,t,r){return ke.get(`${this.baseURL}/v2/content/bulk/markLearned/${e.type.toUpperCase()}/${e.id}/${t.known}/${t.target}`,{searchParams:{dryRun:r}}).json()}getSuggestionStatuses(e){return ke.post(`${this.baseURL}/v2/content/available`,{json:e}).json()}addSuggestionToPath(e,t){return ke.get(`${this.baseURL}/v2/content/bulk/addToLP/${e.type.toUpperCase()}/${e.uuid}/${t.known}/${t.target}`).json()}getShareableLink(e,t){const r=void 0===t?void 0:{searchParams:{activity:t}};return ke.get(`${this.baseURL}/v2/content/link/${e}`,r).text()}getItem(e,t){return ke.get(`${this.baseURL}/v2/content/items/${t}/${e}`).json().then((e=>this._processContentItem(e))).catch((e=>(console.log("WebContentBrowser.getItem:",e),Promise.reject(`WebContentBrowser.getItem: ${e}`))))}getRootItems(e){return ke.get(`${this.baseURL}/v2/content/root/languages/${e.known}/${e.target}`).json().then((e=>e.map((e=>this._processContentItem(e)))))}getUserCreatedMetaCategories(e){return ke.get(`${this.baseURL}/v2/content/categories/community/languages/${e.known}/${e.target}`).json().then((e=>e.map((e=>this._processContentItem(e)))))}getUnitLessons(e){return ke.get(`${this.baseURL}/content/lessons/unit/${e.id}`).json()}getAssignedLessons(e,t){return ke.get(`${this.baseURL}/classes/uuid/${t.id}/${e.known}/${e.target}/lessons`).json()}getClassesWithAssignments(e){return ke.get(`${this.baseURL}/classes/languages/${e.known}/${e.target}/withAssignments`).json().then((e=>e.map((e=>({type:He.Class,isContainer:!0,id:e.uuid,rawid:e.id,title:e.name,code:e.code,comment:e.comment,teacher:e.teacher,teacherEmail:e.teacherEmail,languageName:e.language,totalMessage:e.totalMessages,unreadMessages:e.unreadMessages})))))}getCourseUnits(e,t){return-1==t.id?this.getLessonGinLessons(e):Promise.all([ke.get(`${this.baseURL}/content/lessons/course/${t.id}`).json(),ke.get(`${this.baseURL}/content/materials/course/${t.id}`).json()]).then((([e,t])=>{const r=[];if(t)for(let e=0;e(e.title||e.name)>(t.title||t.name)?1:-1));for(let t=0;t{const s=[];for(let e=0;ee.map((e=>this._processContentItem(e)))))}}function Ze(e){const t={};for(const r in e){const s=e[r],n={};for(let e=0;e1&&(null!=n[t[0]]?n[t[0]].push(t[1]):n[t[0]]=[t[1]])}t[r]=n}return t}class Ke{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest/altanswers`}add(e,t,r){return console.log("WebAltAnswer.add",e,t,r),ke.post(`${this.baseUrl}/cards/${e}/${t}/add`,{body:r,headers:{"Content-Type":"application/json; charset=utf-8"}}).json().catch((e=>(console.log("ERROR WebAltAnswer.add:",e),Promise.reject([{code:"error.critical",message:e}]))))}remove(e,t,r){return console.log("WebAltAnswer.remove",e,t,r),ke.post(`${this.baseUrl}/cards/${e}/${t}/remove`,{body:r,headers:{"Content-Type":"application/json; charset=utf-8"}}).json().catch((e=>(console.log("ERROR WebAltAnswer.remove:",e),Promise.reject([{code:"error.critical",message:e}]))))}query(e,t,r){return console.log("WebAltAnswer.query",e,t,r),ke.post(`${this.baseUrl}/cards/${e}/${t}/query`,{body:r,headers:{"Content-Type":"application/json; charset=utf-8"}}).json().catch((e=>(console.log("ERROR WebAltAnswer.query:",e),Promise.reject([{code:"error.critical",message:e}]))))}getByList(e){return console.log("WebAltAnswer.getByList",e),ke.get(`${this.baseUrl}/lists/${e}`).json().then((e=>Ze(e))).catch((e=>(console.log("ERROR WebAltAnswer.getByList:",e),Promise.reject([{code:"error.critical",message:e}]))))}getByLists(e){return console.log("WebAltAnswer.getByLists",e),ke.post(`${this.baseUrl}/lists/`,{json:e}).json().then((e=>Ze(e))).catch((e=>(console.log("ERROR WebAltAnswer.getByLists:",e),Promise.reject([{code:"error.critical",message:e}]))))}getByLessons(e){return console.log("WebAltAnswer.getByLessons",e),ke.post(`${this.baseUrl}/lessons/`,{json:e}).json().then((e=>Ze(e))).catch((e=>(console.log("ERROR WebAltAnswer.getByLessons:",e),Promise.reject([{code:"error.critical",message:e}]))))}getByHids(e,t){return console.log("WebAltAnswer.getByHids",e),ke.post(`${this.baseUrl}/cards${t?"/"+t:""}`,{json:e}).json().then((e=>Ze(e))).catch((e=>(console.log("ERROR WebAltAnswer.getByHids:",e),Promise.reject([{code:"error.critical",message:e}]))))}}const Je=Object.values(l).join(",");class Xe{constructor(e){this.baseURL=`${e.apiEndpoint}/rest/classes`}enroll(e,t){const r=new URLSearchParams({tags:Je});return[u.Manual,u.Barcode,u.Ip].includes(t)&&r.append("method",t),ke.post(`${this.baseURL}/enroll/${e}`,{searchParams:r}).json().then((e=>!!e.status||Promise.reject(e.reasonKey)))}unenroll(e,t){return this.removeFromClass("unenroll",e,t)}resetAfterRemoving(e,t){return this.removeFromClass("resetAfterRemoving",e,t)}removeFromClass(e,t,r){return ke.post(`${this.baseURL}/${e}/${t}`,{searchParams:{tags:Je,removeAssignments:!!r}}).json().then((e=>{if(!e.status)return Promise.reject(e.reasonKey)}))}findByCodeAndTags(e,t){return ke.get(`${this.baseURL}/codes/${e}`,{searchParams:{tags:t.join(",")}}).json()}findByTags(e){return ke.get(this.baseURL,{searchParams:{tags:e.join(",")}}).json()}getLessons(e){return ke.get(`${this.baseURL}/uuid/${e}/lessons`).json()}getMessages(e){return ke.get(`${this.baseURL}/uuid/${e}/messages.json`).json()}markMessageAsRead(e){return ke.post(`${this.baseURL}/message/${e}/read`).json()}createClass(e){return ke.post(this.baseURL,{json:e}).json().catch((e=>(console.log("ERROR WebClasses.createClass:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(e.error)return Promise.reject([{code:e.message,message:e.addition}])}))}getUniqueRandomCode(){return ke.get(`${this.baseURL}/code`).then((e=>e.text())).catch((e=>(console.log("ERROR WebClasses.getUniqueRandomCode:",e),Promise.reject([{code:"error.critical",message:e}]))))}getAvailableCohorts(){return ke.get(`${this.baseURL}/cohorts`).json().catch((e=>(console.log("ERROR WebClasses.getAvailableCohorts:",e),Promise.reject([{code:"error.critical",message:e}]))))}getGroupsByBarcode(e){return ke.get(`${this.baseURL}/groups/barcode/${encodeURIComponent(e)}`).json().catch((e=>(console.log("ERROR WebClasses.getGroupsByBarcode:",e),Promise.reject([{code:"error.critical",message:e}]))))}getUsersInstructorSummaries(){return ke.get(`${this.baseURL}/instructors`).json().catch((e=>(console.log("ERROR WebClasses.getUsersInstructorSummaries:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class Qe{constructor(e,t){this.resolver=t,this.baseUrl=e.applicationLink,this.apiEndpoint=e.apiEndpoint}getList(e){return console.log("WebListRepository.getList",e),ke.get(`${this.apiEndpoint}/rest/ng/list/${e}`).json().then((e=>this.updateCards(e))).catch((e=>(console.log("ERROR WebListRepository.getList:",e),Promise.reject([{code:"error.critical",message:e.message}]))))}getLists(e){return console.log("WebListRepository.getLists",e),ke.post(`${this.apiEndpoint}/rest/ng/list`,{json:e}).json().then((e=>{for(const t of e)this.updateCards(t);return e})).catch((e=>(console.log("ERROR WebListRepository.getLists:",e),Promise.reject([{code:"error.critical",message:e.message}]))))}async getMediaElementResolver(){return e=>this.resolver.resolve(e)}async getB4xExportUrl(e,t){const r=new URLSearchParams({from:"WEB"});return t&&r.append("named","true"),`${this.apiEndpoint}/rest/lists/${e.id}.b4x?${r}`}async getMediaBaseURL(e){return`${this.baseUrl}game/media/${e.head.id}/`}updateCards(e){const t="side1_sound",r="side2_sound",s="side2_picture";for(let n=0;n(console.log("ERROR WebLearningOrder.getActivityTemplate:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class tt{constructor(e){this.baseUrl=`${e.apiEndpoint}/rest`,this.ldsUrl=je.protocolLessUrl(je.normalizeUrl(e.ldsServer))}getLanguages(){return ke.get(`${this.baseUrl}/languages/available`).json().catch((e=>(console.log("WebLanguages.getLanguages:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLanguagesWithMLI(){return ke.get(`${this.baseUrl}/languages/available/withMLI`).json().catch((e=>(console.log("WebLanguages.getLanguagesWithMLI:",e),Promise.reject([{code:"error.critical",message:e}]))))}getCurrentLanguageSelector(){return ke.get(`${this.baseUrl}/languages/selector`).json().catch((e=>(console.log("WebLanguages.getCurrentLanguageSelector:",e),Promise.reject([{code:"error.critical",message:e}]))))}setCurrentLanguageSelector(e){return ke.put(`${this.baseUrl}/languages/selector/${e.known}/${e.target}`).json().catch((e=>(console.log("WebLanguages.setCurrentLanguageSelector:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLanguageResources(e){return ke.get(`${this.baseUrl}/languages/resources/${e.known}/${e.target}`).json().catch((e=>(console.log("WebLanguages.getLanguageResources:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:Promise.reject([{code:e.message,message:e.addition}])))}async hasReferenceMaterials(e){const t=!!(await this.getAlphabetURL(e)).alphabet;return{hasReferenceMaterials:t,existForLanguage:t}}getAlphabetURL(e){return ke.get(`${this.baseUrl}/lms/${e.known}/${e.target}/alphabet`).json().then((e=>({alphabet:je.protocolLessUrl(e.alphabet),overview:e.overview}))).catch((e=>(console.log("WebLanguages.getAlphabetURL:",e),Promise.reject([{code:"error.critical",message:e}]))))}getAlphabetReferences(e){return ke.get(`${this.baseUrl}/lms/${e.known}/${e.target}/references`).json().catch((e=>(console.log("WebLanguages.getAlphabetReferences:",e),Promise.reject([{code:"error.critical",message:e}]))))}getFontsInfo(e){return ke.get(`${this.ldsUrl}font/info/${e.known}/${e.target}`).json().catch((e=>(console.log("WebLanguages.getFontsInfo:",e),Promise.reject([{code:"error.critical",message:e}]))))}getAvantProficiencyTests(e){return ke.get(`${this.baseUrl}/proficiencytests/${e}`).json().then((e=>{for(const t of e)t.url=`${this.baseUrl}/proficiencytests/redirect/${t.code}`;return e})).catch((e=>(console.log("WebLanguages.getAvantProficiencyTests:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLocalizedLanguages(e){return ke.get(`${this.baseUrl}/public/languages/${e}`).json().catch((e=>(console.log("WebLanguages.getLocalizedLanguages:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLocalizedDialects(e){return ke.get(`${this.baseUrl}/public/languages/dialects/${e}`).json().catch((e=>(console.log("WebLanguages.getLocalizedDialects:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class rt{constructor(e){this.platform=je.getPlatform(),this.baseUrl=`${e.apiEndpoint}/rest/learningstate`}setLastAccessedLesson(e,t,r){return console.log("WebLearningState.setLastAccessedLesson",e,t,r),ke.post(`${this.baseUrl}/save/${e.known}/${e.target}/${t}/${r}`).json().catch((e=>(console.log("ERROR WebLearningState.setLastAccessedLesson:",e),Promise.reject([{code:"error.critical",message:e}]))))}onLessonExit(e,t,r){return console.log("WebLearningState.onLessonExit",e,t,r),ke.post(`${this.baseUrl}/leave/${e.known}/${e.target}/${t}/${r}`).json().catch((e=>(console.log("ERROR WebLearningState.onLessonExit:",e),Promise.reject([{code:"error.critical",message:e}]))))}getLastAccessedLesson(e){return console.log("WebLearningState.getLastAccessedLesson"),ke.get(`${this.baseUrl}/lastlearned/${e.known}/${e.target}`).json().then((e=>e.value)).catch((e=>(console.log("ERROR WebLearningState.getLastAccessedLesson:",e),Promise.reject([{code:"error.critical",message:e.message}]))))}getShowResumeNotifications(){return console.log("WebLearningState.getShowResumeNotifications"),ke.get(`${this.baseUrl}/notifications/show/${this.platform}`).json().catch((e=>(console.log("ERROR WebLearningState.getShowResumeNotifications:",e),Promise.reject([{code:"error.critical",message:e}]))))}setShowResumeNotifications(e){return console.log("WebLearningState.setShowResumeNotifications",e),ke.put(`${this.baseUrl}/notifications/show/${this.platform}`,{searchParams:{show:e}}).json().catch((e=>(console.log("ERROR WebLearningState.setShowResumeNotifications:",e),Promise.reject([{code:"error.critical",message:e}]))))}synchronize(e){return console.log("WebLearningState.synchronize",e),ke.post(`${this.baseUrl}/synchronize`,{json:e}).json().catch((e=>(console.log("ERROR WebLearningState.synchronize:",e),Promise.reject([{code:"error.critical",message:e}]))))}}class st{constructor(e){this.settings=e,this.baseUrl=`${this.settings.apiEndpoint}/rest/ng/profile/subscriptions`}getLanguageSubscriptions(e){return console.log("WebLicenses.getLanguageSubscriptions"),ke.get(this.baseUrl,{searchParams:{includeExpired:!!e}}).json().catch((e=>(console.log("ERROR WebLicenses.getLanguageSubscriptions:",e),Promise.reject([{code:"error.critical",message:e.message}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebLicenses.getLanguageSubscriptions:",e.message),Promise.reject([{code:e.message}]))))}getECommerceSubscriptions(){return console.log("WebLicenses.getECommerceSubscriptions"),ke.get(`${this.settings.apiEndpoint}/rest/ng/profile/subscriptions/e-commerce`).json().catch((e=>(console.log("ERROR WebLicenses.getECommerceSubscriptions:",e),Promise.reject([{code:"error.critical",message:e.message}])))).then((e=>0==e.error?e.value:(console.log("ERROR WebLicenses.getECommerceSubscriptions:",e.message),Promise.reject([{code:e.message}]))))}activate(e,t){return console.log("WebLicenses.activate",e),ke.post(`${this.baseUrl}/activate`,{json:{actCode:e,isInstructorCode:t.isInstructorCode,knownCode:t.selector?t.selector.known:void 0,learnCode:t.selector?t.selector.target:void 0,validateOnly:t.dryRun}}).json().catch((e=>(console.log("ERROR WebLicenses.activate:",e),Promise.reject([{code:"error.critical",message:e.message}])))).then((async e=>!1===e.error?e.value:e.message.startsWith("error.actcode.alreadyactive")?{status:E.Duplicate,selector:{targetCode:e.addition}}:(console.log("ERROR WebLicenses.activate:",e.message,e.value,e.addition),Promise.reject([{code:e.message,value:null!=e.addition&&e.addition}]))))}getActiveSubscriptionsCount(e){return console.log("WebLicenses.getActiveSubscriptionsCount",e),ke.get(`${this.settings.apiEndpoint}/rest/ng/profile/subscriptions/counts/${e}`).json().catch((e=>(console.log("ERROR WebLicenses.getActiveSubscriptionsCount:",e),Promise.reject([{code:"error.critical",message:e.message}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebLicenses.getActiveSubscriptionsCount:",e.message,e.value),Promise.reject([{code:e.message,value:!1}]))))}getSubscriptionLanguages(e){return console.log("WebLicenses.getSubscriptionLanguages",e),ke.post(`${this.baseUrl}/languages`,{json:{actCode:e}}).json().catch((e=>(console.log("ERROR WebLicenses.getSubscriptionLanguages:",e),Promise.reject([{code:"error.critical",message:e.message}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebLicenses.getSubscriptionLanguages:",e.message,e.value,e.addition),Promise.reject([{code:e.message,value:null!==e.addition&&e.addition}]))))}getAvailableLanguages(e){return console.log("WebLicenses.getAvailableLanguages",e),ke.post(`${this.baseUrl}/freechoice/languages`,{json:{actCode:e}}).json().catch((e=>(console.log("ERROR WebLicenses.getAvailableLanguages:",e),Promise.reject([{code:"error.critical",message:e.message}])))).then((e=>!1===e.error?null!==e.value?e.value:[]:(console.log("ERROR WebLicenses.getAvailableLanguages:",e.message,e.value,e.addition),Promise.reject([{code:e.message,value:null!==e.addition&&e.addition}]))))}cancelFastSpringSubscription(e){return ke.delete(`${this.settings.apiEndpoint}/rest/fastspring/${e}`).then((()=>{}))}restoreFastSpringSubscription(e){return ke.put(`${this.settings.apiEndpoint}/rest/fastspring/${e}`).then((()=>{}))}updateFastSpringSubscriptionProduct(e,t){return ke.post(`${this.settings.apiEndpoint}/rest/fastspring/${e}/${t}`).then((()=>{}))}activateTrialSubscription(){return ke.post(`${this.settings.apiEndpoint}/rest/ng/profile/trial/start`).then((()=>{}))}async waitForSubscription(e){let t=null;for(let r=0;r<30;r++){try{t=await ke.get(`${this.settings.apiEndpoint}/rest/fastspring/${e}`).json()}catch(e){console.warn(e)}if(null==t){console.log(` Subscription ${e} is missing`),await je.timeout(2e3);continue}console.log(t);const r=(t.paidUntilDate-(new Date).getTime()/1e3)/86400;if(!t.updating&&r>0)return void console.log(`The subscription ${e} is ready. ${t}`);console.warn(`The subscription ${e} is NOT ready. ${t}`),await je.timeout(2e3)}return Promise.reject()}upgradeSubscriptionNow(e){return ke.post(`${this.settings.apiEndpoint}/rest/fastspring/${e}`).then((()=>{})).catch((e=>(console.log("ERROR WebLicenses.upgradeSubscriptionNow:",e),Promise.reject([{code:e.message}]))))}getUpgradeNowPaymentSummary(e){return ke.get(`${this.settings.apiEndpoint}/rest/fastspring/${e}/payment`).json().catch((e=>(console.log("ERROR WebLicenses.getUpgradeNowPaymentSummary:",e),Promise.reject([{code:e.message}]))))}}const nt=/iPhone/i,ot=/iPod/i,it=/iPad/i,at=/\bAndroid(?:.+)Mobile\b/i,lt=/Android/i,ct=/\bAndroid(?:.+)SD4930UR\b/i,ut=/\b(Kindle|Android(?:.+)(?:KF[A-Z]{2,4}))\b/i,ht=/Windows Phone/i,dt=/\bWindows(?:.+)ARM\b/i,gt=/BlackBerry/i,pt=/BB10/i,ft=/Opera Mini/i,mt=/\b(CriOS|Chrome)(?:.+)Mobile/i,yt=/Mobile(?:.+)Firefox\b/i;function bt(e,t){return e.test(t)}const vt=function(e=navigator.userAgent){let t=e.split("[FBAN");void 0!==t[1]&&(e=t[0]),t=e.split("Twitter"),void 0!==t[1]&&(e=t[0]);const r={apple:{phone:bt(nt,e)&&!bt(ht,e),ipod:bt(ot,e),tablet:!bt(nt,e)&&bt(it,e)&&!bt(ht,e),device:(bt(nt,e)||bt(ot,e)||bt(it,e))&&!bt(ht,e)},amazon:{phone:bt(ct,e),tablet:!bt(ct,e)&&bt(ut,e),device:bt(ct,e)||bt(ut,e)},android:{phone:!bt(ht,e)&&bt(ct,e)||!bt(ht,e)&&bt(at,e),tablet:!bt(ht,e)&&!bt(ct,e)&&!bt(at,e)&&(bt(ut,e)||bt(lt,e)),device:!bt(ht,e)&&(bt(ct,e)||bt(ut,e)||bt(at,e)||bt(lt,e))||bt(/\bokhttp\b/i,e)},windows:{phone:bt(ht,e),tablet:bt(dt,e),device:bt(ht,e)||bt(dt,e)},other:{blackberry:bt(gt,e),blackberry10:bt(pt,e),opera:bt(ft,e),firefox:bt(yt,e),chrome:bt(mt,e),device:bt(gt,e)||bt(pt,e)||bt(ft,e)||bt(yt,e)||bt(mt,e)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}();class _t{constructor(e){this.settings=e;let t=Date.now();const r=()=>{const e=Date.now();!vt.any&&e-t>=4e3&&this.applicationModeChangedListener&&(this.applicationModeChangedListener(this._getApplicationMode(!1,t)),this.applicationModeChangedListener(this._getApplicationMode(!0,e))),t=e,setTimeout(r,2e3)};r(),document.addEventListener("visibilitychange",(()=>{this.applicationModeChangedListener&&this.applicationModeChangedListener(this._getApplicationMode(!document.hidden,document.hidden?t:Date.now()))}))}onApplicationModeChanged(e){this.applicationModeChangedListener=e}async getApplicationMode(){return{active:!document.hidden,locked:!1,online:!0,logged_in:this.settings.loggedIn}}_getApplicationMode(e,t){return{locked:!1,online:!0,logged_in:this.settings.loggedIn,active:e,timestamp:t,previous:{locked:!1,online:!0,logged_in:this.settings.loggedIn,active:!e}}}}class wt{constructor(e,t){this.srpModule=t;const r=e.applicationLink+"rest";this.basePublicUrl=`${r}/public`,this.baseUrl=`${r}/public/ng`,this.basePrivateUrl=e.applicationLink+"game/rest/ng/profile"}getLanguagesOfInterest(){return console.log("WebRegistration.getLanguagesOfInterest"),ke.get(`${this.basePublicUrl}/languages/langofinterest`).json().catch((e=>(console.log("ERROR WebRegistration.getLanguagesOfInterest:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebRegistration.getLanguagesOfInterest:",e.message),Promise.reject([{code:e.message}]))))}checkUserId(e){return console.log("WebRegistration.checkUserId"),ke.post(`${this.baseUrl}/checkuserid`,{json:{userId:e}}).json().catch((e=>(console.log("ERROR WebRegistration.checkUserId:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error||(console.log("ERROR WebRegistration.checkUserId:",e.message),Promise.reject([{code:e.message}]))))}checkClassEnrollmentCodes(e){return console.log("WebRegistration.checkClassEnrollmentCodes",e),ke.post(`${this.basePrivateUrl}/checkclasscodes`,{json:e}).json().catch((e=>(console.log("ERROR WebRegistration.checkClassEnrollmentCodes:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebRegistration.checkClassEnrollmentCodes:",e.message),Promise.reject([{code:e.message}]))))}checkRequireEmailValidation(){return console.log("WebRegistration.checkRequireEmailValidation"),ke.get(`${this.baseUrl}/checkreqemailval`).json().catch((e=>(console.log("ERROR WebRegistration.checkRequireEmailValidation:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:(console.log("ERROR WebRegistration.checkRequireEmailValidation:",e.message),Promise.reject([{code:e.message}]))))}checkActivationCode(e,t){return console.log("WebRegistration.checkActivationCode",e),ke.post(`${this.baseUrl}/subscriptions/validate`,{json:{actCode:e,isInstructorCode:t.isInstructorCode,knownCode:t.selector?t.selector.known:void 0,learnCode:t.selector?t.selector.target:void 0,validateOnly:t.dryRun}}).json().catch((e=>(console.log("ERROR WebRegistration.checkActivationCode:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1===e.error?e.value:e.message.startsWith("error.actcode.alreadyactive")?{status:E.Duplicate,selector:{targetCode:e.addition}}:(console.log("ERROR WebRegistration.checkActivationCode:",e.message,e.value,e.addition),Promise.reject([{code:e.message,value:null!=e.addition&&e.addition}]))))}async register(e){console.log("WebRegistration.register");const t=Object.assign({},e);t.password=await this.srpModule.srpGenerate(t.login,t.password),delete t.retype;const r=void 0!==t.owner?this.basePrivateUrl:this.baseUrl;return ke.post(`${r}/register`,{json:t}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}]))).then((e=>e.error?Promise.reject([{code:e.message,message:e.addition}]):e))}checkDuplicateUsername(e){return console.log("WebRegistration.checkDuplicateUsername"),ke.get(`${this.baseUrl}/checkuserexists`,{searchParams:{login:e}}).json().catch((e=>(console.log("ERROR WebRegistration.checkDuplicateUsername:",e),Promise.reject([{code:"error.critical",message:e}]))))}checkDuplicateEmail(e){return console.log("WebRegistration.checkDuplicateEmail"),ke.get(`${this.baseUrl}/validateemail`,{searchParams:{email:e}}).json().catch((e=>(console.log("ERROR WebRegistration.checkDuplicateEmail:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>!1!==e.error&&(console.log("ERROR WebRegistration.checkDuplicateEmail:",e.message),!0)))}resendActivationEmail(e){return console.log("WebRegistration.resendActivationEmail"),ke.post(`${this.baseUrl}/resendactemail`,{json:e}).json().catch((e=>(console.log("ERROR WebRegistration.resendActivationEmail:",e),Promise.reject([{code:"error.critical",message:e}])))).then((e=>{if(!1!==e.error)return console.log("ERROR WebRegistration.resendActivationEmail:",e.message),Promise.reject([{code:e.message}])}))}}class Rt{constructor(e){this.baseUrl=`${e.applicationLink}rest/public`,this.nodeName=e.node.nickname}restorePassword(e,t){let r=`${this.baseUrl}/restorePassword?ng=true`;return t.node&&(r=r.replace(this.nodeName,t.node.nickname)),ke.post(r,{body:je.toKyFormData({name:e,locale:t.locale,recaptchaResponse:t.recaptchaResponse})}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}]))).then((e=>{if(e.error)return Promise.reject([{code:e.message}])}))}async newPassword(e){return ke.post(`${this.baseUrl}/ng/newPassword`,{json:e}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}]))).then((e=>e.error?Promise.reject([{code:e.message,value:e.value}]):e.value))}}class St{constructor(e,t){this.resolver=t,this.baseUrl=`${e.apiEndpoint}/rest`}findLessons(e,t){return ke.get(`${this.baseUrl}/contentSearch/lessons/${e.known}/${e.target}`,{searchParams:t}).json().catch((e=>(console.log("ERROR WebSearch.findLessons:",e),Promise.reject([{code:"error.critical",message:e}]))))}findCards(e,t){return ke.get(`${this.baseUrl}/contentSearch/cards/${e.known}/${e.target}`,{searchParams:t}).json().then((e=>(e.results=e.results.map((e=>this.resolver.resolveSearchCard(e))),e))).catch((e=>(console.log("ERROR WebSearch.findCards:",e),Promise.reject([{code:"error.critical",message:e}]))))}}var Ut=r(354),Lt=r(736);const Et=e=>Ut.SHA256(e).toString();class Pt{constructor(e,t){this.N=Lt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3",16),this.k=Lt("c46d46600d87fef149bd79b81119842f3c20241fda67d06ef412d8f6d9479c58",16),this.g=Lt("2");let r=Lt.randBetween(0,Math.pow(2,32)),s=this.g.modPow(r,this.N);for(;s.mod(this.N).isZero();)r=Lt.randBetween(0,Math.pow(2,32)),s=this.g.modPow(r,this.N);this.I=e,this.p=t,this.Astr=s.toString(16),this.A=s,this.a=r}calculations(e,t,r){const s=this.A,n=this.I,o=this.g,i=this.N,a=this.k,l=this.a,c=Lt(t,16),u=Lt(Et(this.Astr+t),16);let h=!1;const d=this.calculateX(e,n,r);let g;d.isNegative()?(g=d.negate(),h=!0):g=d;let p=o.modPow(g,i);h&&(p=p.modInv(i)),this.verifier=p;const f=a.multiply(p),m=l.add(u.multiply(d));let y,b=!1;m.isNegative()?(y=m.negate(),b=!0):y=m;let v=c.subtract(f).modPow(y,i);b&&(v=v.modInv(i));const _=s.toString(16)+c.toString(16)+v.toString(16),w=Et(_);return this.M2=Et(s.toString(16)+w+v.toString(16)),w}calculateV(e,t,r){const s=this.g,n=this.N;let o=!1;const i=this.calculateX(e,t,r);let a;i.isNegative()?(a=i.negate(),o=!0):a=i;let l=s.modPow(a,n);return o&&(l=l.modInv(n)),l}calculateX(e,t,r){const s=Et(e+Et(t+":"+r)),n=s[0],o=parseInt(n,16).toString(2);let i=!1;if(4===o.length&&"1"===o[0]&&(i=!0),i){let e="",t="";for(let t=0;tthis.srpAuth(e))).then((e=>this.authSuccessCalcCKey(e)))}handshake(){const e={I:this.srpCore.I,A:this.srpCore.Astr};return ke.post(this.handShakeURL,{body:je.toKyFormData(e)}).json()}srpAuth(e){if(null!=e&&e.type===kt.SUCCESS){const t=Tt.paramsToObject(e.params),r=t.s,s=t.B,n=t.bKey;this.srpCore.I=t.I;const o={M:this.srpCore.calculations(r,s,this.srpCore.p),I:this.srpCore.I,A:this.srpCore.Astr,s:r,B:s,bKey:n};return ke.post(this.authURL,{body:je.toKyFormData(o)}).json()}return Promise.reject({errorMessage:We.loginErrorMessage})}authSuccessCalcCKey(e){if(null==e)return Promise.reject({errorMessage:We.loginErrorMessage});const t=Tt.paramsToObject(e.params);if(e.type===kt.SUCCESS){const e=t.M,r=t.cKey;if(e==this.srpCore.M2){const e=this.srpCore.verifier.toString(16).substring(0,8);return Ut.DES.encrypt(`${r}`,Ut.enc.Utf8.parse(e),{mode:Ut.mode.ECB}).ciphertext.toString()}}return t.leftAttempts?Promise.reject({errorMessage:We.loginAttemptsLeft,value:+t.leftAttempts}):t.blockedMinutes?Promise.reject({errorMessage:We.loginBlockedMessage,value:+t.blockedMinutes}):Promise.reject({errorMessage:We.loginErrorMessage})}static paramsToObject(e){e=e||[];const t={};for(let r=0;r-1},Mt.prototype.set=function(e,t){var r=this.__data__,s=jt(r,e);return s<0?(++this.size,r.push([e,t])):r[s][1]=t,this};const At=Mt,Dt="object"==typeof global&&global&&global.Object===Object&&global;var $t="object"==typeof self&&self&&self.Object===Object&&self;const Nt=Dt||$t||Function("return this")(),It=Nt.Symbol;var Wt=Object.prototype,xt=Wt.hasOwnProperty,Yt=Wt.toString,Bt=It?It.toStringTag:void 0;var Gt=Object.prototype.toString;var Ft=It?It.toStringTag:void 0;const Ht=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ft&&Ft in Object(e)?function(e){var t=xt.call(e,Bt),r=e[Bt];try{e[Bt]=void 0;var s=!0}catch(e){}var n=Yt.call(e);return s&&(t?e[Bt]=r:delete e[Bt]),n}(e):function(e){return Gt.call(e)}(e)},zt=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},qt=function(e){if(!zt(e))return!1;var t=Ht(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Vt=Nt["__core-js_shared__"];var Zt,Kt=(Zt=/[^.]+$/.exec(Vt&&Vt.keys&&Vt.keys.IE_PROTO||""))?"Symbol(src)_1."+Zt:"";var Jt=Function.prototype.toString;const Xt=function(e){if(null!=e){try{return Jt.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Qt=/^\[object .+?Constructor\]$/,er=Function.prototype,tr=Object.prototype,rr=er.toString,sr=tr.hasOwnProperty,nr=RegExp("^"+rr.call(sr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const or=function(e){return!(!zt(e)||(t=e,Kt&&Kt in t))&&(qt(e)?nr:Qt).test(Xt(e));var t},ir=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return or(r)?r:void 0},ar=ir(Nt,"Map"),lr=ir(Object,"create");var cr=Object.prototype.hasOwnProperty;var ur=Object.prototype.hasOwnProperty;function hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ta))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,g=2&r?new vr:void 0;for(o.set(e,t),o.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var Fr={};Fr["[object Float32Array]"]=Fr["[object Float64Array]"]=Fr["[object Int8Array]"]=Fr["[object Int16Array]"]=Fr["[object Int32Array]"]=Fr["[object Uint8Array]"]=Fr["[object Uint8ClampedArray]"]=Fr["[object Uint16Array]"]=Fr["[object Uint32Array]"]=!0,Fr["[object Arguments]"]=Fr["[object Array]"]=Fr["[object ArrayBuffer]"]=Fr["[object Boolean]"]=Fr["[object DataView]"]=Fr["[object Date]"]=Fr["[object Error]"]=Fr["[object Function]"]=Fr["[object Map]"]=Fr["[object Number]"]=Fr["[object Object]"]=Fr["[object RegExp]"]=Fr["[object Set]"]=Fr["[object String]"]=Fr["[object WeakMap]"]=!1;var Hr="object"==typeof exports&&exports&&!exports.nodeType&&exports,zr=Hr&&"object"==typeof module&&module&&!module.nodeType&&module,qr=zr&&zr.exports===Hr&&Dt.process,Vr=function(){try{return zr&&zr.require&&zr.require("util").types||qr&&qr.binding&&qr.binding("util")}catch(e){}}(),Zr=Vr&&Vr.isTypedArray;const Kr=Zr?(Jr=Zr,function(e){return Jr(e)}):function(e){return jr(e)&&Gr(e.length)&&!!Fr[Ht(e)]};var Jr,Xr=Object.prototype.hasOwnProperty;const Qr=function(e,t){var r=Pr(e),s=!r&&$r(e),n=!r&&!s&&xr(e),o=!r&&!s&&!n&&Kr(e),i=r||s||n||o,a=i?function(e,t){for(var r=-1,s=Array(e);++rPromise.reject([{code:"error.critical",message:e}])))}subscribe(e,t){return ke.put(this.subscriptionUrl(e),{searchParams:{email:t}}).json().catch((e=>e.response.text().then((e=>Promise.reject(e)))))}unsubscribe(e){return ke.delete(this.subscriptionUrl(e)).json().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}getSubscriptions(){return ke.get(`${this.baseUrl}/subscriptions`).json().then((e=>{const t=un(e,(e=>"ANY"==e.knownCode&&"ANY"==e.learningCode));return t>=0?[e[t]]:e})).catch((e=>Promise.reject([{code:"error.critical",message:e}])))}updateSubscriptions(e){return ke.post(`${this.baseUrl}/subscriptions`,{json:e}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}setNotificationsEnabled(e){return ke.put(`${this.baseUrl}/notifications/enabled`,{json:e}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}areNotificationsEnabled(){return ke.get(`${this.baseUrl}/notifications/enabled`).json().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}getEngagementSettings(){return ke.get(`${this.baseUrl}/notifications/engagement`).json().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}setEngagementSettings(e){return ke.put(`${this.baseUrl}/notifications/engagement`,{json:e}).json().catch((e=>Promise.reject([{code:"error.critical",message:e}])))}}class dn{constructor(e){this.baseUrl=e.applicationLink,this.apiEndpoint=e.apiEndpoint,this.daaEnable=e.daaEnable,this.daaEnable?this.cdnUrl=e.cdnServer:this.cdnUrl=e.applicationLink}resolve(e){if(!e)return null;const t=e.match(new RegExp("^b4x:(//.*\\.b4x)\\/(.*)$","i"));if(t){let e=je.protocolifyUrl(t[1]);return e=e.replace("http://127.0.0.1:8089/fetch/",""),je.protocolifyUrl(this.apiEndpoint)+"/media/b4x/"+btoa(e)+"/"+t[2]}return je.isAbsoluteUrl(e)?je.protocolifyUrl(je.protocolLessUrl(e)):0===e.indexOf("tts://")?e.replace("tts://",je.protocolifyUrl(this.apiEndpoint)+"/tts/"):0===e.indexOf("daa://")?e.replace("daa://",je.protocolifyUrl(this.cdnUrl)):je.protocolifyUrl(this.baseUrl)+"game/media"+("/"==e.charAt(0)?"":"/")+e}resolveCard(e){return e.picture=this.resolve(e.picture),e.sideOneSound=this.resolve(e.sideOneSound),e.sideTwoSound=this.resolve(e.sideTwoSound),e}resolveMLI(e){return e.picture=this.resolve(e.picture),e.sideOneSound=this.resolve(e.sideOneSound),e.sideTwoSound=this.resolve(e.sideTwoSound),e}resolveRefreshCard(e){return e.card=this.resolveCard(e.card),e}resolveSearchCard(e){return e.picture=this.resolve(e.picture),e}}window.WebMoneAPI=class extends te{constructor(e){super(),this.settings=new Oe(e),this.notification=new Te(e);const t=new Tt(e),r=new dn(e);this.altAnswer=new Ke(e),this.authentication=new We(e,t),this.classes=new Xe(e),this.contentBrowse=new Ve(e,r),this.courses=new Ye(e),this.cwactivity=new Me(e),this.dailyGoal=new Ae(e),this.eventTracker=new De(e),this.languages=new tt(e),this.learningOrder=new et(e),this.learningPath=new Be(e),this.learningState=new rt(e),this.licenses=new st(e),this.lifecycle=new _t(e),this.listRepository=new Qe(e,r),this.mli=new xe(e,r),this.registration=new wt(e,t),this.restorePassword=new Rt(e),this.misc=new Fe(e),this.search=new St(e,r),this.sticke=new hn(e),this.timeTracker=new $e(e),this.userData=new Ne(e),this.userProfile=new Ie(e)}configure(e){console.log("WebMoneAPI.configure"),e()}registerModule(e,t){}}})()})(); //# sourceMappingURL=web-mone-api.js.map