46 lines
331 KiB
JavaScript
46 lines
331 KiB
JavaScript
var Oidc=function(t){var e={};function __webpack_require__(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,r){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)__webpack_require__.d(r,n,function(e){return t[e]}.bind(null,n));return r},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=372)}([function(t,e,r){var n=r(2),i=r(27),o=r(14),s=r(13),a=r(21),u=function(t,e,r){var c,f,h,l,p=t&u.F,g=t&u.G,d=t&u.S,v=t&u.P,y=t&u.B,m=g?n:d?n[e]||(n[e]={}):(n[e]||{}).prototype,S=g?i:i[e]||(i[e]={}),b=S.prototype||(S.prototype={});for(c in g&&(r=e),r)h=((f=!p&&m&&void 0!==m[c])?m:r)[c],l=y&&f?a(h,n):v&&"function"==typeof h?a(Function.call,h):h,m&&s(m,c,h,t&u.U),S[c]!=h&&o(S,c,l),v&&b[c]!=h&&(b[c]=h)};n.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,r){var n=r(5);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}();var i={debug:function debug(){},info:function info(){},warn:function warn(){},error:function error(){}},o=void 0,s=void 0;(e.Log=function(){function Log(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Log)}return Log.reset=function reset(){s=3,o=i},Log.debug=function debug(){if(s>=4){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];o.debug.apply(o,Array.from(e))}},Log.info=function info(){if(s>=3){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];o.info.apply(o,Array.from(e))}},Log.warn=function warn(){if(s>=2){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];o.warn.apply(o,Array.from(e))}},Log.error=function error(){if(s>=1){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];o.error.apply(o,Array.from(e))}},n(Log,null,[{key:"NONE",get:function get(){return 0}},{key:"ERROR",get:function get(){return 1}},{key:"WARN",get:function get(){return 2}},{key:"INFO",get:function get(){return 3}},{key:"DEBUG",get:function get(){return 4}},{key:"level",get:function get(){return s},set:function set(t){if(!(0<=t&&t<=4))throw new Error("Invalid log level");s=t}},{key:"logger",get:function get(){return o},set:function set(t){if(!t.debug&&t.info&&(t.debug=t.info),!(t.debug&&t.info&&t.warn&&t.error))throw new Error("Invalid logger");o=t}}]),Log}()).reset()},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var n=r(66)("wks"),i=r(42),o=r(2).Symbol,s="function"==typeof o;(t.exports=function(t){return n[t]||(n[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=n},function(t,e,r){var n=r(24),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e,r){var n=r(1),i=r(143),o=r(26),s=Object.defineProperty;e.f=r(9)?Object.defineProperty:function defineProperty(t,e,r){if(n(t),e=o(e,!0),n(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){t.exports=!r(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,r){var n=r(25);t.exports=function(t){return Object(n(t))}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(0),i=r(4),o=r(25),s=/"/g,a=function(t,e,r,n){var i=String(o(t)),a="<"+e;return""!==r&&(a+=" "+r+'="'+String(n).replace(s,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var r={};r[t]=e(a),n(n.P+n.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",r)}},function(t,e,r){var n=r(2),i=r(14),o=r(18),s=r(42)("src"),a=Function.toString,u=(""+a).split("toString");r(27).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,r,a){var c="function"==typeof r;c&&(o(r,"name")||i(r,"name",e)),t[e]!==r&&(c&&(o(r,s)||i(r,s,t[e]?""+t[e]:u.join(String(e)))),t===n?t[e]=r:a?t[e]?t[e]=r:i(t,e,r):(delete t[e],i(t,e,r)))})(Function.prototype,"toString",function toString(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e,r){var n=r(8),i=r(43);t.exports=r(9)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(18),i=r(10),o=r(94)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,r){var n=r(51),i=r(43),o=r(17),s=r(26),a=r(18),u=r(143),c=Object.getOwnPropertyDescriptor;e.f=r(9)?c:function getOwnPropertyDescriptor(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(52),i=r(25);t.exports=function(t){return n(i(t))}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e){return!!t&&n(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(11);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(21),i=r(52),o=r(10),s=r(7),a=r(77);t.exports=function(t,e){var r=1==t,u=2==t,c=3==t,f=4==t,h=6==t,l=5==t||h,p=e||a;return function(e,a,g){for(var d,v,y=o(e),m=i(y),S=n(a,g,3),b=s(m.length),_=0,F=r?p(e,b):u?p(e,0):void 0;b>_;_++)if((l||_ in m)&&(v=S(d=m[_],_,y),t))if(r)F[_]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return _;case 2:F.push(d)}else if(f)return!1;return h?-1:c||f?f:F}}},function(t,e,r){var n=r(0),i=r(27),o=r(4);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],s={};s[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:r)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(5);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){var r=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=r)},function(t,e,r){var n=r(122),i=r(0),o=r(66)("metadata"),s=o.store||(o.store=new(r(119))),a=function(t,e,r){var i=s.get(t);if(!i){if(!r)return;s.set(t,i=new n)}var o=i.get(e);if(!o){if(!r)return;i.set(e,o=new n)}return o};t.exports={store:s,map:a,has:function(t,e,r){var n=a(e,r,!1);return void 0!==n&&n.has(t)},get:function(t,e,r){var n=a(e,r,!1);return void 0===n?void 0:n.get(t)},set:function(t,e,r,n){a(r,n,!0).set(t,e)},keys:function(t,e){var r=a(t,e,!1),n=[];return r&&r.forEach(function(t,e){n.push(e)}),n},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,e,r){"use strict";if(r(9)){var n=r(41),i=r(2),o=r(4),s=r(0),a=r(56),u=r(71),c=r(21),f=r(35),h=r(43),l=r(14),p=r(33),g=r(24),d=r(7),v=r(117),y=r(39),m=r(26),S=r(18),b=r(50),_=r(5),F=r(10),w=r(80),E=r(38),x=r(15),P=r(37).f,A=r(78),C=r(42),k=r(6),I=r(22),B=r(65),R=r(58),T=r(75),M=r(45),O=r(61),U=r(36),N=r(76),L=r(127),D=r(8),j=r(16),H=D.f,K=j.f,W=i.RangeError,q=i.TypeError,V=i.Uint8Array,J=Array.prototype,G=u.ArrayBuffer,z=u.DataView,Y=I(0),X=I(2),Q=I(3),Z=I(4),$=I(5),tt=I(6),et=B(!0),rt=B(!1),nt=T.values,it=T.keys,ot=T.entries,st=J.lastIndexOf,at=J.reduce,ut=J.reduceRight,ct=J.join,ft=J.sort,ht=J.slice,lt=J.toString,pt=J.toLocaleString,gt=k("iterator"),dt=k("toStringTag"),vt=C("typed_constructor"),yt=C("def_constructor"),mt=a.CONSTR,St=a.TYPED,bt=a.VIEW,_t=I(1,function(t,e){return Pt(R(t,t[yt]),e)}),Ft=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),wt=!!V&&!!V.prototype.set&&o(function(){new V(1).set({})}),Et=function(t,e){var r=g(t);if(r<0||r%e)throw W("Wrong offset!");return r},xt=function(t){if(_(t)&&St in t)return t;throw q(t+" is not a typed array!")},Pt=function(t,e){if(!(_(t)&&vt in t))throw q("It is not a typed array constructor!");return new t(e)},At=function(t,e){return Ct(R(t,t[yt]),e)},Ct=function(t,e){for(var r=0,n=e.length,i=Pt(t,n);n>r;)i[r]=e[r++];return i},kt=function(t,e,r){H(t,e,{get:function(){return this._d[r]}})},It=function from(t){var e,r,n,i,o,s,a=F(t),u=arguments.length,f=u>1?arguments[1]:void 0,h=void 0!==f,l=A(a);if(void 0!=l&&!w(l)){for(s=l.call(a),n=[],e=0;!(o=s.next()).done;e++)n.push(o.value);a=n}for(h&&u>2&&(f=c(f,arguments[2],2)),e=0,r=d(a.length),i=Pt(this,r);r>e;e++)i[e]=h?f(a[e],e):a[e];return i},Bt=function of(){for(var t=0,e=arguments.length,r=Pt(this,e);e>t;)r[t]=arguments[t++];return r},Rt=!!V&&o(function(){pt.call(new V(1))}),Tt=function toLocaleString(){return pt.apply(Rt?ht.call(xt(this)):xt(this),arguments)},Mt={copyWithin:function copyWithin(t,e){return L.call(xt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function every(t){return Z(xt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function fill(t){return N.apply(xt(this),arguments)},filter:function filter(t){return At(this,X(xt(this),t,arguments.length>1?arguments[1]:void 0))},find:function find(t){return $(xt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function findIndex(t){return tt(xt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function forEach(t){Y(xt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function indexOf(t){return rt(xt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function includes(t){return et(xt(this),t,arguments.length>1?arguments[1]:void 0)},join:function join(t){return ct.apply(xt(this),arguments)},lastIndexOf:function lastIndexOf(t){return st.apply(xt(this),arguments)},map:function map(t){return _t(xt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function reduce(t){return at.apply(xt(this),arguments)},reduceRight:function reduceRight(t){return ut.apply(xt(this),arguments)},reverse:function reverse(){for(var t,e=xt(this).length,r=Math.floor(e/2),n=0;n<r;)t=this[n],this[n++]=this[--e],this[e]=t;return this},some:function some(t){return Q(xt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function sort(t){return ft.call(xt(this),t)},subarray:function subarray(t,e){var r=xt(this),n=r.length,i=y(t,n);return new(R(r,r[yt]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,d((void 0===e?n:y(e,n))-i))}},Ot=function slice(t,e){return At(this,ht.call(xt(this),t,e))},Ut=function set(t){xt(this);var e=Et(arguments[1],1),r=this.length,n=F(t),i=d(n.length),o=0;if(i+e>r)throw W("Wrong length!");for(;o<i;)this[e+o]=n[o++]},Nt={entries:function entries(){return ot.call(xt(this))},keys:function keys(){return it.call(xt(this))},values:function values(){return nt.call(xt(this))}},Lt=function(t,e){return _(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Dt=function getOwnPropertyDescriptor(t,e){return Lt(t,e=m(e,!0))?h(2,t[e]):K(t,e)},jt=function defineProperty(t,e,r){return!(Lt(t,e=m(e,!0))&&_(r)&&S(r,"value"))||S(r,"get")||S(r,"set")||r.configurable||S(r,"writable")&&!r.writable||S(r,"enumerable")&&!r.enumerable?H(t,e,r):(t[e]=r.value,t)};mt||(j.f=Dt,D.f=jt),s(s.S+s.F*!mt,"Object",{getOwnPropertyDescriptor:Dt,defineProperty:jt}),o(function(){lt.call({})})&&(lt=pt=function toString(){return ct.call(this)});var Ht=p({},Mt);p(Ht,Nt),l(Ht,gt,Nt.values),p(Ht,{slice:Ot,set:Ut,constructor:function(){},toString:lt,toLocaleString:Tt}),kt(Ht,"buffer","b"),kt(Ht,"byteOffset","o"),kt(Ht,"byteLength","l"),kt(Ht,"length","e"),H(Ht,dt,{get:function(){return this[St]}}),t.exports=function(t,e,r,u){var c=t+((u=!!u)?"Clamped":"")+"Array",h="get"+t,p="set"+t,g=i[c],y=g||{},m=g&&x(g),S=!g||!a.ABV,F={},w=g&&g.prototype,A=function(t,r){H(t,r,{get:function(){return function(t,r){var n=t._d;return n.v[h](r*e+n.o,Ft)}(this,r)},set:function(t){return function(t,r,n){var i=t._d;u&&(n=(n=Math.round(n))<0?0:n>255?255:255&n),i.v[p](r*e+i.o,n,Ft)}(this,r,t)},enumerable:!0})};S?(g=r(function(t,r,n,i){f(t,g,c,"_d");var o,s,a,u,h=0,p=0;if(_(r)){if(!(r instanceof G||"ArrayBuffer"==(u=b(r))||"SharedArrayBuffer"==u))return St in r?Ct(g,r):It.call(g,r);o=r,p=Et(n,e);var y=r.byteLength;if(void 0===i){if(y%e)throw W("Wrong length!");if((s=y-p)<0)throw W("Wrong length!")}else if((s=d(i)*e)+p>y)throw W("Wrong length!");a=s/e}else a=v(r),o=new G(s=a*e);for(l(t,"_d",{b:o,o:p,l:s,e:a,v:new z(o)});h<a;)A(t,h++)}),w=g.prototype=E(Ht),l(w,"constructor",g)):o(function(){g(1)})&&o(function(){new g(-1)})&&O(function(t){new g,new g(null),new g(1.5),new g(t)},!0)||(g=r(function(t,r,n,i){var o;return f(t,g,c),_(r)?r instanceof G||"ArrayBuffer"==(o=b(r))||"SharedArrayBuffer"==o?void 0!==i?new y(r,Et(n,e),i):void 0!==n?new y(r,Et(n,e)):new y(r):St in r?Ct(g,r):It.call(g,r):new y(v(r))}),Y(m!==Function.prototype?P(y).concat(P(m)):P(y),function(t){t in g||l(g,t,y[t])}),g.prototype=w,n||(w.constructor=g));var C=w[gt],k=!!C&&("values"==C.name||void 0==C.name),I=Nt.values;l(g,vt,!0),l(w,St,c),l(w,bt,!0),l(w,yt,g),(u?new g(1)[dt]==c:dt in w)||H(w,dt,{get:function(){return c}}),F[c]=g,s(s.G+s.W+s.F*(g!=y),F),s(s.S,c,{BYTES_PER_ELEMENT:e}),s(s.S+s.F*o(function(){y.of.call(g,1)}),c,{from:It,of:Bt}),"BYTES_PER_ELEMENT"in w||l(w,"BYTES_PER_ELEMENT",e),s(s.P,c,Mt),U(c),s(s.P+s.F*wt,c,{set:Ut}),s(s.P+s.F*!k,c,Nt),n||w.toString==lt||(w.toString=lt),s(s.P+s.F*o(function(){new g(1).slice()}),c,{slice:Ot}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new g([1,2]).toLocaleString()})||!o(function(){w.toLocaleString.call([1,2])})),c,{toLocaleString:Tt}),M[c]=k?C:I,n||k||l(w,gt,I)}}else t.exports=function(){}},function(t,e,r){var n=r(6)("unscopables"),i=Array.prototype;void 0==i[n]&&r(14)(i,n,{}),t.exports=function(t){i[n][t]=!0}},function(t,e,r){var n=r(42)("meta"),i=r(5),o=r(18),s=r(8).f,a=0,u=Object.isExtensible||function(){return!0},c=!r(4)(function(){return u(Object.preventExtensions({}))}),f=function(t){s(t,n,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,n)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[n].i},getWeak:function(t,e){if(!o(t,n)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[n].w},onFreeze:function(t){return c&&h.NEED&&u(t)&&!o(t,n)&&f(t),t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}();var i={setInterval:function(t){function setInterval(e,r){return t.apply(this,arguments)}return setInterval.toString=function(){return t.toString()},setInterval}(function(t,e){return setInterval(t,e)}),clearInterval:function(t){function clearInterval(e){return t.apply(this,arguments)}return clearInterval.toString=function(){return t.toString()},clearInterval}(function(t){return clearInterval(t)})},o=!1,s=null;e.Global=function(){function Global(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Global)}return Global._testing=function _testing(){o=!0},Global.setXMLHttpRequest=function setXMLHttpRequest(t){s=t},n(Global,null,[{key:"location",get:function get(){if(!o)return location}},{key:"localStorage",get:function get(){if(!o&&"undefined"!=typeof window)return localStorage}},{key:"sessionStorage",get:function get(){if(!o&&"undefined"!=typeof window)return sessionStorage}},{key:"XMLHttpRequest",get:function get(){if(!o&&"undefined"!=typeof window)return s||XMLHttpRequest}},{key:"timer",get:function get(){if(!o)return i}}]),Global}()},function(t,e,r){var n=r(13);t.exports=function(t,e,r){for(var i in e)n(t,i,e[i],r);return t}},function(t,e,r){var n=r(21),i=r(129),o=r(80),s=r(1),a=r(7),u=r(78),c={},f={};(e=t.exports=function(t,e,r,h,l){var p,g,d,v,y=l?function(){return t}:u(t),m=n(r,h,e?2:1),S=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(p=a(t.length);p>S;S++)if((v=e?m(s(g=t[S])[0],g[1]):m(t[S]))===c||v===f)return v}else for(d=y.call(t);!(g=d.next()).done;)if((v=i(d,m,g.value,e))===c||v===f)return v}).BREAK=c,e.RETURN=f},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e,r){"use strict";var n=r(2),i=r(8),o=r(9),s=r(6)("species");t.exports=function(t){var e=n[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(141),i=r(93).concat("length","prototype");e.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return n(t,i)}},function(t,e,r){var n=r(1),i=r(140),o=r(93),s=r(94)("IE_PROTO"),a=function(){},u=function(){var t,e=r(96)("iframe"),n=o.length;for(e.style.display="none",r(92).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[o[n]];return u()};t.exports=Object.create||function create(t,e){var r;return null!==t?(a.prototype=n(t),r=new a,a.prototype=null,r[s]=t):r=u(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(24),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=n(t))<0?i(t+e,0):o(t,e)}},function(t,e,r){var n=r(141),i=r(93);t.exports=Object.keys||function keys(t){return n(t,i)}},function(t,e){t.exports=!1},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(5);t.exports=function(t,e){if(!n(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){t.exports={}},function(t,e,r){var n=r(0),i=r(25),o=r(4),s=r(90),a="["+s+"]",u=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),f=function(t,e,r){var i={},a=o(function(){return!!s[t]()||"
"!="
"[t]()}),u=i[t]=a?e(h):s[t];r&&(i[r]=u),n(n.P+n.F*a,"String",i)},h=f.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=f},function(t,e,r){var n=r(8).f,i=r(18),o=r(6)("toStringTag");t.exports=function(t,e,r){t&&!i(t=r?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlUtility=void 0;var n=r(3),i=r(32);e.UrlUtility=function(){function UrlUtility(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,UrlUtility)}return UrlUtility.addQueryParam=function addQueryParam(t,e,r){return t.indexOf("?")<0&&(t+="?"),"?"!==t[t.length-1]&&(t+="&"),t+=encodeURIComponent(e),t+="=",t+=encodeURIComponent(r)},UrlUtility.parseUrlFragment=function parseUrlFragment(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.Global;"string"!=typeof t&&(t=r.location.href);var o=t.lastIndexOf(e);o>=0&&(t=t.substr(o+1));for(var s,a={},u=/([^&=]+)=([^&]*)/g,c=0;s=u.exec(t);)if(a[decodeURIComponent(s[1])]=decodeURIComponent(s[2]),c++>50)return n.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",t),{error:"Response exceeded expected number of parameters"};for(var f in a)return a;return{}},UrlUtility}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataService=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(108);e.MetadataService=function(){function MetadataService(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.JsonService;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,MetadataService),!t)throw i.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=t,this._jsonService=new e(["application/jwk-set+json"])}return MetadataService.prototype.getMetadata=function getMetadata(){var t=this;return this._settings.metadata?(i.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(i.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then(function(e){return i.Log.debug("MetadataService.getMetadata: json received"),t._settings.metadata=e,e})):(i.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},MetadataService.prototype.getIssuer=function getIssuer(){return this._getMetadataProperty("issuer")},MetadataService.prototype.getAuthorizationEndpoint=function getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")},MetadataService.prototype.getUserInfoEndpoint=function getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")},MetadataService.prototype.getTokenEndpoint=function getTokenEndpoint(){return this._getMetadataProperty("token_endpoint",!0)},MetadataService.prototype.getCheckSessionIframe=function getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)},MetadataService.prototype.getEndSessionEndpoint=function getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)},MetadataService.prototype.getRevocationEndpoint=function getRevocationEndpoint(){return this._getMetadataProperty("revocation_endpoint",!0)},MetadataService.prototype._getMetadataProperty=function _getMetadataProperty(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.Log.debug("MetadataService.getMetadataProperty for: "+t),this.getMetadata().then(function(r){if(i.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===r[t]){if(!0===e)return void i.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+t);throw i.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+t),new Error("Metadata does not contain property "+t)}return r[t]})},MetadataService.prototype.getSigningKeys=function getSigningKeys(){var t=this;return this._settings.signingKeys?(i.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then(function(e){return i.Log.debug("MetadataService.getSigningKeys: jwks_uri received",e),t._jsonService.getJson(e).then(function(e){if(i.Log.debug("MetadataService.getSigningKeys: key set received",e),!e.keys)throw i.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return t._settings.signingKeys=e.keys,t._settings.signingKeys})})},n(MetadataService,[{key:"metadataUrl",get:function get(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(".well-known/openid-configuration")<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=".well-known/openid-configuration"))),this._metadataUrl}}]),MetadataService}()},function(t,e,r){var n=r(20),i=r(6)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:o?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,r){var n=r(20);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,r){"use strict";var n=r(0),i=r(11),o=r(21),s=r(34);t.exports=function(t){n(n.S,t,{from:function from(t){var e,r,n,a,u=arguments[1];return i(this),(e=void 0!==u)&&i(u),void 0==t?new this:(r=[],e?(n=0,a=o(u,arguments[2],2),s(t,!1,function(t){r.push(a(t,n++))})):s(t,!1,r.push,r),new this(r))}})}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t){n(n.S,t,{of:function of(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,r){"use strict";t.exports=r(41)||!r(4)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(2)[t]})},function(t,e,r){for(var n,i=r(2),o=r(14),s=r(42),a=s("typed_array"),u=s("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,h=0,l="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(n=i[l[h++]])?(o(n.prototype,a,!0),o(n.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:a,VIEW:u}},function(t,e,r){"use strict";var n=r(2),i=r(0),o=r(13),s=r(33),a=r(31),u=r(34),c=r(35),f=r(5),h=r(4),l=r(61),p=r(47),g=r(89);t.exports=function(t,e,r,d,v,y){var m=n[t],S=m,b=v?"set":"add",_=S&&S.prototype,F={},w=function(t){var e=_[t];o(_,t,"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function has(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function get(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function add(t){return e.call(this,0===t?0:t),this}:function set(t,r){return e.call(this,0===t?0:t,r),this})};if("function"==typeof S&&(y||_.forEach&&!h(function(){(new S).entries().next()}))){var E=new S,x=E[b](y?{}:-0,1)!=E,P=h(function(){E.has(1)}),A=l(function(t){new S(t)}),C=!y&&h(function(){for(var t=new S,e=5;e--;)t[b](e,e);return!t.has(-0)});A||((S=e(function(e,r){c(e,S,t);var n=g(new m,e,S);return void 0!=r&&u(r,v,n[b],n),n})).prototype=_,_.constructor=S),(P||C)&&(w("delete"),w("has"),v&&w("get")),(C||x)&&w(b),y&&_.clear&&delete _.clear}else S=d.getConstructor(e,t,v,b),s(S.prototype,r),a.NEED=!0;return p(S,t),F[t]=S,i(i.G+i.W+i.F*(S!=m),F),y||d.setStrong(S,t,v),S}},function(t,e,r){var n=r(1),i=r(11),o=r(6)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||void 0==(r=n(s)[o])?e:i(r)}},function(t,e,r){"use strict";var n=r(14),i=r(13),o=r(4),s=r(25),a=r(6);t.exports=function(t,e,r){var u=a(t),c=r(s,u,""[t]),f=c[0],h=c[1];o(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),n(RegExp.prototype,u,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,r){"use strict";var n=r(1);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){var n=r(6)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){return{done:r=!0}},o[n]=function(){return s},t(o)}catch(t){}return r}},function(t,e,r){var n=r(5),i=r(20),o=r(6)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,r){var n=r(20);t.exports=Array.isArray||function isArray(t){return"Array"==n(t)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(17),i=r(7),o=r(39);t.exports=function(t){return function(e,r,s){var a,u=n(e),c=i(u.length),f=o(s,c);if(t&&r!=r){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===r)return t||f||0;return!t&&-1}}},function(t,e,r){var n=r(2),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.State=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(r(105));e.State=function(){function State(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,r=t.data,n=t.created;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,State),this._id=e||(0,o.default)(),this._data=r,this._created="number"==typeof n&&n>0?n:parseInt(Date.now()/1e3)}return State.prototype.toStorageString=function toStorageString(){return i.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created})},State.fromStorageString=function fromStorageString(t){return i.Log.debug("State.fromStorageString"),new State(JSON.parse(t))},State.clearStaleState=function clearStaleState(t,e){var r=Date.now()/1e3-e;return t.getAllKeys().then(function(e){i.Log.debug("State.clearStaleState: got keys",e);for(var n=[],o=function _loop(o){var s=e[o];a=t.get(s).then(function(e){var n=!1;if(e)try{var o=State.fromStorageString(e);i.Log.debug("State.clearStaleState: got item from key: ",s,o.created),o.created<=r&&(n=!0)}catch(t){i.Log.error("State.clearStaleState: Error parsing state for key",s,t.message),n=!0}else i.Log.debug("State.clearStaleState: no item in storage for key: ",s),n=!0;if(n)return i.Log.debug("State.clearStaleState: removed item for key: ",s),t.remove(s)}),n.push(a)},s=0;s<e.length;s++){var a;o(s)}return i.Log.debug("State.clearStaleState: waiting on promise count:",n.length),Promise.all(n)})},n(State,[{key:"id",get:function get(){return this._id}},{key:"data",get:function get(){return this._data}},{key:"created",get:function get(){return this._created}}]),State}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebStorageStateStore=void 0;var n=r(3),i=r(32);e.WebStorageStateStore=function(){function WebStorageStateStore(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.prefix,r=void 0===e?"oidc.":e,n=t.store,o=void 0===n?i.Global.localStorage:n;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,WebStorageStateStore),this._store=o,this._prefix=r}return WebStorageStateStore.prototype.set=function set(t,e){return n.Log.debug("WebStorageStateStore.set",t),t=this._prefix+t,this._store.setItem(t,e),Promise.resolve()},WebStorageStateStore.prototype.get=function get(t){n.Log.debug("WebStorageStateStore.get",t),t=this._prefix+t;var e=this._store.getItem(t);return Promise.resolve(e)},WebStorageStateStore.prototype.remove=function remove(t){n.Log.debug("WebStorageStateStore.remove",t),t=this._prefix+t;var e=this._store.getItem(t);return this._store.removeItem(t),Promise.resolve(e)},WebStorageStateStore.prototype.getAllKeys=function getAllKeys(){n.Log.debug("WebStorageStateStore.getAllKeys");for(var t=[],e=0;e<this._store.length;e++){var r=this._store.key(e);0===r.indexOf(this._prefix)&&t.push(r.substr(this._prefix.length))}return Promise.resolve(t)},WebStorageStateStore}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OidcClientSettings=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),o=r(3),s=r(68),a=r(168),u=r(49);var c="id_token",f="openid",h=900,l=300;e.OidcClientSettings=function(){function OidcClientSettings(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.authority,r=t.metadataUrl,i=t.metadata,o=t.signingKeys,p=t.client_id,g=t.client_secret,d=t.response_type,v=void 0===d?c:d,y=t.scope,m=void 0===y?f:y,S=t.redirect_uri,b=t.post_logout_redirect_uri,_=t.prompt,F=t.display,w=t.max_age,E=t.ui_locales,x=t.acr_values,P=t.resource,A=t.filterProtocolClaims,C=void 0===A||A,k=t.loadUserInfo,I=void 0===k||k,B=t.staleStateAge,R=void 0===B?h:B,T=t.clockSkew,M=void 0===T?l:T,O=t.stateStore,U=void 0===O?new s.WebStorageStateStore:O,N=t.ResponseValidatorCtor,L=void 0===N?a.ResponseValidator:N,D=t.MetadataServiceCtor,j=void 0===D?u.MetadataService:D,H=t.extraQueryParams,K=void 0===H?{}:H;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,OidcClientSettings),this._authority=e,this._metadataUrl=r,this._metadata=i,this._signingKeys=o,this._client_id=p,this._client_secret=g,this._response_type=v,this._scope=m,this._redirect_uri=S,this._post_logout_redirect_uri=b,this._prompt=_,this._display=F,this._max_age=w,this._ui_locales=E,this._acr_values=x,this._resource=P,this._filterProtocolClaims=!!C,this._loadUserInfo=!!I,this._staleStateAge=R,this._clockSkew=M,this._stateStore=U,this._validator=new L(this),this._metadataService=new j(this),this._extraQueryParams="object"===(void 0===K?"undefined":n(K))?K:{}}return i(OidcClientSettings,[{key:"client_id",get:function get(){return this._client_id},set:function set(t){if(this._client_id)throw o.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=t}},{key:"client_secret",get:function get(){return this._client_secret}},{key:"response_type",get:function get(){return this._response_type}},{key:"scope",get:function get(){return this._scope}},{key:"redirect_uri",get:function get(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function get(){return this._post_logout_redirect_uri}},{key:"prompt",get:function get(){return this._prompt}},{key:"display",get:function get(){return this._display}},{key:"max_age",get:function get(){return this._max_age}},{key:"ui_locales",get:function get(){return this._ui_locales}},{key:"acr_values",get:function get(){return this._acr_values}},{key:"resource",get:function get(){return this._resource}},{key:"authority",get:function get(){return this._authority},set:function set(t){if(this._authority)throw o.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=t}},{key:"metadataUrl",get:function get(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(".well-known/openid-configuration")<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=".well-known/openid-configuration")),this._metadataUrl}},{key:"metadata",get:function get(){return this._metadata},set:function set(t){this._metadata=t}},{key:"signingKeys",get:function get(){return this._signingKeys},set:function set(t){this._signingKeys=t}},{key:"filterProtocolClaims",get:function get(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function get(){return this._loadUserInfo}},{key:"staleStateAge",get:function get(){return this._staleStateAge}},{key:"clockSkew",get:function get(){return this._clockSkew}},{key:"stateStore",get:function get(){return this._stateStore}},{key:"validator",get:function get(){return this._validator}},{key:"metadataService",get:function get(){return this._metadataService}},{key:"extraQueryParams",get:function get(){return this._extraQueryParams},set:function set(t){"object"===(void 0===t?"undefined":n(t))?this._extraQueryParams=t:this._extraQueryParams={}}}]),OidcClientSettings}()},function(t,e,r){var n=r(2).navigator;t.exports=n&&n.userAgent||""},function(t,e,r){"use strict";var n=r(2),i=r(9),o=r(41),s=r(56),a=r(14),u=r(33),c=r(4),f=r(35),h=r(24),l=r(7),p=r(117),g=r(37).f,d=r(8).f,v=r(76),y=r(47),m="prototype",S="Wrong index!",b=n.ArrayBuffer,_=n.DataView,F=n.Math,w=n.RangeError,E=n.Infinity,x=b,P=F.abs,A=F.pow,C=F.floor,k=F.log,I=F.LN2,B=i?"_b":"buffer",R=i?"_l":"byteLength",T=i?"_o":"byteOffset";function packIEEE754(t,e,r){var n,i,o,s=new Array(r),a=8*r-e-1,u=(1<<a)-1,c=u>>1,f=23===e?A(2,-24)-A(2,-77):0,h=0,l=t<0||0===t&&1/t<0?1:0;for((t=P(t))!=t||t===E?(i=t!=t?1:0,n=u):(n=C(k(t)/I),t*(o=A(2,-n))<1&&(n--,o*=2),(t+=n+c>=1?f/o:f*A(2,1-c))*o>=2&&(n++,o/=2),n+c>=u?(i=0,n=u):n+c>=1?(i=(t*o-1)*A(2,e),n+=c):(i=t*A(2,c-1)*A(2,e),n=0));e>=8;s[h++]=255&i,i/=256,e-=8);for(n=n<<e|i,a+=e;a>0;s[h++]=255&n,n/=256,a-=8);return s[--h]|=128*l,s}function unpackIEEE754(t,e,r){var n,i=8*r-e-1,o=(1<<i)-1,s=o>>1,a=i-7,u=r-1,c=t[u--],f=127&c;for(c>>=7;a>0;f=256*f+t[u],u--,a-=8);for(n=f&(1<<-a)-1,f>>=-a,a+=e;a>0;n=256*n+t[u],u--,a-=8);if(0===f)f=1-s;else{if(f===o)return n?NaN:c?-E:E;n+=A(2,e),f-=s}return(c?-1:1)*n*A(2,f-e)}function unpackI32(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function packI8(t){return[255&t]}function packI16(t){return[255&t,t>>8&255]}function packI32(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function packF64(t){return packIEEE754(t,52,8)}function packF32(t){return packIEEE754(t,23,4)}function addGetter(t,e,r){d(t[m],e,{get:function(){return this[r]}})}function get(t,e,r,n){var i=p(+r);if(i+e>t[R])throw w(S);var o=t[B]._b,s=i+t[T],a=o.slice(s,s+e);return n?a:a.reverse()}function set(t,e,r,n,i,o){var s=p(+r);if(s+e>t[R])throw w(S);for(var a=t[B]._b,u=s+t[T],c=n(+i),f=0;f<e;f++)a[u+f]=c[o?f:e-f-1]}if(s.ABV){if(!c(function(){b(1)})||!c(function(){new b(-1)})||c(function(){return new b,new b(1.5),new b(NaN),"ArrayBuffer"!=b.name})){for(var M,O=(b=function ArrayBuffer(t){return f(this,b),new x(p(t))})[m]=x[m],U=g(x),N=0;U.length>N;)(M=U[N++])in b||a(b,M,x[M]);o||(O.constructor=b)}var L=new _(new b(2)),D=_[m].setInt8;L.setInt8(0,2147483648),L.setInt8(1,2147483649),!L.getInt8(0)&&L.getInt8(1)||u(_[m],{setInt8:function setInt8(t,e){D.call(this,t,e<<24>>24)},setUint8:function setUint8(t,e){D.call(this,t,e<<24>>24)}},!0)}else b=function ArrayBuffer(t){f(this,b,"ArrayBuffer");var e=p(t);this._b=v.call(new Array(e),0),this[R]=e},_=function DataView(t,e,r){f(this,_,"DataView"),f(t,b,"DataView");var n=t[R],i=h(e);if(i<0||i>n)throw w("Wrong offset!");if(i+(r=void 0===r?n-i:l(r))>n)throw w("Wrong length!");this[B]=t,this[T]=i,this[R]=r},i&&(addGetter(b,"byteLength","_l"),addGetter(_,"buffer","_b"),addGetter(_,"byteLength","_l"),addGetter(_,"byteOffset","_o")),u(_[m],{getInt8:function getInt8(t){return get(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var e=get(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function getUint16(t){var e=get(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function getInt32(t){return unpackI32(get(this,4,t,arguments[1]))},getUint32:function getUint32(t){return unpackI32(get(this,4,t,arguments[1]))>>>0},getFloat32:function getFloat32(t){return unpackIEEE754(get(this,4,t,arguments[1]),23,4)},getFloat64:function getFloat64(t){return unpackIEEE754(get(this,8,t,arguments[1]),52,8)},setInt8:function setInt8(t,e){set(this,1,t,packI8,e)},setUint8:function setUint8(t,e){set(this,1,t,packI8,e)},setInt16:function setInt16(t,e){set(this,2,t,packI16,e,arguments[2])},setUint16:function setUint16(t,e){set(this,2,t,packI16,e,arguments[2])},setInt32:function setInt32(t,e){set(this,4,t,packI32,e,arguments[2])},setUint32:function setUint32(t,e){set(this,4,t,packI32,e,arguments[2])},setFloat32:function setFloat32(t,e){set(this,4,t,packF32,e,arguments[2])},setFloat64:function setFloat64(t,e){set(this,8,t,packF64,e,arguments[2])}});y(b,"ArrayBuffer"),y(_,"DataView"),a(_[m],s.VIEW,!0),e.ArrayBuffer=b,e.DataView=_},function(t,e,r){"use strict";var n=r(11);t.exports.f=function(t){return new function PromiseCapability(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},function(t,e,r){var n=r(2),i=r(74).set,o=n.MutationObserver||n.WebKitMutationObserver,s=n.process,a=n.Promise,u="process"==r(20)(s);t.exports=function(){var t,e,r,c=function(){var n,i;for(u&&(n=s.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(u)r=function(){s.nextTick(c)};else if(!o||n.navigator&&n.navigator.standalone)if(a&&a.resolve){var f=a.resolve();r=function(){f.then(c)}}else r=function(){i.call(n,c)};else{var h=!0,l=document.createTextNode("");new o(c).observe(l,{characterData:!0}),r=function(){l.data=h=!h}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}},function(t,e,r){var n,i,o,s=r(21),a=r(136),u=r(92),c=r(96),f=r(2),h=f.process,l=f.setImmediate,p=f.clearImmediate,g=f.MessageChannel,d=f.Dispatch,v=0,y={},m=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},S=function(t){m.call(t.data)};l&&p||(l=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return y[++v]=function(){a("function"==typeof t?t:Function(t),e)},n(v),v},p=function clearImmediate(t){delete y[t]},"process"==r(20)(h)?n=function(t){h.nextTick(s(m,t,1))}:d&&d.now?n=function(t){d.now(s(m,t,1))}:g?(o=(i=new g).port2,i.port1.onmessage=S,n=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",S,!1)):n="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),m.call(t)}}:function(t){setTimeout(s(m,t,1),0)}),t.exports={set:l,clear:p}},function(t,e,r){"use strict";var n=r(30),i=r(126),o=r(45),s=r(17);t.exports=r(84)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,r){"use strict";var n=r(10),i=r(39),o=r(7);t.exports=function fill(t){for(var e=n(this),r=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,r),u=s>2?arguments[2]:void 0,c=void 0===u?r:i(u,r);c>a;)e[a++]=t;return e}},function(t,e,r){var n=r(279);t.exports=function(t,e){return new(n(t))(e)}},function(t,e,r){var n=r(50),i=r(6)("iterator"),o=r(45);t.exports=r(27).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){"use strict";var n=r(8),i=r(43);t.exports=function(t,e,r){e in t?n.f(t,e,i(0,r)):t[e]=r}},function(t,e,r){var n=r(45),i=r(6)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){var n=r(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,r){var n=r(62),i=r(25);t.exports=function(t,e,r){if(n(e))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(t))}},function(t,e,r){"use strict";var n=r(38),i=r(43),o=r(47),s={};r(14)(s,r(6)("iterator"),function(){return this}),t.exports=function(t,e,r){t.prototype=n(s,{next:i(1,r)}),o(t,e+" Iterator")}},function(t,e,r){"use strict";var n=r(41),i=r(0),o=r(13),s=r(14),a=r(45),u=r(83),c=r(47),f=r(15),h=r(6)("iterator"),l=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,r,g,d,v,y){u(r,e,g);var m,S,b,_=function(t){if(!l&&t in x)return x[t];switch(t){case"keys":return function keys(){return new r(this,t)};case"values":return function values(){return new r(this,t)}}return function entries(){return new r(this,t)}},F=e+" Iterator",w="values"==d,E=!1,x=t.prototype,P=x[h]||x["@@iterator"]||d&&x[d],A=P||_(d),C=d?w?_("entries"):A:void 0,k="Array"==e&&x.entries||P;if(k&&(b=f(k.call(new t)))!==Object.prototype&&b.next&&(c(b,F,!0),n||"function"==typeof b[h]||s(b,h,p)),w&&P&&"values"!==P.name&&(E=!0,A=function values(){return P.call(this)}),n&&!y||!l&&!E&&x[h]||s(x,h,A),a[e]=A,a[F]=p,d)if(m={values:w?A:_("values"),keys:v?A:_("keys"),entries:C},y)for(S in m)S in x||o(x,S,m[S]);else i(i.P+i.F*(l||E),e,m);return m}},function(t,e,r){var n=r(24),i=r(25);t.exports=function(t){return function(e,r){var o,s,a=String(i(e)),u=n(r),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536}}},function(t,e){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function expm1(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,e){t.exports=Math.sign||function sign(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,r){"use strict";var n=r(24),i=r(25);t.exports=function repeat(t){var e=String(i(this)),r="",o=n(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(r+=e);return r}},function(t,e,r){var n=r(5),i=r(91).set;t.exports=function(t,e,r){var o,s=e.constructor;return s!==r&&"function"==typeof s&&(o=s.prototype)!==r.prototype&&n(o)&&i&&i(t,o),t}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,r){var n=r(5),i=r(1),o=function(t,e){if(i(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=r(21)(Function.call,r(16).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function setPrototypeOf(t,r){return o(t,r),e?t.__proto__=r:n(t,r),t}}({},!1):void 0),check:o}},function(t,e,r){var n=r(2).document;t.exports=n&&n.documentElement},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,r){var n=r(66)("keys"),i=r(42);t.exports=function(t){return n[t]||(n[t]=i(t))}},function(t,e,r){var n=r(2),i=r(27),o=r(41),s=r(142),a=r(8).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,r){var n=r(5),i=r(2).document,o=n(i)&&n(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaPopupWindow=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3);var o="location=no,toolbar=no,zoom=no",s="_blank";e.CordovaPopupWindow=function(){function CordovaPopupWindow(t){var e=this;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,CordovaPopupWindow),this._promise=new Promise(function(t,r){e._resolve=t,e._reject=r}),this.features=t.popupWindowFeatures||o,this.target=t.popupWindowTarget||s,this.redirect_uri=t.startUrl,i.Log.debug("CordovaPopupWindow.ctor: redirect_uri: "+this.redirect_uri)}return CordovaPopupWindow.prototype._isInAppBrowserInstalled=function _isInAppBrowserInstalled(t){return["cordova-plugin-inappbrowser","cordova-plugin-inappbrowser.inappbrowser","org.apache.cordova.inappbrowser"].some(function(e){return t.hasOwnProperty(e)})},CordovaPopupWindow.prototype.navigate=function navigate(t){if(t&&t.url){if(!window.cordova)return this._error("cordova is undefined");var e=window.cordova.require("cordova/plugin_list").metadata;if(!1===this._isInAppBrowserInstalled(e))return this._error("InAppBrowser plugin not found");this._popup=cordova.InAppBrowser.open(t.url,this.target,this.features),this._popup?(i.Log.debug("CordovaPopupWindow.navigate: popup successfully created"),this._exitCallbackEvent=this._exitCallback.bind(this),this._loadStartCallbackEvent=this._loadStartCallback.bind(this),this._popup.addEventListener("exit",this._exitCallbackEvent,!1),this._popup.addEventListener("loadstart",this._loadStartCallbackEvent,!1)):this._error("Error opening popup window")}else this._error("No url provided");return this.promise},CordovaPopupWindow.prototype._loadStartCallback=function _loadStartCallback(t){0===t.url.indexOf(this.redirect_uri)&&this._success({url:t.url})},CordovaPopupWindow.prototype._exitCallback=function _exitCallback(t){this._error(t)},CordovaPopupWindow.prototype._success=function _success(t){this._cleanup(),i.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"),this._resolve(t)},CordovaPopupWindow.prototype._error=function _error(t){this._cleanup(),i.Log.error(t),this._reject(new Error(t))},CordovaPopupWindow.prototype.close=function close(){this._cleanup()},CordovaPopupWindow.prototype._cleanup=function _cleanup(){this._popup&&(i.Log.debug("CordovaPopupWindow: cleaning up popup"),this._popup.removeEventListener("exit",this._exitCallbackEvent,!1),this._popup.removeEventListener("loadstart",this._loadStartCallbackEvent,!1),this._popup.close()),this._popup=null},n(CordovaPopupWindow,[{key:"promise",get:function get(){return this._promise}}]),CordovaPopupWindow}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenRevocationClient=void 0;var n=r(3),i=r(49),o=r(32);e.TokenRevocationClient=function(){function TokenRevocationClient(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.XMLHttpRequest,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,TokenRevocationClient),!t)throw n.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=t,this._XMLHttpRequestCtor=e,this._metadataService=new r(this._settings)}return TokenRevocationClient.prototype.revoke=function revoke(t,e){var r=this;if(!t)throw n.Log.error("TokenRevocationClient.revoke: No accessToken provided"),new Error("No accessToken provided.");return this._metadataService.getRevocationEndpoint().then(function(i){if(i){n.Log.error("TokenRevocationClient.revoke: Revoking access token");var o=r._settings.client_id,s=r._settings.client_secret;return r._revoke(i,o,s,t)}if(e)throw n.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")})},TokenRevocationClient.prototype._revoke=function _revoke(t,e,r,i){var o=this;return new Promise(function(s,a){var u=new o._XMLHttpRequestCtor;u.open("POST",t),u.onload=function(){n.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",u.status),200===u.status?s():a(Error(u.statusText+" ("+u.status+")"))};var c="client_id="+encodeURIComponent(e);r&&(c+="&client_secret="+encodeURIComponent(r)),c+="&token_type_hint="+encodeURIComponent("access_token"),c+="&token="+encodeURIComponent(i),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send(c)})},TokenRevocationClient}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckSessionIFrame=void 0;var n=r(3);var i=2e3;e.CheckSessionIFrame=function(){function CheckSessionIFrame(t,e,r,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,CheckSessionIFrame),this._callback=t,this._client_id=e,this._url=r,this._interval=n||i,this._stopOnError=o;var s=r.indexOf("/",r.indexOf("//")+2);this._frame_origin=r.substr(0,s),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.style.width=0,this._frame.style.height=0,this._frame.src=r}return CheckSessionIFrame.prototype.load=function load(){var t=this;return new Promise(function(e){t._frame.onload=function(){e()},window.document.body.appendChild(t._frame),t._boundMessageEvent=t._message.bind(t),window.addEventListener("message",t._boundMessageEvent,!1)})},CheckSessionIFrame.prototype._message=function _message(t){t.origin===this._frame_origin&&t.source===this._frame.contentWindow&&("error"===t.data?(n.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===t.data?(n.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):n.Log.debug("CheckSessionIFrame: "+t.data+" message from check session op iframe"))},CheckSessionIFrame.prototype.start=function start(t){var e=this;if(this._session_state!==t){n.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=t;var r=function send(){e._frame.contentWindow.postMessage(e._client_id+" "+e._session_state,e._frame_origin)};r(),this._timer=window.setInterval(r,this._interval)}},CheckSessionIFrame.prototype.stop=function stop(){this._session_state=null,this._timer&&(n.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},CheckSessionIFrame}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SessionMonitor=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(100);e.SessionMonitor=function(){function SessionMonitor(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.CheckSessionIFrame;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SessionMonitor),!t)throw i.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=t,this._CheckSessionIFrameCtor=r,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),this._userManager.getUser().then(function(t){t&&e._start(t)}).catch(function(t){i.Log.error("SessionMonitor ctor: error from getUser:",t.message)})}return SessionMonitor.prototype._start=function _start(t){var e=this,r=t.session_state;r&&(this._sub=t.profile.sub,this._sid=t.profile.sid,i.Log.debug("SessionMonitor._start: session_state:",r,", sub:",this._sub),this._checkSessionIFrame?this._checkSessionIFrame.start(r):this._metadataService.getCheckSessionIframe().then(function(t){if(t){i.Log.debug("SessionMonitor._start: Initializing check session iframe");var n=e._client_id,o=e._checkSessionInterval,s=e._stopCheckSessionOnError;e._checkSessionIFrame=new e._CheckSessionIFrameCtor(e._callback.bind(e),n,t,o,s),e._checkSessionIFrame.load().then(function(){e._checkSessionIFrame.start(r)})}else i.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")}).catch(function(t){i.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",t.message)}))},SessionMonitor.prototype._stop=function _stop(){this._sub=null,this._sid=null,this._checkSessionIFrame&&(i.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop())},SessionMonitor.prototype._callback=function _callback(){var t=this;this._userManager.querySessionStatus().then(function(e){var r=!0;e?e.sub===t._sub?(r=!1,t._checkSessionIFrame.start(e.session_state),e.sid===t._sid?i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",e.session_state):(i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",e.session_state),t._userManager.events._raiseUserSessionChanged())):i.Log.debug("SessionMonitor._callback: Different subject signed into OP:",e.sub):i.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),r&&(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),t._userManager.events._raiseUserSignedOut())}).catch(function(e){i.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",e.message),t._userManager.events._raiseUserSignedOut()})},n(SessionMonitor,[{key:"_settings",get:function get(){return this._userManager.settings}},{key:"_metadataService",get:function get(){return this._userManager.metadataService}},{key:"_client_id",get:function get(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function get(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function get(){return this._settings.stopCheckSessionOnError}}]),SessionMonitor}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0;var n=r(3);e.Event=function(){function Event(t){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Event),this._name=t,this._callbacks=[]}return Event.prototype.addHandler=function addHandler(t){this._callbacks.push(t)},Event.prototype.removeHandler=function removeHandler(t){var e=this._callbacks.findIndex(function(e){return e===t});e>=0&&this._callbacks.splice(e,1)},Event.prototype.raise=function raise(){n.Log.debug("Event: Raising event: "+this._name);for(var t=0;t<this._callbacks.length;t++){var e;(e=this._callbacks)[t].apply(e,arguments)}},Event}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessTokenEvents=void 0;var n=r(3),i=r(147);var o=60;e.AccessTokenEvents=function(){function AccessTokenEvents(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.accessTokenExpiringNotificationTime,r=void 0===e?o:e,n=t.accessTokenExpiringTimer,s=void 0===n?new i.Timer("Access token expiring"):n,a=t.accessTokenExpiredTimer,u=void 0===a?new i.Timer("Access token expired"):a;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,AccessTokenEvents),this._accessTokenExpiringNotificationTime=r,this._accessTokenExpiring=s,this._accessTokenExpired=u}return AccessTokenEvents.prototype.load=function load(t){if(t.access_token&&void 0!==t.expires_in){var e=t.expires_in;if(n.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",e),e>0){var r=e-this._accessTokenExpiringNotificationTime;r<=0&&(r=1),n.Log.debug("AccessTokenEvents.load: registering expiring timer in:",r),this._accessTokenExpiring.init(r)}else n.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var i=e+1;n.Log.debug("AccessTokenEvents.load: registering expired timer in:",i),this._accessTokenExpired.init(i)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},AccessTokenEvents.prototype.unload=function unload(){n.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},AccessTokenEvents.prototype.addAccessTokenExpiring=function addAccessTokenExpiring(t){this._accessTokenExpiring.addHandler(t)},AccessTokenEvents.prototype.removeAccessTokenExpiring=function removeAccessTokenExpiring(t){this._accessTokenExpiring.removeHandler(t)},AccessTokenEvents.prototype.addAccessTokenExpired=function addAccessTokenExpired(t){this._accessTokenExpired.addHandler(t)},AccessTokenEvents.prototype.removeAccessTokenExpired=function removeAccessTokenExpired(t){this._accessTokenExpired.removeHandler(t)},AccessTokenEvents}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.User=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3);e.User=function(){function User(t){var e=t.id_token,r=t.session_state,n=t.access_token,i=t.token_type,o=t.scope,s=t.profile,a=t.expires_at,u=t.state;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,User),this.id_token=e,this.session_state=r,this.access_token=n,this.token_type=i,this.scope=o,this.profile=s,this.expires_at=a,this.state=u}return User.prototype.toStorageString=function toStorageString(){return i.Log.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})},User.fromStorageString=function fromStorageString(t){return i.Log.debug("User.fromStorageString"),new User(JSON.parse(t))},n(User,[{key:"expires_in",get:function get(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}}},{key:"expired",get:function get(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function get(){return(this.scope||"").split(" ")}}]),User}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=
|
||
// @preserve Copyright (c) Microsoft Open Technologies, Inc.
|
||
function random(){for(var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx",e="0123456789abcdef",r=0,n="",i=0;i<t.length;i++)"-"!==t[i]&&"4"!==t[i]&&(r=16*Math.random()|0),"x"===t[i]?n+=e[r]:"y"===t[i]?(r&=3,n+=e[r|=8]):n+=t[i];return n},t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninState=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(67),s=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(r(105));e.SigninState=function(t){function SigninState(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.nonce,n=e.authority,i=e.client_id;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SigninState);var o=function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,arguments[0]));return!0===r?o._nonce=(0,s.default)():r&&(o._nonce=r),o._authority=n,o._client_id=i,o}return function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(SigninState,t),SigninState.prototype.toStorageString=function toStorageString(){return i.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,nonce:this.nonce,authority:this.authority,client_id:this.client_id})},SigninState.fromStorageString=function fromStorageString(t){return i.Log.debug("SigninState.fromStorageString"),new SigninState(JSON.parse(t))},n(SigninState,[{key:"nonce",get:function get(){return this._nonce}},{key:"authority",get:function get(){return this._authority}},{key:"client_id",get:function get(){return this._client_id}}]),SigninState}(o.State)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorResponse=void 0;var n=r(3);e.ErrorResponse=function(t){function ErrorResponse(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.error,i=e.error_description,o=e.error_uri,s=e.state;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,ErrorResponse),!r)throw n.Log.error("No error passed to ErrorResponse"),new Error("error");var a=function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,i||r));return a.name="ErrorResponse",a.error=r,a.error_description=i,a.error_uri=o,a.state=s,a}return function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(ErrorResponse,t),ErrorResponse}(Error)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JsonService=void 0;var n=r(3),i=r(32);e.JsonService=function(){function JsonService(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Global.XMLHttpRequest;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,JsonService),t&&Array.isArray(t)?this._contentTypes=t.slice():this._contentTypes=[],this._contentTypes.push("application/json"),this._XMLHttpRequest=e}return JsonService.prototype.getJson=function getJson(t,e){var r=this;if(!t)throw n.Log.error("JsonService.getJson: No url passed"),new Error("url");return n.Log.debug("JsonService.getJson, url: ",t),new Promise(function(i,o){var s=new r._XMLHttpRequest;s.open("GET",t);var a=r._contentTypes;s.onload=function(){if(n.Log.debug("JsonService.getJson: HTTP response received, status",s.status),200===s.status){var e=s.getResponseHeader("Content-Type");if(e)if(a.find(function(t){if(e.startsWith(t))return!0}))try{return void i(JSON.parse(s.responseText))}catch(t){return n.Log.error("JsonService.getJson: Error parsing JSON response",t.message),void o(t)}o(Error("Invalid response Content-Type: "+e+", from URL: "+t))}else o(Error(s.statusText+" ("+s.status+")"))},s.onerror=function(){n.Log.error("JsonService.getJson: network error"),o(Error("Network Error"))},e&&(n.Log.debug("JsonService.getJson: token passed, setting Authorization header"),s.setRequestHeader("Authorization","Bearer "+e)),s.send()})},JsonService}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OidcClient=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(69),s=r(107),a=r(160),u=r(159),c=r(158),f=r(157),h=r(106),l=r(67);e.OidcClient=function(){function OidcClient(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,OidcClient),t instanceof o.OidcClientSettings?this._settings=t:this._settings=new o.OidcClientSettings(t)}return OidcClient.prototype.createSigninRequest=function createSigninRequest(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.response_type,n=e.scope,o=e.redirect_uri,s=e.data,u=e.state,c=e.prompt,f=e.display,h=e.max_age,l=e.ui_locales,p=e.id_token_hint,g=e.login_hint,d=e.acr_values,v=e.resource,y=e.request,m=e.request_uri,S=e.extraQueryParams,b=arguments[1];i.Log.debug("OidcClient.createSigninRequest");var _=this._settings.client_id;r=r||this._settings.response_type,n=n||this._settings.scope,o=o||this._settings.redirect_uri,c=c||this._settings.prompt,f=f||this._settings.display,h=h||this._settings.max_age,l=l||this._settings.ui_locales,d=d||this._settings.acr_values,v=v||this._settings.resource,S=S||this._settings.extraQueryParams;var F=this._settings.authority;return this._metadataService.getAuthorizationEndpoint().then(function(e){i.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",e);var w=new a.SigninRequest({url:e,client_id:_,redirect_uri:o,response_type:r,scope:n,data:s||u,authority:F,prompt:c,display:f,max_age:h,ui_locales:l,id_token_hint:p,login_hint:g,acr_values:d,resource:v,request:y,request_uri:m,extraQueryParams:S}),E=w.state;return(b=b||t._stateStore).set(E.id,E.toStorageString()).then(function(){return w})})},OidcClient.prototype.processSigninResponse=function processSigninResponse(t,e){var r=this;i.Log.debug("OidcClient.processSigninResponse");var n=new u.SigninResponse(t);return n.state?(e=e||this._stateStore).remove(n.state).then(function(t){if(!t)throw i.Log.error("OidcClient.processSigninResponse: No matching state found in storage"),new Error("No matching state found in storage");var e=h.SigninState.fromStorageString(t);return i.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),r._validator.validateSigninResponse(e,n)}):(i.Log.error("OidcClient.processSigninResponse: No state in response"),Promise.reject(new Error("No state in response")))},OidcClient.prototype.createSignoutRequest=function createSignoutRequest(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.id_token_hint,n=e.data,o=e.state,s=e.post_logout_redirect_uri,a=arguments[1];return i.Log.debug("OidcClient.createSignoutRequest"),s=s||this._settings.post_logout_redirect_uri,this._metadataService.getEndSessionEndpoint().then(function(e){if(!e)throw i.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");i.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",e);var u=new c.SignoutRequest({url:e,id_token_hint:r,post_logout_redirect_uri:s,data:n||o}),f=u.state;return f&&(i.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(a=a||t._stateStore).set(f.id,f.toStorageString())),u})},OidcClient.prototype.processSignoutResponse=function processSignoutResponse(t,e){var r=this;i.Log.debug("OidcClient.processSignoutResponse");var n=new f.SignoutResponse(t);if(!n.state)return i.Log.debug("OidcClient.processSignoutResponse: No state in response"),n.error?(i.Log.warn("OidcClient.processSignoutResponse: Response was error: ",n.error),Promise.reject(new s.ErrorResponse(n))):Promise.resolve(n);var o=n.state;return(e=e||this._stateStore).remove(o).then(function(t){if(!t)throw i.Log.error("OidcClient.processSignoutResponse: No matching state found in storage"),new Error("No matching state found in storage");var e=l.State.fromStorageString(t);return i.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),r._validator.validateSignoutResponse(e,n)})},OidcClient.prototype.clearStaleState=function clearStaleState(t){return i.Log.debug("OidcClient.clearStaleState"),t=t||this._stateStore,l.State.clearStaleState(t,this.settings.staleStateAge)},n(OidcClient,[{key:"_stateStore",get:function get(){return this.settings.stateStore}},{key:"_validator",get:function get(){return this.settings.validator}},{key:"_metadataService",get:function get(){return this.settings.metadataService}},{key:"settings",get:function get(){return this._settings}},{key:"metadataService",get:function get(){return this._metadataService}}]),OidcClient}()},function(t,e){t.exports=Math.scale||function scale(t,e,r,n,i){return 0===arguments.length||t!=t||e!=e||r!=r||n!=n||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-n)/(r-e)+n}},function(t,e,r){var n=r(34);t.exports=function(t,e){var r=[];return n(t,!1,r.push,r,e),r}},function(t,e,r){var n=r(50),i=r(111);t.exports=function(t){return function toJSON(){if(n(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,r){var n=r(40),i=r(17),o=r(51).f;t.exports=function(t){return function(e){for(var r,s=i(e),a=n(s),u=a.length,c=0,f=[];u>c;)o.call(s,r=a[c++])&&f.push(t?[r,s[r]]:s[r]);return f}}},function(t,e,r){var n=r(7),i=r(88),o=r(25);t.exports=function(t,e,r,s){var a=String(o(t)),u=a.length,c=void 0===r?" ":String(r),f=n(e);if(f<=u||""==c)return a;var h=f-u,l=i.call(c,Math.ceil(h/c.length));return l.length>h&&(l=l.slice(0,h)),s?l+a:a+l}},function(t,e,r){"use strict";var n=r(63),i=r(5),o=r(7),s=r(21),a=r(6)("isConcatSpreadable");t.exports=function flattenIntoArray(t,e,r,u,c,f,h,l){for(var p,g,d=c,v=0,y=!!h&&s(h,l,3);v<u;){if(v in r){if(p=y?y(r[v],v,e):r[v],g=!1,i(p)&&(g=void 0!==(g=p[a])?!!g:n(p)),g&&f>0)d=flattenIntoArray(t,e,p,o(p.length),d,f-1)-1;else{if(d>=9007199254740991)throw TypeError();t[d]=p}d++}v++}return d}},function(t,e,r){var n=r(37),i=r(64),o=r(1),s=r(2).Reflect;t.exports=s&&s.ownKeys||function ownKeys(t){var e=n.f(o(t)),r=i.f;return r?e.concat(r(t)):e}},function(t,e,r){var n=r(24),i=r(7);t.exports=function(t){if(void 0===t)return 0;var e=n(t),r=i(e);if(e!==r)throw RangeError("Wrong length!");return r}},function(t,e,r){"use strict";var n=r(33),i=r(31).getWeak,o=r(1),s=r(5),a=r(35),u=r(34),c=r(22),f=r(18),h=r(44),l=c(5),p=c(6),g=0,d=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},y=function(t,e){return l(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var r=y(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,r,o){var c=t(function(t,n){a(t,c,e,"_i"),t._t=e,t._i=g++,t._l=void 0,void 0!=n&&u(n,r,t[o],t)});return n(c.prototype,{delete:function(t){if(!s(t))return!1;var r=i(t);return!0===r?d(h(this,e)).delete(t):r&&f(r,this._i)&&delete r[this._i]},has:function has(t){if(!s(t))return!1;var r=i(t);return!0===r?d(h(this,e)).has(t):r&&f(r,this._i)}}),c},def:function(t,e,r){var n=i(o(e),!0);return!0===n?d(t).set(e,r):n[t._i]=r,t},ufstore:d}},function(t,e,r){"use strict";var n,i=r(22)(0),o=r(13),s=r(31),a=r(138),u=r(118),c=r(5),f=r(4),h=r(44),l=s.getWeak,p=Object.isExtensible,g=u.ufstore,d={},v=function(t){return function WeakMap(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function get(t){if(c(t)){var e=l(t);return!0===e?g(h(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function set(t,e){return u.def(h(this,"WeakMap"),t,e)}},m=t.exports=r(57)("WeakMap",v,y,u,!0,!0);f(function(){return 7!=(new m).set((Object.freeze||Object)(d),7).get(d)})&&(a((n=u.getConstructor(v,"WeakMap")).prototype,y),s.NEED=!0,i(["delete","has","get","set"],function(t){var e=m.prototype,r=e[t];o(e,t,function(e,i){if(c(e)&&!p(e)){this._f||(this._f=new n);var o=this._f[t](e,i);return"set"==t?this:o}return r.call(this,e,i)})}))},function(t,e,r){"use strict";var n=r(121),i=r(44);t.exports=r(57)("Set",function(t){return function Set(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function add(t){return n.def(i(this,"Set"),t=0===t?0:t,t)}},n)},function(t,e,r){"use strict";var n=r(8).f,i=r(38),o=r(33),s=r(21),a=r(35),u=r(34),c=r(84),f=r(126),h=r(36),l=r(9),p=r(31).fastKey,g=r(44),d=l?"_s":"size",v=function(t,e){var r,n=p(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r};t.exports={getConstructor:function(t,e,r,c){var f=t(function(t,n){a(t,f,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[d]=0,void 0!=n&&u(n,r,t[c],t)});return o(f.prototype,{clear:function clear(){for(var t=g(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var r=g(this,e),n=v(r,t);if(n){var i=n.n,o=n.p;delete r._i[n.i],n.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==n&&(r._f=i),r._l==n&&(r._l=o),r[d]--}return!!n},forEach:function forEach(t){g(this,e);for(var r,n=s(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function has(t){return!!v(g(this,e),t)}}),l&&n(f.prototype,"size",{get:function(){return g(this,e)[d]}}),f},def:function(t,e,r){var n,i,o=v(t,e);return o?o.v=r:(t._l=o={i:i=p(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[d]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,r){c(t,e,function(t,r){this._t=g(t,e),this._k=r,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))},r?"entries":"values",!r,!0),h(e)}}},function(t,e,r){"use strict";var n=r(121),i=r(44);t.exports=r(57)("Map",function(t){return function Map(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function get(t){var e=n.getEntry(i(this,"Map"),t);return e&&e.v},set:function set(t,e){return n.def(i(this,"Map"),0===t?0:t,e)}},n,!0)},function(t,e,r){var n=r(1),i=r(5),o=r(72);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,r){r(9)&&"g"!=/./g.flags&&r(8).f(RegExp.prototype,"flags",{configurable:!0,get:r(60)})},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,r){"use strict";var n=r(10),i=r(39),o=r(7);t.exports=[].copyWithin||function copyWithin(t,e){var r=n(this),s=o(r.length),a=i(t,s),u=i(e,s),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?s:i(c,s))-u,s-a),h=1;for(u<a&&a<u+f&&(h=-1,u+=f-1,a+=f-1);f-- >0;)u in r?r[a]=r[u]:delete r[a],a+=h,u+=h;return r}},function(t,e,r){var n=r(11),i=r(10),o=r(52),s=r(7);t.exports=function(t,e,r,a,u){n(e);var c=i(t),f=o(c),h=s(c.length),l=u?h-1:0,p=u?-1:1;if(r<2)for(;;){if(l in f){a=f[l],l+=p;break}if(l+=p,u?l<0:h<=l)throw TypeError("Reduce of empty array with no initial value")}for(;u?l>=0:h>l;l+=p)l in f&&(a=e(a,f[l],l,c));return a}},function(t,e,r){var n=r(1);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,r){var n=r(87),i=Math.pow,o=i(2,-52),s=i(2,-23),a=i(2,127)*(2-s),u=i(2,-126);t.exports=Math.fround||function fround(t){var e,r,i=Math.abs(t),c=n(t);return i<u?c*function(t){return t+1/o-1/o}(i/u/s)*u*s:(r=(e=(1+s/o)*i)-(e-i))>a||r!=r?c*(1/0):c*r}},function(t,e){t.exports=Math.log1p||function log1p(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,r){var n=r(5),i=Math.floor;t.exports=function isInteger(t){return!n(t)&&isFinite(t)&&i(t)===t}},function(t,e,r){var n=r(20);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=n(t))throw TypeError(e);return+t}},function(t,e,r){var n=r(2).parseFloat,i=r(46).trim;t.exports=1/n(r(90)+"-0")!=-1/0?function parseFloat(t){var e=i(String(t),3),r=n(e);return 0===r&&"-"==e.charAt(0)?-0:r}:n},function(t,e,r){var n=r(2).parseInt,i=r(46).trim,o=r(90),s=/^[-+]?0[xX]/;t.exports=8!==n(o+"08")||22!==n(o+"0x16")?function parseInt(t,e){var r=i(String(t),3);return n(r,e>>>0||(s.test(r)?16:10))}:n},function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},function(t,e,r){"use strict";var n=r(11),i=r(5),o=r(136),s=[].slice,a={};t.exports=Function.bind||function bind(t){var e=n(this),r=s.call(arguments,1),u=function(){var n=r.concat(s.call(arguments));return this instanceof u?function(t,e,r){if(!(e in a)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";a[e]=Function("F,a","return new F("+n.join(",")+")")}return a[e](t,r)}(e,n.length,n):o(e,n,t)};return i(e.prototype)&&(u.prototype=e.prototype),u}},function(t,e,r){"use strict";var n=r(40),i=r(64),o=r(51),s=r(10),a=r(52),u=Object.assign;t.exports=!u||r(4)(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=u({},t)[r]||Object.keys(u({},e)).join("")!=n})?function assign(t,e){for(var r=s(t),u=arguments.length,c=1,f=i.f,h=o.f;u>c;)for(var l,p=a(arguments[c++]),g=f?n(p).concat(f(p)):n(p),d=g.length,v=0;d>v;)h.call(p,l=g[v++])&&(r[l]=p[l]);return r}:u},function(t,e,r){var n=r(17),i=r(37).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(n(t))}},function(t,e,r){var n=r(8),i=r(1),o=r(40);t.exports=r(9)?Object.defineProperties:function defineProperties(t,e){i(t);for(var r,s=o(e),a=s.length,u=0;a>u;)n.f(t,r=s[u++],e[r]);return t}},function(t,e,r){var n=r(18),i=r(17),o=r(65)(!1),s=r(94)("IE_PROTO");t.exports=function(t,e){var r,a=i(t),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;e.length>u;)n(a,r=e[u++])&&(~o(c,r)||c.push(r));return c}},function(t,e,r){e.f=r(6)},function(t,e,r){t.exports=!r(9)&&!r(4)(function(){return 7!=Object.defineProperty(r(96)("div"),"a",{get:function(){return 7}}).a})},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaIFrameNavigator=void 0;var n=r(98);e.CordovaIFrameNavigator=function(){function CordovaIFrameNavigator(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,CordovaIFrameNavigator)}return CordovaIFrameNavigator.prototype.prepare=function prepare(t){t.popupWindowFeatures="hidden=yes";var e=new n.CordovaPopupWindow(t);return Promise.resolve(e)},CordovaIFrameNavigator}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaPopupNavigator=void 0;var n=r(98);e.CordovaPopupNavigator=function(){function CordovaPopupNavigator(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,CordovaPopupNavigator)}return CordovaPopupNavigator.prototype.prepare=function prepare(t){var e=new n.CordovaPopupWindow(t);return Promise.resolve(e)},CordovaPopupNavigator}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SilentRenewService=void 0;var n=r(3);e.SilentRenewService=function(){function SilentRenewService(t){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SilentRenewService),this._userManager=t}return SilentRenewService.prototype.start=function start(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then(function(t){}).catch(function(t){n.Log.error("SilentRenewService.start: Error from getUser:",t.message)}))},SilentRenewService.prototype.stop=function stop(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)},SilentRenewService.prototype._tokenExpiring=function _tokenExpiring(){var t=this;this._userManager.signinSilent().then(function(t){n.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")},function(e){n.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:",e.message),t._userManager.events._raiseSilentRenewError(e)})},SilentRenewService}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timer=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(32),s=r(102);e.Timer=function(t){function Timer(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.timer,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Timer);var i=function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,e));return i._timer=r,i._nowFunc=n||function(){return Date.now()/1e3},i}return function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(Timer,t),Timer.prototype.init=function init(t){t<=0&&(t=1),t=parseInt(t);var e=this.now+t;if(this.expiration===e&&this._timerHandle)i.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),i.Log.debug("Timer.init timer "+this._name+" for duration:",t),this._expiration=e;var r=5;t<r&&(r=t),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*r)}},Timer.prototype.cancel=function cancel(){this._timerHandle&&(i.Log.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)},Timer.prototype._callback=function _callback(){var e=this._expiration-this.now;i.Log.debug("Timer.callback; "+this._name+" timer expires in:",e),this._expiration<=this.now&&(this.cancel(),t.prototype.raise.call(this))},n(Timer,[{key:"now",get:function get(){return parseInt(this._nowFunc())}},{key:"expiration",get:function get(){return this._expiration}}]),Timer}(s.Event)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManagerEvents=void 0;var n=r(3),i=r(103),o=r(102);e.UserManagerEvents=function(t){function UserManagerEvents(e){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,UserManagerEvents);var r=function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,e));return r._userLoaded=new o.Event("User loaded"),r._userUnloaded=new o.Event("User unloaded"),r._silentRenewError=new o.Event("Silent renew error"),r._userSignedOut=new o.Event("User signed out"),r._userSessionChanged=new o.Event("User session changed"),r}return function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(UserManagerEvents,t),UserManagerEvents.prototype.load=function load(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n.Log.debug("UserManagerEvents.load"),t.prototype.load.call(this,e),r&&this._userLoaded.raise(e)},UserManagerEvents.prototype.unload=function unload(){n.Log.debug("UserManagerEvents.unload"),t.prototype.unload.call(this),this._userUnloaded.raise()},UserManagerEvents.prototype.addUserLoaded=function addUserLoaded(t){this._userLoaded.addHandler(t)},UserManagerEvents.prototype.removeUserLoaded=function removeUserLoaded(t){this._userLoaded.removeHandler(t)},UserManagerEvents.prototype.addUserUnloaded=function addUserUnloaded(t){this._userUnloaded.addHandler(t)},UserManagerEvents.prototype.removeUserUnloaded=function removeUserUnloaded(t){this._userUnloaded.removeHandler(t)},UserManagerEvents.prototype.addSilentRenewError=function addSilentRenewError(t){this._silentRenewError.addHandler(t)},UserManagerEvents.prototype.removeSilentRenewError=function removeSilentRenewError(t){this._silentRenewError.removeHandler(t)},UserManagerEvents.prototype._raiseSilentRenewError=function _raiseSilentRenewError(t){n.Log.debug("UserManagerEvents._raiseSilentRenewError",t.message),this._silentRenewError.raise(t)},UserManagerEvents.prototype.addUserSignedOut=function addUserSignedOut(t){this._userSignedOut.addHandler(t)},UserManagerEvents.prototype.removeUserSignedOut=function removeUserSignedOut(t){this._userSignedOut.removeHandler(t)},UserManagerEvents.prototype._raiseUserSignedOut=function _raiseUserSignedOut(t){n.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise(t)},UserManagerEvents.prototype.addUserSessionChanged=function addUserSessionChanged(t){this._userSessionChanged.addHandler(t)},UserManagerEvents.prototype.removeUserSessionChanged=function removeUserSessionChanged(t){this._userSessionChanged.removeHandler(t)},UserManagerEvents.prototype._raiseUserSessionChanged=function _raiseUserSessionChanged(t){n.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise(t)},UserManagerEvents}(i.AccessTokenEvents)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IFrameWindow=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3);e.IFrameWindow=function(){function IFrameWindow(t){var e=this;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,IFrameWindow),this._promise=new Promise(function(t,r){e._resolve=t,e._reject=r}),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.style.width=0,this._frame.style.height=0,window.document.body.appendChild(this._frame)}return IFrameWindow.prototype.navigate=function navigate(t){if(t&&t.url){var e=t.silentRequestTimeout||1e4;i.Log.debug("IFrameWindow.navigate: Using timeout of:",e),this._timer=window.setTimeout(this._timeout.bind(this),e),this._frame.src=t.url}else this._error("No url provided");return this.promise},IFrameWindow.prototype._success=function _success(t){this._cleanup(),i.Log.debug("IFrameWindow: Successful response from frame window"),this._resolve(t)},IFrameWindow.prototype._error=function _error(t){this._cleanup(),i.Log.error(t),this._reject(new Error(t))},IFrameWindow.prototype.close=function close(){this._cleanup()},IFrameWindow.prototype._cleanup=function _cleanup(){this._frame&&(i.Log.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)},IFrameWindow.prototype._timeout=function _timeout(){i.Log.debug("IFrameWindow.timeout"),this._error("Frame window timed out")},IFrameWindow.prototype._message=function _message(t){if(i.Log.debug("IFrameWindow.message"),this._timer&&t.origin===this._origin&&t.source===this._frame.contentWindow){var e=t.data;e?this._success({url:e}):this._error("Invalid response from frame")}},IFrameWindow.notifyParent=function notifyParent(t){i.Log.debug("IFrameWindow.notifyParent"),window.parent&&window!==window.parent&&(t=t||window.location.href)&&(i.Log.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(t,location.protocol+"//"+location.host))},n(IFrameWindow,[{key:"promise",get:function get(){return this._promise}},{key:"_origin",get:function get(){return location.protocol+"//"+location.host}}]),IFrameWindow}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IFrameNavigator=void 0;var n=r(3),i=r(149);e.IFrameNavigator=function(){function IFrameNavigator(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,IFrameNavigator)}return IFrameNavigator.prototype.prepare=function prepare(t){var e=new i.IFrameWindow(t);return Promise.resolve(e)},IFrameNavigator.prototype.callback=function callback(t){n.Log.debug("IFrameNavigator.callback");try{return i.IFrameWindow.notifyParent(t),Promise.resolve()}catch(t){return Promise.reject(t)}},IFrameNavigator}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopupWindow=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(48);var s=500,a="location=no,toolbar=no,width=500,height=500,left=100,top=100;",u="_blank";e.PopupWindow=function(){function PopupWindow(t){var e=this;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,PopupWindow),this._promise=new Promise(function(t,r){e._resolve=t,e._reject=r});var r=t.popupWindowTarget||u,n=t.popupWindowFeatures||a;this._popup=window.open("",r,n),this._popup&&(i.Log.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),s))}return PopupWindow.prototype.navigate=function navigate(t){return this._popup?t&&t.url?(i.Log.debug("PopupWindow.navigate: Setting URL in popup"),this._id=t.id,this._id&&(window["popupCallback_"+t.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=t.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise},PopupWindow.prototype._success=function _success(t){i.Log.debug("PopupWindow.callback: Successful response from popup window"),this._cleanup(),this._resolve(t)},PopupWindow.prototype._error=function _error(t){i.Log.error("PopupWindow.error: ",t),this._cleanup(),this._reject(new Error(t))},PopupWindow.prototype.close=function close(){this._cleanup(!1)},PopupWindow.prototype._cleanup=function _cleanup(t){i.Log.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!t&&this._popup.close(),this._popup=null},PopupWindow.prototype._checkForPopupClosed=function _checkForPopupClosed(){this._popup&&!this._popup.closed||this._error("Popup window closed")},PopupWindow.prototype._callback=function _callback(t,e){this._cleanup(e),t?(i.Log.debug("PopupWindow.callback success"),this._success({url:t})):(i.Log.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))},PopupWindow.notifyOpener=function notifyOpener(t,e,r){if(window.opener){if(t=t||window.location.href){var n=o.UrlUtility.parseUrlFragment(t,r);if(n.state){var s="popupCallback_"+n.state,a=window.opener[s];a?(i.Log.debug("PopupWindow.notifyOpener: passing url message to opener"),a(t,e)):i.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else i.Log.warn("PopupWindow.notifyOpener: no state found in response url")}}else i.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.")},n(PopupWindow,[{key:"promise",get:function get(){return this._promise}}]),PopupWindow}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopupNavigator=void 0;var n=r(3),i=r(151);e.PopupNavigator=function(){function PopupNavigator(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,PopupNavigator)}return PopupNavigator.prototype.prepare=function prepare(t){var e=new i.PopupWindow(t);return Promise.resolve(e)},PopupNavigator.prototype.callback=function callback(t,e,r){n.Log.debug("PopupNavigator.callback");try{return i.PopupWindow.notifyOpener(t,e,r),Promise.resolve()}catch(t){return Promise.reject(t)}},PopupNavigator}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RedirectNavigator=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3);e.RedirectNavigator=function(){function RedirectNavigator(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,RedirectNavigator)}return RedirectNavigator.prototype.prepare=function prepare(){return Promise.resolve(this)},RedirectNavigator.prototype.navigate=function navigate(t){return t&&t.url?(window.location=t.url,Promise.resolve()):(i.Log.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))},n(RedirectNavigator,[{key:"url",get:function get(){return window.location.href}}]),RedirectNavigator}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManagerSettings=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=(r(3),r(69)),o=r(153),s=r(152),a=r(150),u=r(68),c=r(32);var f=60,h=2e3;e.UserManagerSettings=function(t){function UserManagerSettings(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.popup_redirect_uri,n=e.popup_post_logout_redirect_uri,i=e.popupWindowFeatures,l=e.popupWindowTarget,p=e.silent_redirect_uri,g=e.silentRequestTimeout,d=e.automaticSilentRenew,v=void 0!==d&&d,y=e.includeIdTokenInSilentRenew,m=void 0===y||y,S=e.monitorSession,b=void 0===S||S,_=e.checkSessionInterval,F=void 0===_?h:_,w=e.stopCheckSessionOnError,E=void 0===w||w,x=e.revokeAccessTokenOnSignout,P=void 0!==x&&x,A=e.accessTokenExpiringNotificationTime,C=void 0===A?f:A,k=e.redirectNavigator,I=void 0===k?new o.RedirectNavigator:k,B=e.popupNavigator,R=void 0===B?new s.PopupNavigator:B,T=e.iframeNavigator,M=void 0===T?new a.IFrameNavigator:T,O=e.userStore,U=void 0===O?new u.WebStorageStateStore({store:c.Global.sessionStorage}):O;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,UserManagerSettings);var N=function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,arguments[0]));return N._popup_redirect_uri=r,N._popup_post_logout_redirect_uri=n,N._popupWindowFeatures=i,N._popupWindowTarget=l,N._silent_redirect_uri=p,N._silentRequestTimeout=g,N._automaticSilentRenew=!!v,N._includeIdTokenInSilentRenew=m,N._accessTokenExpiringNotificationTime=C,N._monitorSession=b,N._checkSessionInterval=F,N._stopCheckSessionOnError=E,N._revokeAccessTokenOnSignout=P,N._redirectNavigator=I,N._popupNavigator=R,N._iframeNavigator=M,N._userStore=U,N}return function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(UserManagerSettings,t),n(UserManagerSettings,[{key:"popup_redirect_uri",get:function get(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function get(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function get(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function get(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function get(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function get(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function get(){return!(!this.silent_redirect_uri||!this._automaticSilentRenew)}},{key:"includeIdTokenInSilentRenew",get:function get(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function get(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function get(){return this._monitorSession}},{key:"checkSessionInterval",get:function get(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function get(){return this._stopCheckSessionOnError}},{key:"revokeAccessTokenOnSignout",get:function get(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function get(){return this._redirectNavigator}},{key:"popupNavigator",get:function get(){return this._popupNavigator}},{key:"iframeNavigator",get:function get(){return this._iframeNavigator}},{key:"userStore",get:function get(){return this._userStore}}]),UserManagerSettings}(i.OidcClientSettings)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManager=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3),o=r(109),s=r(154),a=r(104),u=r(148),c=r(146),f=r(101),h=r(99);e.UserManager=function(t){function UserManager(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.SilentRenewService,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.SessionMonitor,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h.TokenRevocationClient;!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,UserManager),e instanceof s.UserManagerSettings||(e=new s.UserManagerSettings(e));var a=function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,e));return a._events=new u.UserManagerEvents(e),a._silentRenewService=new r(a),a.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),a.startSilentRenew()),a.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),a._sessionMonitor=new n(a)),a._tokenRevocationClient=new o(a._settings),a}return function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(UserManager,t),UserManager.prototype.getUser=function getUser(){var t=this;return this._loadUser().then(function(e){return e?(i.Log.info("UserManager.getUser: user loaded"),t._events.load(e,!1),e):(i.Log.info("UserManager.getUser: user not found in storage"),null)})},UserManager.prototype.removeUser=function removeUser(){var t=this;return this.storeUser(null).then(function(){i.Log.info("UserManager.removeUser: user removed from storage"),t._events.unload()})},UserManager.prototype.signinRedirect=function signinRedirect(t){return this._signinStart(t,this._redirectNavigator).then(function(){i.Log.info("UserManager.signinRedirect: successful")})},UserManager.prototype.signinRedirectCallback=function signinRedirectCallback(t){return this._signinEnd(t||this._redirectNavigator.url).then(function(t){return t&&(t.profile&&t.profile.sub?i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",t.profile.sub):i.Log.info("UserManager.signinRedirectCallback: no sub")),t})},UserManager.prototype.signinPopup=function signinPopup(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return e?(t.redirect_uri=e,t.display="popup",this._signin(t,this._popupNavigator,{startUrl:e,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}).then(function(t){return t&&(t.profile&&t.profile.sub?i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",t.profile.sub):i.Log.info("UserManager.signinPopup: no sub")),t})):(i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},UserManager.prototype.signinPopupCallback=function signinPopupCallback(t){return this._signinCallback(t,this._popupNavigator).then(function(t){return t&&(t.profile&&t.profile.sub?i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",t.profile.sub):i.Log.info("UserManager.signinPopupCallback: no sub")),t}).catch(function(t){i.Log.error("UserManager.signinPopupCallback error: "+t&&t.message)})},UserManager.prototype.signinSilent=function signinSilent(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.redirect_uri||this.settings.silent_redirect_uri;if(!r)return i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured"));e.redirect_uri=r,e.prompt="none";return(e.id_token_hint||!this.settings.includeIdTokenInSilentRenew?Promise.resolve():this._loadUser().then(function(t){e.id_token_hint=t&&t.id_token})).then(function(){return t._signin(e,t._iframeNavigator,{startUrl:r,silentRequestTimeout:e.silentRequestTimeout||t.settings.silentRequestTimeout})}).then(function(t){return t&&(t.profile&&t.profile.sub?i.Log.info("UserManager.signinSilent: successful, signed in sub: ",t.profile.sub):i.Log.info("UserManager.signinSilent: no sub")),t})},UserManager.prototype.signinSilentCallback=function signinSilentCallback(t){return this._signinCallback(t,this._iframeNavigator).then(function(t){return t&&(t.profile&&t.profile.sub?i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",t.profile.sub):i.Log.info("UserManager.signinSilentCallback: no sub")),t})},UserManager.prototype.querySessionStatus=function querySessionStatus(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.redirect_uri||this.settings.silent_redirect_uri;return r?(e.redirect_uri=r,e.prompt="none",e.response_type="id_token",e.scope="openid",this._signinStart(e,this._iframeNavigator,{startUrl:r,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then(function(e){return t.processSigninResponse(e.url).then(function(t){if(i.Log.debug("UserManager.querySessionStatus: got signin response"),t.session_state&&t.profile.sub&&t.profile.sid)return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",t.profile.sub),{session_state:t.session_state,sub:t.profile.sub,sid:t.profile.sid};i.Log.info("querySessionStatus successful, user not authenticated")})})):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},UserManager.prototype._signin=function _signin(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(t,e,n).then(function(t){return r._signinEnd(t.url)})},UserManager.prototype._signinStart=function _signinStart(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.prepare(n).then(function(e){return i.Log.debug("UserManager._signinStart: got navigator window handle"),r.createSigninRequest(t).then(function(t){return i.Log.debug("UserManager._signinStart: got signin request"),n.url=t.url,n.id=t.state.id,e.navigate(n)}).catch(function(t){throw e.close&&(i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),e.close()),t})})},UserManager.prototype._signinEnd=function _signinEnd(t){var e=this;return this.processSigninResponse(t).then(function(t){i.Log.debug("UserManager._signinEnd: got signin response");var r=new a.User(t);return e.storeUser(r).then(function(){return i.Log.debug("UserManager._signinEnd: user stored"),e._events.load(r),r})})},UserManager.prototype._signinCallback=function _signinCallback(t,e){return i.Log.debug("UserManager._signinCallback"),e.callback(t)},UserManager.prototype.signoutRedirect=function signoutRedirect(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e&&(t.post_logout_redirect_uri=e),this._signoutStart(t,this._redirectNavigator).then(function(){i.Log.info("UserManager.signoutRedirect: successful")})},UserManager.prototype.signoutRedirectCallback=function signoutRedirectCallback(t){return this._signoutEnd(t||this._redirectNavigator.url).then(function(t){return i.Log.info("UserManager.signoutRedirectCallback: successful"),t})},UserManager.prototype.signoutPopup=function signoutPopup(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return t.post_logout_redirect_uri=e,t.display="popup",t.post_logout_redirect_uri&&(t.state=t.state||{}),this._signout(t,this._popupNavigator,{startUrl:e,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}).then(function(){i.Log.info("UserManager.signinPopup: successful")})},UserManager.prototype.signoutPopupCallback=function signoutPopupCallback(t,e){void 0===e&&"boolean"==typeof t&&(t=null,e=!0);return this._popupNavigator.callback(t,e,"?").then(function(){i.Log.info("UserManager.signoutPopupCallback: successful")})},UserManager.prototype._signout=function _signout(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(t,e,n).then(function(t){return r._signoutEnd(t.url)})},UserManager.prototype._signoutStart=function _signoutStart(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.prepare(n).then(function(r){return i.Log.debug("UserManager._signoutStart: got navigator window handle"),e._loadUser().then(function(o){return i.Log.debug("UserManager._signoutStart: loaded current user from storage"),(e._settings.revokeAccessTokenOnSignout?e._revokeInternal(o):Promise.resolve()).then(function(){var s=t.id_token_hint||o&&o.id_token;return s&&(i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),t.id_token_hint=s),e.removeUser().then(function(){return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"),e.createSignoutRequest(t).then(function(t){return i.Log.debug("UserManager._signoutStart: got signout request"),n.url=t.url,t.state&&(n.id=t.state.id),r.navigate(n)})})})}).catch(function(t){throw r.close&&(i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),r.close()),t})})},UserManager.prototype._signoutEnd=function _signoutEnd(t){return this.processSignoutResponse(t).then(function(t){return i.Log.debug("UserManager._signoutEnd: got signout response"),t})},UserManager.prototype.revokeAccessToken=function revokeAccessToken(){var t=this;return this._loadUser().then(function(e){return t._revokeInternal(e,!0).then(function(r){if(r)return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),e.access_token=null,e.expires_at=null,e.token_type=null,t.storeUser(e).then(function(){i.Log.debug("UserManager.revokeAccessToken: user stored"),t._events.load(e)})})}).then(function(){i.Log.info("UserManager.revokeAccessToken: access token revoked successfully")})},UserManager.prototype._revokeInternal=function _revokeInternal(t,e){var r=t&&t.access_token;return!r||r.indexOf(".")>=0?(i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no user, token, or JWT format"),Promise.resolve(!1)):this._tokenRevocationClient.revoke(r,e).then(function(){return!0})},UserManager.prototype.startSilentRenew=function startSilentRenew(){this._silentRenewService.start()},UserManager.prototype.stopSilentRenew=function stopSilentRenew(){this._silentRenewService.stop()},UserManager.prototype._loadUser=function _loadUser(){return this._userStore.get(this._userStoreKey).then(function(t){return t?(i.Log.debug("UserManager._loadUser: user storageString loaded"),a.User.fromStorageString(t)):(i.Log.debug("UserManager._loadUser: no user storageString"),null)})},UserManager.prototype.storeUser=function storeUser(t){if(t){i.Log.debug("UserManager.storeUser: storing user");var e=t.toStorageString();return this._userStore.set(this._userStoreKey,e)}return i.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},n(UserManager,[{key:"_redirectNavigator",get:function get(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function get(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function get(){return this.settings.iframeNavigator}},{key:"_userStore",get:function get(){return this.settings.userStore}},{key:"events",get:function get(){return this._events}},{key:"_userStoreKey",get:function get(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),UserManager}(o.OidcClient)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryWebStorage=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(3);e.InMemoryWebStorage=function(){function InMemoryWebStorage(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,InMemoryWebStorage),this._data={}}return InMemoryWebStorage.prototype.getItem=function getItem(t){return i.Log.debug("InMemoryWebStorage.getItem",t),this._data[t]},InMemoryWebStorage.prototype.setItem=function setItem(t,e){i.Log.debug("InMemoryWebStorage.setItem",t),this._data[t]=e},InMemoryWebStorage.prototype.removeItem=function removeItem(t){i.Log.debug("InMemoryWebStorage.removeItem",t),delete this._data[t]},InMemoryWebStorage.prototype.key=function key(t){return Object.getOwnPropertyNames(this._data)[t]},n(InMemoryWebStorage,[{key:"length",get:function get(){return Object.getOwnPropertyNames(this._data).length}}]),InMemoryWebStorage}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignoutResponse=void 0;var n=r(48);e.SignoutResponse=function SignoutResponse(t){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SignoutResponse);var e=n.UrlUtility.parseUrlFragment(t,"?");this.error=e.error,this.error_description=e.error_description,this.error_uri=e.error_uri,this.state=e.state}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignoutRequest=void 0;var n=r(3),i=r(48),o=r(67);e.SignoutRequest=function SignoutRequest(t){var e=t.url,r=t.id_token_hint,s=t.post_logout_redirect_uri,a=t.data;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SignoutRequest),!e)throw n.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");r&&(e=i.UrlUtility.addQueryParam(e,"id_token_hint",r)),s&&(e=i.UrlUtility.addQueryParam(e,"post_logout_redirect_uri",s),a&&(this.state=new o.State({data:a}),e=i.UrlUtility.addQueryParam(e,"state",this.state.id))),this.url=e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninResponse=void 0;var n=function(){function defineProperties(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,r){return e&&defineProperties(t.prototype,e),r&&defineProperties(t,r),t}}(),i=r(48);e.SigninResponse=function(){function SigninResponse(t){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SigninResponse);var e=i.UrlUtility.parseUrlFragment(t,"#");this.error=e.error,this.error_description=e.error_description,this.error_uri=e.error_uri,this.state=e.state,this.id_token=e.id_token,this.session_state=e.session_state,this.access_token=e.access_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=void 0;var r=parseInt(e.expires_in);if("number"==typeof r&&r>0){var n=parseInt(Date.now()/1e3);this.expires_at=n+r}}return n(SigninResponse,[{key:"expires_in",get:function get(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}}},{key:"expired",get:function get(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function get(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function get(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),SigninResponse}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninRequest=void 0;var n=r(3),i=r(48),o=r(106);e.SigninRequest=function(){function SigninRequest(t){var e=t.url,r=t.client_id,s=t.redirect_uri,a=t.response_type,u=t.scope,c=t.authority,f=t.data,h=t.prompt,l=t.display,p=t.max_age,g=t.ui_locales,d=t.id_token_hint,v=t.login_hint,y=t.acr_values,m=t.resource,S=t.request,b=t.request_uri,_=t.extraQueryParams;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,SigninRequest),!e)throw n.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!r)throw n.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!s)throw n.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!a)throw n.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!u)throw n.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!c)throw n.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var F=SigninRequest.isOidc(a);this.state=new o.SigninState({nonce:F,data:f,client_id:r,authority:c}),e=i.UrlUtility.addQueryParam(e,"client_id",r),e=i.UrlUtility.addQueryParam(e,"redirect_uri",s),e=i.UrlUtility.addQueryParam(e,"response_type",a),e=i.UrlUtility.addQueryParam(e,"scope",u),e=i.UrlUtility.addQueryParam(e,"state",this.state.id),F&&(e=i.UrlUtility.addQueryParam(e,"nonce",this.state.nonce));var w={prompt:h,display:l,max_age:p,ui_locales:g,id_token_hint:d,login_hint:v,acr_values:y,resource:m,request:S,request_uri:b};for(var E in w)w[E]&&(e=i.UrlUtility.addQueryParam(e,E,w[E]));for(var x in _)e=i.UrlUtility.addQueryParam(e,x,_[x]);this.url=e}return SigninRequest.isOidc=function isOidc(t){return!!t.split(/\s+/g).filter(function(t){return"id_token"===t})[0]},SigninRequest.isOAuth=function isOAuth(t){return!!t.split(/\s+/g).filter(function(t){return"token"===t})[0]},SigninRequest}()},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=g,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=g,s/=256,c-=8);t[r+p-g]|=128*d}},function(t,e,r){"use strict";e.byteLength=function byteLength(t){var e=getLens(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function toByteArray(t){for(var e,r=getLens(t),n=r[0],s=r[1],a=new o(function _byteLength(t,e,r){return 3*(e+r)/4-r}(0,n,s)),u=0,c=s>0?n-4:n,f=0;f<c;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],a[u++]=e>>16&255,a[u++]=e>>8&255,a[u++]=255&e;2===s&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,a[u++]=255&e);1===s&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e);return a},e.fromByteArray=function fromByteArray(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(encodeChunk(t,s,s+16383>a?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function getLens(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function tripletToBase64(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function encodeChunk(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(tripletToBase64(n));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e,r){"use strict";(function(t){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var n=r(163),i=r(162),o=r(161);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(t,e){if(kMaxLength()<e)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Buffer.prototype:(null===t&&(t=new Buffer(e)),t.length=e),t}function Buffer(t,e,r){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,t)}return from(this,t,e,r)}function from(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function fromArrayBuffer(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);Buffer.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Buffer.prototype:t=fromArrayLike(t,e);return t}(t,e,r,n):"string"==typeof e?function fromString(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(e,r),i=(t=createBuffer(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function fromObject(t,e){if(Buffer.isBuffer(e)){var r=0|checked(e.length);return 0===(t=createBuffer(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function isnan(t){return t!=t}(e.length)?createBuffer(t,0):fromArrayLike(t,e);if("Buffer"===e.type&&o(e.data))return fromArrayLike(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function assertSize(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function allocUnsafe(t,e){if(assertSize(e),t=createBuffer(t,e<0?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function fromArrayLike(t,e){var r=e.length<0?0:0|checked(e.length);t=createBuffer(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function byteLength(t,e){if(Buffer.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function swap(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bidirectionalIndexOf(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=Buffer.from(e,n)),Buffer.isBuffer(e))return 0===e.length?-1:arrayIndexOf(t,e,r,n,i);if("number"==typeof e)return e&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):arrayIndexOf(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function read(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(read(t,o)===read(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(read(t,o+h)!==read(e,h)){f=!1;break}if(f)return o}return-1}function hexWrite(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(function asciiToBytes(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function latin1Write(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(function utf16leToBytes(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,u,c,f=t[i],h=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(h=f);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&f)<<6|63&o)>127&&(h=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&f)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(h=c);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(c=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&c<1114112&&(h=c)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function decodeCodePointsArray(t){var e=t.length;if(e<=s)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=s));return r}(n)}e.Buffer=Buffer,e.SlowBuffer=function SlowBuffer(t){+t!=t&&(t=0);return Buffer.alloc(+t)},e.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(t){return t.__proto__=Buffer.prototype,t},Buffer.from=function(t,e,r){return from(null,t,e,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(t,e,r){return function alloc(t,e,r,n){return assertSize(e),e<=0?createBuffer(t,e):void 0!==r?"string"==typeof n?createBuffer(t,e).fill(r,n):createBuffer(t,e).fill(r):createBuffer(t,e)}(null,t,e,r)},Buffer.allocUnsafe=function(t){return allocUnsafe(null,t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(null,t)},Buffer.isBuffer=function isBuffer(t){return!(null==t||!t._isBuffer)},Buffer.compare=function compare(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Buffer.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!Buffer.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)swap(this,e,e+1);return this},Buffer.prototype.swap32=function swap32(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)swap(this,e,e+3),swap(this,e+1,e+2);return this},Buffer.prototype.swap64=function swap64(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)swap(this,e,e+7),swap(this,e+1,e+6),swap(this,e+2,e+5),swap(this,e+3,e+4);return this},Buffer.prototype.toString=function toString(){var t=0|this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):function slowToString(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"latin1":case"binary":return latin1Slice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},Buffer.prototype.equals=function equals(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function inspect(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function compare(t,e,r,n,i){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),u=this.slice(n,i),c=t.slice(e,r),f=0;f<a;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},Buffer.prototype.includes=function includes(t,e,r){return-1!==this.indexOf(t,e,r)},Buffer.prototype.indexOf=function indexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!1)},Buffer.prototype.write=function write(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"latin1":case"binary":return latin1Write(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var s=4096;function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function latin1Slice(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function hexSlice(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=toHex(t[o]);return i}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function checkOffset(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,i,o){if(!Buffer.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function objectWriteUInt16(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function objectWriteUInt32(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function checkIEEE754(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(t,e,r,n,o){return o||checkIEEE754(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,o){return o||checkIEEE754(t,0,r,8),i.write(t,e,r,n,52,8),r+8}Buffer.prototype.slice=function slice(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),Buffer.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=Buffer.prototype;else{var i=e-t;r=new Buffer(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},Buffer.prototype.readUIntLE=function readUIntLE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},Buffer.prototype.readUIntBE=function readUIntBE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},Buffer.prototype.readUInt8=function readUInt8(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function readUInt16LE(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function readIntLE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function readIntBE(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},Buffer.prototype.readInt8=function readInt8(t,e){return e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function readInt16LE(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function readFloatLE(t,e){return e||checkOffset(t,4,this.length),i.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(t,e){return e||checkOffset(t,4,this.length),i.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(t,e){return e||checkOffset(t,8,this.length),i.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(t,e){return e||checkOffset(t,8,this.length),i.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(t,e,r,n){(t=+t,e|=0,r|=0,n)||checkInt(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},Buffer.prototype.writeUIntBE=function writeUIntBE(t,e,r,n){(t=+t,e|=0,r|=0,n)||checkInt(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},Buffer.prototype.writeUInt8=function writeUInt8(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function writeIntLE(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},Buffer.prototype.writeIntBE=function writeIntBE(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},Buffer.prototype.writeInt8=function writeInt8(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function writeInt16LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function writeInt16BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function writeInt32LE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function writeInt32BE(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function writeFloatLE(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function copy(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},Buffer.prototype.fill=function fill(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=Buffer.isBuffer(t)?t:utf8ToBytes(new Buffer(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var a=/[^+\/0-9A-Za-z-_]/g;function toHex(t){return t<16?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function base64ToBytes(t){return n.toByteArray(function base64clean(t){if((t=function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(a,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function blitBuffer(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(97))},function(t,e,r){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i={userAgent:!1},u={};
|
||
/*!
|
||
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
||
Code licensed under the BSD License:
|
||
http://developer.yahoo.com/yui/license.html
|
||
version: 2.9.0
|
||
*/
|
||
if(void 0===p)var p={};p.lang={extend:function extend(t,r,n){if(!r||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var o=function d(){};if(o.prototype=r.prototype,t.prototype=new o,t.prototype.constructor=t,t.superclass=r.prototype,r.prototype.constructor==Object.prototype.constructor&&(r.prototype.constructor=r),n){var s;for(s in n)t.prototype[s]=n[s];var a=function e(){},u=["toString","valueOf"];try{/MSIE/.test(i.userAgent)&&(a=function e(t,r){for(s=0;s<u.length;s+=1){var n=u[s],i=r[n];"function"==typeof i&&i!=Object.prototype[n]&&(t[n]=i)}})}catch(t){}a(t.prototype,n)}}};
|
||
/*! CryptoJS v3.1.2 core-fix.js
|
||
* code.google.com/p/crypto-js
|
||
* (c) 2009-2013 by Jeff Mott. All rights reserved.
|
||
* code.google.com/p/crypto-js/wiki/License
|
||
* THIS IS FIX of 'core.js' to fix Hmac issue.
|
||
* https://code.google.com/p/crypto-js/issues/detail?id=84
|
||
* https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js
|
||
*/
|
||
var v=v||function(t,e){var r={},n=r.lib={},i=n.Base=function(){function n(){}return{extend:function extend(t){n.prototype=this;var e=new n;return t&&e.mixIn(t),e.hasOwnProperty("init")||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function create(){var t=this.extend();return t.init.apply(t,arguments),t},init:function init(){},mixIn:function mixIn(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function clone(){return this.init.prototype.extend(this)}}}(),o=n.WordArray=i.extend({init:function init(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function toString(t){return(t||a).stringify(this)},concat:function concat(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o<i;o+=4)e[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function clamp(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function clone(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function random(e){for(var r=[],n=0;n<e;n+=4)r.push(4294967296*t.random()|0);return new o.init(r,e)}}),s=r.enc={},a=s.Hex={stringify:function stringify(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function parse(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},u=s.Latin1={stringify:function stringify(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function parse(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},c=s.Utf8={stringify:function stringify(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function parse(t){return u.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=i.extend({reset:function reset(){this._data=new o.init,this._nDataBytes=0},_append:function _append(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function _process(e){var r=this._data,n=r.words,i=r.sigBytes,s=this.blockSize,a=i/(4*s),u=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,c=t.min(4*u,i);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(n,f);var h=n.splice(0,u);r.sigBytes-=c}return new o.init(h,c)},clone:function clone(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(n.Hasher=f.extend({cfg:i.extend(),init:function init(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function reset(){f.reset.call(this),this._doReset()},update:function update(t){return this._append(t),this._process(),this},finalize:function finalize(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function _createHelper(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function _createHmacHelper(t){return function(e,r){return new h.HMAC.init(t,r).finalize(e)}}}),r.algo={});return r}(Math);!function(t){var e,r=(e=v).lib,n=r.Base,i=r.WordArray;(e=e.x64={}).Word=n.extend({init:function init(t,e){this.high=t,this.low=e}}),e.WordArray=n.extend({init:function init(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:8*t.length},toX32:function toX32(){for(var t=this.words,e=t.length,r=[],n=0;n<e;n++){var o=t[n];r.push(o.high),r.push(o.low)}return i.create(r,this.sigBytes)},clone:function clone(){for(var t=n.clone.call(this),e=t.words=this.words.slice(0),r=e.length,i=0;i<r;i++)e[i]=e[i].clone();return t}})}(),function(){var t=v,e=t.lib.WordArray;t.enc.Base64={stringify:function stringify(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp(),t=[];for(var i=0;i<r;i+=3)for(var o=(e[i>>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;4>s&&i+.75*s<r;s++)t.push(n.charAt(o>>>6*(3-s)&63));if(e=n.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function parse(t){var r=t.length,n=this._map;(i=n.charAt(64))&&(-1!=(i=t.indexOf(i))&&(r=i));for(var i=[],o=0,s=0;s<r;s++)if(s%4){var a=n.indexOf(t.charAt(s-1))<<s%4*2,u=n.indexOf(t.charAt(s))>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return e.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){for(var e=v,r=(i=e.lib).WordArray,n=i.Hasher,i=e.algo,o=[],s=[],a=function u(t){return 4294967296*(t-(0|t))|0},u=2,c=0;64>c;){var f;t:{f=u;for(var h=t.sqrt(f),l=2;l<=h;l++)if(!(f%l)){f=!1;break t}f=!0}f&&(8>c&&(o[c]=a(t.pow(u,.5))),s[c]=a(t.pow(u,1/3)),c++),u++}var p=[];i=i.SHA256=n.extend({_doReset:function _doReset(){this._hash=new r.init(o.slice(0))},_doProcessBlock:function _doProcessBlock(t,e){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],u=r[4],c=r[5],f=r[6],h=r[7],l=0;64>l;l++){if(16>l)p[l]=0|t[e+l];else{var g=p[l-15],d=p[l-2];p[l]=((g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3)+p[l-7]+((d<<15|d>>>17)^(d<<13|d>>>19)^d>>>10)+p[l-16]}g=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&f)+s[l]+p[l],d=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&o^i&o),h=f,f=c,c=u,u=a+g|0,a=o,o=i,i=n,n=g+d|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0,r[5]=r[5]+c|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function _doFinalize(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=t.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function clone(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=n._createHelper(i),e.HmacSHA256=n._createHmacHelper(i)}(Math),function(){function a(){return r.create.apply(r,arguments)}for(var t=v,e=t.lib.Hasher,r=(i=t.x64).Word,n=i.WordArray,i=t.algo,o=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],s=[],u=0;80>u;u++)s[u]=a();i=i.SHA512=e.extend({_doReset:function _doReset(){this._hash=new n.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function _doProcessBlock(t,e){for(var r=(h=this._hash.words)[0],n=h[1],i=h[2],a=h[3],u=h[4],c=h[5],f=h[6],h=h[7],l=r.high,p=r.low,g=n.high,d=n.low,v=i.high,y=i.low,m=a.high,S=a.low,b=u.high,_=u.low,F=c.high,w=c.low,E=f.high,x=f.low,P=h.high,A=h.low,C=l,k=p,I=g,B=d,R=v,T=y,M=m,O=S,U=b,N=_,L=F,D=w,j=E,H=x,K=P,W=A,q=0;80>q;q++){var V=s[q];if(16>q)var J=V.high=0|t[e+2*q],G=V.low=0|t[e+2*q+1];else{J=((G=(J=s[q-15]).high)>>>1|(z=J.low)<<31)^(G>>>8|z<<24)^G>>>7;var z=(z>>>1|G<<31)^(z>>>8|G<<24)^(z>>>7|G<<25),Y=((G=(Y=s[q-2]).high)>>>19|(X=Y.low)<<13)^(G<<3|X>>>29)^G>>>6,X=(X>>>19|G<<13)^(X<<3|G>>>29)^(X>>>6|G<<26),Q=(G=s[q-7]).high,Z=($=s[q-16]).high,$=$.low;J=(J=(J=J+Q+((G=z+G.low)>>>0<z>>>0?1:0))+Y+((G=G+X)>>>0<X>>>0?1:0))+Z+((G=G+$)>>>0<$>>>0?1:0);V.high=J,V.low=G}Q=U&L^~U&j,$=N&D^~N&H,V=C&I^C&R^I&R;var tt=k&B^k&T^B&T,et=(z=(C>>>28|k<<4)^(C<<30|k>>>2)^(C<<25|k>>>7),Y=(k>>>28|C<<4)^(k<<30|C>>>2)^(k<<25|C>>>7),(X=o[q]).high),rt=X.low;Z=(Z=(Z=(Z=K+((U>>>14|N<<18)^(U>>>18|N<<14)^(U<<23|N>>>9))+((X=W+((N>>>14|U<<18)^(N>>>18|U<<14)^(N<<23|U>>>9)))>>>0<W>>>0?1:0))+Q+((X=X+$)>>>0<$>>>0?1:0))+et+((X=X+rt)>>>0<rt>>>0?1:0))+J+((X=X+G)>>>0<G>>>0?1:0),V=z+V+((G=Y+tt)>>>0<Y>>>0?1:0),K=j,W=H,j=L,H=D,L=U,D=N,U=M+Z+((N=O+X|0)>>>0<O>>>0?1:0)|0,M=R,O=T,R=I,T=B,I=C,B=k,C=Z+V+((k=X+G|0)>>>0<X>>>0?1:0)|0}p=r.low=p+k,r.high=l+C+(p>>>0<k>>>0?1:0),d=n.low=d+B,n.high=g+I+(d>>>0<B>>>0?1:0),y=i.low=y+T,i.high=v+R+(y>>>0<T>>>0?1:0),S=a.low=S+O,a.high=m+M+(S>>>0<O>>>0?1:0),_=u.low=_+N,u.high=b+U+(_>>>0<N>>>0?1:0),w=c.low=w+D,c.high=F+L+(w>>>0<D>>>0?1:0),x=f.low=x+H,f.high=E+j+(x>>>0<H>>>0?1:0),A=h.low=A+W,h.high=P+K+(A>>>0<W>>>0?1:0)},_doFinalize:function _doFinalize(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(n+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function clone(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),t.SHA512=e._createHelper(i),t.HmacSHA512=e._createHmacHelper(i)}(),function(){var t=v,e=(i=t.x64).Word,r=i.WordArray,n=(i=t.algo).SHA512,i=i.SHA384=n.extend({_doReset:function _doReset(){this._hash=new r.init([new e.init(3418070365,3238371032),new e.init(1654270250,914150663),new e.init(2438529370,812702999),new e.init(355462360,4144912697),new e.init(1731405415,4290775857),new e.init(2394180231,1750603025),new e.init(3675008525,1694076839),new e.init(1203062813,3204075428)])},_doFinalize:function _doFinalize(){var t=n._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=n._createHelper(i),t.HmacSHA384=n._createHmacHelper(i)}();
|
||
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*/
|
||
var y,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_="=";function hex2b64(t){var e,r,n="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),n+=S.charAt(r>>6)+S.charAt(63&r);if(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),n+=S.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),n+=S.charAt(r>>2)+S.charAt((3&r)<<4)),_)for(;(3&n.length)>0;)n+=_;return n}function b64tohex(t){var e,r,n,i="",o=0;for(e=0;e<t.length&&t.charAt(e)!=_;++e)(n=S.indexOf(t.charAt(e)))<0||(0==o?(i+=int2char(n>>2),r=3&n,o=1):1==o?(i+=int2char(r<<2|n>>4),r=15&n,o=2):2==o?(i+=int2char(r),i+=int2char(n>>2),r=3&n,o=3):(i+=int2char(r<<2|n>>4),i+=int2char(15&n),o=0));return 1==o&&(i+=int2char(r<<2)),i}function b64toBA(t){var e,r=b64tohex(t),n=new Array;for(e=0;2*e<r.length;++e)n[e]=parseInt(r.substring(2*e,2*e+2),16);return n}function BigInteger(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function nbi(){return new BigInteger(null)}"Microsoft Internet Explorer"==i.appName?(BigInteger.prototype.am=function am2(t,e,r,n,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,f=a*u+c*s;i=((u=s*u+((32767&f)<<15)+r[n]+(1073741823&i))>>>30)+(f>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},y=30):"Netscape"!=i.appName?(BigInteger.prototype.am=function am1(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},y=26):(BigInteger.prototype.am=function am3(t,e,r,n,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,f=a*u+c*s;i=((u=s*u+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+a*c,r[n++]=268435455&u}return i},y=28),BigInteger.prototype.DB=y,BigInteger.prototype.DM=(1<<y)-1,BigInteger.prototype.DV=1<<y;BigInteger.prototype.FV=Math.pow(2,52),BigInteger.prototype.F1=52-y,BigInteger.prototype.F2=2*y-52;var F,w,E="0123456789abcdefghijklmnopqrstuvwxyz",P=new Array;for(F="0".charCodeAt(0),w=0;w<=9;++w)P[F++]=w;for(F="a".charCodeAt(0),w=10;w<36;++w)P[F++]=w;for(F="A".charCodeAt(0),w=10;w<36;++w)P[F++]=w;function int2char(t){return E.charAt(t)}function intAt(t,e){var r=P[t.charCodeAt(e)];return null==r?-1:r}function nbv(t){var e=nbi();return e.fromInt(t),e}function nbits(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function Classic(t){this.m=t}function Montgomery(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function op_and(t,e){return t&e}function op_or(t,e){return t|e}function op_xor(t,e){return t^e}function op_andnot(t,e){return t&~e}function lbit(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function cbit(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function NullExp(){}function nNop(t){return t}function Barrett(t){this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}Classic.prototype.convert=function cConvert(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},Classic.prototype.revert=function cRevert(t){return t},Classic.prototype.reduce=function cReduce(t){t.divRemTo(this.m,null,t)},Classic.prototype.mulTo=function cMulTo(t,e,r){t.multiplyTo(e,r),this.reduce(r)},Classic.prototype.sqrTo=function cSqrTo(t,e){t.squareTo(e),this.reduce(e)},Montgomery.prototype.convert=function montConvert(t){var e=nbi();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(BigInteger.ZERO)>0&&this.m.subTo(e,e),e},Montgomery.prototype.revert=function montRevert(t){var e=nbi();return t.copyTo(e),this.reduce(e),e},Montgomery.prototype.reduce=function montReduce(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},Montgomery.prototype.mulTo=function montMulTo(t,e,r){t.multiplyTo(e,r),this.reduce(r)},Montgomery.prototype.sqrTo=function montSqrTo(t,e){t.squareTo(e),this.reduce(e)},BigInteger.prototype.copyTo=function bnpCopyTo(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},BigInteger.prototype.fromInt=function bnpFromInt(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},BigInteger.prototype.fromString=function bnpFromString(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,o=0;--n>=0;){var s=8==r?255&t[n]:intAt(t,n);s<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&BigInteger.ZERO.subTo(this,this)},BigInteger.prototype.clamp=function bnpClamp(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},BigInteger.prototype.dlShiftTo=function bnpDLShiftTo(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},BigInteger.prototype.drShiftTo=function bnpDRShiftTo(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},BigInteger.prototype.lShiftTo=function bnpLShiftTo(t,e){var r,n=t%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},BigInteger.prototype.rShiftTo=function bnpRShiftTo(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&o)<<i,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&o)<<i),e.t=this.t-r,e.clamp()}},BigInteger.prototype.subTo=function bnpSubTo(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},BigInteger.prototype.multiplyTo=function bnpMultiplyTo(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e[i]=0;for(i=0;i<n.t;++i)e[i+r.t]=r.am(0,n[i],e,i,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&BigInteger.ZERO.subTo(e,e)},BigInteger.prototype.squareTo=function bnpSquareTo(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},BigInteger.prototype.divRemTo=function bnpDivRemTo(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=nbi());var o=nbi(),s=this.s,a=t.s,u=this.DB-nbits(n[n.t-1]);u>0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,f=o[c-1];if(0!=f){var h=f*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),l=this.FV/h,p=(1<<this.F1)/h,g=1<<this.F2,d=r.t,v=d-c,y=null==e?nbi():e;for(o.dlShiftTo(v,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),BigInteger.ONE.dlShiftTo(c,y),y.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--v>=0;){var m=r[--d]==f?this.DM:Math.floor(r[d]*l+(r[d-1]+g)*p);if((r[d]+=o.am(0,m,r,v,0,c))<m)for(o.dlShiftTo(v,y),r.subTo(y,r);r[d]<--m;)r.subTo(y,r)}null!=e&&(r.drShiftTo(c,e),s!=a&&BigInteger.ZERO.subTo(e,e)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&BigInteger.ZERO.subTo(r,r)}}},BigInteger.prototype.invDigit=function bnpInvDigit(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},BigInteger.prototype.isEven=function bnpIsEven(){return 0==(this.t>0?1&this[0]:this.s)},BigInteger.prototype.exp=function bnpExp(t,e){if(t>4294967295||t<1)return BigInteger.ONE;var r=nbi(),n=nbi(),i=e.convert(this),o=nbits(t)-1;for(i.copyTo(r);--o>=0;)if(e.sqrTo(r,n),(t&1<<o)>0)e.mulTo(n,i,r);else{var s=r;r=n,n=s}return e.revert(r)},BigInteger.prototype.toString=function bnToString(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=int2char(r));s>=0;)a<e?(r=(this[s]&(1<<a)-1)<<e-a,r|=this[--s]>>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=int2char(r));return i?o:"0"},BigInteger.prototype.negate=function bnNegate(){var t=nbi();return BigInteger.ZERO.subTo(this,t),t},BigInteger.prototype.abs=function bnAbs(){return this.s<0?this.negate():this},BigInteger.prototype.compareTo=function bnCompareTo(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},BigInteger.prototype.bitLength=function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},BigInteger.prototype.mod=function bnMod(t){var e=nbi();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(BigInteger.ZERO)>0&&t.subTo(e,e),e},BigInteger.prototype.modPowInt=function bnModPowInt(t,e){var r;return r=t<256||e.isEven()?new Classic(e):new Montgomery(e),this.exp(t,r)},BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1),NullExp.prototype.convert=nNop,NullExp.prototype.revert=nNop,NullExp.prototype.mulTo=function nMulTo(t,e,r){t.multiplyTo(e,r)},NullExp.prototype.sqrTo=function nSqrTo(t,e){t.squareTo(e)},Barrett.prototype.convert=function barrettConvert(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=nbi();return t.copyTo(e),this.reduce(e),e},Barrett.prototype.revert=function barrettRevert(t){return t},Barrett.prototype.reduce=function barrettReduce(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},Barrett.prototype.mulTo=function barrettMulTo(t,e,r){t.multiplyTo(e,r),this.reduce(r)},Barrett.prototype.sqrTo=function barrettSqrTo(t,e){t.squareTo(e),this.reduce(e)};var C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],I=(1<<26)/C[C.length-1];
|
||
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*/
|
||
function Arcfour(){this.i=0,this.j=0,this.S=new Array}BigInteger.prototype.chunkSize=function bnpChunkSize(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},BigInteger.prototype.toRadix=function bnpToRadix(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=nbv(r),i=nbi(),o=nbi(),s="";for(this.divRemTo(n,i,o);i.signum()>0;)s=(r+o.intValue()).toString(t).substr(1)+s,i.divRemTo(n,i,o);return o.intValue().toString(t)+s},BigInteger.prototype.fromRadix=function bnpFromRadix(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,o=0,s=0,a=0;a<t.length;++a){var u=intAt(t,a);u<0?"-"==t.charAt(a)&&0==this.signum()&&(i=!0):(s=e*s+u,++o>=r&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),i&&BigInteger.ZERO.subTo(this,this)},BigInteger.prototype.fromNumber=function bnpFromNumber(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(BigInteger.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},BigInteger.prototype.bitwiseTo=function bnpBitwiseTo(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n<o;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=o;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},BigInteger.prototype.changeBit=function bnpChangeBit(t,e){var r=BigInteger.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},BigInteger.prototype.addTo=function bnpAddTo(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},BigInteger.prototype.dMultiply=function bnpDMultiply(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},BigInteger.prototype.dAddOffset=function bnpDAddOffset(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},BigInteger.prototype.multiplyLowerTo=function bnpMultiplyLowerTo(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},BigInteger.prototype.multiplyUpperTo=function bnpMultiplyUpperTo(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},BigInteger.prototype.modInt=function bnpModInt(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},BigInteger.prototype.millerRabin=function bnpMillerRabin(t){var e=this.subtract(BigInteger.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var n=e.shiftRight(r);(t=t+1>>1)>C.length&&(t=C.length);for(var i=nbi(),o=0;o<t;++o){i.fromInt(C[Math.floor(Math.random()*C.length)]);var s=i.modPow(n,this);if(0!=s.compareTo(BigInteger.ONE)&&0!=s.compareTo(e)){for(var a=1;a++<r&&0!=s.compareTo(e);)if(0==(s=s.modPowInt(2,this)).compareTo(BigInteger.ONE))return!1;if(0!=s.compareTo(e))return!1}}return!0},BigInteger.prototype.clone=
|
||
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*/
|
||
function bnClone(){var t=nbi();return this.copyTo(t),t},BigInteger.prototype.intValue=function bnIntValue(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},BigInteger.prototype.byteValue=function bnByteValue(){return 0==this.t?this.s:this[0]<<24>>24},BigInteger.prototype.shortValue=function bnShortValue(){return 0==this.t?this.s:this[0]<<16>>16},BigInteger.prototype.signum=function bnSigNum(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},BigInteger.prototype.toByteArray=function bnToByteArray(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},BigInteger.prototype.equals=function bnEquals(t){return 0==this.compareTo(t)},BigInteger.prototype.min=function bnMin(t){return this.compareTo(t)<0?this:t},BigInteger.prototype.max=function bnMax(t){return this.compareTo(t)>0?this:t},BigInteger.prototype.and=function bnAnd(t){var e=nbi();return this.bitwiseTo(t,op_and,e),e},BigInteger.prototype.or=function bnOr(t){var e=nbi();return this.bitwiseTo(t,op_or,e),e},BigInteger.prototype.xor=function bnXor(t){var e=nbi();return this.bitwiseTo(t,op_xor,e),e},BigInteger.prototype.andNot=function bnAndNot(t){var e=nbi();return this.bitwiseTo(t,op_andnot,e),e},BigInteger.prototype.not=function bnNot(){for(var t=nbi(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},BigInteger.prototype.shiftLeft=function bnShiftLeft(t){var e=nbi();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},BigInteger.prototype.shiftRight=function bnShiftRight(t){var e=nbi();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},BigInteger.prototype.getLowestSetBit=function bnGetLowestSetBit(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+lbit(this[t]);return this.s<0?this.t*this.DB:-1},BigInteger.prototype.bitCount=function bnBitCount(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=cbit(this[r]^e);return t},BigInteger.prototype.testBit=function bnTestBit(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},BigInteger.prototype.setBit=function bnSetBit(t){return this.changeBit(t,op_or)},BigInteger.prototype.clearBit=function bnClearBit(t){return this.changeBit(t,op_andnot)},BigInteger.prototype.flipBit=function bnFlipBit(t){return this.changeBit(t,op_xor)},BigInteger.prototype.add=function bnAdd(t){var e=nbi();return this.addTo(t,e),e},BigInteger.prototype.subtract=function bnSubtract(t){var e=nbi();return this.subTo(t,e),e},BigInteger.prototype.multiply=function bnMultiply(t){var e=nbi();return this.multiplyTo(t,e),e},BigInteger.prototype.divide=function bnDivide(t){var e=nbi();return this.divRemTo(t,e,null),e},BigInteger.prototype.remainder=function bnRemainder(t){var e=nbi();return this.divRemTo(t,null,e),e},BigInteger.prototype.divideAndRemainder=function bnDivideAndRemainder(t){var e=nbi(),r=nbi();return this.divRemTo(t,e,r),new Array(e,r)},BigInteger.prototype.modPow=function bnModPow(t,e){var r,n,i=t.bitLength(),o=nbv(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new Classic(e):e.isEven()?new Barrett(e):new Montgomery(e);var s=new Array,a=3,u=r-1,c=(1<<r)-1;if(s[1]=n.convert(this),r>1){var f=nbi();for(n.sqrTo(s[1],f);a<=c;)s[a]=nbi(),n.mulTo(f,s[a-2],s[a]),a+=2}var h,l,p=t.t-1,g=!0,d=nbi();for(i=nbits(t[p])-1;p>=0;){for(i>=u?h=t[p]>>i-u&c:(h=(t[p]&(1<<i+1)-1)<<u-i,p>0&&(h|=t[p-1]>>this.DB+i-u)),a=r;0==(1&h);)h>>=1,--a;if((i-=a)<0&&(i+=this.DB,--p),g)s[h].copyTo(o),g=!1;else{for(;a>1;)n.sqrTo(o,d),n.sqrTo(d,o),a-=2;a>0?n.sqrTo(o,d):(l=o,o=d,d=l),n.mulTo(d,s[h],o)}for(;p>=0&&0==(t[p]&1<<i);)n.sqrTo(o,d),l=o,o=d,d=l,--i<0&&(i=this.DB-1,--p)}return n.revert(o)},BigInteger.prototype.modInverse=function bnModInverse(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return BigInteger.ZERO;for(var r=t.clone(),n=this.clone(),i=nbv(1),o=nbv(0),s=nbv(0),a=nbv(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(t,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),e?(s.isEven()&&a.isEven()||(s.addTo(this,s),a.subTo(t,a)),s.rShiftTo(1,s)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);r.compareTo(n)>=0?(r.subTo(n,r),e&&i.subTo(s,i),o.subTo(a,o)):(n.subTo(r,n),e&&s.subTo(i,s),a.subTo(o,a))}return 0!=n.compareTo(BigInteger.ONE)?BigInteger.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},BigInteger.prototype.pow=function bnPow(t){return this.exp(t,new NullExp)},BigInteger.prototype.gcd=function bnGCD(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},BigInteger.prototype.isProbablePrime=function bnIsProbablePrime(t){var e,r=this.abs();if(1==r.t&&r[0]<=C[C.length-1]){for(e=0;e<C.length;++e)if(r[0]==C[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<C.length;){for(var n=C[e],i=e+1;i<C.length&&n<I;)n*=C[i++];for(n=r.modInt(n);e<i;)if(n%C[e++]==0)return!1}return r.millerRabin(t)},BigInteger.prototype.square=function bnSquare(){var t=nbi();return this.squareTo(t),t},Arcfour.prototype.init=function ARC4init(t){var e,r,n;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[r],this.S[r]=n;this.i=0,this.j=0},Arcfour.prototype.next=function ARC4next(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var R,T,M,O=256;
|
||
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*/function rng_seed_time(){!function rng_seed_int(t){T[M++]^=255&t,T[M++]^=t>>8&255,T[M++]^=t>>16&255,T[M++]^=t>>24&255,M>=O&&(M-=O)}((new Date).getTime())}if(null==T){var U;if(T=new Array,M=0,void 0!==u&&(void 0!==u.crypto||void 0!==u.msCrypto)){var N=u.crypto||u.msCrypto;if(N.getRandomValues){var L=new Uint8Array(32);for(N.getRandomValues(L),U=0;U<32;++U)T[M++]=L[U]}else if("Netscape"==i.appName&&i.appVersion<"5"){var D=u.crypto.random(32);for(U=0;U<D.length;++U)T[M++]=255&D.charCodeAt(U)}}for(;M<O;)U=Math.floor(65536*Math.random()),T[M++]=U>>>8,T[M++]=255&U;M=0,rng_seed_time()}function rng_get_byte(){if(null==R){for(rng_seed_time(),(R=function prng_newstate(){return new Arcfour}()).init(T),M=0;M<T.length;++M)T[M]=0;M=0}return R.next()}function SecureRandom(){}
|
||
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*/
|
||
function parseBigInt(t,e){return new BigInteger(t,e)}function oaep_mgf1_arr(t,e,r){for(var n="",i=0;n.length<e;)n+=r(String.fromCharCode.apply(String,t.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return n}function RSAKey(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}
|
||
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
|
||
*/
|
||
function ECFieldElementFp(t,e){this.x=e,this.q=t}function ECPointFp(t,e,r,n){this.curve=t,this.x=e,this.y=r,this.z=null==n?BigInteger.ONE:n,this.zinv=null}function ECCurveFp(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new ECPointFp(this,null,null)}SecureRandom.prototype.nextBytes=function rng_get_bytes(t){var e;for(e=0;e<t.length;++e)t[e]=rng_get_byte()},RSAKey.prototype.doPublic=function RSADoPublic(t){return t.modPowInt(this.e,this.n)},RSAKey.prototype.setPublic=function RSASetPublic(t,e){if(this.isPublic=!0,this.isPrivate=!1,"string"!=typeof t)this.n=t,this.e=e;else{if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA public key";this.n=parseBigInt(t,16),this.e=parseInt(e,16)}},RSAKey.prototype.encrypt=function RSAEncrypt(t){var e=function pkcs1pad2(t,e){if(e<t.length+11)throw"Message too long for RSA";for(var r=new Array,n=t.length-1;n>=0&&e>0;){var i=t.charCodeAt(n--);i<128?r[--e]=i:i>127&&i<2048?(r[--e]=63&i|128,r[--e]=i>>6|192):(r[--e]=63&i|128,r[--e]=i>>6&63|128,r[--e]=i>>12|224)}r[--e]=0;for(var o=new SecureRandom,s=new Array;e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);r[--e]=s[0]}return r[--e]=2,r[--e]=0,new BigInteger(r)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var r=this.doPublic(e);if(null==r)return null;var n=r.toString(16);return 0==(1&n.length)?n:"0"+n},RSAKey.prototype.encryptOAEP=function RSAEncryptOAEP(t,e,r){var n=function oaep_pad(t,e,r,n){var i=H.crypto.MessageDigest,o=H.crypto.Util,s=null;if(r||(r="sha1"),"string"==typeof r&&(s=i.getCanonicalAlgName(r),n=i.getHashLength(s),r=function f(t){return hextorstr(o.hashHex(rstrtohex(t),s))}),t.length+2*n+2>e)throw"Message too long for RSA";var a,u="";for(a=0;a<e-t.length-2*n-2;a+=1)u+="\0";var c=r("")+u+""+t,h=new Array(n);(new SecureRandom).nextBytes(h);var l=oaep_mgf1_arr(h,c.length,r),p=[];for(a=0;a<c.length;a+=1)p[a]=c.charCodeAt(a)^l.charCodeAt(a);var g=oaep_mgf1_arr(p,h.length,r),d=[0];for(a=0;a<h.length;a+=1)d[a+1]=h[a]^g.charCodeAt(a);return new BigInteger(d.concat(p))}(t,this.n.bitLength()+7>>3,e,r);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},RSAKey.prototype.type="RSA",ECFieldElementFp.prototype.equals=function feFpEquals(t){return t==this||this.q.equals(t.q)&&this.x.equals(t.x)},ECFieldElementFp.prototype.toBigInteger=function feFpToBigInteger(){return this.x},ECFieldElementFp.prototype.negate=function feFpNegate(){return new ECFieldElementFp(this.q,this.x.negate().mod(this.q))},ECFieldElementFp.prototype.add=function feFpAdd(t){return new ECFieldElementFp(this.q,this.x.add(t.toBigInteger()).mod(this.q))},ECFieldElementFp.prototype.subtract=function feFpSubtract(t){return new ECFieldElementFp(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))},ECFieldElementFp.prototype.multiply=function feFpMultiply(t){return new ECFieldElementFp(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))},ECFieldElementFp.prototype.square=function feFpSquare(){return new ECFieldElementFp(this.q,this.x.square().mod(this.q))},ECFieldElementFp.prototype.divide=function feFpDivide(t){return new ECFieldElementFp(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))},ECPointFp.prototype.getX=function pointFpGetX(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ECPointFp.prototype.getY=function pointFpGetY(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ECPointFp.prototype.equals=function pointFpEquals(t){return t==this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(BigInteger.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(BigInteger.ZERO))},ECPointFp.prototype.isInfinity=function pointFpIsInfinity(){return null==this.x&&null==this.y||this.z.equals(BigInteger.ZERO)&&!this.y.toBigInteger().equals(BigInteger.ZERO)},ECPointFp.prototype.negate=function pointFpNegate(){return new ECPointFp(this.curve,this.x,this.y.negate(),this.z)},ECPointFp.prototype.add=function pointFpAdd(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),r=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(BigInteger.ZERO.equals(r))return BigInteger.ZERO.equals(e)?this.twice():this.curve.getInfinity();var n=new BigInteger("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),s=(t.x.toBigInteger(),t.y.toBigInteger(),r.square()),a=s.multiply(r),u=i.multiply(s),c=e.square().multiply(this.z),f=c.subtract(u.shiftLeft(1)).multiply(t.z).subtract(a).multiply(r).mod(this.curve.q),h=u.multiply(n).multiply(e).subtract(o.multiply(a)).subtract(c.multiply(e)).multiply(t.z).add(e.multiply(a)).mod(this.curve.q),l=a.multiply(this.z).multiply(t.z).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(f),this.curve.fromBigInteger(h),l)},ECPointFp.prototype.twice=function pointFpTwice(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new BigInteger("3"),e=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),o=this.curve.a.toBigInteger(),s=e.square().multiply(t);BigInteger.ZERO.equals(o)||(s=s.add(this.z.square().multiply(o)));var a=(s=s.mod(this.curve.q)).square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),u=s.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q),c=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(u),c)},ECPointFp.prototype.multiply=function pointFpMultiply(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,r=t,n=r.multiply(new BigInteger("3")),i=this.negate(),o=this;for(e=n.bitLength()-2;e>0;--e){o=o.twice();var s=n.testBit(e);s!=r.testBit(e)&&(o=o.add(s?this:i))}return o},ECPointFp.prototype.multiplyTwo=function pointFpMultiplyTwo(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(e);n>=0;)i=i.twice(),t.testBit(n)?i=r.testBit(n)?i.add(o):i.add(this):r.testBit(n)&&(i=i.add(e)),--n;return i},ECCurveFp.prototype.getQ=function curveFpGetQ(){return this.q},ECCurveFp.prototype.getA=function curveFpGetA(){return this.a},ECCurveFp.prototype.getB=function curveFpGetB(){return this.b},ECCurveFp.prototype.equals=function curveFpEquals(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},ECCurveFp.prototype.getInfinity=function curveFpGetInfinity(){return this.infinity},ECCurveFp.prototype.fromBigInteger=function curveFpFromBigInteger(t){return new ECFieldElementFp(this.q,t)},ECCurveFp.prototype.decodePointHex=function curveFpDecodePointHex(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var e=(t.length-2)/2,r=t.substr(2,e),n=t.substr(e+2,e);return new ECPointFp(this,this.fromBigInteger(new BigInteger(r,16)),this.fromBigInteger(new BigInteger(n,16)));default:return null}};
|
||
/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
|
||
*/
|
||
var H,K,W,q=function(){var t=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),e=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function h(t,e,n){return e?r[e]:String.fromCharCode(parseInt(n,16))}var i=new String(""),o=(Object,Array,Object.hasOwnProperty);return function(r,a){var u,c,f=r.match(t),l=f[0],p=!1;"{"===l?u={}:"["===l?u=[]:(u=[],p=!0);for(var g=[u],d=1-p,v=f.length;d<v;++d){var y;switch((l=f[d]).charCodeAt(0)){default:(y=g[0])[c||y.length]=+l,c=void 0;break;case 34:if(-1!==(l=l.substring(1,l.length-1)).indexOf("\\")&&(l=l.replace(e,h)),y=g[0],!c){if(!(y instanceof Array)){c=l||i;break}c=y.length}y[c]=l,c=void 0;break;case 91:y=g[0],g.unshift(y[c||y.length]=[]),c=void 0;break;case 93:g.shift();break;case 102:(y=g[0])[c||y.length]=!1,c=void 0;break;case 110:(y=g[0])[c||y.length]=null,c=void 0;break;case 116:(y=g[0])[c||y.length]=!0,c=void 0;break;case 123:y=g[0],g.unshift(y[c||y.length]={}),c=void 0;break;case 125:g.shift()}}if(p){if(1!==g.length)throw new Error;u=u[0]}else if(g.length)throw new Error;if(a){u=function s(t,e){var r=t[e];if(r&&"object"===(void 0===r?"undefined":n(r))){var i=null;for(var u in r)if(o.call(r,u)&&r!==t){var c=s(r,u);void 0!==c?r[u]=c:(i||(i=[]),i.push(u))}if(i)for(var f=i.length;--f>=0;)delete r[i[f]]}return a.call(t,e,r)}({"":u},"")}return u}}(),V=new function(){};function stoBA(t){for(var e=new Array,r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function BAtos(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}function BAtohex(t){for(var e="",r=0;r<t.length;r++){var n=t[r].toString(16);1==n.length&&(n="0"+n),e+=n}return e}function stohex(t){return BAtohex(stoBA(t))}function b64tob64u(t){return t=(t=(t=t.replace(/\=/g,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function b64utob64(t){return t.length%4==2?t+="==":t.length%4==3&&(t+="="),t=(t=t.replace(/-/g,"+")).replace(/_/g,"/")}function hextob64u(t){return t.length%2==1&&(t="0"+t),b64tob64u(hex2b64(t))}function b64utohex(t){return b64tohex(b64utob64(t))}function utf8tohex(t){return uricmptohex(encodeURIComponentAll(t))}function hextoutf8(t){return decodeURIComponent(hextouricmp(t))}function hextorstr(t){for(var e="",r=0;r<t.length-1;r+=2)e+=String.fromCharCode(parseInt(t.substr(r,2),16));return e}function rstrtohex(t){for(var e="",r=0;r<t.length;r++)e+=("0"+t.charCodeAt(r).toString(16)).slice(-2);return e}function hextob64(t){return hex2b64(t)}function hextob64nl(t){var e=hextob64(t).replace(/(.{64})/g,"$1\r\n");return e=e.replace(/\r\n$/,"")}function b64nltohex(t){return b64tohex(t.replace(/[^0-9A-Za-z\/+=]*/g,""))}function hextopem(t,e){return"-----BEGIN "+e+"-----\r\n"+hextob64nl(t)+"\r\n-----END "+e+"-----\r\n"}function pemtohex(t,e){if(-1==t.indexOf("-----BEGIN "))throw"can't find PEM header: "+e;return b64nltohex(t=void 0!==e?(t=t.replace("-----BEGIN "+e+"-----","")).replace("-----END "+e+"-----",""):(t=t.replace(/-----BEGIN [^-]+-----/,"")).replace(/-----END [^-]+-----/,""))}function zulutomsec(t){var e,r,n,i,o,s,a,u,c,f,h;if(h=t.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/))return u=h[1],e=parseInt(u),2===u.length&&(50<=e&&e<100?e=1900+e:0<=e&&e<50&&(e=2e3+e)),r=parseInt(h[2])-1,n=parseInt(h[3]),i=parseInt(h[4]),o=parseInt(h[5]),s=parseInt(h[6]),a=0,""!==(c=h[7])&&(f=(c.substr(1)+"00").substr(0,3),a=parseInt(f)),Date.UTC(e,r,n,i,o,s,a);throw"unsupported zulu format: "+t}function zulutosec(t){return~~(zulutomsec(t)/1e3)}function uricmptohex(t){return t.replace(/%/g,"")}function hextouricmp(t){return t.replace(/(..)/g,"%$1")}function ipv6tohex(t){var e="malformed IPv6 address";if(!t.match(/^[0-9A-Fa-f:]+$/))throw e;var r=(t=t.toLowerCase()).split(":").length-1;if(r<2)throw e;var n=":".repeat(7-r+2),i=(t=t.replace("::",n)).split(":");if(8!=i.length)throw e;for(var o=0;o<8;o++)i[o]=("0000"+i[o]).slice(-4);return i.join("")}function hextoipv6(t){if(!t.match(/^[0-9A-Fa-f]{32}$/))throw"malformed IPv6 address octet";for(var e=(t=t.toLowerCase()).match(/.{1,4}/g),r=0;r<8;r++)e[r]=e[r].replace(/^0+/,""),""==e[r]&&(e[r]="0");var n=(t=":"+e.join(":")+":").match(/:(0:){2,}/g);if(null===n)return t.slice(1,-1);var i="";for(r=0;r<n.length;r++)n[r].length>i.length&&(i=n[r]);return(t=t.replace(i,"::")).slice(1,-1)}function hextoip(t){var e="malformed hex value";if(!t.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw e;if(8!=t.length)return 32==t.length?hextoipv6(t):t;try{return parseInt(t.substr(0,2),16)+"."+parseInt(t.substr(2,2),16)+"."+parseInt(t.substr(4,2),16)+"."+parseInt(t.substr(6,2),16)}catch(t){throw e}}function encodeURIComponentAll(t){for(var e=encodeURIComponent(t),r="",n=0;n<e.length;n++)"%"==e[n]?(r+=e.substr(n,3),n+=2):r=r+"%"+stohex(e[n]);return r}function hextoposhex(t){return t.length%2==1?"0"+t:t.substr(0,1)>"7"?"00"+t:t}V.getLblen=function(t,e){if("8"!=t.substr(e+2,1))return 1;var r=parseInt(t.substr(e+3,1));return 0==r?-1:0<r&&r<10?r+1:-2},V.getL=function(t,e){var r=V.getLblen(t,e);return r<1?"":t.substr(e+2,2*r)},V.getVblen=function(t,e){var r;return""==(r=V.getL(t,e))?-1:("8"===r.substr(0,1)?new BigInteger(r.substr(2),16):new BigInteger(r,16)).intValue()},V.getVidx=function(t,e){var r=V.getLblen(t,e);return r<0?r:e+2*(r+1)},V.getV=function(t,e){var r=V.getVidx(t,e),n=V.getVblen(t,e);return t.substr(r,2*n)},V.getTLV=function(t,e){return t.substr(e,2)+V.getL(t,e)+V.getV(t,e)},V.getNextSiblingIdx=function(t,e){return V.getVidx(t,e)+2*V.getVblen(t,e)},V.getChildIdx=function(t,e){var r=V,n=new Array,i=r.getVidx(t,e);"03"==t.substr(e,2)?n.push(i+2):n.push(i);for(var o=r.getVblen(t,e),s=i,a=0;;){var u=r.getNextSiblingIdx(t,s);if(null==u||u-i>=2*o)break;if(a>=200)break;n.push(u),s=u,a++}return n},V.getNthChildIdx=function(t,e,r){return V.getChildIdx(t,e)[r]},V.getIdxbyList=function(t,e,r,n){var i,o,s=V;if(0==r.length){if(void 0!==n&&t.substr(e,2)!==n)throw"checking tag doesn't match: "+t.substr(e,2)+"!="+n;return e}return i=r.shift(),o=s.getChildIdx(t,e),s.getIdxbyList(t,o[i],r,n)},V.getTLVbyList=function(t,e,r,n){var i=V,o=i.getIdxbyList(t,e,r);if(void 0===o)throw"can't find nthList object";if(void 0!==n&&t.substr(o,2)!=n)throw"checking tag doesn't match: "+t.substr(o,2)+"!="+n;return i.getTLV(t,o)},V.getVbyList=function(t,e,r,n,i){var o,s,a=V;if(void 0===(o=a.getIdxbyList(t,e,r,n)))throw"can't find nthList object";return s=a.getV(t,o),!0===i&&(s=s.substr(2)),s},V.hextooidstr=function(t){var e=function h(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},r=[],n=t.substr(0,2),i=parseInt(n,16);r[0]=new String(Math.floor(i/40)),r[1]=new String(i%40);for(var o=t.substr(2),s=[],a=0;a<o.length/2;a++)s.push(parseInt(o.substr(2*a,2),16));var u=[],c="";for(a=0;a<s.length;a++)128&s[a]?c+=e((127&s[a]).toString(2),7):(c+=e((127&s[a]).toString(2),7),u.push(new String(parseInt(c,2))),c="");var f=r.join(".");return u.length>0&&(f=f+"."+u.join(".")),f},V.dump=function(t,e,r,n){var i=V,o=i.getV,s=i.dump,a=i.getChildIdx,u=t;t instanceof H.asn1.ASN1Object&&(u=t.getEncodedHex());var c=function q(t,e){return t.length<=2*e?t:t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e)};void 0===e&&(e={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var f=e.ommit_long_octet;if("01"==u.substr(r,2))return"00"==(h=o(u,r))?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n";if("02"==u.substr(r,2))return n+"INTEGER "+c(h=o(u,r),f)+"\n";if("03"==u.substr(r,2))return n+"BITSTRING "+c(h=o(u,r),f)+"\n";if("04"==u.substr(r,2)){var h=o(u,r);if(i.isASN1HEX(h)){var l=n+"OCTETSTRING, encapsulates\n";return l+=s(h,e,0,n+" ")}return n+"OCTETSTRING "+c(h,f)+"\n"}if("05"==u.substr(r,2))return n+"NULL\n";if("06"==u.substr(r,2)){var p=o(u,r),g=H.asn1.ASN1Util.oidHexToInt(p),d=H.asn1.x509.OID.oid2name(g),v=g.replace(/\./g," ");return""!=d?n+"ObjectIdentifier "+d+" ("+v+")\n":n+"ObjectIdentifier ("+v+")\n"}if("0c"==u.substr(r,2))return n+"UTF8String '"+hextoutf8(o(u,r))+"'\n";if("13"==u.substr(r,2))return n+"PrintableString '"+hextoutf8(o(u,r))+"'\n";if("14"==u.substr(r,2))return n+"TeletexString '"+hextoutf8(o(u,r))+"'\n";if("16"==u.substr(r,2))return n+"IA5String '"+hextoutf8(o(u,r))+"'\n";if("17"==u.substr(r,2))return n+"UTCTime "+hextoutf8(o(u,r))+"\n";if("18"==u.substr(r,2))return n+"GeneralizedTime "+hextoutf8(o(u,r))+"\n";if("30"==u.substr(r,2)){if("3000"==u.substr(r,4))return n+"SEQUENCE {}\n";l=n+"SEQUENCE\n";var y=e;if((2==(b=a(u,r)).length||3==b.length)&&"06"==u.substr(b[0],2)&&"04"==u.substr(b[b.length-1],2)){d=i.oidname(o(u,b[0]));var m=JSON.parse(JSON.stringify(e));m.x509ExtName=d,y=m}for(var S=0;S<b.length;S++)l+=s(u,y,b[S],n+" ");return l}if("31"==u.substr(r,2)){l=n+"SET\n";var b=a(u,r);for(S=0;S<b.length;S++)l+=s(u,e,b[S],n+" ");return l}var _=parseInt(u.substr(r,2),16);if(0!=(128&_)){var F=31&_;if(0!=(32&_)){var l=n+"["+F+"]\n";for(b=a(u,r),S=0;S<b.length;S++)l+=s(u,e,b[S],n+" ");return l}return"68747470"==(h=o(u,r)).substr(0,8)&&(h=hextoutf8(h)),"subjectAltName"===e.x509ExtName&&2==F&&(h=hextoutf8(h)),l=n+"["+F+"] "+h+"\n"}return n+"UNKNOWN("+u.substr(r,2)+") "+o(u,r)+"\n"},V.isASN1HEX=function(t){var e=V;if(t.length%2==1)return!1;var r=e.getVblen(t,0),n=t.substr(0,2),i=e.getL(t,0);return t.length-n.length-i.length==2*r},V.oidname=function(t){var e=H.asn1;H.lang.String.isHex(t)&&(t=e.ASN1Util.oidHexToInt(t));var r=e.x509.OID.oid2name(t);return""===r&&(r=t),r},void 0!==H&&H||(H={}),void 0!==H.lang&&H.lang||(H.lang={}),H.lang.String=function(){},"function"==typeof t?(K=function utf8tob64u(e){return b64tob64u(new t(e,"utf8").toString("base64"))},W=function b64utoutf8(e){return new t(b64utob64(e),"base64").toString("utf8")}):(K=function utf8tob64u(t){return hextob64u(uricmptohex(encodeURIComponentAll(t)))},W=function b64utoutf8(t){return decodeURIComponent(hextouricmp(b64utohex(t)))}),H.lang.String.isInteger=function(t){return!!t.match(/^[0-9]+$/)||!!t.match(/^-[0-9]+$/)},H.lang.String.isHex=function(t){return!(t.length%2!=0||!t.match(/^[0-9a-f]+$/)&&!t.match(/^[0-9A-F]+$/))},H.lang.String.isBase64=function(t){return!(!(t=t.replace(/\s+/g,"")).match(/^[0-9A-Za-z+\/]+={0,3}$/)||t.length%4!=0)},H.lang.String.isBase64URL=function(t){return!t.match(/[+/=]/)&&(t=b64utob64(t),H.lang.String.isBase64(t))},H.lang.String.isIntegerArray=function(t){return!!(t=t.replace(/\s+/g,"")).match(/^\[[0-9,]+\]$/)};void 0!==H&&H||(H={}),void 0!==H.crypto&&H.crypto||(H.crypto={}),H.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:v.algo.MD5,sha1:v.algo.SHA1,sha224:v.algo.SHA224,sha256:v.algo.SHA256,sha384:v.algo.SHA384,sha512:v.algo.SHA512,ripemd160:v.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if(void 0===this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,r){var n=this.getDigestInfoHex(t,e),i=r/4;if(n.length+22>i)throw"key is too short for SigAlg: keylen="+r+","+e;for(var o="0001",s="00"+n,a="",u=i-o.length-s.length,c=0;c<u;c+=2)a+="ff";return o+a+s},this.hashString=function(t,e){return new H.crypto.MessageDigest({alg:e}).digestString(t)},this.hashHex=function(t,e){return new H.crypto.MessageDigest({alg:e}).digestHex(t)},this.sha1=function(t){return new H.crypto.MessageDigest({alg:"sha1",prov:"cryptojs"}).digestString(t)},this.sha256=function(t){return new H.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"}).digestString(t)},this.sha256Hex=function(t){return new H.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"}).digestHex(t)},this.sha512=function(t){return new H.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"}).digestString(t)},this.sha512Hex=function(t){return new H.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"}).digestHex(t)}},H.crypto.Util.md5=function(t){return new H.crypto.MessageDigest({alg:"md5",prov:"cryptojs"}).digestString(t)},H.crypto.Util.ripemd160=function(t){return new H.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"}).digestString(t)},H.crypto.Util.SECURERANDOMGEN=new SecureRandom,H.crypto.Util.getRandomHexOfNbytes=function(t){var e=new Array(t);return H.crypto.Util.SECURERANDOMGEN.nextBytes(e),BAtohex(e)},H.crypto.Util.getRandomBigIntegerOfNbytes=function(t){return new BigInteger(H.crypto.Util.getRandomHexOfNbytes(t),16)},H.crypto.Util.getRandomHexOfNbits=function(t){var e=t%8,r=new Array((t-e)/8+1);return H.crypto.Util.SECURERANDOMGEN.nextBytes(r),r[0]=(255<<e&255^255)&r[0],BAtohex(r)},H.crypto.Util.getRandomBigIntegerOfNbits=function(t){return new BigInteger(H.crypto.Util.getRandomHexOfNbits(t),16)},H.crypto.Util.getRandomBigIntegerZeroToMax=function(t){for(var e=t.bitLength();;){var r=H.crypto.Util.getRandomBigIntegerOfNbits(e);if(-1!=t.compareTo(r))return r}},H.crypto.Util.getRandomBigIntegerMinToMax=function(t,e){var r=t.compareTo(e);if(1==r)throw"biMin is greater than biMax";if(0==r)return t;var n=e.subtract(t);return H.crypto.Util.getRandomBigIntegerZeroToMax(n).add(t)},H.crypto.MessageDigest=function(t){this.setAlgAndProvider=function(t,e){if(null!==(t=H.crypto.MessageDigest.getCanonicalAlgName(t))&&void 0===e&&(e=H.crypto.Util.DEFAULTPROVIDER[t]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t)&&"cryptojs"==e){try{this.md=H.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create()}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=v.enc.Hex.parse(t);this.md.update(e)},this.digest=function(){return this.md.finalize().toString(v.enc.Hex)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}if(-1!=":sha256:".indexOf(t)&&"sjcl"==e){try{this.md=new sjcl.hash.sha256}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=sjcl.codec.hex.toBits(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return sjcl.codec.hex.fromBits(t)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==t&&void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=H.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},H.crypto.MessageDigest.getCanonicalAlgName=function(t){return"string"==typeof t&&(t=(t=t.toLowerCase()).replace(/-/,"")),t},H.crypto.MessageDigest.getHashLength=function(t){var e=H.crypto.MessageDigest,r=e.getCanonicalAlgName(t);if(void 0===e.HASHLENGTH[r])throw"not supported algorithm: "+t;return e.HASHLENGTH[r]},H.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},H.crypto.Mac=function(t){this.setAlgAndProvider=function(t,e){if(null==(t=t.toLowerCase())&&(t="hmacsha1"),"hmac"!=(t=t.toLowerCase()).substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+t;void 0===e&&(e=H.crypto.Util.DEFAULTPROVIDER[t]),this.algProv=t+"/"+e;var r=t.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(r)&&"cryptojs"==e){try{var n=H.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[r];this.mac=v.algo.HMAC.create(n,this.pass)}catch(t){throw"setAlgAndProvider hash alg set fail hashAlg="+r+"/"+t}this.updateString=function(t){this.mac.update(t)},this.updateHex=function(t){var e=v.enc.Hex.parse(t);this.mac.update(e)},this.doFinal=function(){return this.mac.finalize().toString(v.enc.Hex)},this.doFinalString=function(t){return this.updateString(t),this.doFinal()},this.doFinalHex=function(t){return this.updateHex(t),this.doFinal()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(t){if("string"==typeof t){var e=t;return t.length%2!=1&&t.match(/^[0-9A-Fa-f]+$/)||(e=rstrtohex(t)),void(this.pass=v.enc.Hex.parse(e))}if("object"!=(void 0===t?"undefined":n(t)))throw"KJUR.crypto.Mac unsupported password type: "+t;e=null;if(void 0!==t.hex){if(t.hex.length%2!=0||!t.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+t.hex;e=t.hex}if(void 0!==t.utf8&&(e=utf8tohex(t.utf8)),void 0!==t.rstr&&(e=rstrtohex(t.rstr)),void 0!==t.b64&&(e=b64tohex(t.b64)),void 0!==t.b64u&&(e=b64utohex(t.b64u)),null==e)throw"KJUR.crypto.Mac unsupported password type: "+t;this.pass=v.enc.Hex.parse(e)},void 0!==t&&(void 0!==t.pass&&this.setPassword(t.pass),void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=H.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},H.crypto.Signature=function(t){var e=null;if(this._setAlgNames=function(){var t=this.algName.match(/^(.+)with(.+)$/);t&&(this.mdAlgName=t[1].toLowerCase(),this.pubkeyAlgName=t[2].toLowerCase())},this._zeroPaddingOfSignature=function(t,e){for(var r="",n=e/4-t.length,i=0;i<n;i++)r+="0";return r+t},this.setAlgAndProvider=function(t,e){if(this._setAlgNames(),"cryptojs/jsrsa"!=e)throw"provider not supported: "+e;if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)){try{this.md=new H.crypto.MessageDigest({alg:this.mdAlgName})}catch(t){throw"setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+t}this.init=function(t,e){var r=null;try{r=void 0===e?J.getKey(t):J.getKey(t,e)}catch(t){throw"init failed:"+t}if(!0===r.isPrivate)this.prvKey=r,this.state="SIGN";else{if(!0!==r.isPublic)throw"init failed.:"+r;this.pubKey=r,this.state="VERIFY"}},this.updateString=function(t){this.md.updateString(t)},this.updateHex=function(t){this.md.updateHex(t)},this.sign=function(){if(this.sHashHex=this.md.digest(),void 0!==this.ecprvhex&&void 0!==this.eccurvename){var t=new H.crypto.ECDSA({curve:this.eccurvename});this.hSign=t.signHex(this.sHashHex,this.ecprvhex)}else if(this.prvKey instanceof RSAKey&&"rsaandmgf1"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof RSAKey&&"rsa"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof H.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof H.crypto.DSA))throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;this.hSign=this.prvKey.signWithMessageHash(this.sHashHex)}return this.hSign},this.signString=function(t){return this.updateString(t),this.sign()},this.signHex=function(t){return this.updateHex(t),this.sign()},this.verify=function(t){if(this.sHashHex=this.md.digest(),void 0!==this.ecpubhex&&void 0!==this.eccurvename)return new H.crypto.ECDSA({curve:this.eccurvename}).verifyHex(this.sHashHex,t,this.ecpubhex);if(this.pubKey instanceof RSAKey&&"rsaandmgf1"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,t,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof RSAKey&&"rsa"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(void 0!==H.crypto.ECDSA&&this.pubKey instanceof H.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(void 0!==H.crypto.DSA&&this.pubKey instanceof H.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(t,e){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(t){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(t){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(t){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(t){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=t,void 0!==t&&(void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov?this.provName=H.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=t.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),void 0!==t.psssaltlen&&(this.pssSaltLen=t.psssaltlen),void 0!==t.prvkeypem)){if(void 0!==t.prvkeypas)throw"both prvkeypem and prvkeypas parameters not supported";try{e=J.getKey(t.prvkeypem);this.init(e)}catch(t){throw"fatal error to load pem private key: "+t}}},H.crypto.Cipher=function(t){},H.crypto.Cipher.encrypt=function(t,e,r){if(e instanceof RSAKey&&e.isPublic){var n=H.crypto.Cipher.getAlgByKeyAndName(e,r);if("RSA"===n)return e.encrypt(t);if("RSAOAEP"===n)return e.encryptOAEP(t,"sha1");var i=n.match(/^RSAOAEP(\d+)$/);if(null!==i)return e.encryptOAEP(t,"sha"+i[1]);throw"Cipher.encrypt: unsupported algorithm for RSAKey: "+r}throw"Cipher.encrypt: unsupported key or algorithm"},H.crypto.Cipher.decrypt=function(t,e,r){if(e instanceof RSAKey&&e.isPrivate){var n=H.crypto.Cipher.getAlgByKeyAndName(e,r);if("RSA"===n)return e.decrypt(t);if("RSAOAEP"===n)return e.decryptOAEP(t,"sha1");var i=n.match(/^RSAOAEP(\d+)$/);if(null!==i)return e.decryptOAEP(t,"sha"+i[1]);throw"Cipher.decrypt: unsupported algorithm for RSAKey: "+r}throw"Cipher.decrypt: unsupported key or algorithm"},H.crypto.Cipher.getAlgByKeyAndName=function(t,e){if(t instanceof RSAKey){if(-1!=":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(e))return e;if(null===e||void 0===e)return"RSA";throw"getAlgByKeyAndName: not supported algorithm name for RSAKey: "+e}throw"getAlgByKeyAndName: not supported algorithm name: "+e},H.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},void 0!==H&&H||(H={}),void 0!==H.crypto&&H.crypto||(H.crypto={}),H.crypto.ECDSA=function(t){var e=new SecureRandom;this.type="EC",this.isPrivate=!1,this.isPublic=!1,this.getBigRandom=function(t){return new BigInteger(t.bitLength(),e).mod(t.subtract(BigInteger.ONE)).add(BigInteger.ONE)},this.setNamedCurve=function(t){this.ecparams=H.crypto.ECParameterDB.getByName(t),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=t},this.setPrivateKeyHex=function(t){this.isPrivate=!0,this.prvKeyHex=t},this.setPublicKeyHex=function(t){this.isPublic=!0,this.pubKeyHex=t},this.getPublicKeyXYHex=function(){var t=this.pubKeyHex;if("04"!==t.substr(0,2))throw"this method supports uncompressed format(04) only";var e=this.ecparams.keylen/4;if(t.length!==2+2*e)throw"malformed public key hex length";var r={};return r.x=t.substr(2,e),r.y=t.substr(2+e),r},this.getShortNISTPCurveName=function(){var t=this.curveName;return"secp256r1"===t||"NIST P-256"===t||"P-256"===t||"prime256v1"===t?"P-256":"secp384r1"===t||"NIST P-384"===t||"P-384"===t?"P-384":null},this.generateKeyPairHex=function(){var t=this.ecparams.n,e=this.getBigRandom(t),r=this.ecparams.G.multiply(e),n=r.getX().toBigInteger(),i=r.getY().toBigInteger(),o=this.ecparams.keylen/4,s=("0000000000"+e.toString(16)).slice(-o),a="04"+("0000000000"+n.toString(16)).slice(-o)+("0000000000"+i.toString(16)).slice(-o);return this.setPrivateKeyHex(s),this.setPublicKeyHex(a),{ecprvhex:s,ecpubhex:a}},this.signWithMessageHash=function(t){return this.signHex(t,this.prvKeyHex)},this.signHex=function(t,e){var r=new BigInteger(e,16),n=this.ecparams.n,i=new BigInteger(t,16);do{var o=this.getBigRandom(n),s=this.ecparams.G.multiply(o).getX().toBigInteger().mod(n)}while(s.compareTo(BigInteger.ZERO)<=0);var a=o.modInverse(n).multiply(i.add(r.multiply(s))).mod(n);return H.crypto.ECDSA.biRSSigToASN1Sig(s,a)},this.sign=function(t,e){var r=e,n=this.ecparams.n,i=BigInteger.fromByteArrayUnsigned(t);do{var o=this.getBigRandom(n),s=this.ecparams.G.multiply(o).getX().toBigInteger().mod(n)}while(s.compareTo(BigInteger.ZERO)<=0);var a=o.modInverse(n).multiply(i.add(r.multiply(s))).mod(n);return this.serializeSig(s,a)},this.verifyWithMessageHash=function(t,e){return this.verifyHex(t,e,this.pubKeyHex)},this.verifyHex=function(t,e,r){var n,i,o,s=H.crypto.ECDSA.parseSigHex(e);n=s.r,i=s.s,o=ECPointFp.decodeFromHex(this.ecparams.curve,r);var a=new BigInteger(t,16);return this.verifyRaw(a,n,i,o)},this.verify=function(t,e,r){var i,o,s;if(Bitcoin.Util.isArray(e)){var a=this.parseSig(e);i=a.r,o=a.s}else{if("object"!==(void 0===e?"undefined":n(e))||!e.r||!e.s)throw"Invalid value for signature";i=e.r,o=e.s}if(r instanceof ECPointFp)s=r;else{if(!Bitcoin.Util.isArray(r))throw"Invalid format for pubkey value, must be byte array or ECPointFp";s=ECPointFp.decodeFrom(this.ecparams.curve,r)}var u=BigInteger.fromByteArrayUnsigned(t);return this.verifyRaw(u,i,o,s)},this.verifyRaw=function(t,e,r,n){var i=this.ecparams.n,o=this.ecparams.G;if(e.compareTo(BigInteger.ONE)<0||e.compareTo(i)>=0)return!1;if(r.compareTo(BigInteger.ONE)<0||r.compareTo(i)>=0)return!1;var s=r.modInverse(i),a=t.multiply(s).mod(i),u=e.multiply(s).mod(i);return o.multiply(a).add(n.multiply(u)).getX().toBigInteger().mod(i).equals(e)},this.serializeSig=function(t,e){var r=t.toByteArraySigned(),n=e.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(t){var e;if(48!=t[0])throw new Error("Signature not a valid DERSequence");if(2!=t[e=2])throw new Error("First element in signature must be a DERInteger");var r=t.slice(e+2,e+2+t[e+1]);if(2!=t[e+=2+t[e+1]])throw new Error("Second element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);return e+=2+t[e+1],{r:BigInteger.fromByteArrayUnsigned(r),s:BigInteger.fromByteArrayUnsigned(n)}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(e<0||e>7)throw"Invalid signature type";var r=this.ecparams.n;return{r:BigInteger.fromByteArrayUnsigned(t.slice(1,33)).mod(r),s:BigInteger.fromByteArrayUnsigned(t.slice(33,65)).mod(r),i:e}},this.readPKCS5PrvKeyHex=function(t){var e,r,n,i=V,o=H.crypto.ECDSA.getName,s=i.getVbyList;if(!1===i.isASN1HEX(t))throw"not ASN.1 hex string";try{e=s(t,0,[2,0],"06"),r=s(t,0,[1],"04");try{n=s(t,0,[3,0],"03").substr(2)}catch(t){}}catch(t){throw"malformed PKCS#1/5 plain ECC private key"}if(this.curveName=o(e),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(t){var e,r,n,i=V,o=H.crypto.ECDSA.getName,s=i.getVbyList;if(!1===i.isASN1HEX(t))throw"not ASN.1 hex string";try{s(t,0,[1,0],"06"),e=s(t,0,[1,1],"06"),r=s(t,0,[2,0,1],"04");try{n=s(t,0,[2,0,2,0],"03").substr(2)}catch(t){}}catch(t){throw"malformed PKCS#8 plain ECC private key"}if(this.curveName=o(e),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PubKeyHex=function(t){var e,r,n=V,i=H.crypto.ECDSA.getName,o=n.getVbyList;if(!1===n.isASN1HEX(t))throw"not ASN.1 hex string";try{o(t,0,[0,0],"06"),e=o(t,0,[0,1],"06"),r=o(t,0,[1],"03").substr(2)}catch(t){throw"malformed PKCS#8 ECC public key"}if(this.curveName=i(e),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r)},this.readCertPubKeyHex=function(t,e){5!==e&&(e=6);var r,n,i=V,o=H.crypto.ECDSA.getName,s=i.getVbyList;if(!1===i.isASN1HEX(t))throw"not ASN.1 hex string";try{r=s(t,0,[0,e,0,1],"06"),n=s(t,0,[0,e,1],"03").substr(2)}catch(t){throw"malformed X.509 certificate ECC public key"}if(this.curveName=o(r),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},H.crypto.ECDSA.parseSigHex=function(t){var e=H.crypto.ECDSA.parseSigHexInHexRS(t);return{r:new BigInteger(e.r,16),s:new BigInteger(e.s,16)}},H.crypto.ECDSA.parseSigHexInHexRS=function(t){var e=V,r=e.getChildIdx,n=e.getV;if("30"!=t.substr(0,2))throw"signature is not a ASN.1 sequence";var i=r(t,0);if(2!=i.length)throw"number of signature ASN.1 sequence elements seem wrong";var o=i[0],s=i[1];if("02"!=t.substr(o,2))throw"1st item of sequene of signature is not ASN.1 integer";if("02"!=t.substr(s,2))throw"2nd item of sequene of signature is not ASN.1 integer";return{r:n(t,o),s:n(t,s)}},H.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=H.crypto.ECDSA.parseSigHexInHexRS(t),r=e.r,n=e.s;if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw"unknown ECDSA sig r length error";if(n.length%32!=0)throw"unknown ECDSA sig s length error";return r+n},H.crypto.ECDSA.concatSigToASN1Sig=function(t){if(t.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig length error";var e=t.substr(0,t.length/2),r=t.substr(t.length/2);return H.crypto.ECDSA.hexRSSigToASN1Sig(e,r)},H.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var r=new BigInteger(t,16),n=new BigInteger(e,16);return H.crypto.ECDSA.biRSSigToASN1Sig(r,n)},H.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var r=H.asn1,n=new r.DERInteger({bigint:t}),i=new r.DERInteger({bigint:e});return new r.DERSequence({array:[n,i]}).getEncodedHex()},H.crypto.ECDSA.getName=function(t){return"2a8648ce3d030107"===t?"secp256r1":"2b8104000a"===t?"secp256k1":"2b81040022"===t?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t)?"secp256r1":-1!=="|secp256k1|".indexOf(t)?"secp256k1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(t)?"secp384r1":null},void 0!==H&&H||(H={}),void 0!==H.crypto&&H.crypto||(H.crypto={}),H.crypto.ECParameterDB=new function(){var t={},e={};function a(t){return new BigInteger(t,16)}this.getByName=function(r){var n=r;if(void 0!==e[n]&&(n=e[r]),void 0!==t[n])return t[n];throw"unregistered EC curve name: "+n},this.regist=function(r,n,i,o,s,u,c,f,h,l,p,g){t[r]={};var d=a(i),v=a(o),y=a(s),m=a(u),S=a(c),b=new ECCurveFp(d,v,y),_=b.decodePointHex("04"+f+h);t[r].name=r,t[r].keylen=n,t[r].curve=b,t[r].G=_,t[r].n=m,t[r].h=S,t[r].oid=p,t[r].info=g;for(var F=0;F<l.length;F++)e[l[F]]=r}},H.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field"),H.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field"),H.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field"),H.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]),H.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]),H.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]),H.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]),H.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]),H.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]),H.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);var J=function(){var t=function d(t,e,n){return r(v.AES,t,e,n)},r=function k(t,e,r,n){var i=v.enc.Hex.parse(e),o=v.enc.Hex.parse(r),s=v.enc.Hex.parse(n),a={};a.key=o,a.iv=s,a.ciphertext=i;var u=t.decrypt(a,o,{iv:s});return v.enc.Hex.stringify(u)},n=function l(t,e,r){return i(v.AES,t,e,r)},i=function g(t,e,r,n){var i=v.enc.Hex.parse(e),o=v.enc.Hex.parse(r),s=v.enc.Hex.parse(n),a=t.encrypt(i,o,{iv:s}),u=v.enc.Hex.parse(a.toString());return v.enc.Base64.stringify(u)},s={"AES-256-CBC":{proc:t,eproc:n,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:n,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:n,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function e(t,n,i){return r(v.TripleDES,t,n,i)},eproc:function o(t,e,r){return i(v.TripleDES,t,e,r)},keylen:24,ivlen:8},"DES-CBC":{proc:function a(t,e,n){return r(v.DES,t,e,n)},eproc:function f(t,e,r){return i(v.DES,t,e,r)},keylen:8,ivlen:8}},u=function n(t){var e={},r=t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));r&&(e.cipher=r[1],e.ivsalt=r[2]);var i=t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));i&&(e.type=i[1]);var o=-1,s=0;-1!=t.indexOf("\r\n\r\n")&&(o=t.indexOf("\r\n\r\n"),s=2),-1!=t.indexOf("\n\n")&&(o=t.indexOf("\n\n"),s=1);var a=t.indexOf("-----END");if(-1!=o&&-1!=a){var u=t.substring(o+2*s,a-s);u=u.replace(/\s+/g,""),e.data=u}return e},c=function j(t,e,r){for(var n=r.substring(0,16),i=v.enc.Hex.parse(n),o=v.enc.Utf8.parse(e),a=s[t].keylen+s[t].ivlen,u="",c=null;;){var f=v.algo.MD5.create();if(null!=c&&f.update(c),f.update(o),f.update(i),c=f.finalize(),(u+=v.enc.Hex.stringify(c)).length>=2*a)break}var h={};return h.keyhex=u.substr(0,2*s[t].keylen),h.ivhex=u.substr(2*s[t].keylen,2*s[t].ivlen),h},p=function b(t,e,r,n){var i=v.enc.Base64.parse(t),o=v.enc.Hex.stringify(i);return(0,s[e].proc)(o,r,n)};return{version:"1.0.0",parsePKCS5PEM:function parsePKCS5PEM(t){return u(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function getKeyAndUnusedIvByPasscodeAndIvsalt(t,e,r){return c(t,e,r)},decryptKeyB64:function decryptKeyB64(t,e,r,n){return p(t,e,r,n)},getDecryptedKeyHex:function getDecryptedKeyHex(t,e){var r=u(t),n=(r.type,r.cipher),i=r.ivsalt,o=r.data,s=c(n,e,i).keyhex;return p(o,n,s,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function getEncryptedPKCS5PEMFromPrvKeyHex(t,e,r,n,i){var o="";if(void 0!==n&&null!=n||(n="AES-256-CBC"),void 0===s[n])throw"KEYUTIL unsupported algorithm: "+n;void 0!==i&&null!=i||(i=function m(t){var e=v.lib.WordArray.random(t);return v.enc.Hex.stringify(e)}(s[n].ivlen).toUpperCase());var a=function h(t,e,r,n){return(0,s[e].eproc)(t,r,n)}(e,n,c(n,r,i).keyhex,i);o="-----BEGIN "+t+" PRIVATE KEY-----\r\n";return o+="Proc-Type: 4,ENCRYPTED\r\n",o+="DEK-Info: "+n+","+i+"\r\n",o+="\r\n",o+=a.replace(/(.{64})/g,"$1\r\n"),o+="\r\n-----END "+t+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function parseHexOfEncryptedPKCS8(t){var e=V,r=e.getChildIdx,n=e.getV,i={},o=r(t,0);if(2!=o.length)throw"malformed format: SEQUENCE(0).items != 2: "+o.length;i.ciphertext=n(t,o[1]);var s=r(t,o[0]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+s.length;if("2a864886f70d01050d"!=n(t,s[0]))throw"this only supports pkcs5PBES2";var a=r(t,s[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+a.length;var u=r(t,a[1]);if(2!=u.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+u.length;if("2a864886f70d0307"!=n(t,u[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=n(t,u[1]);var c=r(t,a[0]);if(2!=c.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+c.length;if("2a864886f70d01050c"!=n(t,c[0]))throw"this only supports pkcs5PBKDF2";var f=r(t,c[1]);if(f.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+f.length;i.pbkdf2Salt=n(t,f[0]);var h=n(t,f[1]);try{i.pbkdf2Iter=parseInt(h,16)}catch(t){throw"malformed format pbkdf2Iter: "+h}return i},getPBKDF2KeyHexFromParam:function getPBKDF2KeyHexFromParam(t,e){var r=v.enc.Hex.parse(t.pbkdf2Salt),n=t.pbkdf2Iter,i=v.PBKDF2(e,r,{keySize:6,iterations:n});return v.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function _getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e){var r=pemtohex(t,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=J.getPBKDF2KeyHexFromParam(n,e),o={};o.ciphertext=v.enc.Hex.parse(n.ciphertext);var s=v.enc.Hex.parse(i),a=v.enc.Hex.parse(n.encryptionSchemeIV),u=v.TripleDES.decrypt(o,s,{iv:a});return v.enc.Hex.stringify(u)},getKeyFromEncryptedPKCS8PEM:function getKeyFromEncryptedPKCS8PEM(t,e){var r=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function parsePlainPrivatePKCS8Hex(t){var e=V,r=e.getChildIdx,n=e.getV,i={algparam:null};if("30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var o=r(t,0);if(3!=o.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(o[1],2))throw"malformed PKCS8 private key(code:003)";var s=r(t,o[1]);if(2!=s.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(s[0],2))throw"malformed PKCS8 private key(code:005)";if(i.algoid=n(t,s[0]),"06"==t.substr(s[1],2)&&(i.algparam=n(t,s[1])),"04"!=t.substr(o[2],2))throw"malformed PKCS8 private key(code:006)";return i.keyidx=e.getVidx(t,o[2]),i},getKeyFromPlainPrivatePKCS8PEM:function getKeyFromPlainPrivatePKCS8PEM(t){var e=pemtohex(t,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(e)},getKeyFromPlainPrivatePKCS8Hex:function getKeyFromPlainPrivatePKCS8Hex(t){var e,r=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==r.algoid)e=new RSAKey;else if("2a8648ce380401"==r.algoid)e=new H.crypto.DSA;else{if("2a8648ce3d0201"!=r.algoid)throw"unsupported private key algorithm";e=new H.crypto.ECDSA}return e.readPKCS8PrvKeyHex(t),e},_getKeyFromPublicPKCS8Hex:function _getKeyFromPublicPKCS8Hex(t){var e,r=V.getVbyList(t,0,[0,0],"06");if("2a864886f70d010101"===r)e=new RSAKey;else if("2a8648ce380401"===r)e=new H.crypto.DSA;else{if("2a8648ce3d0201"!==r)throw"unsupported PKCS#8 public key hex";e=new H.crypto.ECDSA}return e.readPKCS8PubKeyHex(t),e},parsePublicRawRSAKeyHex:function parsePublicRawRSAKeyHex(t){var e=V,r=e.getChildIdx,n=e.getV,i={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var o=r(t,0);if(2!=o.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(o[0],2))throw"malformed RSA key(code:003)";if(i.n=n(t,o[0]),"02"!=t.substr(o[1],2))throw"malformed RSA key(code:004)";return i.e=n(t,o[1]),i},parsePublicPKCS8Hex:function parsePublicPKCS8Hex(t){var e=V,r=e.getChildIdx,n=e.getV,i={algparam:null},o=r(t,0);if(2!=o.length)throw"outer DERSequence shall have 2 elements: "+o.length;var s=o[0];if("30"!=t.substr(s,2))throw"malformed PKCS8 public key(code:001)";var a=r(t,s);if(2!=a.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(a[0],2))throw"malformed PKCS8 public key(code:003)";if(i.algoid=n(t,a[0]),"06"==t.substr(a[1],2)?i.algparam=n(t,a[1]):"30"==t.substr(a[1],2)&&(i.algparam={},i.algparam.p=e.getVbyList(t,a[1],[0],"02"),i.algparam.q=e.getVbyList(t,a[1],[1],"02"),i.algparam.g=e.getVbyList(t,a[1],[2],"02")),"03"!=t.substr(o[1],2))throw"malformed PKCS8 public key(code:004)";return i.key=n(t,o[1]).substr(2),i}}}();J.getKey=function(t,e,r){var n=(v=V).getChildIdx,i=(v.getV,v.getVbyList),o=H.crypto,s=o.ECDSA,a=o.DSA,u=RSAKey,c=pemtohex,f=J;if(void 0!==u&&t instanceof u)return t;if(void 0!==s&&t instanceof s)return t;if(void 0!==a&&t instanceof a)return t;if(void 0!==t.curve&&void 0!==t.xy&&void 0===t.d)return new s({pub:t.xy,curve:t.curve});if(void 0!==t.curve&&void 0!==t.d)return new s({prv:t.d,curve:t.curve});if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d)return(A=new u).setPublic(t.n,t.e),A;if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.co&&void 0===t.qi)return(A=new u).setPrivateEx(t.n,t.e,t.d,t.p,t.q,t.dp,t.dq,t.co),A;if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0===t.p)return(A=new u).setPrivate(t.n,t.e,t.d),A;if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0===t.x)return(A=new a).setPublic(t.p,t.q,t.g,t.y),A;if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0!==t.x)return(A=new a).setPrivate(t.p,t.q,t.g,t.y,t.x),A;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d)return(A=new u).setPublic(b64utohex(t.n),b64utohex(t.e)),A;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.qi)return(A=new u).setPrivateEx(b64utohex(t.n),b64utohex(t.e),b64utohex(t.d),b64utohex(t.p),b64utohex(t.q),b64utohex(t.dp),b64utohex(t.dq),b64utohex(t.qi)),A;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d)return(A=new u).setPrivate(b64utohex(t.n),b64utohex(t.e),b64utohex(t.d)),A;if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0===t.d){var h=(P=new s({curve:t.crv})).ecparams.keylen/4,l="04"+("0000000000"+b64utohex(t.x)).slice(-h)+("0000000000"+b64utohex(t.y)).slice(-h);return P.setPublicKeyHex(l),P}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0!==t.d){h=(P=new s({curve:t.crv})).ecparams.keylen/4,l="04"+("0000000000"+b64utohex(t.x)).slice(-h)+("0000000000"+b64utohex(t.y)).slice(-h);var p=("0000000000"+b64utohex(t.d)).slice(-h);return P.setPublicKeyHex(l),P.setPrivateKeyHex(p),P}if("pkcs5prv"===r){var g,d=t,v=V;if(9===(g=n(d,0)).length)(A=new u).readPKCS5PrvKeyHex(d);else if(6===g.length)(A=new a).readPKCS5PrvKeyHex(d);else{if(!(g.length>2&&"04"===d.substr(g[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";(A=new s).readPKCS5PrvKeyHex(d)}return A}if("pkcs8prv"===r)return A=f.getKeyFromPlainPrivatePKCS8Hex(t);if("pkcs8pub"===r)return f._getKeyFromPublicPKCS8Hex(t);if("x509pub"===r)return X509.getPublicKeyFromCertHex(t);if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return X509.getPublicKeyFromCertPEM(t);if(-1!=t.indexOf("-END PUBLIC KEY-")){var y=pemtohex(t,"PUBLIC KEY");return f._getKeyFromPublicPKCS8Hex(y)}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var m=c(t,"RSA PRIVATE KEY");return f.getKey(m,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var S=i(I=c(t,"DSA PRIVATE KEY"),0,[1],"02"),b=i(I,0,[2],"02"),_=i(I,0,[3],"02"),F=i(I,0,[4],"02"),w=i(I,0,[5],"02");return(A=new a).setPrivate(new BigInteger(S,16),new BigInteger(b,16),new BigInteger(_,16),new BigInteger(F,16),new BigInteger(w,16)),A}if(-1!=t.indexOf("-END PRIVATE KEY-"))return f.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var E=f.getDecryptedKeyHex(t,e),x=new RSAKey;return x.readPKCS5PrvKeyHex(E),x}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var P,A=i(I=f.getDecryptedKeyHex(t,e),0,[1],"04"),C=i(I,0,[2,0],"06"),k=i(I,0,[3,0],"03").substr(2);if(void 0===H.crypto.OID.oidhex2name[C])throw"undefined OID(hex) in KJUR.crypto.OID: "+C;return(P=new s({curve:H.crypto.OID.oidhex2name[C]})).setPublicKeyHex(k),P.setPrivateKeyHex(A),P.isPublic=!1,P}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var I;S=i(I=f.getDecryptedKeyHex(t,e),0,[1],"02"),b=i(I,0,[2],"02"),_=i(I,0,[3],"02"),F=i(I,0,[4],"02"),w=i(I,0,[5],"02");return(A=new a).setPrivate(new BigInteger(S,16),new BigInteger(b,16),new BigInteger(_,16),new BigInteger(F,16),new BigInteger(w,16)),A}if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return f.getKeyFromEncryptedPKCS8PEM(t,e);throw"not supported argument"},J.generateKeypair=function(t,e){if("RSA"==t){var r=e;(s=new RSAKey).generate(r,"10001"),s.isPrivate=!0,s.isPublic=!0;var n=new RSAKey,i=s.n.toString(16),o=s.e.toString(16);return n.setPublic(i,o),n.isPrivate=!1,n.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=n,a}if("EC"==t){var s,a,u=e,c=new H.crypto.ECDSA({curve:u}).generateKeyPairHex();return(s=new H.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),s.setPrivateKeyHex(c.ecprvhex),s.isPrivate=!0,s.isPublic=!1,(n=new H.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),n.isPrivate=!1,n.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=n,a}throw"unknown algorithm: "+t},J.getPEM=function(t,e,r,n,i,s){var a=H,u=a.asn1,c=u.DERObjectIdentifier,f=u.DERInteger,h=u.ASN1Util.newObject,l=u.x509.SubjectPublicKeyInfo,p=a.crypto,g=p.DSA,d=p.ECDSA,y=RSAKey;function A(t){return h({seq:[{int:0},{int:{bigint:t.n}},{int:t.e},{int:{bigint:t.d}},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.dmp1}},{int:{bigint:t.dmq1}},{int:{bigint:t.coeff}}]})}function B(t){return h({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]})}function x(t){return h({seq:[{int:0},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}},{int:{bigint:t.y}},{int:{bigint:t.x}}]})}if((void 0!==y&&t instanceof y||void 0!==g&&t instanceof g||void 0!==d&&t instanceof d)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e))return hextopem(_=new l(t).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==e&&void 0!==y&&t instanceof y&&(void 0===r||null==r)&&1==t.isPrivate)return hextopem(_=A(t).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==e&&void 0!==d&&t instanceof d&&(void 0===r||null==r)&&1==t.isPrivate){var m=new c({name:t.curveName}).getEncodedHex(),S=B(t).getEncodedHex(),b="";return b+=hextopem(m,"EC PARAMETERS"),b+=hextopem(S,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==g&&t instanceof g&&(void 0===r||null==r)&&1==t.isPrivate)return hextopem(_=x(t).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==e&&void 0!==y&&t instanceof y&&void 0!==r&&null!=r&&1==t.isPrivate){var _=A(t).getEncodedHex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",_,r,n,s)}if("PKCS5PRV"==e&&void 0!==d&&t instanceof d&&void 0!==r&&null!=r&&1==t.isPrivate){_=B(t).getEncodedHex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",_,r,n,s)}if("PKCS5PRV"==e&&void 0!==g&&t instanceof g&&void 0!==r&&null!=r&&1==t.isPrivate){_=x(t).getEncodedHex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",_,r,n,s)}var F=function o(t,e){var r=w(t,e);return new h({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:r.pbkdf2Salt}},{int:r.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:r.encryptionSchemeIV}}]}]}]},{octstr:{hex:r.ciphertext}}]}).getEncodedHex()},w=function c(t,e){var r=v.lib.WordArray.random(8),n=v.lib.WordArray.random(8),i=v.PBKDF2(e,r,{keySize:6,iterations:100}),o=v.enc.Hex.parse(t),s=v.TripleDES.encrypt(o,i,{iv:n})+"",a={};return a.ciphertext=s,a.pbkdf2Salt=v.enc.Hex.stringify(r),a.pbkdf2Iter=100,a.encryptionSchemeAlg="DES-EDE3-CBC",a.encryptionSchemeIV=v.enc.Hex.stringify(n),a};if("PKCS8PRV"==e&&void 0!=y&&t instanceof y&&1==t.isPrivate){var E=A(t).getEncodedHex();_=h({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:E}}]}).getEncodedHex();return void 0===r||null==r?hextopem(_,"PRIVATE KEY"):hextopem(S=F(_,r),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&void 0!==d&&t instanceof d&&1==t.isPrivate){E=new h({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]}).getEncodedHex(),_=h({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:E}}]}).getEncodedHex();return void 0===r||null==r?hextopem(_,"PRIVATE KEY"):hextopem(S=F(_,r),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&void 0!==g&&t instanceof g&&1==t.isPrivate){E=new f({bigint:t.x}).getEncodedHex(),_=h({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}]},{octstr:{hex:E}}]}).getEncodedHex();return void 0===r||null==r?hextopem(_,"PRIVATE KEY"):hextopem(S=F(_,r),"ENCRYPTED PRIVATE KEY")}throw"unsupported object nor format"},J.getKeyFromCSRPEM=function(t){var e=pemtohex(t,"CERTIFICATE REQUEST");return J.getKeyFromCSRHex(e)},J.getKeyFromCSRHex=function(t){var e=J.parseCSRHex(t);return J.getKey(e.p8pubkeyhex,null,"pkcs8pub")},J.parseCSRHex=function(t){var e=V,r=e.getChildIdx,n=e.getTLV,i={},o=t;if("30"!=o.substr(0,2))throw"malformed CSR(code:001)";var s=r(o,0);if(s.length<1)throw"malformed CSR(code:002)";if("30"!=o.substr(s[0],2))throw"malformed CSR(code:003)";var a=r(o,s[0]);if(a.length<3)throw"malformed CSR(code:004)";return i.p8pubkeyhex=n(o,a[2]),i},J.getJWKFromKey=function(t){var e={};if(t instanceof RSAKey&&t.isPrivate)return e.kty="RSA",e.n=hextob64u(t.n.toString(16)),e.e=hextob64u(t.e.toString(16)),e.d=hextob64u(t.d.toString(16)),e.p=hextob64u(t.p.toString(16)),e.q=hextob64u(t.q.toString(16)),e.dp=hextob64u(t.dmp1.toString(16)),e.dq=hextob64u(t.dmq1.toString(16)),e.qi=hextob64u(t.coeff.toString(16)),e;if(t instanceof RSAKey&&t.isPublic)return e.kty="RSA",e.n=hextob64u(t.n.toString(16)),e.e=hextob64u(t.e.toString(16)),e;if(t instanceof H.crypto.ECDSA&&t.isPrivate){if("P-256"!==(n=t.getShortNISTPCurveName())&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;var r=t.getPublicKeyXYHex();return e.kty="EC",e.crv=n,e.x=hextob64u(r.x),e.y=hextob64u(r.y),e.d=hextob64u(t.prvKeyHex),e}if(t instanceof H.crypto.ECDSA&&t.isPublic){var n;if("P-256"!==(n=t.getShortNISTPCurveName())&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;r=t.getPublicKeyXYHex();return e.kty="EC",e.crv=n,e.x=hextob64u(r.x),e.y=hextob64u(r.y),e}throw"not supported key object"},RSAKey.getPosArrayOfChildrenFromHex=function(t){return V.getChildIdx(t,0)},RSAKey.getHexValueArrayOfChildrenFromHex=function(t){var e,r=V.getV,n=r(t,(e=RSAKey.getPosArrayOfChildrenFromHex(t))[0]),i=r(t,e[1]),o=r(t,e[2]),s=r(t,e[3]),a=r(t,e[4]),u=r(t,e[5]),c=r(t,e[6]),f=r(t,e[7]),h=r(t,e[8]);return(e=new Array).push(n,i,o,s,a,u,c,f,h),e},RSAKey.prototype.readPrivateKeyFromPEMString=function(t){var e=pemtohex(t),r=RSAKey.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},RSAKey.prototype.readPKCS5PrvKeyHex=function(t){var e=RSAKey.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},RSAKey.prototype.readPKCS8PrvKeyHex=function(t){var e,r,n,i,o,s,a,u,c=V,f=c.getVbyList;if(!1===c.isASN1HEX(t))throw"not ASN.1 hex string";try{e=f(t,0,[2,0,1],"02"),r=f(t,0,[2,0,2],"02"),n=f(t,0,[2,0,3],"02"),i=f(t,0,[2,0,4],"02"),o=f(t,0,[2,0,5],"02"),s=f(t,0,[2,0,6],"02"),a=f(t,0,[2,0,7],"02"),u=f(t,0,[2,0,8],"02")}catch(t){throw"malformed PKCS#8 plain RSA private key"}this.setPrivateEx(e,r,n,i,o,s,a,u)},RSAKey.prototype.readPKCS5PubKeyHex=function(t){var e=V,r=e.getV;if(!1===e.isASN1HEX(t))throw"keyHex is not ASN.1 hex string";var n=e.getChildIdx(t,0);if(2!==n.length||"02"!==t.substr(n[0],2)||"02"!==t.substr(n[1],2))throw"wrong hex for PKCS#5 public key";var i=r(t,n[0]),o=r(t,n[1]);this.setPublic(i,o)},RSAKey.prototype.readPKCS8PubKeyHex=function(t){var e=V;if(!1===e.isASN1HEX(t))throw"not ASN.1 hex string";if("06092a864886f70d010101"!==e.getTLVbyList(t,0,[0,0]))throw"not PKCS8 RSA public key";var r=e.getTLVbyList(t,0,[1,0]);this.readPKCS5PubKeyHex(r)},RSAKey.prototype.readCertPubKeyHex=function(t,e){var r,n;(r=new X509).readCertHex(t),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)};var G=new RegExp("");function _zeroPaddingOfSignature(t,e){for(var r="",n=e/4-t.length,i=0;i<n;i++)r+="0";return r+t}function pss_mgf1_str(t,e,r){for(var n="",i=0;n.length<e;)n+=hextorstr(r(rstrtohex(t+String.fromCharCode.apply(String,[(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(t){for(var e in H.crypto.Util.DIGESTINFOHEAD){var r=H.crypto.Util.DIGESTINFOHEAD[e],n=r.length;if(t.substring(0,n)==r)return[e,t.substring(n)]}return[]}function X509(){var t=V,e=t.getChildIdx,r=t.getV,n=t.getTLV,i=t.getVbyList,o=t.getTLVbyList,s=t.getIdxbyList,a=t.getVidx,u=t.oidname,c=X509,f=pemtohex;this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return null===this.hex||0!==this.version?this.version:"a003020102"!==o(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return i(this.hex,0,[0,1+this.foffset],"02")},this.getSignatureAlgorithmField=function(){return u(i(this.hex,0,[0,2+this.foffset,0],"06"))},this.getIssuerHex=function(){return o(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return c.hex2dn(this.getIssuerHex())},this.getSubjectHex=function(){return o(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return c.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var t=i(this.hex,0,[0,4+this.foffset,0]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.getNotAfter=function(){var t=i(this.hex,0,[0,4+this.foffset,1]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.getPublicKeyHex=function(){return t.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return s(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var t=this.getPublicKeyIdx();return s(this.hex,t,[1,0],"30")},this.getPublicKey=function(){return J.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){return u(i(this.hex,0,[1,0],"06"))},this.getSignatureValueHex=function(){return i(this.hex,0,[2],"03",!0)},this.verifySignature=function(t){var e=this.getSignatureAlgorithmName(),r=this.getSignatureValueHex(),n=o(this.hex,0,[0],"30"),i=new H.crypto.Signature({alg:e});return i.init(t),i.updateHex(n),i.verify(r)},this.parseExt=function(){if(3!==this.version)return-1;var r=s(this.hex,0,[0,7,0],"30"),n=e(this.hex,r);this.aExtInfo=new Array;for(var o=0;o<n.length;o++){var u={critical:!1},c=0;3===e(this.hex,n[o]).length&&(u.critical=!0,c=1),u.oid=t.hextooidstr(i(this.hex,n[o],[0],"06"));var f=s(this.hex,n[o],[1+c]);u.vidx=a(this.hex,f),this.aExtInfo.push(u)}},this.getExtInfo=function(t){var e=this.aExtInfo,r=t;if(t.match(/^[0-9.]+$/)||(r=H.asn1.x509.OID.name2oid(t)),""!==r)for(var n=0;n<e.length;n++)if(e[n].oid===r)return e[n]},this.getExtBasicConstraints=function(){var t=this.getExtInfo("basicConstraints");if(void 0===t)return t;var e=r(this.hex,t.vidx);if(""===e)return{};if("0101ff"===e)return{cA:!0};if("0101ff02"===e.substr(0,8)){var n=r(e,6);return{cA:!0,pathLen:parseInt(n,16)}}throw"basicConstraints parse error"},this.getExtKeyUsageBin=function(){var t=this.getExtInfo("keyUsage");if(void 0===t)return"";var e=r(this.hex,t.vidx);if(e.length%2!=0||e.length<=2)throw"malformed key usage value";var n=parseInt(e.substr(0,2)),i=parseInt(e.substr(2),16).toString(2);return i.substr(0,i.length-n)},this.getExtKeyUsageString=function(){for(var t=this.getExtKeyUsageBin(),e=new Array,r=0;r<t.length;r++)"1"==t.substr(r,1)&&e.push(X509.KEYUSAGE_NAME[r]);return e.join(",")},this.getExtSubjectKeyIdentifier=function(){var t=this.getExtInfo("subjectKeyIdentifier");return void 0===t?t:r(this.hex,t.vidx)},this.getExtAuthorityKeyIdentifier=function(){var t=this.getExtInfo("authorityKeyIdentifier");if(void 0===t)return t;for(var i={},o=n(this.hex,t.vidx),s=e(o,0),a=0;a<s.length;a++)"80"===o.substr(s[a],2)&&(i.kid=r(o,s[a]));return i},this.getExtExtKeyUsageName=function(){var t=this.getExtInfo("extKeyUsage");if(void 0===t)return t;var i=new Array,o=n(this.hex,t.vidx);if(""===o)return i;for(var s=e(o,0),a=0;a<s.length;a++)i.push(u(r(o,s[a])));return i},this.getExtSubjectAltName=function(){for(var t=this.getExtSubjectAltName2(),e=new Array,r=0;r<t.length;r++)"DNS"===t[r][0]&&e.push(t[r][1]);return e},this.getExtSubjectAltName2=function(){var t,i,o,s=this.getExtInfo("subjectAltName");if(void 0===s)return s;for(var a=new Array,u=n(this.hex,s.vidx),c=e(u,0),f=0;f<c.length;f++)o=u.substr(c[f],2),t=r(u,c[f]),"81"===o&&(i=hextoutf8(t),a.push(["MAIL",i])),"82"===o&&(i=hextoutf8(t),a.push(["DNS",i])),"84"===o&&(i=X509.hex2dn(t,0),a.push(["DN",i])),"86"===o&&(i=hextoutf8(t),a.push(["URI",i])),"87"===o&&(i=hextoip(t),a.push(["IP",i]));return a},this.getExtCRLDistributionPointsURI=function(){var t=this.getExtInfo("cRLDistributionPoints");if(void 0===t)return t;for(var r=new Array,n=e(this.hex,t.vidx),o=0;o<n.length;o++)try{var s=hextoutf8(i(this.hex,n[o],[0,0,0],"86"));r.push(s)}catch(t){}return r},this.getExtAIAInfo=function(){var t=this.getExtInfo("authorityInfoAccess");if(void 0===t)return t;for(var r={ocsp:[],caissuer:[]},n=e(this.hex,t.vidx),o=0;o<n.length;o++){var s=i(this.hex,n[o],[0],"06"),a=i(this.hex,n[o],[1],"86");"2b06010505073001"===s&&r.ocsp.push(hextoutf8(a)),"2b06010505073002"===s&&r.caissuer.push(hextoutf8(a))}return r},this.getExtCertificatePolicies=function(){var t=this.getExtInfo("certificatePolicies");if(void 0===t)return t;for(var o=n(this.hex,t.vidx),s=[],a=e(o,0),c=0;c<a.length;c++){var f={},h=e(o,a[c]);if(f.id=u(r(o,h[0])),2===h.length)for(var l=e(o,h[1]),p=0;p<l.length;p++){var g=i(o,l[p],[0],"06");"2b06010505070201"===g?f.cps=hextoutf8(i(o,l[p],[1])):"2b06010505070202"===g&&(f.unotice=hextoutf8(i(o,l[p],[1,0])))}s.push(f)}return s},this.readCertPEM=function(t){this.readCertHex(f(t))},this.readCertHex=function(t){this.hex=t,this.getVersion();try{s(this.hex,0,[0,7],"a3"),this.parseExt()}catch(t){}},this.getInfo=function(){var t,e,r;if(t="Basic Fields\n",t+=" serial number: "+this.getSerialNumberHex()+"\n",t+=" signature algorithm: "+this.getSignatureAlgorithmField()+"\n",t+=" issuer: "+this.getIssuerString()+"\n",t+=" notBefore: "+this.getNotBefore()+"\n",t+=" notAfter: "+this.getNotAfter()+"\n",t+=" subject: "+this.getSubjectString()+"\n",t+=" subject public key info: \n",t+=" key algorithm: "+(e=this.getPublicKey()).type+"\n","RSA"===e.type&&(t+=" n="+hextoposhex(e.n.toString(16)).substr(0,16)+"...\n",t+=" e="+hextoposhex(e.e.toString(16))+"\n"),void 0!==(r=this.aExtInfo)&&null!==r){t+="X509v3 Extensions:\n";for(var n=0;n<r.length;n++){var i=r[n],o=H.asn1.x509.OID.oid2name(i.oid);""===o&&(o=i.oid);var s="";if(!0===i.critical&&(s="CRITICAL"),t+=" "+o+" "+s+":\n","basicConstraints"===o){var a=this.getExtBasicConstraints();void 0===a.cA?t+=" {}\n":(t+=" cA=true",void 0!==a.pathLen&&(t+=", pathLen="+a.pathLen),t+="\n")}else if("keyUsage"===o)t+=" "+this.getExtKeyUsageString()+"\n";else if("subjectKeyIdentifier"===o)t+=" "+this.getExtSubjectKeyIdentifier()+"\n";else if("authorityKeyIdentifier"===o){var u=this.getExtAuthorityKeyIdentifier();void 0!==u.kid&&(t+=" kid="+u.kid+"\n")}else{if("extKeyUsage"===o)t+=" "+this.getExtExtKeyUsageName().join(", ")+"\n";else if("subjectAltName"===o)t+=" "+this.getExtSubjectAltName2()+"\n";else if("cRLDistributionPoints"===o)t+=" "+this.getExtCRLDistributionPointsURI()+"\n";else if("authorityInfoAccess"===o){var c=this.getExtAIAInfo();void 0!==c.ocsp&&(t+=" ocsp: "+c.ocsp.join(",")+"\n"),void 0!==c.caissuer&&(t+=" caissuer: "+c.caissuer.join(",")+"\n")}else if("certificatePolicies"===o)for(var f=this.getExtCertificatePolicies(),h=0;h<f.length;h++)void 0!==f[h].id&&(t+=" policy oid: "+f[h].id+"\n"),void 0!==f[h].cps&&(t+=" cps: "+f[h].cps+"\n")}}}return t+="signature algorithm: "+this.getSignatureAlgorithmName()+"\n",t+="signature: "+this.getSignatureValueHex().substr(0,16)+"...\n"}}G.compile("[^0-9a-f]","gi"),RSAKey.prototype.sign=function(t,e){var r=function b(t){return H.crypto.Util.hashString(t,e)}(t);return this.signWithMessageHash(r,e)},RSAKey.prototype.signWithMessageHash=function(t,e){var r=parseBigInt(H.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),16);return _zeroPaddingOfSignature(this.doPrivate(r).toString(16),this.n.bitLength())},RSAKey.prototype.signPSS=function(t,e,r){var n=function c(t){return H.crypto.Util.hashHex(t,e)}(rstrtohex(t));return void 0===r&&(r=-1),this.signWithMessageHashPSS(n,e,r)},RSAKey.prototype.signWithMessageHashPSS=function(t,e,r){var n,i=hextorstr(t),s=i.length,a=this.n.bitLength()-1,u=Math.ceil(a/8),c=function o(t){return H.crypto.Util.hashHex(t,e)};if(-1===r||void 0===r)r=s;else if(-2===r)r=u-s-2;else if(r<-2)throw"invalid salt length";if(u<s+r+2)throw"data too long";var f="";r>0&&(f=new Array(r),(new SecureRandom).nextBytes(f),f=String.fromCharCode.apply(String,f));var h=hextorstr(c(rstrtohex("\0\0\0\0\0\0\0\0"+i+f))),l=[];for(n=0;n<u-r-s-2;n+=1)l[n]=0;var p=String.fromCharCode.apply(String,l)+""+f,g=pss_mgf1_str(h,p.length,c),d=[];for(n=0;n<p.length;n+=1)d[n]=p.charCodeAt(n)^g.charCodeAt(n);var v=65280>>8*u-a&255;for(d[0]&=~v,n=0;n<s;n++)d.push(h.charCodeAt(n));return d.push(188),_zeroPaddingOfSignature(this.doPrivate(new BigInteger(d)).toString(16),this.n.bitLength())},RSAKey.prototype.verify=function(t,e){var r=parseBigInt(e=(e=e.replace(G,"")).replace(/[ \n]+/g,""),16);if(r.bitLength()>this.n.bitLength())return 0;var n=_rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(r).toString(16).replace(/^1f+00/,""));if(0==n.length)return!1;var i=n[0];return n[1]==function a(t){return H.crypto.Util.hashString(t,i)}(t)},RSAKey.prototype.verifyWithMessageHash=function(t,e){var r=parseBigInt(e=(e=e.replace(G,"")).replace(/[ \n]+/g,""),16);if(r.bitLength()>this.n.bitLength())return 0;var n=_rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(r).toString(16).replace(/^1f+00/,""));if(0==n.length)return!1;n[0];return n[1]==t},RSAKey.prototype.verifyPSS=function(t,r,n,i){var o=function e(t){return H.crypto.Util.hashHex(t,n)}(rstrtohex(t));return void 0===i&&(i=-1),this.verifyWithMessageHashPSS(o,r,n,i)},RSAKey.prototype.verifyWithMessageHashPSS=function(t,e,n,i){var o=new BigInteger(e,16);if(o.bitLength()>this.n.bitLength())return!1;var s,a=function r(t){return H.crypto.Util.hashHex(t,n)},u=hextorstr(t),c=u.length,f=this.n.bitLength()-1,h=Math.ceil(f/8);if(-1===i||void 0===i)i=c;else if(-2===i)i=h-c-2;else if(i<-2)throw"invalid salt length";if(h<c+i+2)throw"data too long";var l=this.doPublic(o).toByteArray();for(s=0;s<l.length;s+=1)l[s]&=255;for(;l.length<h;)l.unshift(0);if(188!==l[h-1])throw"encoded message does not end in 0xbc";var p=(l=String.fromCharCode.apply(String,l)).substr(0,h-c-1),g=l.substr(p.length,c),d=65280>>8*h-f&255;if(0!=(p.charCodeAt(0)&d))throw"bits beyond keysize not zero";var v=pss_mgf1_str(g,p.length,a),y=[];for(s=0;s<p.length;s+=1)y[s]=p.charCodeAt(s)^v.charCodeAt(s);y[0]&=~d;var m=h-c-i-2;for(s=0;s<m;s+=1)if(0!==y[s])throw"leftmost octets not zero";if(1!==y[m])throw"0x01 marker not found";return g===hextorstr(a(rstrtohex("\0\0\0\0\0\0\0\0"+u+String.fromCharCode.apply(String,y.slice(-i)))))},RSAKey.SALT_LEN_HLEN=-1,RSAKey.SALT_LEN_MAX=-2,RSAKey.SALT_LEN_RECOVER=-2,X509.hex2dn=function(t,e){if(void 0===e&&(e=0),"30"!==t.substr(e,2))throw"malformed DN";for(var r=new Array,n=V.getChildIdx(t,e),i=0;i<n.length;i++)r.push(X509.hex2rdn(t,n[i]));return"/"+(r=r.map(function(t){return t.replace("/","\\/")})).join("/")},X509.hex2rdn=function(t,e){if(void 0===e&&(e=0),"31"!==t.substr(e,2))throw"malformed RDN";for(var r=new Array,n=V.getChildIdx(t,e),i=0;i<n.length;i++)r.push(X509.hex2attrTypeValue(t,n[i]));return(r=r.map(function(t){return t.replace("+","\\+")})).join("+")},X509.hex2attrTypeValue=function(t,e){var r=V,n=r.getV;if(void 0===e&&(e=0),"30"!==t.substr(e,2))throw"malformed attribute type and value";var i=r.getChildIdx(t,e);2!==i.length||t.substr(i[0],2);var o=n(t,i[0]),s=H.asn1.ASN1Util.oidHexToInt(o);return H.asn1.x509.OID.oid2atype(s)+"="+hextorstr(n(t,i[1]))},X509.getPublicKeyFromCertHex=function(t){var e=new X509;return e.readCertHex(t),e.getPublicKey()},X509.getPublicKeyFromCertPEM=function(t){var e=new X509;return e.readCertPEM(t),e.getPublicKey()},X509.getPublicKeyInfoPropOfCertPEM=function(t){var e,r,n=V.getVbyList,i={};return i.algparam=null,(e=new X509).readCertPEM(t),r=e.getPublicKeyHex(),i.keyhex=n(r,0,[1],"03").substr(2),i.algoid=n(r,0,[0,0],"06"),"2a8648ce3d0201"===i.algoid&&(i.algparam=n(r,0,[0,1],"06")),i},X509.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"],void 0!==H&&H||(H={}),void 0!==H.jws&&H.jws||(H.jws={}),H.jws.JWS=function(){var t=H.jws.JWS.isSafeJSONString;this.parseJWS=function(e,r){if(void 0===this.parsedJWS||!r&&void 0===this.parsedJWS.sigvalH){var n=e.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(null==n)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var i=n[1],o=n[2],s=n[3],a=i+"."+o;if(this.parsedJWS={},this.parsedJWS.headB64U=i,this.parsedJWS.payloadB64U=o,this.parsedJWS.sigvalB64U=s,this.parsedJWS.si=a,!r){var u=b64utohex(s),c=parseBigInt(u,16);this.parsedJWS.sigvalH=u,this.parsedJWS.sigvalBI=c}var f=W(i),h=W(o);if(this.parsedJWS.headS=f,this.parsedJWS.payloadS=h,!t(f,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+f}}},H.jws.JWS.sign=function(t,e,r,i,o){var s,a,u,c=H,f=c.jws.JWS,h=f.readSafeJSONString,l=f.isSafeJSONString,p=c.crypto,g=(p.ECDSA,p.Mac),d=p.Signature,v=JSON;if("string"!=typeof e&&"object"!=(void 0===e?"undefined":n(e)))throw"spHeader must be JSON string or object: "+e;if("object"==(void 0===e?"undefined":n(e))&&(a=e,s=v.stringify(a)),"string"==typeof e){if(!l(s=e))throw"JWS Head is not safe JSON string: "+s;a=h(s)}if(u=r,"object"==(void 0===r?"undefined":n(r))&&(u=v.stringify(r)),""!=t&&null!=t||void 0===a.alg||(t=a.alg),""!=t&&null!=t&&void 0===a.alg&&(a.alg=t,s=v.stringify(a)),t!==a.alg)throw"alg and sHeader.alg doesn't match: "+t+"!="+a.alg;var y=null;if(void 0===f.jwsalg2sigalg[t])throw"unsupported alg name: "+t;y=f.jwsalg2sigalg[t];var m=K(s)+"."+K(u),S="";if("Hmac"==y.substr(0,4)){if(void 0===i)throw"mac key shall be specified for HS* alg";var b=new g({alg:y,prov:"cryptojs",pass:i});b.updateString(m),S=b.doFinal()}else{var _;if(-1!=y.indexOf("withECDSA"))(_=new d({alg:y})).init(i,o),_.updateString(m),hASN1Sig=_.sign(),S=H.crypto.ECDSA.asn1SigToConcatSig(hASN1Sig);else if("none"!=y)(_=new d({alg:y})).init(i,o),_.updateString(m),S=_.sign()}return m+"."+hextob64u(S)},H.jws.JWS.verify=function(t,e,r){var i,o=H,s=o.jws.JWS,a=s.readSafeJSONString,u=o.crypto,c=u.ECDSA,f=u.Mac,h=u.Signature;void 0!==n(RSAKey)&&(i=RSAKey);var l=t.split(".");if(3!==l.length)return!1;var p=l[0]+"."+l[1],g=b64utohex(l[2]),d=a(W(l[0])),v=null,y=null;if(void 0===d.alg)throw"algorithm not specified in header";if((y=(v=d.alg).substr(0,2),null!=r&&"[object Array]"===Object.prototype.toString.call(r)&&r.length>0)&&-1==(":"+r.join(":")+":").indexOf(":"+v+":"))throw"algorithm '"+v+"' not accepted in the list";if("none"!=v&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=J.getKey(e)),!("RS"!=y&&"PS"!=y||e instanceof i))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==y&&!(e instanceof c))throw"key shall be a ECDSA obj for ES* algs";var m=null;if(void 0===s.jwsalg2sigalg[d.alg])throw"unsupported alg name: "+v;if("none"==(m=s.jwsalg2sigalg[v]))throw"not supported";if("Hmac"==m.substr(0,4)){if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var S=new f({alg:m,pass:e});return S.updateString(p),g==S.doFinal()}if(-1!=m.indexOf("withECDSA")){var b,_=null;try{_=c.concatSigToASN1Sig(g)}catch(t){return!1}return(b=new h({alg:m})).init(e),b.updateString(p),b.verify(_)}return(b=new h({alg:m})).init(e),b.updateString(p),b.verify(g)},H.jws.JWS.parse=function(t){var e,r,n,i=t.split("."),o={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=i[0],r=i[1],3==i.length&&(n=i[2]),o.headerObj=H.jws.JWS.readSafeJSONString(W(e)),o.payloadObj=H.jws.JWS.readSafeJSONString(W(r)),o.headerPP=JSON.stringify(o.headerObj,null," "),null==o.payloadObj?o.payloadPP=W(r):o.payloadPP=JSON.stringify(o.payloadObj,null," "),void 0!==n&&(o.sigHex=b64utohex(n)),o},H.jws.JWS.verifyJWT=function(t,e,r){var i=H.jws,o=i.JWS,s=o.readSafeJSONString,a=o.inArray,u=o.includedArray,c=t.split("."),f=c[0],h=c[1],l=(b64utohex(c[2]),s(W(f))),p=s(W(h));if(void 0===l.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!a(l.alg,r.alg))return!1;if(void 0!==p.iss&&"object"===n(r.iss)&&!a(p.iss,r.iss))return!1;if(void 0!==p.sub&&"object"===n(r.sub)&&!a(p.sub,r.sub))return!1;if(void 0!==p.aud&&"object"===n(r.aud))if("string"==typeof p.aud){if(!a(p.aud,r.aud))return!1}else if("object"==n(p.aud)&&!u(p.aud,r.aud))return!1;var g=i.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(g=r.verifyAt),void 0!==r.gracePeriod&&"number"==typeof r.gracePeriod||(r.gracePeriod=0),!(void 0!==p.exp&&"number"==typeof p.exp&&p.exp+r.gracePeriod<g)&&(!(void 0!==p.nbf&&"number"==typeof p.nbf&&g<p.nbf-r.gracePeriod)&&(!(void 0!==p.iat&&"number"==typeof p.iat&&g<p.iat-r.gracePeriod)&&((void 0===p.jti||void 0===r.jti||p.jti===r.jti)&&!!o.verify(t,e,r.alg))))},H.jws.JWS.includedArray=function(t,e){var r=H.jws.JWS.inArray;if(null===t)return!1;if("object"!==(void 0===t?"undefined":n(t)))return!1;if("number"!=typeof t.length)return!1;for(var i=0;i<t.length;i++)if(!r(t[i],e))return!1;return!0},H.jws.JWS.inArray=function(t,e){if(null===e)return!1;if("object"!==(void 0===e?"undefined":n(e)))return!1;if("number"!=typeof e.length)return!1;for(var r=0;r<e.length;r++)if(e[r]==t)return!0;return!1},H.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},H.jws.JWS.isSafeJSONString=function(t,e,r){var i=null;try{return"object"!=(void 0===(i=q(t))?"undefined":n(i))?0:i.constructor===Array?0:(e&&(e[r]=i),1)}catch(t){return 0}},H.jws.JWS.readSafeJSONString=function(t){var e=null;try{return"object"!=(void 0===(e=q(t))?"undefined":n(e))?null:e.constructor===Array?null:e}catch(t){return null}},H.jws.JWS.getEncodedSignatureValueFromJWS=function(t){var e=t.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(null==e)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return e[1]},H.jws.JWS.getJWKthumbprint=function(t){if("RSA"!==t.kty&&"EC"!==t.kty&&"oct"!==t.kty)throw"unsupported algorithm for JWK Thumprint";var e="{";if("RSA"===t.kty){if("string"!=typeof t.n||"string"!=typeof t.e)throw"wrong n and e value for RSA key";e+='"e":"'+t.e+'",',e+='"kty":"'+t.kty+'",',e+='"n":"'+t.n+'"}'}else if("EC"===t.kty){if("string"!=typeof t.crv||"string"!=typeof t.x||"string"!=typeof t.y)throw"wrong crv, x and y value for EC key";e+='"crv":"'+t.crv+'",',e+='"kty":"'+t.kty+'",',e+='"x":"'+t.x+'",',e+='"y":"'+t.y+'"}'}else if("oct"===t.kty){if("string"!=typeof t.k)throw"wrong k value for oct(symmetric) key";e+='"kty":"'+t.kty+'",',e+='"k":"'+t.k+'"}'}var r=rstrtohex(e);return hextob64u(H.crypto.Util.hashHex(r,"sha256"))},H.jws.IntDate={},H.jws.IntDate.get=function(t){var e=H.jws.IntDate,r=e.getNow,n=e.getZulu;if("now"==t)return r();if("now + 1hour"==t)return r()+3600;if("now + 1day"==t)return r()+86400;if("now + 1month"==t)return r()+2592e3;if("now + 1year"==t)return r()+31536e3;if(t.match(/Z$/))return n(t);if(t.match(/^[0-9]+$/))return parseInt(t);throw"unsupported format: "+t},H.jws.IntDate.getZulu=function(t){return zulutosec(t)},H.jws.IntDate.getNow=function(){return~~(new Date/1e3)},H.jws.IntDate.intDate2UTCString=function(t){return new Date(1e3*t).toUTCString()},H.jws.IntDate.intDate2Zulu=function(t){var e=new Date(1e3*t);return("0000"+e.getUTCFullYear()).slice(-4)+("00"+(e.getUTCMonth()+1)).slice(-2)+("00"+e.getUTCDate()).slice(-2)+("00"+e.getUTCHours()).slice(-2)+("00"+e.getUTCMinutes()).slice(-2)+("00"+e.getUTCSeconds()).slice(-2)+"Z"},e.SecureRandom=SecureRandom,e.rng_seed_time=rng_seed_time,e.BigInteger=BigInteger,e.RSAKey=RSAKey,e.ECDSA=H.crypto.ECDSA,e.DSA=H.crypto.DSA,e.Signature=H.crypto.Signature,e.MessageDigest=H.crypto.MessageDigest,e.Mac=H.crypto.Mac,e.Cipher=H.crypto.Cipher,e.KEYUTIL=J,e.ASN1HEX=V,e.X509=X509,e.CryptoJS=v,e.b64tohex=b64tohex,e.b64toBA=b64toBA,e.stoBA=stoBA,e.BAtos=BAtos,e.BAtohex=BAtohex,e.stohex=stohex,e.stob64=function stob64(t){return hex2b64(stohex(t))},e.stob64u=function stob64u(t){return b64tob64u(hex2b64(stohex(t)))},e.b64utos=function b64utos(t){return BAtos(b64toBA(b64utob64(t)))},e.b64tob64u=b64tob64u,e.b64utob64=b64utob64,e.hex2b64=hex2b64,e.hextob64u=hextob64u,e.b64utohex=b64utohex,e.utf8tob64u=K,e.b64utoutf8=W,e.utf8tob64=function utf8tob64(t){return hex2b64(uricmptohex(encodeURIComponentAll(t)))},e.b64toutf8=function b64toutf8(t){return decodeURIComponent(hextouricmp(b64tohex(t)))},e.utf8tohex=utf8tohex,e.hextoutf8=hextoutf8,e.hextorstr=hextorstr,e.rstrtohex=rstrtohex,e.hextob64=hextob64,e.hextob64nl=hextob64nl,e.b64nltohex=b64nltohex,e.hextopem=hextopem,e.pemtohex=pemtohex,e.hextoArrayBuffer=function hextoArrayBuffer(t){if(t.length%2!=0)throw"input is not even length";if(null==t.match(/^[0-9A-Fa-f]+$/))throw"input is not hexadecimal";for(var e=new ArrayBuffer(t.length/2),r=new DataView(e),n=0;n<t.length/2;n++)r.setUint8(n,parseInt(t.substr(2*n,2),16));return e},e.ArrayBuffertohex=function ArrayBuffertohex(t){for(var e="",r=new DataView(t),n=0;n<t.byteLength;n++)e+=("00"+r.getUint8(n).toString(16)).slice(-2);return e},e.zulutomsec=zulutomsec,e.zulutosec=zulutosec,e.zulutodate=function zulutodate(t){return new Date(zulutomsec(t))},e.datetozulu=function datetozulu(t,e,r){var n,i=t.getUTCFullYear();if(e){if(i<1950||2049<i)throw"not proper year for UTCTime: "+i;n=(""+i).slice(-2)}else n=("000"+i).slice(-4);if(n+=("0"+(t.getUTCMonth()+1)).slice(-2),n+=("0"+t.getUTCDate()).slice(-2),n+=("0"+t.getUTCHours()).slice(-2),n+=("0"+t.getUTCMinutes()).slice(-2),n+=("0"+t.getUTCSeconds()).slice(-2),r){var o=t.getUTCMilliseconds();0!==o&&(n+="."+(o=(o=("00"+o).slice(-3)).replace(/0+$/g,"")))}return n+="Z"},e.uricmptohex=uricmptohex,e.hextouricmp=hextouricmp,e.ipv6tohex=ipv6tohex,e.hextoipv6=hextoipv6,e.hextoip=hextoip,e.iptohex=function iptohex(t){var e="malformed IP address";if(!(t=t.toLowerCase(t)).match(/^[0-9.]+$/)){if(t.match(/^[0-9a-f:]+$/)&&-1!==t.indexOf(":"))return ipv6tohex(t);throw e}var r=t.split(".");if(4!==r.length)throw e;var n="";try{for(var i=0;i<4;i++)n+=("0"+parseInt(r[i]).toString(16)).slice(-2);return n}catch(t){throw e}},e.encodeURIComponentAll=encodeURIComponentAll,e.newline_toUnix=function newline_toUnix(t){return t=t.replace(/\r\n/gm,"\n")},e.newline_toDos=function newline_toDos(t){return t=(t=t.replace(/\r\n/gm,"\n")).replace(/\n/gm,"\r\n")},e.hextoposhex=hextoposhex,e.intarystrtohex=function intarystrtohex(t){t=(t=(t=t.replace(/^\s*\[\s*/,"")).replace(/\s*\]\s*$/,"")).replace(/\s*/g,"");try{return t.split(/,/).map(function(t,e,r){var n=parseInt(t);if(n<0||255<n)throw"integer not in range 0-255";return("00"+n.toString(16)).slice(-2)}).join("")}catch(t){throw"malformed integer array string: "+t}},e.strdiffidx=function strdiffidx(t,e){var r=t.length;t.length>e.length&&(r=e.length);for(var n=0;n<r;n++)if(t.charCodeAt(n)!=e.charCodeAt(n))return n;return t.length!=e.length?r:-1},e.KJUR=H,e.crypto=H.crypto,e.asn1=H.asn1,e.jws=H.jws,e.lang=H.lang}).call(this,r(164).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JoseUtil=void 0;var n=r(165),i=r(3);var o=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];e.JoseUtil=function(){function JoseUtil(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,JoseUtil)}return JoseUtil.parseJwt=function parseJwt(t){i.Log.debug("JoseUtil.parseJwt");try{var e=n.jws.JWS.parse(t);return{header:e.headerObj,payload:e.payloadObj}}catch(t){i.Log.error(t)}},JoseUtil.validateJwt=function validateJwt(t,e,r,o,s,a){i.Log.debug("JoseUtil.validateJwt");try{if("RSA"===e.kty)if(e.e&&e.n)e=n.KEYUTIL.getKey(e);else{if(!e.x5c||!e.x5c.length)return i.Log.error("JoseUtil.validateJwt: RSA key missing key material",e),Promise.reject(new Error("RSA key missing key material"));var u=(0,n.b64tohex)(e.x5c[0]);e=n.X509.getPublicKeyFromCertHex(u)}else{if("EC"!==e.kty)return i.Log.error("JoseUtil.validateJwt: Unsupported key type",e&&e.kty),Promise.reject(new Error("Unsupported key type: "+e&&e.kty));if(!(e.crv&&e.x&&e.y))return i.Log.error("JoseUtil.validateJwt: EC key missing key material",e),Promise.reject(new Error("EC key missing key material"));e=n.KEYUTIL.getKey(e)}return JoseUtil._validateJwt(t,e,r,o,s,a)}catch(t){return i.Log.error(t&&t.message||t),Promise.reject("JWT validation failed")}},JoseUtil._validateJwt=function _validateJwt(t,e,r,s,a,u){a||(a=0),u||(u=parseInt(Date.now()/1e3));var c=JoseUtil.parseJwt(t).payload;if(!c.iss)return i.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(c.iss!==r)return i.Log.error("JoseUtil._validateJwt: Invalid issuer in token",c.iss),Promise.reject(new Error("Invalid issuer in token: "+c.iss));if(!c.aud)return i.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(c.aud===s||Array.isArray(c.aud)&&c.aud.indexOf(s)>=0))return i.Log.error("JoseUtil._validateJwt: Invalid audience in token",c.aud),Promise.reject(new Error("Invalid audience in token: "+c.aud));var f=u+a,h=u-a;if(!c.iat)return i.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(f<c.iat)return i.Log.error("JoseUtil._validateJwt: iat is in the future",c.iat),Promise.reject(new Error("iat is in the future: "+c.iat));if(c.nbf&&f<c.nbf)return i.Log.error("JoseUtil._validateJwt: nbf is in the future",c.nbf),Promise.reject(new Error("nbf is in the future: "+c.nbf));if(!c.exp)return i.Log.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(c.exp<h)return i.Log.error("JoseUtil._validateJwt: exp is in the past",c.exp),Promise.reject(new Error("exp is in the past:"+c.exp));try{if(!n.jws.JWS.verify(t,e,o))return i.Log.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed"))}catch(t){return i.Log.error(t&&t.message||t),Promise.reject(new Error("signature validation failed"))}return Promise.resolve()},JoseUtil.hashString=function hashString(t,e){try{return n.crypto.Util.hashString(t,e)}catch(t){i.Log.error(t)}},JoseUtil.hexToBase64Url=function hexToBase64Url(t){try{return(0,n.hextob64u)(t)}catch(t){i.Log.error(t)}},JoseUtil}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserInfoService=void 0;var n=r(108),i=r(49),o=r(3);e.UserInfoService=function(){function UserInfoService(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,UserInfoService),!t)throw o.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new e,this._metadataService=new r(this._settings)}return UserInfoService.prototype.getClaims=function getClaims(t){var e=this;return t?this._metadataService.getUserInfoEndpoint().then(function(r){return o.Log.debug("UserInfoService.getClaims: received userinfo url",r),e._jsonService.getJson(r,t).then(function(t){return o.Log.debug("UserInfoService.getClaims: claims received",t),t})}):(o.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},UserInfoService}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResponseValidator=void 0;var n=r(3),i=r(49),o=r(167),s=r(107),a=r(166);var u=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];e.ResponseValidator=function(){function ResponseValidator(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.MetadataService,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UserInfoService,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:a.JoseUtil;if(function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,ResponseValidator),!t)throw n.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=t,this._metadataService=new e(this._settings),this._userInfoService=new r(this._settings),this._joseUtil=s}return ResponseValidator.prototype.validateSigninResponse=function validateSigninResponse(t,e){var r=this;return n.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(t,e).then(function(e){return n.Log.debug("ResponseValidator.validateSigninResponse: state processed"),r._validateTokens(t,e).then(function(t){return n.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),r._processClaims(t).then(function(t){return n.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),t})})})},ResponseValidator.prototype.validateSignoutResponse=function validateSignoutResponse(t,e){return t.id!==e.state?(n.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(n.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),e.state=t.data,e.error?(n.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",e.error),Promise.reject(new s.ErrorResponse(e))):Promise.resolve(e))},ResponseValidator.prototype._processSigninParams=function _processSigninParams(t,e){if(t.id!==e.state)return n.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!t.client_id)return n.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!t.authority)return n.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==t.authority)return n.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=t.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==t.client_id)return n.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=t.client_id;return n.Log.debug("ResponseValidator._processSigninParams: state validated"),e.state=t.data,e.error?(n.Log.warn("ResponseValidator._processSigninParams: Response was error",e.error),Promise.reject(new s.ErrorResponse(e))):t.nonce&&!e.id_token?(n.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!t.nonce&&e.id_token?(n.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):Promise.resolve(e)},ResponseValidator.prototype._processClaims=function _processClaims(t){var e=this;if(t.isOpenIdConnect){if(n.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),t.profile=this._filterProtocolClaims(t.profile),this._settings.loadUserInfo&&t.access_token)return n.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(t.access_token).then(function(r){return n.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),r.sub!==t.profile.sub?(n.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in access_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in access_token"))):(t.profile=e._mergeClaims(t.profile,r),n.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",t.profile),t)});n.Log.debug("ResponseValidator._processClaims: not loading user info")}else n.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(t)},ResponseValidator.prototype._mergeClaims=function _mergeClaims(t,e){var r=Object.assign({},t);for(var n in e){var i=e[n];Array.isArray(i)||(i=[i]);for(var o=0;o<i.length;o++){var s=i[o];r[n]?Array.isArray(r[n])?r[n].indexOf(s)<0&&r[n].push(s):r[n]!==s&&(r[n]=[r[n],s]):r[n]=s}}return r},ResponseValidator.prototype._filterProtocolClaims=function _filterProtocolClaims(t){n.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:",t);var e=Object.assign({},t);return this._settings._filterProtocolClaims?(u.forEach(function(t){delete e[t]}),n.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",e)):n.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),e},ResponseValidator.prototype._validateTokens=function _validateTokens(t,e){return e.id_token?e.access_token?(n.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(t,e)):(n.Log.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(t,e)):(n.Log.debug("ResponseValidator._validateTokens: No id_token to validate"),Promise.resolve(e))},ResponseValidator.prototype._validateIdTokenAndAccessToken=function _validateIdTokenAndAccessToken(t,e){var r=this;return this._validateIdToken(t,e).then(function(t){return r._validateAccessToken(t)})},ResponseValidator.prototype._validateIdToken=function _validateIdToken(t,e){var r=this;if(!t.nonce)return n.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var i=this._joseUtil.parseJwt(e.id_token);if(!i||!i.header||!i.payload)return n.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",i),Promise.reject(new Error("Failed to parse id_token"));if(t.nonce!==i.payload.nonce)return n.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"));var o=i.header.kid;return this._metadataService.getIssuer().then(function(s){return n.Log.debug("ResponseValidator._validateIdToken: Received issuer"),r._metadataService.getSigningKeys().then(function(a){if(!a)return n.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));n.Log.debug("ResponseValidator._validateIdToken: Received signing keys");var u=void 0;if(o)u=a.filter(function(t){return t.kid===o})[0];else{if((a=r._filterByAlg(a,i.header.alg)).length>1)return n.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));u=a[0]}if(!u)return n.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var c=t.client_id,f=r._settings.clockSkew;return n.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",f),r._joseUtil.validateJwt(e.id_token,u,s,c,f).then(function(){return n.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),i.payload.sub?(e.profile=i.payload,e):(n.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))})})})},ResponseValidator.prototype._filterByAlg=function _filterByAlg(t,e){var r=null;if(e.startsWith("RS"))r="RSA";else if(e.startsWith("PS"))r="PS";else{if(!e.startsWith("ES"))return n.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",e),[];r="EC"}return n.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",r),t=t.filter(function(t){return t.kty===r}),n.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",r,t.length),t},ResponseValidator.prototype._validateAccessToken=function _validateAccessToken(t){if(!t.profile)return n.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!t.profile.at_hash)return n.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!t.id_token)return n.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var e=this._joseUtil.parseJwt(t.id_token);if(!e||!e.header)return n.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",e),Promise.reject(new Error("Failed to parse id_token"));var r=e.header.alg;if(!r||5!==r.length)return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r),Promise.reject(new Error("Unsupported alg: "+r));var i=r.substr(2,3);if(!i)return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,i),Promise.reject(new Error("Unsupported alg: "+r));if(256!==(i=parseInt(i))&&384!==i&&512!==i)return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,i),Promise.reject(new Error("Unsupported alg: "+r));var o="sha"+i,s=this._joseUtil.hashString(t.access_token,o);if(!s)return n.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",o),Promise.reject(new Error("Failed to validate at_hash"));var a=s.substr(0,s.length/2),u=this._joseUtil.hexToBase64Url(a);return u!==t.profile.at_hash?(n.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",u,t.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(n.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(t))},ResponseValidator}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),i=r(109),o=r(69),s=r(68),a=r(156),u=r(155),c=r(103),f=r(49),h=r(145),l=r(144),p=r(100),g=r(99),d=r(101),v=r(32),y=r(104);e.default={Log:n.Log,OidcClient:i.OidcClient,OidcClientSettings:o.OidcClientSettings,WebStorageStateStore:s.WebStorageStateStore,InMemoryWebStorage:a.InMemoryWebStorage,UserManager:u.UserManager,AccessTokenEvents:c.AccessTokenEvents,MetadataService:f.MetadataService,CordovaPopupNavigator:h.CordovaPopupNavigator,CordovaIFrameNavigator:l.CordovaIFrameNavigator,CheckSessionIFrame:p.CheckSessionIFrame,TokenRevocationClient:g.TokenRevocationClient,SessionMonitor:d.SessionMonitor,Global:v.Global,User:y.User},t.exports=e.default},function(t,e){t.exports=function(t,e){var r=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,r)}}},function(t,e,r){var n=r(0),i=r(170)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function escape(t){return i(t)}})},function(t,e,r){r(171),t.exports=r(27).RegExp.escape},function(t,e,r){(function(e){!function(e){"use strict";var r,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof t,f=e.regeneratorRuntime;if(f)c&&(t.exports=f);else{(f=e.regeneratorRuntime=c?t.exports:{}).wrap=wrap;var h="suspendedStart",l="suspendedYield",p="executing",g="completed",d={},v={};v[s]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(values([])));m&&m!==n&&i.call(m,s)&&(v=m);var S=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(v);GeneratorFunction.prototype=S.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[u]=GeneratorFunction.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(S),t},f.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[a]=function(){return this},f.AsyncIterator=AsyncIterator,f.async=function(t,e,r,n){var i=new AsyncIterator(wrap(t,e,r,n));return f.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},defineIteratorMethods(S),S[u]="Generator",S[s]=function(){return this},S.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function next(){for(;e.length;){var r=e.pop();if(r in t)return next.value=r,next.done=!1,next}return next.done=!0,next}},f.values=values,Context.prototype={constructor:Context,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(resetTryEntry),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function handle(n,i){return s.type="throw",s.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var a=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;resetTryEntry(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:values(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),d}}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,o=Object.create(i.prototype),s=new Context(n||[]);return o._invoke=function makeInvokeMethod(t,e,r){var n=h;return function invoke(i,o){if(n===p)throw new Error("Generator is already running");if(n===g){if("throw"===i)throw o;return doneResult()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var a=maybeInvokeDelegate(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=tryCatch(t,e,r);if("normal"===u.type){if(n=r.done?g:l,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=g,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function AsyncIterator(t){function invoke(e,r,n,o){var s=tryCatch(t[e],t,r);if("throw"!==s.type){var a=s.arg,u=a.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){invoke("next",t,n,o)},function(t){invoke("throw",t,n,o)}):Promise.resolve(u).then(function(t){a.value=t,n(a)},o)}o(s.arg)}var r;"object"==typeof e.process&&e.process.domain&&(invoke=e.process.domain.bind(invoke)),this._invoke=function enqueue(t,e){function callInvokeWithMethodAndArg(){return new Promise(function(r,n){invoke(t,e,r,n)})}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,maybeInvokeDelegate(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=tryCatch(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,d;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function next(){for(;++n<t.length;)if(i.call(t,n))return next.value=t[n],next.done=!1,next;return next.value=r,next.done=!0,next};return o.next=o}}return{next:doneResult}}function doneResult(){return{value:r,done:!0}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,r(97))},function(t,e,r){for(var n=r(75),i=r(40),o=r(13),s=r(2),a=r(14),u=r(45),c=r(6),f=c("iterator"),h=c("toStringTag"),l=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},g=i(p),d=0;d<g.length;d++){var v,y=g[d],m=p[y],S=s[y],b=S&&S.prototype;if(b&&(b[f]||a(b,f,l),b[h]||a(b,h,y),u[y]=l,m))for(v in n)b[v]||o(b,v,n[v],!0)}},function(t,e,r){var n=r(0),i=r(74);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,r){var n=r(2),i=r(0),o=r(70),s=[].slice,a=/MSIE .\./.test(o),u=function(t){return function(e,r){var n=arguments.length>2,i=!!n&&s.call(arguments,2);return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,r)}};i(i.G+i.B+i.F*a,{setTimeout:u(n.setTimeout),setInterval:u(n.setInterval)})},function(t,e,r){"use strict";var n=r(0),i=r(2),o=r(27),s=r(73)(),a=r(6)("observable"),u=r(11),c=r(1),f=r(35),h=r(33),l=r(14),p=r(34),g=p.RETURN,d=function(t){return null==t?void 0:u(t)},v=function(t){var e=t._c;e&&(t._c=void 0,e())},y=function(t){return void 0===t._o},m=function(t){y(t)||(t._o=void 0,v(t))},S=function(t,e){c(t),this._c=void 0,this._o=t,t=new b(this);try{var r=e(t),n=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){n.unsubscribe()}:u(r),this._c=r)}catch(e){return void t.error(e)}y(this)&&v(this)};S.prototype=h({},{unsubscribe:function unsubscribe(){m(this)}});var b=function(t){this._s=t};b.prototype=h({},{next:function next(t){var e=this._s;if(!y(e)){var r=e._o;try{var n=d(r.next);if(n)return n.call(r,t)}catch(t){try{m(e)}finally{throw t}}}},error:function error(t){var e=this._s;if(y(e))throw t;var r=e._o;e._o=void 0;try{var n=d(r.error);if(!n)throw t;t=n.call(r,t)}catch(t){try{v(e)}finally{throw t}}return v(e),t},complete:function complete(t){var e=this._s;if(!y(e)){var r=e._o;e._o=void 0;try{var n=d(r.complete);t=n?n.call(r,t):void 0}catch(t){try{v(e)}finally{throw t}}return v(e),t}}});var _=function Observable(t){f(this,_,"Observable","_f")._f=u(t)};h(_.prototype,{subscribe:function subscribe(t){return new S(t,this._f)},forEach:function forEach(t){var e=this;return new(o.Promise||i.Promise)(function(r,n){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:r})})}}),h(_,{from:function from(t){var e="function"==typeof this?this:_,r=d(c(t)[a]);if(r){var n=c(r.call(t));return n.constructor===e?n:new e(function(t){return n.subscribe(t)})}return new e(function(e){var r=!1;return s(function(){if(!r){try{if(p(t,!1,function(t){if(e.next(t),r)return g})===g)return}catch(t){if(r)throw t;return void e.error(t)}e.complete()}}),function(){r=!0}})},of:function of(){for(var t=0,e=arguments.length,r=new Array(e);t<e;)r[t]=arguments[t++];return new("function"==typeof this?this:_)(function(t){var e=!1;return s(function(){if(!e){for(var n=0;n<r.length;++n)if(t.next(r[n]),e)return;t.complete()}}),function(){e=!0}})}}),l(_.prototype,a,function(){return this}),n(n.G,{Observable:_}),r(36)("Observable")},function(t,e,r){var n=r(0),i=r(73)(),o=r(2).process,s="process"==r(20)(o);n(n.G,{asap:function asap(t){var e=s&&o.domain;i(e?e.bind(t):t)}})},function(t,e,r){var n=r(28),i=r(1),o=r(11),s=n.key,a=n.set;n.exp({metadata:function metadata(t,e){return function decorator(r,n){a(t,e,(void 0!==n?i:o)(r),s(n))}}})},function(t,e,r){var n=r(28),i=r(1),o=n.has,s=n.key;n.exp({hasOwnMetadata:function hasOwnMetadata(t,e){return o(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,r){var n=r(28),i=r(1),o=r(15),s=n.has,a=n.key,u=function(t,e,r){if(s(t,e,r))return!0;var n=o(e);return null!==n&&u(t,n,r)};n.exp({hasMetadata:function hasMetadata(t,e){return u(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,r){var n=r(28),i=r(1),o=n.keys,s=n.key;n.exp({getOwnMetadataKeys:function getOwnMetadataKeys(t){return o(i(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,e,r){var n=r(28),i=r(1),o=n.get,s=n.key;n.exp({getOwnMetadata:function getOwnMetadata(t,e){return o(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,r){var n=r(120),i=r(111),o=r(28),s=r(1),a=r(15),u=o.keys,c=o.key,f=function(t,e){var r=u(t,e),o=a(t);if(null===o)return r;var s=f(o,e);return s.length?r.length?i(new n(r.concat(s))):s:r};o.exp({getMetadataKeys:function getMetadataKeys(t){return f(s(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,r){var n=r(28),i=r(1),o=r(15),s=n.has,a=n.get,u=n.key,c=function(t,e,r){if(s(t,e,r))return a(t,e,r);var n=o(e);return null!==n?c(t,n,r):void 0};n.exp({getMetadata:function getMetadata(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,r){var n=r(28),i=r(1),o=n.key,s=n.map,a=n.store;n.exp({deleteMetadata:function deleteMetadata(t,e){var r=arguments.length<3?void 0:o(arguments[2]),n=s(i(e),r,!1);if(void 0===n||!n.delete(t))return!1;if(n.size)return!0;var u=a.get(e);return u.delete(r),!!u.size||a.delete(e)}})},function(t,e,r){var n=r(28),i=r(1),o=n.key,s=n.set;n.exp({defineMetadata:function defineMetadata(t,e,r,n){s(t,e,i(r),o(n))}})},function(t,e,r){"use strict";var n=r(0),i=r(72),o=r(124);n(n.S,"Promise",{try:function(t){var e=i.f(this),r=o(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},function(t,e,r){"use strict";var n=r(0),i=r(27),o=r(2),s=r(58),a=r(123);n(n.P+n.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),r="function"==typeof t;return this.then(r?function(r){return a(e,t()).then(function(){return r})}:t,r?function(r){return a(e,t()).then(function(){throw r})}:t)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{signbit:function signbit(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,r){var n=r(0);n(n.S,"Math",{umulh:function umulh(t,e){var r=+t,n=+e,i=65535&r,o=65535&n,s=r>>>16,a=n>>>16,u=(s*o>>>0)+(i*o>>>16);return s*a+(u>>>16)+((i*a>>>0)+(65535&u)>>>16)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{scale:r(110)})},function(t,e,r){var n=r(0),i=Math.PI/180;n(n.S,"Math",{radians:function radians(t){return t*i}})},function(t,e,r){var n=r(0);n(n.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,r){var n=r(0);n(n.S,"Math",{imulh:function imulh(t,e){var r=+t,n=+e,i=65535&r,o=65535&n,s=r>>16,a=n>>16,u=(s*o>>>0)+(i*o>>>16);return s*a+(u>>16)+((i*a>>>0)+(65535&u)>>16)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{isubh:function isubh(t,e,r,n){var i=t>>>0,o=r>>>0;return(e>>>0)-(n>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,r){var n=r(0);n(n.S,"Math",{iaddh:function iaddh(t,e,r,n){var i=t>>>0,o=r>>>0;return(e>>>0)+(n>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,r){var n=r(0),i=r(110),o=r(130);n(n.S,"Math",{fscale:function fscale(t,e,r,n,s){return o(i(t,e,r,n,s))}})},function(t,e,r){var n=r(0),i=180/Math.PI;n(n.S,"Math",{degrees:function degrees(t){return t*i}})},function(t,e,r){var n=r(0);n(n.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,r){var n=r(0);n(n.S,"Math",{clamp:function clamp(t,e,r){return Math.min(r,Math.max(e,t))}})},function(t,e,r){var n=r(0),i=r(20);n(n.S,"Error",{isError:function isError(t){return"Error"===i(t)}})},function(t,e,r){var n=r(0);n(n.S,"System",{global:r(2)})},function(t,e,r){var n=r(0);n(n.G,{global:r(2)})},function(t,e,r){r(53)("WeakSet")},function(t,e,r){r(53)("WeakMap")},function(t,e,r){r(53)("Set")},function(t,e,r){r(53)("Map")},function(t,e,r){r(54)("WeakSet")},function(t,e,r){r(54)("WeakMap")},function(t,e,r){r(54)("Set")},function(t,e,r){r(54)("Map")},function(t,e,r){var n=r(0);n(n.P+n.R,"Set",{toJSON:r(112)("Set")})},function(t,e,r){var n=r(0);n(n.P+n.R,"Map",{toJSON:r(112)("Map")})},function(t,e,r){"use strict";var n=r(0),i=r(10),o=r(26),s=r(15),a=r(16).f;r(9)&&n(n.P+r(55),"Object",{__lookupSetter__:function __lookupSetter__(t){var e,r=i(this),n=o(t,!0);do{if(e=a(r,n))return e.set}while(r=s(r))}})},function(t,e,r){"use strict";var n=r(0),i=r(10),o=r(26),s=r(15),a=r(16).f;r(9)&&n(n.P+r(55),"Object",{__lookupGetter__:function __lookupGetter__(t){var e,r=i(this),n=o(t,!0);do{if(e=a(r,n))return e.get}while(r=s(r))}})},function(t,e,r){"use strict";var n=r(0),i=r(10),o=r(11),s=r(8);r(9)&&n(n.P+r(55),"Object",{__defineSetter__:function __defineSetter__(t,e){s.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,r){"use strict";var n=r(0),i=r(10),o=r(11),s=r(8);r(9)&&n(n.P+r(55),"Object",{__defineGetter__:function __defineGetter__(t,e){s.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,r){var n=r(0),i=r(113)(!0);n(n.S,"Object",{entries:function entries(t){return i(t)}})},function(t,e,r){var n=r(0),i=r(113)(!1);n(n.S,"Object",{values:function values(t){return i(t)}})},function(t,e,r){var n=r(0),i=r(116),o=r(17),s=r(16),a=r(79);n(n.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var e,r,n=o(t),u=s.f,c=i(n),f={},h=0;c.length>h;)void 0!==(r=u(n,e=c[h++]))&&a(f,e,r);return f}})},function(t,e,r){r(95)("observable")},function(t,e,r){r(95)("asyncIterator")},function(t,e,r){"use strict";var n=r(0),i=r(25),o=r(7),s=r(62),a=r(60),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};r(83)(c,"RegExp String",function next(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),n(n.P,"String",{matchAll:function matchAll(t){if(i(this),!s(t))throw TypeError(t+" is not a regexp!");var e=String(this),r="flags"in u?String(t.flags):a.call(t),n=new RegExp(t.source,~r.indexOf("g")?r:"g"+r);return n.lastIndex=o(t.lastIndex),new c(n,e)}})},function(t,e,r){"use strict";r(46)("trimRight",function(t){return function trimRight(){return t(this,2)}},"trimEnd")},function(t,e,r){"use strict";r(46)("trimLeft",function(t){return function trimLeft(){return t(this,1)}},"trimStart")},function(t,e,r){"use strict";var n=r(0),i=r(114),o=r(70);n(n.P+n.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padEnd:function padEnd(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,r){"use strict";var n=r(0),i=r(114),o=r(70);n(n.P+n.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padStart:function padStart(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,r){"use strict";var n=r(0),i=r(85)(!0);n(n.P,"String",{at:function at(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(0),i=r(115),o=r(10),s=r(7),a=r(24),u=r(77);n(n.P,"Array",{flatten:function flatten(){var t=arguments[0],e=o(this),r=s(e.length),n=u(e,0);return i(n,e,e,r,0,void 0===t?1:a(t)),n}}),r(30)("flatten")},function(t,e,r){"use strict";var n=r(0),i=r(115),o=r(10),s=r(7),a=r(11),u=r(77);n(n.P,"Array",{flatMap:function flatMap(t){var e,r,n=o(this);return a(t),e=s(n.length),r=u(n,0),i(r,n,n,e,0,1,t,arguments[1]),r}}),r(30)("flatMap")},function(t,e,r){"use strict";var n=r(0),i=r(65)(!0);n(n.P,"Array",{includes:function includes(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(30)("includes")},function(t,e,r){var n=r(0),i=r(91);i&&n(n.S,"Reflect",{setPrototypeOf:function setPrototypeOf(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,r){var n=r(8),i=r(16),o=r(15),s=r(18),a=r(0),u=r(43),c=r(1),f=r(5);a(a.S,"Reflect",{set:function set(t,e,r){var a,h,l=arguments.length<4?t:arguments[3],p=i.f(c(t),e);if(!p){if(f(h=o(t)))return set(h,e,r,l);p=u(0)}if(s(p,"value")){if(!1===p.writable||!f(l))return!1;if(a=i.f(l,e)){if(a.get||a.set||!1===a.writable)return!1;a.value=r,n.f(l,e,a)}else n.f(l,e,u(0,r));return!0}return void 0!==p.set&&(p.set.call(l,r),!0)}})},function(t,e,r){var n=r(0),i=r(1),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function preventExtensions(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,r){var n=r(0);n(n.S,"Reflect",{ownKeys:r(116)})},function(t,e,r){var n=r(0),i=r(1),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function isExtensible(t){return i(t),!o||o(t)}})},function(t,e,r){var n=r(0);n(n.S,"Reflect",{has:function has(t,e){return e in t}})},function(t,e,r){var n=r(0),i=r(15),o=r(1);n(n.S,"Reflect",{getPrototypeOf:function getPrototypeOf(t){return i(o(t))}})},function(t,e,r){var n=r(16),i=r(0),o=r(1);i(i.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,e){return n.f(o(t),e)}})},function(t,e,r){var n=r(16),i=r(15),o=r(18),s=r(0),a=r(5),u=r(1);s(s.S,"Reflect",{get:function get(t,e){var r,s,c=arguments.length<3?t:arguments[2];return u(t)===c?t[e]:(r=n.f(t,e))?o(r,"value")?r.value:void 0!==r.get?r.get.call(c):void 0:a(s=i(t))?get(s,e,c):void 0}})},function(t,e,r){"use strict";var n=r(0),i=r(1),o=function(t){this._t=i(t),this._i=0;var e,r=this._k=[];for(e in t)r.push(e)};r(83)(o,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),n(n.S,"Reflect",{enumerate:function enumerate(t){return new o(t)}})},function(t,e,r){var n=r(0),i=r(16).f,o=r(1);n(n.S,"Reflect",{deleteProperty:function deleteProperty(t,e){var r=i(o(t),e);return!(r&&!r.configurable)&&delete t[e]}})},function(t,e,r){var n=r(8),i=r(0),o=r(1),s=r(26);i(i.S+i.F*r(4)(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(t,e,r){o(t),e=s(e,!0),o(r);try{return n.f(t,e,r),!0}catch(t){return!1}}})},function(t,e,r){var n=r(0),i=r(38),o=r(11),s=r(1),a=r(5),u=r(4),c=r(137),f=(r(2).Reflect||{}).construct,h=u(function(){function F(){}return!(f(function(){},[],F)instanceof F)}),l=!u(function(){f(function(){})});n(n.S+n.F*(h||l),"Reflect",{construct:function construct(t,e){o(t),s(e);var r=arguments.length<3?t:o(arguments[2]);if(l&&!h)return f(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(c.apply(t,n))}var u=r.prototype,p=i(a(u)?u:Object.prototype),g=Function.apply.call(t,p,e);return a(g)?g:p}})},function(t,e,r){var n=r(0),i=r(11),o=r(1),s=(r(2).Reflect||{}).apply,a=Function.apply;n(n.S+n.F*!r(4)(function(){s(function(){})}),"Reflect",{apply:function apply(t,e,r){var n=i(t),u=o(r);return s?s(n,e,u):a.call(n,e,u)}})},function(t,e,r){r(29)("Float64",8,function(t){return function Float64Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Float32",4,function(t){return function Float32Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Uint32",4,function(t){return function Uint32Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Int32",4,function(t){return function Int32Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Uint16",2,function(t){return function Uint16Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Int16",2,function(t){return function Int16Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Uint8",1,function(t){return function Uint8ClampedArray(e,r,n){return t(this,e,r,n)}},!0)},function(t,e,r){r(29)("Uint8",1,function(t){return function Uint8Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){r(29)("Int8",1,function(t){return function Int8Array(e,r,n){return t(this,e,r,n)}})},function(t,e,r){var n=r(0);n(n.G+n.W+n.F*!r(56).ABV,{DataView:r(71).DataView})},function(t,e,r){"use strict";var n=r(0),i=r(56),o=r(71),s=r(1),a=r(39),u=r(7),c=r(5),f=r(2).ArrayBuffer,h=r(58),l=o.ArrayBuffer,p=o.DataView,g=i.ABV&&f.isView,d=l.prototype.slice,v=i.VIEW;n(n.G+n.W+n.F*(f!==l),{ArrayBuffer:l}),n(n.S+n.F*!i.CONSTR,"ArrayBuffer",{isView:function isView(t){return g&&g(t)||c(t)&&v in t}}),n(n.P+n.U+n.F*r(4)(function(){return!new l(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function slice(t,e){if(void 0!==d&&void 0===e)return d.call(s(this),t);for(var r=s(this).byteLength,n=a(t,r),i=a(void 0===e?r:e,r),o=new(h(this,l))(u(i-n)),c=new p(this),f=new p(o),g=0;n<i;)f.setUint8(g++,c.getUint8(n++));return o}}),r(36)("ArrayBuffer")},function(t,e,r){"use strict";var n=r(118),i=r(44);r(57)("WeakSet",function(t){return function WeakSet(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function add(t){return n.def(i(this,"WeakSet"),t,!0)}},n,!1,!0)},function(t,e,r){"use strict";var n,i,o,s,a=r(41),u=r(2),c=r(21),f=r(50),h=r(0),l=r(5),p=r(11),g=r(35),d=r(34),v=r(58),y=r(74).set,m=r(73)(),S=r(72),b=r(124),_=r(123),F=u.TypeError,w=u.process,E=u.Promise,x="process"==f(w),P=function(){},A=i=S.f,C=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[r(6)("species")]=function(t){t(P,P)};return(x||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e}catch(t){}}(),k=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var r=t._c;m(function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{a?(i||(2==t._h&&T(t),t._h=1),!0===a?r=n:(f&&f.enter(),r=a(n),f&&(f.exit(),s=!0)),r===e.promise?c(F("Promise-chain cycle")):(o=k(r))?o.call(r,u,c):u(r)):c(n)}catch(t){f&&!s&&f.exit(),c(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&B(t)})}},B=function(t){y.call(u,function(){var e,r,n,i=t._v,o=R(t);if(o&&(e=b(function(){x?w.emit("unhandledRejection",i,t):(r=u.onunhandledrejection)?r({promise:t,reason:i}):(n=u.console)&&n.error&&n.error("Unhandled promise rejection",i)}),t._h=x||R(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},T=function(t){y.call(u,function(){var e;x?w.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},M=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},O=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw F("Promise can't be resolved itself");(e=k(t))?m(function(){var n={_w:r,_d:!1};try{e.call(t,c(O,n,1),c(M,n,1))}catch(t){M.call(n,t)}}):(r._v=t,r._s=1,I(r,!1))}catch(t){M.call({_w:r,_d:!1},t)}}};C||(E=function Promise(t){g(this,E,"Promise","_h"),p(t),n.call(this);try{t(c(O,this,1),c(M,this,1))}catch(t){M.call(this,t)}},(n=function Promise(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(33)(E.prototype,{then:function then(t,e){var r=A(v(this,E));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=x?w.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&I(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=c(O,t,1),this.reject=c(M,t,1)},S.f=A=function(t){return t===E||t===s?new o(t):i(t)}),h(h.G+h.W+h.F*!C,{Promise:E}),r(47)(E,"Promise"),r(36)("Promise"),s=r(27).Promise,h(h.S+h.F*!C,"Promise",{reject:function reject(t){var e=A(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!C),"Promise",{resolve:function resolve(t){return _(a&&this===s?E:this,t)}}),h(h.S+h.F*!(C&&r(61)(function(t){E.all(t).catch(P)})),"Promise",{all:function all(t){var e=this,r=A(e),n=r.resolve,i=r.reject,o=b(function(){var r=[],o=0,s=1;d(t,!1,function(t){var a=o++,u=!1;r.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,r[a]=t,--s||n(r))},i)}),--s||n(r)});return o.e&&i(o.v),r.promise},race:function race(t){var e=this,r=A(e),n=r.reject,i=b(function(){d(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return i.e&&n(i.v),r.promise}})},function(t,e,r){r(59)("split",2,function(t,e,n){"use strict";var i=r(62),o=n,s=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var a=void 0===/()??/.exec("")[1];n=function(t,e){var r=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(r,t,e);var n,u,c,f,h,l=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,d=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,p+"g");for(a||(n=new RegExp("^"+v.source+"$(?!\\s)",p));(u=v.exec(r))&&!((c=u.index+u[0].length)>g&&(l.push(r.slice(g,u.index)),!a&&u.length>1&&u[0].replace(n,function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(u[h]=void 0)}),u.length>1&&u.index<r.length&&s.apply(l,u.slice(1)),f=u[0].length,g=c,l.length>=d));)v.lastIndex===u.index&&v.lastIndex++;return g===r.length?!f&&v.test("")||l.push(""):l.push(r.slice(g)),l.length>d?l.slice(0,d):l}}else"0".split(void 0,0).length&&(n=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function split(r,i){var o=t(this),s=void 0==r?void 0:r[e];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,r){r(59)("search",1,function(t,e,r){return[function search(r){"use strict";var n=t(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},r]})},function(t,e,r){r(59)("replace",2,function(t,e,r){return[function replace(n,i){"use strict";var o=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,r){r(59)("match",1,function(t,e,r){return[function match(r){"use strict";var n=t(this),i=void 0==r?void 0:r[e];return void 0!==i?i.call(r,n):new RegExp(r)[e](String(n))},r]})},function(t,e,r){"use strict";r(125);var n=r(1),i=r(60),o=r(9),s=/./.toString,a=function(t){r(13)(RegExp.prototype,"toString",t,!0)};r(4)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?a(function toString(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=s.name&&a(function toString(){return s.call(this)})},function(t,e,r){var n=r(2),i=r(89),o=r(8).f,s=r(37).f,a=r(62),u=r(60),c=n.RegExp,f=c,h=c.prototype,l=/a/g,p=/a/g,g=new c(l)!==l;if(r(9)&&(!g||r(4)(function(){return p[r(6)("match")]=!1,c(l)!=l||c(p)==p||"/a/i"!=c(l,"i")}))){c=function RegExp(t,e){var r=this instanceof c,n=a(t),o=void 0===e;return!r&&n&&t.constructor===c&&o?t:i(g?new f(n&&!o?t.source:t,e):f((n=t instanceof c)?t.source:t,n&&o?u.call(t):e),r?this:h,c)};for(var d=function(t){t in c||o(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},v=s(f),y=0;v.length>y;)d(v[y++]);h.constructor=c,c.prototype=h,r(13)(n,"RegExp",c)}r(36)("RegExp")},function(t,e,r){r(36)("Array")},function(t,e,r){"use strict";var n=r(0),i=r(22)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),n(n.P+n.F*s,"Array",{findIndex:function findIndex(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(30)(o)},function(t,e,r){"use strict";var n=r(0),i=r(22)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),n(n.P+n.F*o,"Array",{find:function find(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(30)("find")},function(t,e,r){var n=r(0);n(n.P,"Array",{fill:r(76)}),r(30)("fill")},function(t,e,r){var n=r(0);n(n.P,"Array",{copyWithin:r(127)}),r(30)("copyWithin")},function(t,e,r){"use strict";var n=r(0),i=r(17),o=r(24),s=r(7),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(u||!r(19)(a)),"Array",{lastIndexOf:function lastIndexOf(t){if(u)return a.apply(this,arguments)||0;var e=i(this),r=s(e.length),n=r-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}})},function(t,e,r){"use strict";var n=r(0),i=r(65)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(s||!r(19)(o)),"Array",{indexOf:function indexOf(t){return s?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),i=r(128);n(n.P+n.F*!r(19)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,r){"use strict";var n=r(0),i=r(128);n(n.P+n.F*!r(19)([].reduce,!0),"Array",{reduce:function reduce(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,r){"use strict";var n=r(0),i=r(22)(4);n(n.P+n.F*!r(19)([].every,!0),"Array",{every:function every(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),i=r(22)(3);n(n.P+n.F*!r(19)([].some,!0),"Array",{some:function some(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),i=r(22)(2);n(n.P+n.F*!r(19)([].filter,!0),"Array",{filter:function filter(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),i=r(22)(1);n(n.P+n.F*!r(19)([].map,!0),"Array",{map:function map(t){return i(this,t,arguments[1])}})},function(t,e,r){var n=r(5),i=r(63),o=r(6)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),n(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,r){"use strict";var n=r(0),i=r(22)(0),o=r(19)([].forEach,!0);n(n.P+n.F*!o,"Array",{forEach:function forEach(t){return i(this,t,arguments[1])}})},function(t,e,r){"use strict";var n=r(0),i=r(11),o=r(10),s=r(4),a=[].sort,u=[1,2,3];n(n.P+n.F*(s(function(){u.sort(void 0)})||!s(function(){u.sort(null)})||!r(19)(a)),"Array",{sort:function sort(t){return void 0===t?a.call(o(this)):a.call(o(this),i(t))}})},function(t,e,r){"use strict";var n=r(0),i=r(92),o=r(20),s=r(39),a=r(7),u=[].slice;n(n.P+n.F*r(4)(function(){i&&u.call(i)}),"Array",{slice:function slice(t,e){var r=a(this.length),n=o(this);if(e=void 0===e?r:e,"Array"==n)return u.call(this,t,e);for(var i=s(t,r),c=s(e,r),f=a(c-i),h=new Array(f),l=0;l<f;l++)h[l]="String"==n?this.charAt(i+l):this[i+l];return h}})},function(t,e,r){"use strict";var n=r(0),i=r(17),o=[].join;n(n.P+n.F*(r(52)!=Object||!r(19)(o)),"Array",{join:function join(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(0),i=r(79);n(n.S+n.F*r(4)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var t=0,e=arguments.length,r=new("function"==typeof this?this:Array)(e);e>t;)i(r,t,arguments[t++]);return r.length=e,r}})},function(t,e,r){"use strict";var n=r(21),i=r(0),o=r(10),s=r(129),a=r(80),u=r(7),c=r(79),f=r(78);i(i.S+i.F*!r(61)(function(t){Array.from(t)}),"Array",{from:function from(t){var e,r,i,h,l=o(t),p="function"==typeof this?this:Array,g=arguments.length,d=g>1?arguments[1]:void 0,v=void 0!==d,y=0,m=f(l);if(v&&(d=n(d,g>2?arguments[2]:void 0,2)),void 0==m||p==Array&&a(m))for(r=new p(e=u(l.length));e>y;y++)c(r,y,v?d(l[y],y):l[y]);else for(h=m.call(l),r=new p;!(i=h.next()).done;y++)c(r,y,v?s(h,d,[i.value,y],!0):i.value);return r.length=y,r}})},function(t,e,r){var n=r(0);n(n.S,"Array",{isArray:r(63)})},function(t,e,r){"use strict";var n=r(1),i=r(26);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(n(this),"number"!=t)}},function(t,e,r){var n=r(6)("toPrimitive"),i=Date.prototype;n in i||r(14)(i,n,r(287))},function(t,e,r){var n=Date.prototype,i=n.toString,o=n.getTime;new Date(NaN)+""!="Invalid Date"&&r(13)(n,"toString",function toString(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,r){"use strict";var n=r(4),i=Date.prototype.getTime,o=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=n(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!n(function(){o.call(new Date(NaN))})?function toISOString(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),r=t.getUTCMilliseconds(),n=e<0?"-":e>9999?"+":"";return n+("00000"+Math.abs(e)).slice(n?-6:-4)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(r>99?r:"0"+s(r))+"Z"}:o},function(t,e,r){var n=r(0),i=r(290);n(n.P+n.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,r){"use strict";var n=r(0),i=r(10),o=r(26);n(n.P+n.F*r(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(t){var e=i(this),r=o(e);return"number"!=typeof r||isFinite(r)?e.toISOString():null}})},function(t,e,r){var n=r(0);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,r){"use strict";r(12)("sup",function(t){return function sup(){return t(this,"sup","","")}})},function(t,e,r){"use strict";r(12)("sub",function(t){return function sub(){return t(this,"sub","","")}})},function(t,e,r){"use strict";r(12)("strike",function(t){return function strike(){return t(this,"strike","","")}})},function(t,e,r){"use strict";r(12)("small",function(t){return function small(){return t(this,"small","","")}})},function(t,e,r){"use strict";r(12)("link",function(t){return function link(e){return t(this,"a","href",e)}})},function(t,e,r){"use strict";r(12)("italics",function(t){return function italics(){return t(this,"i","","")}})},function(t,e,r){"use strict";r(12)("fontsize",function(t){return function fontsize(e){return t(this,"font","size",e)}})},function(t,e,r){"use strict";r(12)("fontcolor",function(t){return function fontcolor(e){return t(this,"font","color",e)}})},function(t,e,r){"use strict";r(12)("fixed",function(t){return function fixed(){return t(this,"tt","","")}})},function(t,e,r){"use strict";r(12)("bold",function(t){return function bold(){return t(this,"b","","")}})},function(t,e,r){"use strict";r(12)("blink",function(t){return function blink(){return t(this,"blink","","")}})},function(t,e,r){"use strict";r(12)("big",function(t){return function big(){return t(this,"big","","")}})},function(t,e,r){"use strict";r(12)("anchor",function(t){return function anchor(e){return t(this,"a","name",e)}})},function(t,e,r){"use strict";var n=r(0),i=r(7),o=r(82),s="".startsWith;n(n.P+n.F*r(81)("startsWith"),"String",{startsWith:function startsWith(t){var e=o(this,t,"startsWith"),r=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return s?s.call(e,n,r):e.slice(r,r+n.length)===n}})},function(t,e,r){var n=r(0);n(n.P,"String",{repeat:r(88)})},function(t,e,r){"use strict";var n=r(0),i=r(82);n(n.P+n.F*r(81)("includes"),"String",{includes:function includes(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var n=r(0),i=r(7),o=r(82),s="".endsWith;n(n.P+n.F*r(81)("endsWith"),"String",{endsWith:function endsWith(t){var e=o(this,t,"endsWith"),r=arguments.length>1?arguments[1]:void 0,n=i(e.length),a=void 0===r?n:Math.min(i(r),n),u=String(t);return s?s.call(e,u,a):e.slice(a-u.length,a)===u}})},function(t,e,r){"use strict";var n=r(0),i=r(85)(!1);n(n.P,"String",{codePointAt:function codePointAt(t){return i(this,t)}})},function(t,e,r){"use strict";var n=r(85)(!0);r(84)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})},function(t,e,r){"use strict";r(46)("trim",function(t){return function trim(){return t(this,3)}})},function(t,e,r){var n=r(0),i=r(17),o=r(7);n(n.S,"String",{raw:function raw(t){for(var e=i(t.raw),r=o(e.length),n=arguments.length,s=[],a=0;r>a;)s.push(String(e[a++])),a<n&&s.push(String(arguments[a]));return s.join("")}})},function(t,e,r){var n=r(0),i=r(39),o=String.fromCharCode,s=String.fromCodePoint;n(n.S+n.F*(!!s&&1!=s.length),"String",{fromCodePoint:function fromCodePoint(t){for(var e,r=[],n=arguments.length,s=0;n>s;){if(e=+arguments[s++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");r.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return r.join("")}})},function(t,e,r){var n=r(0);n(n.S,"Math",{trunc:function trunc(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,r){var n=r(0),i=r(86),o=Math.exp;n(n.S,"Math",{tanh:function tanh(t){var e=i(t=+t),r=i(-t);return e==1/0?1:r==1/0?-1:(e-r)/(o(t)+o(-t))}})},function(t,e,r){var n=r(0),i=r(86),o=Math.exp;n(n.S+n.F*r(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function sinh(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{sign:r(87)})},function(t,e,r){var n=r(0);n(n.S,"Math",{log2:function log2(t){return Math.log(t)/Math.LN2}})},function(t,e,r){var n=r(0);n(n.S,"Math",{log1p:r(131)})},function(t,e,r){var n=r(0);n(n.S,"Math",{log10:function log10(t){return Math.log(t)*Math.LOG10E}})},function(t,e,r){var n=r(0),i=Math.imul;n(n.S+n.F*r(4)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function imul(t,e){var r=+t,n=+e,i=65535&r,o=65535&n;return 0|i*o+((65535&r>>>16)*o+i*(65535&n>>>16)<<16>>>0)}})},function(t,e,r){var n=r(0),i=Math.abs;n(n.S,"Math",{hypot:function hypot(t,e){for(var r,n,o=0,s=0,a=arguments.length,u=0;s<a;)u<(r=i(arguments[s++]))?(o=o*(n=u/r)*n+1,u=r):o+=r>0?(n=r/u)*n:r;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,r){var n=r(0);n(n.S,"Math",{fround:r(130)})},function(t,e,r){var n=r(0),i=r(86);n(n.S+n.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,r){var n=r(0),i=Math.exp;n(n.S,"Math",{cosh:function cosh(t){return(i(t=+t)+i(-t))/2}})},function(t,e,r){var n=r(0);n(n.S,"Math",{clz32:function clz32(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,r){var n=r(0),i=r(87);n(n.S,"Math",{cbrt:function cbrt(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,r){var n=r(0),i=Math.atanh;n(n.S+n.F*!(i&&1/i(-0)<0),"Math",{atanh:function atanh(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,r){var n=r(0),i=Math.asinh;n(n.S+n.F*!(i&&1/i(0)>0),"Math",{asinh:function asinh(t){return isFinite(t=+t)&&0!=t?t<0?-asinh(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(t,e,r){var n=r(0),i=r(131),o=Math.sqrt,s=Math.acosh;n(n.S+n.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function acosh(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,r){var n=r(0),i=r(135);n(n.S+n.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,r){var n=r(0),i=r(134);n(n.S+n.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,r){var n=r(0);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(0);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(0),i=r(132),o=Math.abs;n(n.S,"Number",{isSafeInteger:function isSafeInteger(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,r){var n=r(0);n(n.S,"Number",{isNaN:function isNaN(t){return t!=t}})},function(t,e,r){var n=r(0);n(n.S,"Number",{isInteger:r(132)})},function(t,e,r){var n=r(0),i=r(2).isFinite;n(n.S,"Number",{isFinite:function isFinite(t){return"number"==typeof t&&i(t)}})},function(t,e,r){var n=r(0);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,r){"use strict";var n=r(0),i=r(4),o=r(133),s=1..toPrecision;n(n.P+n.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function toPrecision(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},function(t,e,r){"use strict";var n=r(0),i=r(24),o=r(133),s=r(88),a=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",h=function(t,e){for(var r=-1,n=e;++r<6;)n+=t*c[r],c[r]=n%1e7,n=u(n/1e7)},l=function(t){for(var e=6,r=0;--e>=0;)r+=c[e],c[e]=u(r/t),r=r%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var r=String(c[t]);e=""===e?r:e+s.call("0",7-r.length)+r}return e},g=function(t,e,r){return 0===e?r:e%2==1?g(t,e-1,r*t):g(t*t,e/2,r)};n(n.P+n.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(4)(function(){a.call({})})),"Number",{toFixed:function toFixed(t){var e,r,n,a,u=o(this,f),c=i(t),d="",v="0";if(c<0||c>20)throw RangeError(f);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(d="-",u=-u),u>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(u*g(2,69,1))-69)<0?u*g(2,-e,1):u/g(2,e,1),r*=4503599627370496,(e=52-e)>0){for(h(0,r),n=c;n>=7;)h(1e7,0),n-=7;for(h(g(10,n,1),0),n=e-1;n>=23;)l(1<<23),n-=23;l(1<<n),h(1,1),l(2),v=p()}else h(0,r),h(1<<-e,0),v=p()+s.call("0",c);return v=c>0?d+((a=v.length)<=c?"0."+s.call("0",c-a)+v:v.slice(0,a-c)+"."+v.slice(a-c)):d+v}})},function(t,e,r){"use strict";var n=r(2),i=r(18),o=r(20),s=r(89),a=r(26),u=r(4),c=r(37).f,f=r(16).f,h=r(8).f,l=r(46).trim,p=n.Number,g=p,d=p.prototype,v="Number"==o(r(38)(d)),y="trim"in String.prototype,m=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var r,n,i,o=(e=y?e.trim():l(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(r=e.charCodeAt(2))||120===r)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+e}for(var s,u=e.slice(2),c=0,f=u.length;c<f;c++)if((s=u.charCodeAt(c))<48||s>i)return NaN;return parseInt(u,n)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function Number(t){var e=arguments.length<1?0:t,r=this;return r instanceof p&&(v?u(function(){d.valueOf.call(r)}):"Number"!=o(r))?s(new g(m(e)),r,p):m(e)};for(var S,b=r(9)?c(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;b.length>_;_++)i(g,S=b[_])&&!i(p,S)&&h(p,S,f(g,S));p.prototype=d,d.constructor=p,r(13)(n,"Number",p)}},function(t,e,r){var n=r(0),i=r(134);n(n.G+n.F*(parseFloat!=i),{parseFloat:i})},function(t,e,r){var n=r(0),i=r(135);n(n.G+n.F*(parseInt!=i),{parseInt:i})},function(t,e,r){"use strict";var n=r(5),i=r(15),o=r(6)("hasInstance"),s=Function.prototype;o in s||r(8).f(s,o,{value:function(t){if("function"!=typeof this||!n(t))return!1;if(!n(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,r){var n=r(8).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||r(9)&&n(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,r){var n=r(0);n(n.P,"Function",{bind:r(137)})},function(t,e,r){"use strict";var n=r(50),i={};i[r(6)("toStringTag")]="z",i+""!="[object z]"&&r(13)(Object.prototype,"toString",function toString(){return"[object "+n(this)+"]"},!0)},function(t,e,r){var n=r(0);n(n.S,"Object",{setPrototypeOf:r(91).set})},function(t,e){t.exports=Object.is||function is(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,r){var n=r(0);n(n.S,"Object",{is:r(352)})},function(t,e,r){var n=r(0);n(n.S+n.F,"Object",{assign:r(138)})},function(t,e,r){var n=r(5);r(23)("isExtensible",function(t){return function isExtensible(e){return!!n(e)&&(!t||t(e))}})},function(t,e,r){var n=r(5);r(23)("isSealed",function(t){return function isSealed(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(5);r(23)("isFrozen",function(t){return function isFrozen(e){return!n(e)||!!t&&t(e)}})},function(t,e,r){var n=r(5),i=r(31).onFreeze;r(23)("preventExtensions",function(t){return function preventExtensions(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(5),i=r(31).onFreeze;r(23)("seal",function(t){return function seal(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){var n=r(5),i=r(31).onFreeze;r(23)("freeze",function(t){return function freeze(e){return t&&n(e)?t(i(e)):e}})},function(t,e,r){r(23)("getOwnPropertyNames",function(){return r(139).f})},function(t,e,r){var n=r(10),i=r(40);r(23)("keys",function(){return function keys(t){return i(n(t))}})},function(t,e,r){var n=r(10),i=r(15);r(23)("getPrototypeOf",function(){return function getPrototypeOf(t){return i(n(t))}})},function(t,e,r){var n=r(17),i=r(16).f;r(23)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(t,e){return i(n(t),e)}})},function(t,e,r){var n=r(0);n(n.S+n.F*!r(9),"Object",{defineProperties:r(140)})},function(t,e,r){var n=r(0);n(n.S+n.F*!r(9),"Object",{defineProperty:r(8).f})},function(t,e,r){var n=r(0);n(n.S,"Object",{create:r(38)})},function(t,e,r){var n=r(40),i=r(64),o=r(51);t.exports=function(t){var e=n(t),r=i.f;if(r)for(var s,a=r(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,r){"use strict";var n=r(2),i=r(18),o=r(9),s=r(0),a=r(13),u=r(31).KEY,c=r(4),f=r(66),h=r(47),l=r(42),p=r(6),g=r(142),d=r(95),v=r(368),y=r(63),m=r(1),S=r(5),b=r(17),_=r(26),F=r(43),w=r(38),E=r(139),x=r(16),P=r(8),A=r(40),C=x.f,k=P.f,I=E.f,B=n.Symbol,R=n.JSON,T=R&&R.stringify,M=p("_hidden"),O=p("toPrimitive"),U={}.propertyIsEnumerable,N=f("symbol-registry"),L=f("symbols"),D=f("op-symbols"),j=Object.prototype,H="function"==typeof B,K=n.QObject,W=!K||!K.prototype||!K.prototype.findChild,q=o&&c(function(){return 7!=w(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=C(j,e);n&&delete j[e],k(t,e,r),n&&t!==j&&k(j,e,n)}:k,V=function(t){var e=L[t]=w(B.prototype);return e._k=t,e},J=H&&"symbol"==typeof B.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof B},G=function defineProperty(t,e,r){return t===j&&G(D,e,r),m(t),e=_(e,!0),m(r),i(L,e)?(r.enumerable?(i(t,M)&&t[M][e]&&(t[M][e]=!1),r=w(r,{enumerable:F(0,!1)})):(i(t,M)||k(t,M,F(1,{})),t[M][e]=!0),q(t,e,r)):k(t,e,r)},z=function defineProperties(t,e){m(t);for(var r,n=v(e=b(e)),i=0,o=n.length;o>i;)G(t,r=n[i++],e[r]);return t},Y=function propertyIsEnumerable(t){var e=U.call(this,t=_(t,!0));return!(this===j&&i(L,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(L,t)||i(this,M)&&this[M][t])||e)},X=function getOwnPropertyDescriptor(t,e){if(t=b(t),e=_(e,!0),t!==j||!i(L,e)||i(D,e)){var r=C(t,e);return!r||!i(L,e)||i(t,M)&&t[M][e]||(r.enumerable=!0),r}},Q=function getOwnPropertyNames(t){for(var e,r=I(b(t)),n=[],o=0;r.length>o;)i(L,e=r[o++])||e==M||e==u||n.push(e);return n},Z=function getOwnPropertySymbols(t){for(var e,r=t===j,n=I(r?D:b(t)),o=[],s=0;n.length>s;)!i(L,e=n[s++])||r&&!i(j,e)||o.push(L[e]);return o};H||(a((B=function Symbol(){if(this instanceof B)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(r){this===j&&e.call(D,r),i(this,M)&&i(this[M],t)&&(this[M][t]=!1),q(this,t,F(1,r))};return o&&W&&q(j,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",function toString(){return this._k}),x.f=X,P.f=G,r(37).f=E.f=Q,r(51).f=Y,r(64).f=Z,o&&!r(41)&&a(j,"propertyIsEnumerable",Y,!0),g.f=function(t){return V(p(t))}),s(s.G+s.W+s.F*!H,{Symbol:B});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)p($[tt++]);for(var et=A(p.store),rt=0;et.length>rt;)d(et[rt++]);s(s.S+s.F*!H,"Symbol",{for:function(t){return i(N,t+="")?N[t]:N[t]=B(t)},keyFor:function keyFor(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!H,"Object",{create:function create(t,e){return void 0===e?w(t):z(w(t),e)},defineProperty:G,defineProperties:z,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),R&&s(s.S+s.F*(!H||c(function(){var t=B();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))})),"JSON",{stringify:function stringify(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(S(e)||void 0!==t)&&!J(t))return y(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!J(e))return e}),n[1]=e,T.apply(R,n)}}),B.prototype[O]||r(14)(B.prototype,O,B.prototype.valueOf),h(B,"Symbol"),h(Math,"Math",!0),h(n.JSON,"JSON",!0)},function(t,e,r){r(369),r(367),r(366),r(365),r(364),r(363),r(362),r(361),r(360),r(359),r(358),r(357),r(356),r(355),r(354),r(353),r(351),r(350),r(349),r(348),r(347),r(346),r(345),r(344),r(343),r(342),r(341),r(340),r(339),r(338),r(337),r(336),r(335),r(334),r(333),r(332),r(331),r(330),r(329),r(328),r(327),r(326),r(325),r(324),r(323),r(322),r(321),r(320),r(319),r(318),r(317),r(316),r(315),r(314),r(313),r(312),r(311),r(310),r(309),r(308),r(307),r(306),r(305),r(304),r(303),r(302),r(301),r(300),r(299),r(298),r(297),r(296),r(295),r(294),r(293),r(292),r(291),r(289),r(288),r(286),r(285),r(284),r(283),r(282),r(281),r(280),r(278),r(277),r(276),r(275),r(274),r(273),r(272),r(271),r(270),r(269),r(268),r(267),r(266),r(75),r(265),r(264),r(125),r(263),r(262),r(261),r(260),r(259),r(122),r(120),r(119),r(258),r(257),r(256),r(255),r(254),r(253),r(252),r(251),r(250),r(249),r(248),r(247),r(246),r(245),r(244),r(243),r(242),r(241),r(240),r(239),r(238),r(237),r(236),r(235),r(234),r(233),r(232),r(231),r(230),r(229),r(228),r(227),r(226),r(225),r(224),r(223),r(222),r(221),r(220),r(219),r(218),r(217),r(216),r(215),r(214),r(213),r(212),r(211),r(210),r(209),r(208),r(207),r(206),r(205),r(204),r(203),r(202),r(201),r(200),r(199),r(198),r(197),r(196),r(195),r(194),r(193),r(192),r(191),r(190),r(189),r(188),r(187),r(186),r(185),r(184),r(183),r(182),r(181),r(180),r(179),r(178),r(177),r(176),r(175),r(174),t.exports=r(27)},function(t,e,r){"use strict";(function(t){if(r(370),r(173),r(172),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";function define(t,r,n){t[r]||Object[e](t,r,{writable:!0,configurable:!0,value:n})}define(String.prototype,"padLeft","".padStart),define(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&define(Array,t,Function.call.bind([][t]))})}).call(this,r(97))},function(t,e,r){r(371),t.exports=r(169)}]); |