var Oidc=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),t.exports=n(291)},function(t,e,n){(function(t){"use strict";function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(2),n(286),n(288),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(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]&&e(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(3),n(50),n(51),n(52),n(53),n(55),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(68),n(70),n(72),n(74),n(77),n(78),n(79),n(83),n(85),n(87),n(91),n(92),n(93),n(94),n(96),n(97),n(98),n(99),n(100),n(101),n(102),n(104),n(105),n(106),n(108),n(109),n(110),n(112),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(130),n(131),n(135),n(136),n(137),n(138),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(158),n(159),n(164),n(165),n(167),n(168),n(169),n(172),n(173),n(174),n(175),n(176),n(178),n(179),n(180),n(181),n(184),n(186),n(187),n(188),n(190),n(192),n(194),n(195),n(196),n(198),n(199),n(200),n(201),n(207),n(210),n(211),n(213),n(214),n(217),n(218),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(241),n(242),n(243),n(244),n(245),n(246),n(248),n(249),n(250),n(251),n(252),n(253),n(255),n(256),n(258),n(259),n(260),n(261),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(284),n(285),t.exports=n(5)},function(t,e,n){"use strict";var r=n(4),i=n(5),s=n(6),o=n(7),a=n(9),u=n(18),c=n(22).KEY,f=n(8),h=n(23),l=n(24),d=n(19),p=n(25),g=n(26),y=n(39),v=n(42),m=n(12),S=n(29),b=n(16),w=n(17),E=n(43),x=n(46),_=n(48),A=n(11),F=_.f,P=A.f,O=x.f,C=r.Symbol,I=r.JSON,T=I&&I.stringify,j=!1,R="prototype",D=p("_hidden"),H=p("toPrimitive"),k={}.propertyIsEnumerable,N=h("symbol-registry"),B=h("symbols"),M=Object[R],V="function"==typeof C,L=r.QObject,K=o&&f(function(){return 7!=E(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=F(M,e);r&&delete M[e],P(t,e,n),r&&t!==M&&P(M,e,r)}:P,U=function(t){var e=B[t]=E(C[R]);return e._k=t,o&&j&&K(M,t,{configurable:!0,set:function(e){s(this,D)&&s(this[D],t)&&(this[D][t]=!1),K(this,t,w(1,e))}}),e},q=V&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},W=function(t,e,n){return m(t),e=b(e,!0),m(n),s(B,e)?(n.enumerable?(s(t,D)&&t[D][e]&&(t[D][e]=!1),n=E(n,{enumerable:w(0,!1)})):(s(t,D)||P(t,D,w(1,{})),t[D][e]=!0),K(t,e,n)):P(t,e,n)},J=function(t,e){m(t);for(var n,r=y(e=S(e)),i=0,s=r.length;s>i;)W(t,n=r[i++],e[n]);return t},z=function(t,e){return void 0===e?E(t):J(E(t),e)},Y=function(t){var e=k.call(this,t=b(t,!0));return e||!s(this,t)||!s(B,t)||s(this,D)&&this[D][t]?e:!0},G=function(t,e){var n=F(t=S(t),e=b(e,!0));return!n||!s(B,e)||s(t,D)&&t[D][e]||(n.enumerable=!0),n},X=function(t){for(var e,n=O(S(t)),r=[],i=0;n.length>i;)s(B,e=n[i++])||e==D||e==c||r.push(e);return r},$=function(t){for(var e,n=O(S(t)),r=[],i=0;n.length>i;)s(B,e=n[i++])&&r.push(B[e]);return r},Z=function(t){if(void 0!==t&&!q(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&v(e)||(e=function(t,e){return n&&(e=n.call(this,t,e)),q(e)?void 0:e}),r[1]=e,T.apply(I,r)}},Q=f(function(){var t=C();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))});V||(C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");return U(d(arguments.length>0?arguments[0]:void 0))},u(C[R],"toString",function(){return this._k}),_.f=G,A.f=W,n(47).f=x.f=X,n(41).f=Y,n(40).f=$,o&&!n(49)&&u(M,"propertyIsEnumerable",Y,!0)),a(a.G+a.W+a.F*!V,{Symbol:C});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;){var nt=tt[et++],rt=i.Symbol,it=p(nt);nt in rt||P(rt,nt,{value:V?it:U(it)})}L&&L[R]&&L[R].findChild||(j=!0),a(a.S+a.F*!V,"Symbol",{"for":function(t){return s(N,t+="")?N[t]:N[t]=C(t)},keyFor:function(t){if(q(t))return g(N,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){j=!0},useSimple:function(){j=!1}}),a(a.S+a.F*!V,"Object",{create:z,defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:G,getOwnPropertyNames:X,getOwnPropertySymbols:$}),I&&a(a.S+a.F*(!V||Q),"JSON",{stringify:Z}),C[R][H]||n(10)(C[R],H,C[R].valueOf),l(C,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.2.1"};"number"==typeof __e&&(__e=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(4),i=n(5),s=n(10),o=n(18),a=n(20),u="prototype",c=function(t,e,n){var f,h,l,d,p=t&c.F,g=t&c.G,y=t&c.S,v=t&c.P,m=t&c.B,S=g?r:y?r[e]||(r[e]={}):(r[e]||{})[u],b=g?i:i[e]||(i[e]={}),w=b[u]||(b[u]={});g&&(n=e);for(f in n)h=!p&&S&&void 0!==S[f],l=(h?S:n)[f],d=m&&h?a(l,r):v&&"function"==typeof l?a(Function.call,l):l,S&&o(S,f,l,t&c.U),b[f]!=l&&s(b,f,d),v&&w[f]!=l&&(w[f]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(11),i=n(17);t.exports=n(7)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(12),i=n(14),s=n(16),o=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=s(e,!0),r(n),i)try{return o(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(13),i=n(4).document,s=r(i)&&r(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(4),i=n(10),s=n(6),o=n(19)("src"),a="toString",u=Function[a],c=(""+u).split(a);n(5).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(s(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(s(n,o)||i(n,o,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[o]||u.call(this)})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(19)("meta"),i=n(13),s=n(6),o=n(11).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(8)(function(){return u(Object.preventExtensions({}))}),f=function(t){o(t,r,{value:{i:"O"+ ++a,w:{}}})},h=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},l=function(t,e){if(!s(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return c&&p.NEED&&u(t)&&!s(t,r)&&f(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:h,getWeak:l,onFreeze:d}},function(t,e,n){var r=n(4),i="__core-js_shared__",s=r[i]||(r[i]={});t.exports=function(t){return s[t]||(s[t]={})}},function(t,e,n){var r=n(11).f,i=n(6),s=n(25)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,s)&&r(t,s,{configurable:!0,value:e})}},function(t,e,n){var r=n(23)("wks"),i=n(19),s=n(4).Symbol,o="function"==typeof s;t.exports=function(t){return r[t]||(r[t]=o&&s[t]||(o?s:i)("Symbol."+t))}},function(t,e,n){var r=n(27),i=n(29);t.exports=function(t,e){for(var n,s=i(t),o=r(s),a=o.length,u=0;a>u;)if(s[n=o[u++]]===e)return n}},function(t,e,n){var r=n(28),i=n(38);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(6),i=n(29),s=n(33)(!1),o=n(37)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=o&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~s(c,n)||c.push(n));return c}},function(t,e,n){var r=n(30),i=n(32);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(31);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(29),i=n(34),s=n(36);t.exports=function(t){return function(e,n,o){var a,u=r(e),c=i(u.length),f=s(o,c);if(t&&n!=n){for(;c>f;)if(a=u[f++],a!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f;return!t&&-1}}},function(t,e,n){var r=n(35),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(35),i=Math.max,s=Math.min;t.exports=function(t,e){return t=r(t),0>t?i(t+e,0):s(t,e)}},function(t,e,n){var r=n(23)("keys"),i=n(19);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(27),i=n(40),s=n(41);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,a=n(t),u=s.f,c=0;a.length>c;)u.call(t,o=a[c++])&&e.push(o);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(31);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(12),i=n(44),s=n(38),o=n(37)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,e=n(15)("iframe"),r=s.length,i=">";for(e.style.display="none",n(45).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("u;)r.f(t,n=o[u++],e[n]);return t}},function(t,e,n){t.exports=n(4).document&&document.documentElement},function(t,e,n){var r=n(29),i=n(47).f,s={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(e){return o.slice()}};t.exports.f=function(t){return o&&"[object Window]"==s.call(t)?a(t):i(r(t))}},function(t,e,n){var r=n(28),i=n(38).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(41),i=n(17),s=n(29),o=n(16),a=n(6),u=n(14),c=Object.getOwnPropertyDescriptor;e.f=n(7)?c:function(t,e){if(t=s(t),e=o(e,!0),u)try{return c(t,e)}catch(n){}return a(t,e)?i(!r.f.call(t,e),t[e]):void 0}},function(t,e){t.exports=!1},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(43)})},function(t,e,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperties:n(44)})},function(t,e,n){var r=n(29),i=n(48).f;n(54)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(9),i=n(5),s=n(8);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],o={};o[t]=e(n),r(r.S+r.F*s(function(){n(1)}),"Object",o)}},function(t,e,n){var r=n(56),i=n(57);n(54)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(32);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(6),i=n(56),s=n(37)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){var r=n(56),i=n(27);n(54)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(54)("getOwnPropertyNames",function(){return n(46).f})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(54)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(54)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(54)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13);n(54)("isFrozen",function(t){return function(e){return r(e)?t?t(e):!1:!0}})},function(t,e,n){var r=n(13);n(54)("isSealed",function(t){return function(e){return r(e)?t?t(e):!1:!0}})},function(t,e,n){var r=n(13);n(54)("isExtensible",function(t){return function(e){return r(e)?t?t(e):!0:!1}})},function(t,e,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(67)})},function(t,e,n){"use strict";var r=n(27),i=n(40),s=n(41),o=n(56),a=n(30),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=o(t),u=arguments.length,c=1,f=i.f,h=s.f;u>c;)for(var l,d=a(arguments[c++]),p=f?r(d).concat(f(d)):r(d),g=p.length,y=0;g>y;)h.call(d,l=p[y++])&&(n[l]=d[l]);return n}:u},function(t,e,n){var r=n(9);r(r.S,"Object",{is:n(69)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(71).set})},function(t,e,n){var r=n(13),i=n(12),s=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(20)(Function.call,n(48).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return s(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:s}},function(t,e,n){"use strict";var r=n(73),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(31),i=n(25)("toStringTag"),s="Arguments"==r(function(){return arguments}()),o=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=o(e=Object(t),i))?n:s?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(9);r(r.P,"Function",{bind:n(75)})},function(t,e,n){"use strict";var r=n(21),i=n(13),s=n(76),o=[].slice,a={},u=function(t,e,n){if(!(e in a)){for(var r=[],i=0;e>i;i++)r[i]="a["+i+"]";a[e]=Function("F,a","return new F("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?u(e,r.length,r):s(e,r,t)};return i(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(11).f,i=n(17),s=n(6),o=Function.prototype,a=/^\s*function ([^ (]*)/,u="name";u in o||n(7)&&r(o,u,{configurable:!0,get:function(){var t=(""+this).match(a),e=t?t[1]:"";return s(this,u)||r(this,u,i(5,e)),e}})},function(t,e,n){"use strict";var r=n(13),i=n(57),s=n(25)("hasInstance"),o=Function.prototype;s in o||n(11).f(o,s,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(9),i=n(80);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(4).parseInt,i=n(81).trim,s=n(82),o=/^[\-+]?0[xX]/;t.exports=8!==r(s+"08")||22!==r(s+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(o.test(n)?16:10))}:r},function(t,e,n){var r=n(9),i=n(32),s=n(8),o=n(82),a="["+o+"]",u="
",c=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),h=function(t,e,n){var i={},a=s(function(){return!!o[t]()||u[t]()!=u}),c=i[t]=a?e(l):o[t];n&&(i[n]=c),r(r.P+r.F*a,"String",i)},l=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(f,"")),t};t.exports=h},function(t,e){t.exports=" \n\x0B\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(9),i=n(84);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){var r=n(4).parseFloat,i=n(81).trim;t.exports=1/r(n(82)+"-0")!==-(1/0)?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(4),i=n(6),s=n(31),o=n(86),a=n(16),u=n(8),c=n(47).f,f=n(48).f,h=n(11).f,l=n(81).trim,d="Number",p=r[d],g=p,y=p.prototype,v=s(n(43)(y))==d,m="trim"in String.prototype,S=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():l(e,3);var n,r,i,s=e.charCodeAt(0);if(43===s||45===s){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===s){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var o,u=e.slice(2),c=0,f=u.length;f>c;c++)if(o=u.charCodeAt(c),48>o||o>i)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(v?u(function(){y.valueOf.call(n)}):s(n)!=d)?o(new g(S(e)),n,p):S(e)};for(var b,w=n(7)?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(","),E=0;w.length>E;E++)i(g,b=w[E])&&!i(p,b)&&h(p,b,f(g,b));p.prototype=y,y.constructor=p,n(18)(r,d,p)}},function(t,e,n){var r=n(13),i=n(71).set;t.exports=function(t,e,n){var s,o=e.constructor;return o!==n&&"function"==typeof o&&(s=o.prototype)!==n.prototype&&r(s)&&i&&i(t,s),t}},function(t,e,n){"use strict";var r=n(9),i=(n(88),n(35)),s=n(89),o=n(90),a=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",h="0",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+o.call(h,7-n.length)+n}return e},g=function(t,e,n){return 0===e?n:e%2===1?g(t,e-1,n*t):g(t*t,e/2,n)},y=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!n(8)(function(){a.call({})})),"Number",{toFixed:function(t){var e,n,r,a,u=s(this,f),c=i(t),v="",m=h;if(0>c||c>20)throw RangeError(f);if(u!=u)return"NaN";if(-1e21>=u||u>=1e21)return String(u);if(0>u&&(v="-",u=-u),u>1e-21)if(e=y(u*g(2,69,1))-69,n=0>e?u*g(2,-e,1):u/g(2,e,1),n*=4503599627370496,e=52-e,e>0){for(l(0,n),r=c;r>=7;)l(1e7,0),r-=7;for(l(g(10,r,1),0),r=e-1;r>=23;)d(1<<23),r-=23;d(1<0?(a=m.length,m=v+(c>=a?"0."+o.call(h,c-a)+m:m.slice(0,a-c)+"."+m.slice(a-c))):m=v+m,m}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(31);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(35),i=n(32);t.exports=function(t){var e=String(i(this)),n="",s=r(t);if(0>s||s==1/0)throw RangeError("Count can't be negative");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(9),i=n(8),s=n(89),o=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==o.call(1,void 0)})||!i(function(){o.call({})})),"Number",{toPrecision:function(t){var e=s(this,"Number#toPrecision: incorrect invocation!");return void 0===t?o.call(e):o.call(e,t)}})},function(t,e,n){var r=n(9);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(9),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(9);r(r.S,"Number",{isInteger:n(95)})},function(t,e,n){var r=n(13),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(9);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(9),i=n(95),s=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&s(t)<=9007199254740991}})},function(t,e,n){var r=n(9);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(9);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(9),i=n(84);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(9),i=n(80);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(9),i=n(103),s=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+s(t-1)*s(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?0>t?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(9);i(i.S,"Math",{asinh:r})},function(t,e,n){var r=n(9);r(r.S,"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(9),i=n(107);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},function(t,e,n){var r=n(9);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(9),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(9);r(r.S,"Math",{expm1:n(111)})},function(t,e){t.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},function(t,e,n){var r=n(9),i=n(107),s=Math.pow,o=s(2,-52),a=s(2,-23),u=s(2,127)*(2-a),c=s(2,-126),f=function(t){return t+1/o-1/o};r(r.S,"Math",{fround:function(t){var e,n,r=Math.abs(t),s=i(t);return c>r?s*f(r/c/a)*c*a:(e=(1+a/o)*r,n=e-(e-r),n>u||n!=n?s*(1/0):s*n)}})},function(t,e,n){var r=n(9),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,s=0,o=0,a=arguments.length,u=0;a>o;)n=i(arguments[o++]),n>u?(r=u/n,s=s*r*r+1,u=n):n>0?(r=n/u,s+=r*r):s+=n;return u===1/0?1/0:u*Math.sqrt(s)}})},function(t,e,n){var r=n(9),i=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,s=n&r,o=n&i;return 0|s*o+((n&r>>>16)*o+s*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(9);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(9);r(r.S,"Math",{log1p:n(103)})},function(t,e,n){var r=n(9);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(9);r(r.S,"Math",{sign:n(107)})},function(t,e,n){var r=n(9),i=n(111),s=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(s(t-1)-s(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(9),i=n(111),s=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(s(t)+s(-t))}})},function(t,e,n){var r=n(9);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(9),i=n(36),s=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;r>o;){if(e=+arguments[o++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(65536>e?s(e):s(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(9),i=n(29),s=n(34);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=s(e.length),r=arguments.length,o=[],a=0;n>a;)o.push(String(e[a++])),r>a&&o.push(String(arguments[a]));return o.join("")}})},function(t,e,n){"use strict";n(81)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(126)(!0);n(127)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(35),i=n(32);t.exports=function(t){return function(e,n){var s,o,a=String(i(e)),u=r(n),c=a.length;return 0>u||u>=c?t?"":void 0:(s=a.charCodeAt(u),55296>s||s>56319||u+1===c||(o=a.charCodeAt(u+1))<56320||o>57343?t?a.charAt(u):s:t?a.slice(u,u+2):(s-55296<<10)+(o-56320)+65536)}}},function(t,e,n){"use strict";var r=n(49),i=n(9),s=n(18),o=n(10),a=n(6),u=n(128),c=n(129),f=n(24),h=n(57),l=n(25)("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",g="keys",y="values",v=function(){return this};t.exports=function(t,e,n,m,S,b,w){c(n,e,m);var E,x,_,A=function(t){if(!d&&t in C)return C[t];switch(t){case g:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},F=e+" Iterator",P=S==y,O=!1,C=t.prototype,I=C[l]||C[p]||S&&C[S],T=I||A(S),j=S?P?A("entries"):T:void 0,R="Array"==e?C.entries||I:I;if(R&&(_=h(R.call(new t)),_!==Object.prototype&&(f(_,F,!0),r||a(_,l)||o(_,l,v))),P&&I&&I.name!==y&&(O=!0,T=function(){return I.call(this)}),r&&!w||!d&&!O&&C[l]||o(C,l,T),u[e]=T,u[F]=v,S)if(E={values:P?T:A(y),keys:b?T:A(g),entries:j},w)for(x in E)x in C||s(C,x,E[x]);else i(i.P+i.F*(d||O),e,E);return E}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(43),i=n(17),s=n(24),o={};n(10)(o,n(25)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),s(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(9),i=n(126)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(9),i=n(34),s=n(132),o="endsWith",a=""[o];r(r.P+r.F*n(134)(o),"String",{endsWith:function(t){var e=s(this,t,o),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),u=void 0===n?r:Math.min(i(n),r),c=String(t);return a?a.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){var r=n(133),i=n(32);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(13),i=n(31),s=n(25)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[s])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(25)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},function(t,e,n){"use strict";var r=n(9),i=n(132),s="includes";r(r.P+r.F*n(134)(s),"String",{includes:function(t){return!!~i(this,t,s).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(9);r(r.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var r=n(9),i=n(34),s=n(132),o="startsWith",a=""[o];r(r.P+r.F*n(134)(o),"String",{startsWith:function(t){var e=s(this,t,o),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(139)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){var r=n(9),i=n(8),s=n(32),o=/"/g,a=function(t,e,n,r){var i=String(s(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(o,""")+'"'),a+">"+i+""+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n(139)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(139)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(139)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(139)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(139)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(139)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(139)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(139)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(139)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(139)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(139)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(139)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(9);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(16);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=s(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var r=n(9),i=n(8),s=Date.prototype.getTime,o=function(t){return t>9?t:"0"+t};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=0>e?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+o(t.getUTCMonth()+1)+"-"+o(t.getUTCDate())+"T"+o(t.getUTCHours())+":"+o(t.getUTCMinutes())+":"+o(t.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}})},function(t,e,n){var r=Date.prototype,i="Invalid Date",s="toString",o=r[s],a=r.getTime;new Date(NaN)+""!=i&&n(18)(r,s,function(){var t=a.call(this);return t===t?o.call(this):i})},function(t,e,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(157))},function(t,e,n){"use strict";var r=n(12),i=n(16),s="number";t.exports=function(t){if("string"!==t&&t!==s&&"default"!==t)throw TypeError("Incorrect hint");
return i(r(this),t!=s)}},function(t,e,n){var r=n(9);r(r.S,"Array",{isArray:n(42)})},function(t,e,n){"use strict";var r=n(20),i=n(9),s=n(56),o=n(160),a=n(161),u=n(34),c=n(162);i(i.S+i.F*!n(163)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,f,h=s(t),l="function"==typeof this?this:Array,d=arguments.length,p=d>1?arguments[1]:void 0,g=void 0!==p,y=0,v=c(h);if(g&&(p=r(p,d>2?arguments[2]:void 0,2)),void 0==v||l==Array&&a(v))for(e=u(h.length),n=new l(e);e>y;y++)n[y]=g?p(h[y],y):h[y];else for(f=v.call(h),n=new l;!(i=f.next()).done;y++)n[y]=g?o(f,p,[i.value,y],!0):i.value;return n.length=y,n}})},function(t,e,n){var r=n(12);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(s){var o=t.return;throw void 0!==o&&r(o.call(t)),s}}},function(t,e,n){var r=n(128),i=n(25)("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[i]===t)}},function(t,e,n){var r=n(73),i=n(25)("iterator"),s=n(128);t.exports=n(5).getIteratorMethod=function(t){return void 0!=t?t[i]||t["@@iterator"]||s[r(t)]:void 0}},function(t,e,n){var r=n(25)("iterator"),i=!1;try{var s=[7][r]();s.return=function(){i=!0},Array.from(s,function(){throw 2})}catch(o){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var s=[7],o=s[r]();o.next=function(){n=!0},s[r]=function(){return o},t(s)}catch(a){}return n}},function(t,e,n){"use strict";var r=n(9);r(r.S+r.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)n[t]=arguments[t++];return n.length=e,n}})},function(t,e,n){"use strict";var r=n(9),i=n(29),s=[].join;r(r.P+r.F*(n(30)!=Object||!n(166)(s)),"Array",{join:function(t){return s.call(i(this),void 0===t?",":t)}})},function(t,e,n){var r=n(8);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(9),i=n(45),s=n(31),o=n(36),a=n(34),u=[].slice;r(r.P+r.F*n(8)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=a(this.length),r=s(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=o(t,n),c=o(e,n),f=a(c-i),h=Array(f),l=0;f>l;l++)h[l]="String"==r?this.charAt(i+l):this[i+l];return h}})},function(t,e,n){"use strict";var r=n(9),i=n(21),s=n(56),o=n(8),a=[].sort,u=[1,2,3];r(r.P+r.F*(o(function(){u.sort(void 0)})||!o(function(){u.sort(null)})||!n(166)(a)),"Array",{sort:function(t){return void 0===t?a.call(s(this)):a.call(s(this),i(t))}})},function(t,e,n){"use strict";var r=n(9),i=n(170)(0),s=n(166)([].forEach,!0);r(r.P+r.F*!s,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(20),i=n(30),s=n(56),o=n(34),a=n(171);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,f=4==t,h=6==t,l=5==t||h,d=e||a;return function(e,a,p){for(var g,y,v=s(e),m=i(v),S=r(a,p,3),b=o(m.length),w=0,E=n?d(e,b):u?d(e,0):void 0;b>w;w++)if((l||w in m)&&(g=m[w],y=S(g,w,v),t))if(n)E[w]=y;else if(y)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:E.push(g)}else if(f)return!1;return h?-1:c||f?f:E}}},function(t,e,n){var r=n(13),i=n(42),s=n(25)("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&(n=n[s],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},function(t,e,n){"use strict";var r=n(9),i=n(170)(1);r(r.P+r.F*!n(166)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(170)(2);r(r.P+r.F*!n(166)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(170)(3);r(r.P+r.F*!n(166)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(170)(4);r(r.P+r.F*!n(166)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(177);r(r.P+r.F*!n(166)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){var r=n(21),i=n(56),s=n(30),o=n(34);t.exports=function(t,e,n,a,u){r(e);var c=i(t),f=s(c),h=o(c.length),l=u?h-1:0,d=u?-1:1;if(2>n)for(;;){if(l in f){a=f[l],l+=d;break}if(l+=d,u?0>l:l>=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?l>=0:h>l;l+=d)l in f&&(a=e(a,f[l],l,c));return a}},function(t,e,n){"use strict";var r=n(9),i=n(177);r(r.P+r.F*!n(166)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(9),i=n(33)(!1);r(r.P+r.F*!n(166)([].indexOf),"Array",{indexOf:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(29),s=n(35),o=n(34);r(r.P+r.F*!n(166)([].lastIndexOf),"Array",{lastIndexOf:function(t){var e=i(this),n=o(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,s(arguments[1]))),0>r&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r;return-1}})},function(t,e,n){var r=n(9);r(r.P,"Array",{copyWithin:n(182)}),n(183)("copyWithin")},function(t,e,n){"use strict";var r=n(56),i=n(36),s=n(34);t.exports=[].copyWithin||function(t,e){var n=r(this),o=s(n.length),a=i(t,o),u=i(e,o),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?o:i(c,o))-u,o-a),h=1;for(a>u&&u+f>a&&(h=-1,u+=f-1,a+=f-1);f-- >0;)u in n?n[a]=n[u]:delete n[a],a+=h,u+=h;return n}},function(t,e,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(9);r(r.P,"Array",{fill:n(185)}),n(183)("fill")},function(t,e,n){"use strict";var r=n(56),i=n(36),s=n(34);t.exports=function(t){for(var e=r(this),n=s(e.length),o=arguments.length,a=i(o>1?arguments[1]:void 0,n),u=o>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var r=n(9),i=n(170)(5),s="find",o=!0;s in[]&&Array(1)[s](function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(183)(s)},function(t,e,n){"use strict";var r=n(9),i=n(170)(6),s="findIndex",o=!0;s in[]&&Array(1)[s](function(){o=!1}),r(r.P+r.F*o,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(183)(s)},function(t,e,n){n(189)("Array")},function(t,e,n){"use strict";var r=n(4),i=n(11),s=n(7),o=n(25)("species");t.exports=function(t){var e=r[t];s&&e&&!e[o]&&i.f(e,o,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(183),i=n(191),s=n(128),o=n(29);t.exports=n(127)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),i=n(86),s=n(11).f,o=n(47).f,a=n(133),u=n(193),c=r.RegExp,f=c,h=c.prototype,l=/a/g,d=/a/g,p=new c(l)!==l;if(n(7)&&(!p||n(8)(function(){return d[n(25)("match")]=!1,c(l)!=l||c(d)==d||"/a/i"!=c(l,"i")}))){c=function(t,e){var n=this instanceof c,r=a(t),s=void 0===e;return!n&&r&&t.constructor===c&&s?t:i(p?new f(r&&!s?t.source:t,e):f((r=t instanceof c)?t.source:t,r&&s?u.call(t):e),n?this:h,c)};for(var g=(function(t){t in c||s(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})}),y=o(f),v=0;y.length>v;)g(y[v++]);h.constructor=c,c.prototype=h,n(18)(r,"RegExp",c)}n(189)("RegExp")},function(t,e,n){"use strict";var r=n(12);t.exports=function(){var t=r(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,n){"use strict";n(195);var r=n(12),i=n(193),s=n(7),o="toString",a=/./[o],u=function(t){n(18)(RegExp.prototype,o,t,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!s&&t instanceof RegExp?i.call(t):void 0)}):a.name!=o&&u(function(){return a.call(this)})},function(t,e,n){n(7)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(193)})},function(t,e,n){n(197)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";var r=n(10),i=n(18),s=n(8),o=n(32),a=n(25);t.exports=function(t,e,n){var u=a(t),c=n(o,u,""[t]),f=c[0],h=c[1];s(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,u,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,n){n(197)("replace",2,function(t,e,n){return[function(r,i){"use strict";var s=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,s,i):n.call(String(s),r,i)},n]})},function(t,e,n){n(197)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(197)("split",2,function(t,e,r){"use strict";var i=n(133),s=r,o=[].push,a="split",u="length",c="lastIndex";if("c"=="abbc"[a](/(b)*/)[1]||4!="test"[a](/(?:)/,-1)[u]||2!="ab"[a](/(?:ab)*/)[u]||4!="."[a](/(.?)(.?)/)[u]||"."[a](/()()/)[u]>1||""[a](/.?/)[u]){var f=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return s.call(n,t,e);var r,a,h,l,d,p=[],g=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,v=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,g+"g");for(f||(r=new RegExp("^"+m.source+"$(?!\\s)",g));(a=m.exec(n))&&(h=a.index+a[0][u],!(h>y&&(p.push(n.slice(y,a.index)),!f&&a[u]>1&&a[0].replace(r,function(){for(d=1;d1&&a.index=v)));)m[c]===a.index&&m[c]++;return y===n[u]?!l&&m.test("")||p.push(""):p.push(n.slice(y)),p[u]>v?p.slice(0,v):p}}else"0"[a](void 0,0)[u]&&(r=function(t,e){return void 0===t&&0===e?[]:s.call(this,t,e)});return[function(n,i){var s=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,s,i):r.call(String(s),n,i)},r]})},function(t,e,n){"use strict";var r,i,s,o=n(49),a=n(4),u=n(20),c=n(73),f=n(9),h=n(13),l=(n(12),n(21)),d=n(88),p=n(202),g=(n(71).set,n(203)),y=n(204).set,v=n(205),m="Promise",S=a.TypeError,b=a.process,w=a[m],b=a.process,E="process"==c(b),x=function(){},_=!!function(){try{var t=w.resolve(1),e=(t.constructor={})[n(25)("species")]=function(t){t(x,x)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(x)instanceof e}catch(r){}}(),A=function(t,e){return t===e||t===w&&e===s},F=function(t){var e;return h(t)&&"function"==typeof(e=t.then)?e:!1},P=function(t){return A(w,t)?new O(t):new i(t)},O=i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw S("Bad Promise constructor");e=t,n=r}),this.resolve=l(e),this.reject=l(n)},C=function(t){try{t()}catch(e){return{error:e}}},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;v(function(){for(var r=t._v,i=1==t._s,s=0,o=function(e){var n,s,o=i?e.ok:e.fail,a=e.resolve,u=e.reject,c=e.domain;try{o?(i||(2==t._h&&R(t),t._h=1),o===!0?n=r:(c&&c.enter(),n=o(r),c&&c.exit()),n===e.promise?u(S("Promise-chain cycle")):(s=F(n))?s.call(n,a,u):a(n)):u(r)}catch(f){u(f)}};n.length>s;)o(n[s++]);t._c=[],t._n=!1,e&&!t._h&&T(t)})}},T=function(t){y.call(a,function(){var e,n,r,i=t._v;if(j(t)&&(e=C(function(){E?b.emit("unhandledRejection",i,t):(n=a.onunhandledrejection)?n({promise:t,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=E||j(t)?2:1),t._a=void 0,e)throw e.error})},j=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!j(e.promise))return!1;return!0},R=function(t){y.call(a,function(){var e;E?b.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},D=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},H=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=F(t))?v(function(){var r={_w:n,_d:!1};try{e.call(t,u(H,r,1),u(D,r,1))}catch(i){D.call(r,i)}}):(n._v=t,n._s=1,I(n,!1))}catch(r){D.call({_w:n,_d:!1},r)}}};_||(w=function(t){d(this,w,m,"_h"),l(t),r.call(this);try{t(u(H,this,1),u(D,this,1))}catch(e){D.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(206)(w.prototype,{then:function(t,e){var n=P(g(this,w));return n.ok="function"==typeof t?t:!0,n.fail="function"==typeof e&&e,n.domain=E?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},"catch":function(t){return this.then(void 0,t)}}),O=function(){var t=new r;this.promise=t,this.resolve=u(H,t,1),this.reject=u(D,t,1)}),f(f.G+f.W+f.F*!_,{Promise:w}),n(24)(w,m),n(189)(m),s=n(5)[m],f(f.S+f.F*!_,m,{reject:function(t){var e=P(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(o||!_),m,{resolve:function(t){if(t instanceof w&&A(t.constructor,this))return t;var e=P(this),n=e.resolve;return n(t),e.promise}}),f(f.S+f.F*!(_&&n(163)(function(t){w.all(t).catch(x)})),m,{all:function(t){var e=this,n=P(e),r=n.resolve,i=n.reject,s=C(function(){var n=[],s=0,o=1;p(t,!1,function(t){var a=s++,u=!1;n.push(void 0),o++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--o||r(n))},i)}),--o||r(n)});return s&&i(s.error),n.promise},race:function(t){var e=this,n=P(e),r=n.reject,i=C(function(){p(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e,n){var r=n(20),i=n(160),s=n(161),o=n(12),a=n(34),u=n(162);t.exports=function(t,e,n,c,f){var h,l,d,p=f?function(){return t}:u(t),g=r(n,c,e?2:1),y=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(s(p))for(h=a(t.length);h>y;y++)e?g(o(l=t[y])[0],l[1]):g(t[y]);else for(d=p.call(t);!(l=d.next()).done;)i(d,g,l.value,e)}},function(t,e,n){var r=n(12),i=n(21),s=n(25)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[s])?e:i(n)}},function(t,e,n){var r,i,s,o=n(20),a=n(76),u=n(45),c=n(15),f=n(4),h=f.process,l=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,g=0,y={},v="onreadystatechange",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&&d||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++g]=function(){a("function"==typeof t?t:Function(t),e)},r(g),g},d=function(t){delete y[t]},"process"==n(31)(h)?r=function(t){h.nextTick(o(m,t,1))}:p?(i=new p,s=i.port2,i.port1.onmessage=S,r=o(s.postMessage,s,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",S,!1)):r=v in c("script")?function(t){u.appendChild(c("script"))[v]=function(){u.removeChild(this),m.call(t)}}:function(t){setTimeout(o(m,t,1),0)}),t.exports={set:l,clear:d}},function(t,e,n){var r,i,s,o=n(4),a=n(204).set,u=o.MutationObserver||o.WebKitMutationObserver,c=o.process,f=o.Promise,h="process"==n(31)(c),l=function(){var t,e;for(h&&(t=c.domain)&&t.exit();r;)e=r.fn,e(),r=r.next;i=void 0,t&&t.enter()};if(h)s=function(){c.nextTick(l)};else if(u){var d=!0,p=document.createTextNode("");new u(l).observe(p,{characterData:!0}),s=function(){p.data=d=!d}}else s=f&&f.resolve?function(){f.resolve().then(l)}:function(){a.call(o,l)};t.exports=function(t){var e={fn:t,next:void 0};i&&(i.next=e),r||(r=e,s()),i=e}},function(t,e,n){var r=n(18);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(208);t.exports=n(209)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(11).f,i=n(43),s=(n(10),n(206)),o=n(20),a=n(88),u=n(32),c=n(202),f=n(127),h=n(191),l=n(189),d=n(7),p=n(22).fastKey,g=d?"_s":"size",y=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var h=t(function(t,r){a(t,h,e,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=r&&c(r,n,t[f],t)});return s(h.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[g]=0},"delete":function(t){var e=this,n=y(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[g]--}return!!n},forEach:function(t){a(this,h,"forEach");for(var e,n=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),d&&r(h.prototype,"size",{get:function(){return u(this[g])}}),h},def:function(t,e,n){var r,i,s=y(t,e);return s?s.v=n:(t._l=s={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[g]++,"F"!==i&&(t._i[i]=s)),t},getEntry:y,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?h(0,n.k):"values"==e?h(0,n.v):h(0,[n.k,n.v]):(t._t=void 0,h(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(4),i=n(9),s=n(18),o=n(206),a=n(22),u=n(202),c=n(88),f=n(13),h=n(8),l=n(163),d=n(24),p=n(86);t.exports=function(t,e,n,g,y,v){var m=r[t],S=m,b=y?"set":"add",w=S&&S.prototype,E={},x=function(t){var e=w[t];s(w,t,"delete"==t?function(t){return v&&!f(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return v&&!f(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof S&&(v||w.forEach&&!h(function(){(new S).entries().next()}))){var _=new S,A=_[b](v?{}:-0,1)!=_,F=h(function(){_.has(1)}),P=l(function(t){new S(t)}),O=!v&&h(function(){for(var t=new S,e=5;e--;)t[b](e,e);return!t.has(-0)});P||(S=e(function(e,n){c(e,S,t);var r=p(new m,e,S);return void 0!=n&&u(n,y,r[b],r),r}),S.prototype=w,w.constructor=S),(F||O)&&(x("delete"),x("has"),y&&x("get")),(O||A)&&x(b),v&&w.clear&&delete w.clear}else S=g.getConstructor(e,t,y,b),o(S.prototype,n),a.NEED=!0;return d(S,t),E[t]=S,i(i.G+i.W+i.F*(S!=m),E),v||g.setStrong(S,t,y),S}},function(t,e,n){"use strict";var r=n(208);t.exports=n(209)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(170)(0),s=n(18),o=n(22),a=n(67),u=n(212),c=n(13),f=(n(6),o.getWeak),h=Object.isExtensible,l=u.ufstore,d={},p=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(c(t)){var e=f(t);return e===!0?l(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(this,t,e)}},y=t.exports=n(209)("WeakMap",p,g,u,!0,!0);7!=(new y).set((Object.freeze||Object)(d),7).get(d)&&(r=u.getConstructor(p),a(r.prototype,g),o.NEED=!0,i(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];s(e,t,function(e,i){if(c(e)&&!h(e)){this._f||(this._f=new r);var s=this._f[t](e,i);return"set"==t?this:s}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(206),i=n(22).getWeak,s=n(12),o=n(13),a=n(88),u=n(202),c=n(170),f=n(6),h=c(5),l=c(6),d=0,p=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return h(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);return e?e[1]:void 0},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=l(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,s){var c=t(function(t,r){a(t,c,e,"_i"),t._i=d++,t._l=void 0,void 0!=r&&u(r,n,t[s],t)});return r(c.prototype,{"delete":function(t){if(!o(t))return!1;var e=i(t);return e===!0?p(this).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!o(t))return!1;var e=i(t);return e===!0?p(this).has(t):e&&f(e,this._i)}}),c},def:function(t,e,n){var r=i(s(e),!0);return r===!0?p(t).set(e,n):r[t._i]=n,t},ufstore:p}},function(t,e,n){"use strict";var r=n(212);n(209)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(9),i=n(215),s=n(216),o=n(12),a=n(36),u=n(34),c=n(13),f=(n(25)("typed_array"),n(4).ArrayBuffer),h=n(203),l=s.ArrayBuffer,d=s.DataView,p=i.ABV&&f.isView,g=l.prototype.slice,y=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(f!==l),{ArrayBuffer:l}),r(r.S+r.F*!i.CONSTR,v,{isView:function(t){return p&&p(t)||c(t)&&y in t}}),r(r.P+r.U+r.F*n(8)(function(){return!new l(2).slice(1,void 0).byteLength}),v,{slice:function(t,e){if(void 0!==g&&void 0===e)return g.call(o(this),t);for(var n=o(this).byteLength,r=a(t,n),i=a(void 0===e?n:e,n),s=new(h(this,l))(u(i-r)),c=new d(this),f=new d(s),p=0;i>r;)f.setUint8(p++,c.getUint8(r++));return s}}),n(189)(v)},function(t,e,n){for(var r,i=n(4),s=n(10),o=n(19),a=o("typed_array"),u=o("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,h=0,l=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l>h;)(r=i[d[h++]])?(s(r.prototype,a,!0),s(r.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:a,VIEW:u}},function(t,e,n){"use strict";var r=n(4),i=n(7),s=n(49),o=n(215),a=n(10),u=n(206),c=n(8),f=n(88),h=n(35),l=n(34),d=n(47).f,p=n(11).f,g=n(185),y=n(24),v="ArrayBuffer",m="DataView",S="prototype",b="Wrong length!",w="Wrong index!",E=r[v],x=r[m],_=r.Math,A=(r.parseInt,r.RangeError),F=r.Infinity,P=E,O=_.abs,C=_.pow,I=(_.min,_.floor),T=_.log,j=_.LN2,R="buffer",D="byteLength",H="byteOffset",k=i?"_b":R,N=i?"_l":D,B=i?"_o":H,M=function(t,e,n){var r,i,s,o=Array(n),a=8*n-e-1,u=(1<>1,f=23===e?C(2,-24)-C(2,-77):0,h=0,l=0>t||0===t&&0>1/t?1:0;for(t=O(t),t!=t||t===F?(i=t!=t?1:0,r=u):(r=I(T(t)/j),t*(s=C(2,-r))<1&&(r--,s*=2),t+=r+c>=1?f/s:f*C(2,1-c),t*s>=2&&(r++,s/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(t*s-1)*C(2,e),r+=c):(i=t*C(2,c-1)*C(2,e),r=0));e>=8;o[h++]=255&i,i/=256,e-=8);for(r=r<0;o[h++]=255&r,r/=256,a-=8);return o[--h]|=128*l,o},V=function(t,e,n){var r,i=8*n-e-1,s=(1<>1,a=i-7,u=n-1,c=t[u--],f=127&c;for(c>>=7;a>0;f=256*f+t[u],u--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=e;a>0;r=256*r+t[u],u--,a-=8);if(0===f)f=1-o;else{if(f===s)return r?NaN:c?-F:F;r+=C(2,e),f-=o}return(c?-1:1)*r*C(2,f-e)},L=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},K=function(t){return[255&t]},U=function(t){return[255&t,t>>8&255]},q=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return M(t,52,8)},J=function(t){return M(t,23,4)},z=function(t,e,n){p(t[S],e,{get:function(){return this[n]}})},Y=function(t,e,n,r){var i=+n,s=h(i);if(i!=s||0>s||s+e>t[N])throw A(w);var o=t[k]._b,a=s+t[B],u=o.slice(a,a+e);return r?u:u.reverse()},G=function(t,e,n,r,i,s){var o=+n,a=h(o);if(o!=a||0>a||a+e>t[N])throw A(w);for(var u=t[k]._b,c=a+t[B],f=r(+i),l=0;e>l;l++)u[c+l]=f[s?l:e-l-1]},X=function(t,e){f(t,E,v);var n=+e,r=l(n);if(n!=r)throw A(b);return r};if(o.ABV){if(!c(function(){new E})||!c(function(){new E(.5)})){E=function(t){return new P(X(this,t))};for(var $,Z=E[S]=P[S],Q=d(P),tt=0;Q.length>tt;)($=Q[tt++])in E||a(E,$,P[$]);s||(Z.constructor=E)}var et=new x(new E(2)),nt=x[S].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||u(x[S],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else E=function(t){var e=X(this,t);this._b=g.call(Array(e),0),this[N]=e},x=function(t,e,n){f(this,x,m),f(t,E,m);var r=t[N],i=h(e);if(0>i||i>r)throw A("Wrong offset!");if(n=void 0===n?r-i:l(n),i+n>r)throw A(b);this[k]=t,this[B]=i,this[N]=n},i&&(z(E,D,"_l"),z(x,R,"_b"),z(x,D,"_l"),z(x,H,"_o")),u(x[S],{getInt8:function(t){return Y(this,1,t)[0]<<24>>24},getUint8:function(t){return Y(this,1,t)[0]},getInt16:function(t){var e=Y(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Y(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return L(Y(this,4,t,arguments[1]))},getUint32:function(t){return L(Y(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return V(Y(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return V(Y(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,K,e)},setUint8:function(t,e){G(this,1,t,K,e)},setInt16:function(t,e){G(this,2,t,U,e,arguments[2])},setUint16:function(t,e){G(this,2,t,U,e,arguments[2])},setInt32:function(t,e){G(this,4,t,q,e,arguments[2])},setUint32:function(t,e){G(this,4,t,q,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,J,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,W,e,arguments[2])}});y(E,v),y(x,m),a(x[S],o.VIEW,!0),e[v]=E,e[m]=x},function(t,e,n){var r=n(9);r(r.G+r.W+r.F*!n(215).ABV,{DataView:n(216).DataView})},function(t,e,n){n(219)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(7)){var r=n(49),i=n(4),s=n(8),o=n(9),a=n(215),u=n(216),c=n(20),f=n(88),h=n(17),l=n(10),d=n(206),p=(n(95),n(35)),g=n(34),y=n(36),v=n(16),m=n(6),S=n(69),b=n(73),w=n(13),E=n(56),x=n(161),_=n(43),A=n(57),F=n(47).f,P=(n(220),n(162)),O=n(19),C=n(25),I=n(170),T=n(33),j=n(203),R=n(190),D=n(128),H=n(163),k=n(189),N=n(185),B=n(182),M=n(11),V=n(48),L=M.f,K=V.f,U=i.RangeError,q=i.TypeError,W=i.Uint8Array,J="ArrayBuffer",z="Shared"+J,Y="BYTES_PER_ELEMENT",G="prototype",X=Array[G],$=u.ArrayBuffer,Z=u.DataView,Q=I(0),tt=I(2),et=I(3),nt=I(4),rt=I(5),it=I(6),st=T(!0),ot=T(!1),at=R.values,ut=R.keys,ct=R.entries,ft=X.lastIndexOf,ht=X.reduce,lt=X.reduceRight,dt=X.join,pt=X.sort,gt=X.slice,yt=X.toString,vt=X.toLocaleString,mt=C("iterator"),St=C("toStringTag"),bt=O("typed_constructor"),wt=O("def_constructor"),Et=a.CONSTR,xt=a.TYPED,_t=a.VIEW,At="Wrong length!",Ft=I(1,function(t,e){return jt(j(t,t[wt]),e)}),Pt=s(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Ot=!!W&&!!W[G].set&&s(function(){new W(1).set({})}),Ct=function(t,e){if(void 0===t)throw q(At);var n=+t,r=g(t);if(e&&!S(n,r))throw U(At);return r},It=function(t,e){var n=p(t);if(0>n||n%e)throw U("Wrong offset!");return n},Tt=function(t){if(w(t)&&xt in t)return t;throw q(t+" is not a typed array!")},jt=function(t,e){if(!(w(t)&&bt in t))throw q("It is not a typed array constructor!");return new t(e)},Rt=function(t,e){return Dt(j(t,t[wt]),e)},Dt=function(t,e){for(var n=0,r=e.length,i=jt(t,r);r>n;)i[n]=e[n++];return i},Ht=function(t,e,n){L(t,e,{get:function(){return this._d[n]}})},kt=function(t){var e,n,r,i,s,o,a=E(t),u=arguments.length,f=u>1?arguments[1]:void 0,h=void 0!==f,l=P(a);if(void 0!=l&&!x(l)){for(o=l.call(a),r=[],e=0;!(s=o.next()).done;e++)r.push(s.value);a=r}for(h&&u>2&&(f=c(f,arguments[2],2)),e=0,n=g(a.length),i=jt(this,n);n>e;e++)i[e]=h?f(a[e],e):a[e];return i},Nt=function(){for(var t=0,e=arguments.length,n=jt(this,e);e>t;)n[t]=arguments[t++];return n},Bt=!!W&&s(function(){vt.call(new W(1))}),Mt=function(){return vt.apply(Bt?gt.call(Tt(this)):Tt(this),arguments)},Vt={copyWithin:function(t,e){return B.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Tt(this),arguments)},filter:function(t){return Rt(this,tt(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return ot(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return st(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return dt.apply(Tt(this),arguments)},lastIndexOf:function(t){return ft.apply(Tt(this),arguments)},map:function(t){return Ft(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Tt(this),arguments)},reduceRight:function(t){return lt.apply(Tt(this),arguments)},reverse:function(){for(var t,e=this,n=Tt(e).length,r=Math.floor(n/2),i=0;r>i;)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),r=n.length,i=y(t,r);return new(j(n,n[wt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===e?r:y(e,r))-i))}},Lt=function(t,e){return Rt(this,gt.call(Tt(this),t,e))},Kt=function(t){Tt(this);var e=It(arguments[1],1),n=this.length,r=E(t),i=g(r.length),s=0;if(i+e>n)throw U(At);for(;i>s;)this[e+s]=r[s++]},Ut={entries:function(){return ct.call(Tt(this))},keys:function(){return ut.call(Tt(this))},values:function(){return at.call(Tt(this))}},qt=function(t,e){return w(t)&&t[xt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Wt=function(t,e){return qt(t,e=v(e,!0))?h(2,t[e]):K(t,e)},Jt=function(t,e,n){return!(qt(t,e=v(e,!0))&&w(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?L(t,e,n):(t[e]=n.value,t)};Et||(V.f=Wt,M.f=Jt),o(o.S+o.F*!Et,"Object",{getOwnPropertyDescriptor:Wt,defineProperty:Jt}),s(function(){yt.call({})})&&(yt=vt=function(){return dt.call(this)});var zt=d({},Vt);d(zt,Ut),l(zt,mt,Ut.values),d(zt,{slice:Lt,set:Kt,constructor:function(){},toString:yt,toLocaleString:Mt}),Ht(zt,"buffer","b"),Ht(zt,"byteOffset","o"),Ht(zt,"byteLength","l"),Ht(zt,"length","e"),L(zt,St,{get:function(){return this[xt]}}),t.exports=function(t,e,n,u){u=!!u;var c=t+(u?"Clamped":"")+"Array",h="Uint8Array"!=c,d="get"+t,p="set"+t,y=i[c],v=y||{},m=y&&A(y),S=!y||!a.ABV,E={},x=y&&y[G],P=function(t,n){var r=t._d;return r.v[d](n*e+r.o,Pt)},O=function(t,n,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](n*e+i.o,r,Pt)},C=function(t,e){L(t,e,{get:function(){return P(this,e)},set:function(t){return O(this,e,t)},enumerable:!0})};S?(y=n(function(t,n,r,i){f(t,y,c,"_d");var s,o,a,u,h=0,d=0;if(w(n)){if(!(n instanceof $||(u=b(n))==J||u==z))return xt in n?Dt(y,n):kt.call(y,n);s=n,d=It(r,e);var p=n.byteLength;if(void 0===i){if(p%e)throw U(At);if(o=p-d,0>o)throw U(At)}else if(o=g(i)*e,o+d>p)throw U(At);a=o/e}else a=Ct(n,!0),o=a*e,s=new $(o);for(l(t,"_d",{b:s,o:d,l:o,e:a,v:new Z(s)});a>h;)C(t,h++)}),x=y[G]=_(zt),l(x,"constructor",y)):H(function(t){new y(null),new y(t)},!0)||(y=n(function(t,n,r,i){f(t,y,c);var s;return w(n)?n instanceof $||(s=b(n))==J||s==z?void 0!==i?new v(n,It(r,e),i):void 0!==r?new v(n,It(r,e)):new v(n):xt in n?Dt(y,n):kt.call(y,n):new v(Ct(n,h))}),Q(m!==Function.prototype?F(v).concat(F(m)):F(v),function(t){t in y||l(y,t,v[t])}),y[G]=x,r||(x.constructor=y));var I=x[mt],T=!!I&&("values"==I.name||void 0==I.name),j=Ut.values;l(y,bt,!0),l(x,xt,c),l(x,_t,!0),l(x,wt,y),(u?new y(1)[St]==c:St in x)||L(x,St,{get:function(){return c}}),E[c]=y,o(o.G+o.W+o.F*(y!=v),E),o(o.S,c,{BYTES_PER_ELEMENT:e,from:kt,of:Nt}),Y in x||l(x,Y,e),o(o.P,c,Vt),k(c),o(o.P+o.F*Ot,c,{set:Kt}),o(o.P+o.F*!T,c,Ut),o(o.P+o.F*(x.toString!=yt),c,{toString:yt}),o(o.P+o.F*s(function(){new y(1).slice()}),c,{slice:Lt}),o(o.P+o.F*(s(function(){return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!s(function(){x.toLocaleString.call([1,2])})),c,{toLocaleString:Mt}),D[c]=T?I:j,r||T||l(x,mt,j)}}else t.exports=function(){}},function(t,e,n){var r=n(73),i=n(25)("iterator"),s=n(128);t.exports=n(5).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||s.hasOwnProperty(r(e))}},function(t,e,n){n(219)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(219)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r);
}},!0)},function(t,e,n){n(219)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(219)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(219)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(219)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(219)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(219)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(9),i=Function.apply;r(r.S,"Reflect",{apply:function(t,e,n){return i.call(t,e,n)}})},function(t,e,n){var r=n(9),i=n(43),s=n(21),o=n(12),a=n(13),u=n(75);r(r.S+r.F*n(8)(function(){function t(){}return!(Reflect.construct(function(){},[],t)instanceof t)}),"Reflect",{construct:function(t,e){s(t);var n=arguments.length<3?t:s(arguments[2]);if(t==n){if(void 0!=e)switch(o(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 r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,f=i(a(c)?c:Object.prototype),h=Function.apply.call(t,f,e);return a(h)?h:f}})},function(t,e,n){var r=n(11),i=n(9),s=n(12),o=n(16);i(i.S+i.F*n(8)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){s(t),e=o(e,!0),s(n);try{return r.f(t,e,n),!0}catch(i){return!1}}})},function(t,e,n){var r=n(9),i=n(48).f,s=n(12);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(s(t),e);return n&&!n.configurable?!1:delete t[e]}})},function(t,e,n){"use strict";var r=n(9),i=n(12),s=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(129)(s,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new s(t)}})},function(t,e,n){function r(t,e){var n,a,f=arguments.length<3?t:arguments[2];return c(t)===f?t[e]:(n=i.f(t,e))?o(n,"value")?n.value:void 0!==n.get?n.get.call(f):void 0:u(a=s(t))?r(a,e,f):void 0}var i=n(48),s=n(57),o=n(6),a=n(9),u=n(13),c=n(12);a(a.S,"Reflect",{get:r})},function(t,e,n){var r=n(48),i=n(9),s=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(s(t),e)}})},function(t,e,n){var r=n(9),i=n(57),s=n(12);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(s(t))}})},function(t,e,n){var r=n(9);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(9),i=n(12),s=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),s?s(t):!0}})},function(t,e,n){var r=n(9);r(r.S,"Reflect",{ownKeys:n(240)})},function(t,e,n){var r=n(47),i=n(40),s=n(12),o=n(4).Reflect;t.exports=o&&o.ownKeys||function(t){var e=r.f(s(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(9),i=n(12),s=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return s&&s(t),!0}catch(e){return!1}}})},function(t,e,n){function r(t,e,n){var u,l,d=arguments.length<4?t:arguments[3],p=s.f(f(t),e);if(!p){if(h(l=o(t)))return r(l,e,n,d);p=c(0)}return a(p,"value")?p.writable!==!1&&h(d)?(u=s.f(d,e)||c(0),u.value=n,i.f(d,e,u),!0):!1:void 0===p.set?!1:(p.set.call(d,n),!0)}var i=n(11),s=n(48),o=n(57),a=n(6),u=n(9),c=n(17),f=n(12),h=n(13);u(u.S,"Reflect",{set:r})},function(t,e,n){var r=n(9),i=n(71);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(n){return!1}}})},function(t,e,n){"use strict";var r=n(9),i=n(33)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(183)("includes")},function(t,e,n){"use strict";var r=n(9),i=n(126)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(9),i=n(247);r(r.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(34),i=n(90),s=n(32);t.exports=function(t,e,n,o){var a=String(s(t)),u=a.length,c=void 0===n?" ":String(n),f=r(e);if(u>=f)return a;""==c&&(c=" ");var h=f-u,l=i.call(c,Math.ceil(h/c.length));return l.length>h&&(l=l.slice(0,h)),o?l+a:a+l}},function(t,e,n){"use strict";var r=n(9),i=n(247);r(r.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(81)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(81)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(9),i=n(32),s=n(34),o=n(133),a=n(193),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(129)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!o(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):a.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=s(t.lastIndex),new c(r,e)}})},function(t,e,n){var r=n(9),i=n(240),s=n(29),o=n(17),a=n(48),u=n(11);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=s(t),c=a.f,f=i(r),h={},l=0;f.length>l;)n=c(r,e=f[l++]),e in h?u.f(h,e,o(0,n)):h[e]=n;return h}})},function(t,e,n){var r=n(9),i=n(254)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(27),i=n(29),s=n(41).f;t.exports=function(t){return function(e){for(var n,o=i(e),a=r(o),u=a.length,c=0,f=[];u>c;)s.call(o,n=a[c++])&&f.push(t?[n,o[n]]:o[n]);return f}}},function(t,e,n){var r=n(9),i=n(254)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(21),o=n(11);n(7)&&r(r.P+n(257),"Object",{__defineGetter__:function(t,e){o.f(i(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){t.exports=n(49)||!n(8)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(4)[t]})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(21),o=n(11);n(7)&&r(r.P+n(257),"Object",{__defineSetter__:function(t,e){o.f(i(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(16),o=n(57),a=n(48).f;n(7)&&r(r.P+n(257),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=s(t,!0);do if(e=a(n,r))return e.get;while(n=o(n))}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(16),o=n(57),a=n(48).f;n(7)&&r(r.P+n(257),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=s(t,!0);do if(e=a(n,r))return e.set;while(n=o(n))}})},function(t,e,n){var r=n(9);r(r.P+r.R,"Map",{toJSON:n(262)("Map")})},function(t,e,n){var r=n(73),i=n(263);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(202);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(9);r(r.P+r.R,"Set",{toJSON:n(262)("Set")})},function(t,e,n){var r=n(9);r(r.S,"System",{global:n(4)})},function(t,e,n){var r=n(9),i=n(31);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(9);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,s=e>>>0,o=n>>>0;return s+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,n){var r=n(9);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,s=e>>>0,o=n>>>0;return s-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,n){var r=n(9);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,i=+e,s=r&n,o=i&n,a=r>>16,u=i>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>16)+((s*u>>>0)+(c&n)>>16)}})},function(t,e,n){var r=n(9);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,i=+e,s=r&n,o=i&n,a=r>>>16,u=i>>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>>16)+((s*u>>>0)+(c&n)>>>16)}})},function(t,e,n){var r=n(272),i=n(12),s=r.key,o=r.set;r.exp({defineMetadata:function(t,e,n,r){o(t,e,i(n),s(r))}})},function(t,e,n){var r=n(207),i=n(9),s=n(23)("metadata"),o=s.store||(s.store=new(n(211))),a=function(t,e,n){var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}var s=i.get(e);if(!s){if(!n)return;i.set(e,s=new r)}return s},u=function(t,e,n){var r=a(e,n,!1);return void 0===r?!1:r.has(t)},c=function(t,e,n){var r=a(e,n,!1);return void 0===r?void 0:r.get(t)},f=function(t,e,n,r){a(n,r,!0).set(t,e)},h=function(t,e){var n=a(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},l=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},d=function(t){i(i.S,"Reflect",t)};t.exports={store:o,map:a,has:u,get:c,set:f,keys:h,key:l,exp:d}},function(t,e,n){var r=n(272),i=n(12),s=r.key,o=r.map,a=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:s(arguments[2]),r=o(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=a.get(e);return u.delete(n),!!u.size||a.delete(e)}})},function(t,e,n){var r=n(272),i=n(12),s=n(57),o=r.has,a=r.get,u=r.key,c=function(t,e,n){var r=o(t,e,n);if(r)return a(t,e,n);var i=s(e);return null!==i?c(t,i,n):void 0};r.exp({getMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(210),i=n(263),s=n(272),o=n(12),a=n(57),u=s.keys,c=s.key,f=function(t,e){var n=u(t,e),s=a(t);if(null===s)return n;var o=f(s,e);return o.length?n.length?i(new r(n.concat(o))):o:n};s.exp({getMetadataKeys:function(t){return f(o(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(272),i=n(12),s=r.get,o=r.key;r.exp({getOwnMetadata:function(t,e){return s(t,i(e),arguments.length<3?void 0:o(arguments[2]))}})},function(t,e,n){var r=n(272),i=n(12),s=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(t){return s(i(t),arguments.length<2?void 0:o(arguments[1]))}})},function(t,e,n){var r=n(272),i=n(12),s=n(57),o=r.has,a=r.key,u=function(t,e,n){var r=o(t,e,n);if(r)return!0;var i=s(e);return null!==i?u(t,i,n):!1};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(272),i=n(12),s=r.has,o=r.key;r.exp({hasOwnMetadata:function(t,e){return s(t,i(e),arguments.length<3?void 0:o(arguments[2]))}})},function(t,e,n){var r=n(272),i=n(12),s=n(21),o=r.key,a=r.set;r.exp({metadata:function(t,e){return function(n,r){a(t,e,(void 0!==r?i:s)(n),o(r))}}})},function(t,e,n){var r=n(4),i=n(9),s=n(76),o=n(282),a=r.navigator,u=!!a&&/MSIE .\./.test(a.userAgent),c=function(t){return u?function(e,n){return t(s(o,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),n)}:t};i(i.G+i.B+i.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){"use strict";var r=n(283),i=n(76),s=n(21);t.exports=function(){for(var t=s(this),e=arguments.length,n=Array(e),o=0,a=r._,u=!1;e>o;)(n[o]=arguments[o++])===a&&(u=!0);return function(){var r,s=this,o=arguments.length,c=0,f=0;if(!u&&!o)return i(t,n,s);if(r=n.slice(),u)for(;e>c;c++)r[c]===a&&(r[c]=arguments[f++]);for(;o>f;)r.push(arguments[f++]);return i(t,r,s)}}},function(t,e,n){t.exports=n(4)},function(t,e,n){var r=n(9),i=n(204);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(190),i=n(18),s=n(4),o=n(10),a=n(128),u=n(25),c=u("iterator"),f=u("toStringTag"),h=a.Array,l=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;5>d;d++){var p,g=l[d],y=s[g],v=y&&y.prototype;if(v){v[c]||o(v,c,h),v[f]||o(v,f,g),a[g]=h;for(p in r)v[p]||i(v,p,r[p],!0)}}},function(t,e,n){(function(e,n){!function(e){"use strict";function r(t,e,n,r){var i=Object.create((e||s).prototype),o=new p(r||[]);return i._invoke=h(t,n,o),i}function i(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}function s(){}function o(){}function a(){}function u(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function c(t){this.arg=t}function f(t){function e(e,n){var r=t[e](n),i=r.value;return i instanceof c?Promise.resolve(i.arg).then(s,o):Promise.resolve(i).then(function(t){return r.value=t,r})}function r(t,n){function r(){return e(t,n)}return i=i?i.then(r,r):new Promise(function(t){t(r())})}"object"==typeof n&&n.domain&&(e=n.domain.bind(e));var i,s=e.bind(t,"next"),o=e.bind(t,"throw");e.bind(t,"return");this._invoke=r}function h(t,e,n){var r=E;return function(s,o){if(r===_)throw new Error("Generator is already running");if(r===A){if("throw"===s)throw o;return y()}for(;;){var a=n.delegate;if(a){if("return"===s||"throw"===s&&a.iterator[s]===v){n.delegate=null;var u=a.iterator.return;if(u){var c=i(u,a.iterator,o);if("throw"===c.type){s="throw",o=c.arg;continue}}if("return"===s)continue}var c=i(a.iterator[s],a.iterator,o);if("throw"===c.type){n.delegate=null,s="throw",o=c.arg;continue}s="next",o=v;var f=c.arg;if(!f.done)return r=x,f;n[a.resultName]=f.value,n.next=a.nextLoc,n.delegate=null}if("next"===s)n._sent=o,r===x?n.sent=o:n.sent=v;else if("throw"===s){if(r===E)throw r=A,o;n.dispatchException(o)&&(s="next",o=v)}else"return"===s&&n.abrupt("return",o);r=_;var c=i(t,e,n);if("normal"===c.type){r=n.done?A:x;var f={value:c.arg,done:n.done};if(c.arg!==F)return f;n.delegate&&"next"===s&&(o=v)}else"throw"===c.type&&(r=A,s="throw",o=c.arg)}}}function l(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 d(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function g(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,r=function i(){for(;++n=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var o=m.call(i,"catchLoc"),a=m.call(i,"finallyLoc");if(o&&a){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),d(n),F}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;d(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:g(t),resultName:e,nextLoc:n},F}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}(),n(287))},function(t,e){function n(){c=!1,o.length?u=o.concat(u):f=-1,u.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=u.length;e;){for(o=u,u=[];++f1)for(var n=1;n=u){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];c.info.apply(c,Array.from(e))}},t.warn=function(){if(f>=a){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];c.warn.apply(c,Array.from(e))}},t.error=function(){if(f>=o){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];c.error.apply(c,Array.from(e))}},r(t,null,[{key:"NONE",get:function(){return s}},{key:"ERROR",get:function(){return o}},{key:"WARN",get:function(){return a}},{key:"INFO",get:function(){return u}},{key:"level",get:function(){return f},set:function(t){if(!(t>=s&&u>=t))throw new Error("Invalid log level");f=t}},{key:"logger",get:function(){return c},set:function(t){if(!(t.info&&t.warn&&t.error))throw new Error("Invalid logger");c=t}}]),t}();e.default=h,h.reset(),t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1)return o.default.error("No kid found in id_token"),Promise.reject(new Error("No kid found in id_token"));i=a[0].kid}var u=a.filter(function(t){return t.kid===i})[0];if(!u)return o.default.error("No key matching kid found in signing keys"),Promise.reject(new Error("No key matching kid found in signing keys"));var c=t.client_id,f=n._settings.clockSkew;return o.default.info("Validaing JWT; using clock skew (in seconds) of: ",f),n._joseUtil.validateJwt(e.id_token,u,s,c,f).then(function(){return o.default.info("JWT validation successful"),e.profile=r.payload,e})})})},t.prototype._validateAccessToken=function(t){if(o.default.info("ResponseValidator._validateAccessToken"),!t.profile)return o.default.error("No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!t.profile.at_hash)return o.default.error("No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!t.id_token)return o.default.error("No id_token"),Promise.reject(new Error("No id_token"));var e=this._joseUtil.parseJwt(t.id_token);if(!e||!e.header)return o.default.error("Failed to parse id_token",e),Promise.reject(new Error("Failed to parse id_token"));var n=e.header.alg;if(!n||5!==n.length)return o.default.error("Unsupported alg:",n),Promise.reject(new Error("Unsupported alg: "+n));var r=n.substr(2,3);if(!r)return o.default.error("Unsupported alg:",n,r),Promise.reject(new Error("Unsupported alg: "+n));if(r=parseInt(r),256!==r&&384!==r&&512!==r)return o.default.error("Unsupported alg:",n,r),Promise.reject(new Error("Unsupported alg: "+n));var i="sha"+r,s=this._joseUtil.hashString(t.access_token,i);if(!s)return o.default.error("access_token hash failed:",i),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?(o.default.error("Failed to validate at_hash",u,t.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):Promise.resolve(t)},t}();e.default=y,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=n(299),u=r(a),c=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?u.default:arguments[1];if(i(this,t),!e)throw o.default.error("No settings passed to MetadataService"),new Error("settings");this._settings=e,this._jsonService=new n}return t.prototype.getMetadata=function(){var t=this;return o.default.info("MetadataService.getMetadata"),this._settings.metadata?(o.default.info("Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this._settings.metadataUrl?(o.default.info("getting metadata from",this._settings.metadataUrl),this._jsonService.getJson(this._settings.metadataUrl).then(function(e){return o.default.info("json received"),t._settings.metadata=e,e})):(o.default.error("No metadataUrl configured on settings"),Promise.reject(new Error("No metadataUrl configured on settings")))},t.prototype.getIssuer=function(){return o.default.info("MetadataService.getIssuer"),this._getMetadataProperty("issuer")},t.prototype.getAuthorizationEndpoint=function(){return o.default.info("MetadataService.getAuthorizationEndpoint"),this._getMetadataProperty("authorization_endpoint")},t.prototype.getUserInfoEndpoint=function(){return o.default.info("MetadataService.getUserInfoEndpoint"),this._getMetadataProperty("userinfo_endpoint")},t.prototype.getCheckSessionIframe=function(){return o.default.info("MetadataService.getCheckSessionIframe"),this._getMetadataProperty("check_session_iframe",!0)},t.prototype.getEndSessionEndpoint=function(){return o.default.info("MetadataService.getEndSessionEndpoint"),this._getMetadataProperty("end_session_endpoint",!0)},t.prototype.getRevocationEndpoint=function(){return o.default.info("MetadataService.getRevocationEndpoint"),this._getMetadataProperty("revocation_endpoint",!0)},t.prototype._getMetadataProperty=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];return o.default.info("MetadataService._getMetadataProperty",t),this.getMetadata().then(function(n){if(o.default.info("metadata recieved"),void 0===n[t]){if(e===!0)return void o.default.warn("Metadata does not contain optional property "+t);throw o.default.error("Metadata does not contain property "+t),new Error("Metadata does not contain property "+t)}return n[t]})},t.prototype.getSigningKeys=function(){var t=this;return o.default.info("MetadataService.getSigningKeys"),this._settings.signingKeys?(o.default.info("Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then(function(e){return o.default.info("jwks_uri received",e),t._jsonService.getJson(e).then(function(e){if(o.default.info("key set received",e),!e.keys)throw o.default.error("Missing keys on keyset"),new Error("Missing keys on keyset");var n=t._filterSigningKeys(e.keys);return o.default.info("filtered keys",n),t._settings.signingKeys=n,t._settings.signingKeys})})},t.prototype._filterSigningKeys=function(t){return o.default.info("MetadataService._filterSigningKeys",t),t.filter(function(t){return"sig"===t.use})},t}();e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=n(296),u=r(a),c=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?u.default.XMLHttpRequest:arguments[0];i(this,t),this._XMLHttpRequest=e}return t.prototype.getJson=function(t,e){var n=this;if(o.default.info("JsonService.getJson",t),!t)throw o.default.error("No url passed"),new Error("url");return new Promise(function(r,i){var s=new n._XMLHttpRequest;s.open("GET",t),s.onload=function(){o.default.info("HTTP response received, status",s.status),200===s.status?r(JSON.parse(s.responseText)):i(Error(s.statusText+" ("+s.status+")"))},s.onerror=function(){o.default.error("network error"),i(Error("Network Error"))},e&&(o.default.info("token passed, setting Authorization header"),s.setRequestHeader("Authorization","Bearer "+e)),s.send()})},t}();e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(299),o=r(s),a=n(298),u=r(a),c=n(292),f=r(c),h=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?o.default:arguments[1],r=arguments.length<=2||void 0===arguments[2]?u.default:arguments[2];if(i(this,t),!e)throw f.default.error("No settings passed to UserInfoService"),new Error("settings");this._settings=e,this._jsonService=new n,this._metadataService=new r(this._settings)}return t.prototype.getClaims=function(t){var e=this;return f.default.info("UserInfoService.getClaims"),t?this._metadataService.getUserInfoEndpoint().then(function(n){return f.default.info("received userinfo url",n),e._jsonService.getJson(n,t).then(function(t){return f.default.info("claims received",t),t})}):(f.default.error("No token passed"),Promise.reject(new Error("A token is required")))},t}();e.default=h,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(292),u=r(a),c=function(t){function e(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.error,o=n.error_description,a=n.error_uri,c=n.state;if(i(this,e),!r)throw u.default.error("No error passed to ErrorResponse"),new Error("error");var f=s(this,t.call(this,o||r));return f.name="ErrorResponse",f.error=r,f.error_description=o,f.error_uri=a,f.state=c,f}return o(e,t),e}(Error);e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(303),o=n(292),a=r(o),u=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],c=function(){function t(){i(this,t)}return t.parseJwt=function(t){a.default.info("JoseUtil.parseJwt");try{var e=s.jws.JWS.parse(t);return{header:e.headerObj,payload:e.payloadObj}}catch(n){a.default.error(n)}},t.validateJwt=function(e,n,r,i,o,u){a.default.info("JoseUtil.validateJwt");try{if("RSA"===n.kty)if(n.e&&n.n)n=s.KEYUTIL.getKey(n);else{if(!n.x5c||!n.x5c.length)return a.default.error("RSA key missing key material",n),Promise.reject(new Error("RSA key missing key material"));n=s.KEYUTIL.getKey(s.X509.getPublicKeyFromCertPEM(n.x5c[0]))}else{if("EC"!==n.kty)return a.default.error("Unsupported key type",n&&n.kty),Promise.reject(new Error("Unsupported key type: "+n&&n.kty));if(!(n.crv&&n.x&&n.y))return a.default.error("EC key missing key material",n),Promise.reject(new Error("EC key missing key material"));n=s.KEYUTIL.getKey(n)}return t._validateJwt(e,n,r,i,o,u)}catch(c){return a.default.error(c&&c.message||c),Promise.reject("JWT validation failed")}},t._validateJwt=function(e,n,r,i,o,c){a.default.info("JoseUtil._validateJwt"),o||(o=0),c||(c=parseInt(Date.now()/1e3));var f=t.parseJwt(e).payload;if(f.iss!==r)return a.default.error("Invalid issuer in token",f.iss),Promise.reject(new Error("Invalid issuer in token: "+f.iss));if(f.aud!==i)return a.default.error("Invalid audience in token",f.aud),Promise.reject(new Error("Invalid audience in token: "+f.aud));var h=c+o,l=c-o;if(h>6)+nr.charAt(63&n);if(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=nr.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=nr.charAt(n>>2)+nr.charAt((3&n)<<4)),rr)for(;(3&r.length)>0;)r+=rr;return r}function r(t){var e,n,r,i="",s=0;for(e=0;er||(0==s?(i+=f(r>>2),n=3&r,s=1):1==s?(i+=f(n<<2|r>>4),n=15&r,s=2):2==s?(i+=f(n),i+=f(r>>2),n=3&r,s=3):(i+=f(n<<2|r>>4),i+=f(15&r),s=0));return 1==s&&(i+=f(n<<2)),i}function i(t){var e,n=r(t),i=new Array;for(e=0;2*e=0;){var o=e*this[t++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i}function u(t,e,n,r,i,s){for(var o=32767&e,a=e>>15;--s>=0;){var u=32767&this[t],c=this[t++]>>15,f=a*u+c*o;u=o*u+((32767&f)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(f>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i}function c(t,e,n,r,i,s){for(var o=16383&e,a=e>>14;--s>=0;){var u=16383&this[t],c=this[t++]>>14,f=a*u+c*o;u=o*u+((16383&f)<<14)+n[r]+i,i=(u>>28)+(f>>14)+a*c,n[r++]=268435455&u}return i}function f(t){return cr.charAt(t)}function h(t,e){var n=fr[t.charCodeAt(e)];return null==n?-1:n}function l(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function d(t){this.t=1,this.s=0>t?-1:0,t>0?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0}function p(t){var e=o();return e.fromInt(t),e}function g(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,o=0;--r>=0;){var a=8==n?255&t[r]:h(t,r);0>a?"-"==t.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-o):this[this.t-1]|=a<=this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t}function v(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 n,r=(1<0)for(a>a)>0&&(i=!0,s=f(n));o>=0;)e>a?(n=(this[o]&(1<>(a+=this.DB-e)):(n=this[o]>>(a-=e)&r,0>=a&&(a+=this.DB,--o)),n>0&&(i=!0),i&&(s+=f(n));return i?s:"0"}function m(){var t=o();return s.ZERO.subTo(this,t),t}function S(){return this.s<0?this.negate():this}function b(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(e=n-t.t,0!=e)return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0}function w(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function E(){return this.t<=0?0:this.DB*(this.t-1)+w(this[this.t-1]^this.s&this.DM)}function x(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function _(t,e){for(var n=t;n=0;--n)e[n+o+1]=this[n]>>i|a,a=(this[n]&s)<=0;--n)e[n]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()}function F(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)return void(e.t=0);var r=t%this.DB,i=this.DB-r,s=(1<>r;for(var o=n+1;o>r;r>0&&(e[this.t-n-1]|=(this.s&s)<n;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=t.s}e.s=0>r?-1:0,-1>r?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function O(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[n]=0;for(n=0;n=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()}function I(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(f,a),i.lShiftTo(f,n)):(r.copyTo(a),i.copyTo(n));var h=a.t,l=a[h-1];if(0!=l){var d=l*(1<1?a[h-2]>>this.F2:0),p=this.FV/d,g=(1<=0&&(n[n.t++]=1,n.subTo(S,n)),s.ONE.dlShiftTo(h,S),S.subTo(a,a);a.t=0;){var b=n[--v]==l?this.DM:Math.floor(n[v]*p+(n[v-1]+y)*g);if((n[v]+=a.am(0,b,n,m,0,h))0&&n.rShiftTo(f,n),0>u&&s.ZERO.subTo(n,n)}}}function T(t){var e=o();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(s.ZERO)>0&&t.subTo(e,e),e}function j(t){this.m=t}function R(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function D(t){return t}function H(t){t.divRemTo(this.m,null,t)}function k(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function N(t,e){t.squareTo(e),this.reduce(e)}function B(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function M(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}function L(t){var e=o();return t.copyTo(e),this.reduce(e),e}function K(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function U(t,e){t.squareTo(e),this.reduce(e)}function q(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function W(){return 0==(this.t>0?1&this[0]:this.s)}function J(t,e){if(t>4294967295||1>t)return s.ONE;var n=o(),r=o(),i=e.convert(this),a=w(t)-1;for(i.copyTo(n);--a>=0;)if(e.sqrTo(n,r),(t&1<0)e.mulTo(r,i,n);else{var u=n;n=r,r=u}return e.revert(n)}function z(t,e){var n;return n=256>t||e.isEven()?new j(e):new M(e),this.exp(t,n)}/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function Y(){var t=o();return this.copyTo(t),t}function G(){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)<>24}function $(){return 0==this.t?this.s:this[0]<<16>>16}function Z(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function Q(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function tt(t){if(null==t&&(t=10),0==this.signum()||2>t||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=p(n),i=o(),s=o(),a="";for(this.divRemTo(r,i,s);i.signum()>0;)a=(n+s.intValue()).toString(t).substr(1)+a,i.divRemTo(r,i,s);return s.intValue().toString(t)+a}function et(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),r=Math.pow(e,n),i=!1,o=0,a=0,u=0;uc?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(a=e*a+c,++o>=n&&(this.dMultiply(r),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(a,0)),i&&s.ZERO.subTo(this,this)}function nt(t,e,n){if("number"==typeof e)if(2>t)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(s.ONE.shiftLeft(t-1),ft,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(s.ONE.shiftLeft(t-1),this);else{var r=new Array,i=7&t;r.length=(t>>3)+1,e.nextBytes(r),i>0?r[0]&=(1<0)for(r>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<=0;)8>r?(n=(this[t]&(1<>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,0>=r&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e}function it(t){return 0==this.compareTo(t)}function st(t){return this.compareTo(t)<0?this:t}function ot(t){return this.compareTo(t)>0?this:t}function at(t,e,n){var r,i,s=Math.min(t.t,this.t);for(r=0;s>r;++r)n[r]=e(this[r],t[r]);if(t.tt?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function mt(t){var e=o();return 0>t?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function St(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 bt(){for(var t=0;t=this.t?0!=this.s:0!=(this[e]&1<n;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=t.s}e.s=0>r?-1:0,r>0?e[n++]=r:-1>r&&(e[n++]=this.DV+r),e.t=n,e.clamp()}function Ct(t){var e=o();return this.addTo(t,e),e}function It(t){var e=o();return this.subTo(t,e),e}function Tt(t){var e=o();return this.multiplyTo(t,e),e}function jt(){var t=o();return this.squareTo(t),t}function Rt(t){var e=o();return this.divRemTo(t,e,null),e}function Dt(t){var e=o();return this.divRemTo(t,null,e),e}function Ht(t){var e=o(),n=o();return this.divRemTo(t,e,n),new Array(e,n)}function kt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Nt(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]}}function Bt(){}function Mt(t){return t}function Vt(t,e,n){t.multiplyTo(e,n)}function Lt(t,e){t.squareTo(e)}function Kt(t){return this.exp(t,new Bt)}function Ut(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;var i;for(i=n.t-this.t;i>r;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);i>r;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()}function qt(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=o();return t.copyTo(e),this.reduce(e),e}function zt(t){return t}function Yt(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)}function Gt(t,e){t.squareTo(e),this.reduce(e)}function Xt(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function $t(t,e){var n,r,i=t.bitLength(),s=p(1);if(0>=i)return s;n=18>i?1:48>i?3:144>i?4:768>i?5:6,r=8>i?new j(e):e.isEven()?new Wt(e):new M(e);var a=new Array,u=3,c=n-1,f=(1<1){var h=o();for(r.sqrTo(a[1],h);f>=u;)a[u]=o(),r.mulTo(h,a[u-2],a[u]),u+=2}var l,d,g=t.t-1,y=!0,v=o();for(i=w(t[g])-1;g>=0;){for(i>=c?l=t[g]>>i-c&f:(l=(t[g]&(1<0&&(l|=t[g-1]>>this.DB+i-c)),u=n;0==(1&l);)l>>=1,--u;if((i-=u)<0&&(i+=this.DB,--g),y)a[l].copyTo(s),y=!1;else{for(;u>1;)r.sqrTo(s,v),r.sqrTo(v,s),u-=2;u>0?r.sqrTo(s,v):(d=s,s=v,v=d),r.mulTo(v,a[l],s)}for(;g>=0&&0==(t[g]&1<s)return e;for(s>i&&(s=i),s>0&&(e.rShiftTo(s,e),n.rShiftTo(s,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n}function Qt(t){if(0>=t)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n}function te(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return s.ZERO;for(var n=t.clone(),r=this.clone(),i=p(1),o=p(0),a=p(0),u=p(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),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(;r.isEven();)r.rShiftTo(1,r),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(r)>=0?(n.subTo(r,n),e&&i.subTo(a,i),o.subTo(u,o)):(r.subTo(n,r),e&&a.subTo(i,a),u.subTo(o,u))}return 0!=r.compareTo(s.ONE)?s.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u}function ee(t){var e,n=this.abs();if(1==n.t&&n[0]<=hr[hr.length-1]){for(e=0;er;)r*=hr[i++];for(r=n.modInt(r);i>e;)if(r%hr[e++]==0)return!1}return n.millerRabin(t)}function ne(t){var e=this.subtract(s.ONE),n=e.getLowestSetBit();if(0>=n)return!1;var r=e.shiftRight(n);t=t+1>>1,t>hr.length&&(t=hr.length);for(var i=o(),a=0;t>a;++a){i.fromInt(hr[Math.floor(Math.random()*hr.length)]);var u=i.modPow(r,this);if(0!=u.compareTo(s.ONE)&&0!=u.compareTo(e)){for(var c=1;c++e;++e)this.S[e]=e;for(n=0,e=0;256>e;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0}function se(){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]}function oe(){return new re}function ae(t){pr[gr++]^=255&t,pr[gr++]^=t>>8&255,pr[gr++]^=t>>16&255,pr[gr++]^=t>>24&255,gr>=yr&&(gr-=yr)}function ue(){ae((new Date).getTime())}function ce(){if(null==dr){for(ue(),dr=oe(),dr.init(pr),gr=0;gr=0&&e>0;){var i=t.charCodeAt(r--);128>i?n[--e]=i:i>127&&2048>i?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var o=new he,a=new Array;e>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new s(n)}function pe(t,e,n){for(var r="",i=0;r.length>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function ge(t,e,n){if(t.length+2*br+2>e)throw"Message too long for RSA";var r,i="";for(r=0;r0&&e.length>0?(this.n=le(t,16),this.e=parseInt(e,16)):alert("Invalid RSA public key")}function me(t){return t.modPowInt(this.e,this.n)}function Se(t){var e=de(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r}function be(t,e){var n=ge(t,this.n.bitLength()+7>>3,e);if(null==n)return null;var r=this.doPublic(n);if(null==r)return null;var i=r.toString(16);return 0==(1&i.length)?i:"0"+i}/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function we(t,e){for(var n=t.toByteArray(),r=0;r=n.length)return null;for(var i="";++rs?i+=String.fromCharCode(s):s>191&&224>s?(i+=String.fromCharCode((31&s)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&s)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}function Ee(t,e,n){for(var r="",i=0;r.length>24,(16711680&i)>>16,(65280&i)>>8,255&i])),i+=1;return r}function xe(t,e,n){t=t.toByteArray();var r;for(r=0;r0&&e.length>0?(this.n=le(t,16),this.e=parseInt(e,16),this.d=le(n,16)):alert("Invalid RSA private key")}function Ae(t,e,n,r,i,s,o,a){if(this.isPrivate=!0,null==t)throw"RSASetPrivateEx N == null";if(null==e)throw"RSASetPrivateEx E == null";if(0==t.length)throw"RSASetPrivateEx N.length == 0";if(0==e.length)throw"RSASetPrivateEx E.length == 0";null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=le(t,16),this.e=parseInt(e,16),this.d=le(n,16),this.p=le(r,16),this.q=le(i,16),this.dmp1=le(s,16),this.dmq1=le(o,16),this.coeff=le(a,16)):alert("Invalid RSA private key in RSASetPrivateEx")}function Fe(t,e){var n=new he,r=t>>1;this.e=parseInt(e,16);for(var i=new s(e,16);;){for(;this.p=new s(t-r,1,n),0!=this.p.subtract(s.ONE).gcd(i).compareTo(s.ONE)||!this.p.isProbablePrime(10););for(;this.q=new s(r,1,n),0!=this.q.subtract(s.ONE).gcd(i).compareTo(s.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(s.ONE),u=this.q.subtract(s.ONE),c=a.multiply(u);if(0==c.gcd(i).compareTo(s.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}}function Pe(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)}function Oe(t){var e=le(t,16),n=this.doPrivate(e);return null==n?null:we(n,this.n.bitLength()+7>>3)}function Ce(t,e){var n=le(t,16),r=this.doPrivate(n);return null==r?null:xe(r,this.n.bitLength()+7>>3,e)}/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function Ie(t,e){this.x=e,this.q=t}function Te(t){return t==this?!0:this.q.equals(t.q)&&this.x.equals(t.x)}function je(){return this.x}function Re(){return new Ie(this.q,this.x.negate().mod(this.q))}function De(t){return new Ie(this.q,this.x.add(t.toBigInteger()).mod(this.q))}function He(t){return new Ie(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}function ke(t){return new Ie(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}function Ne(){return new Ie(this.q,this.x.square().mod(this.q))}function Be(t){return new Ie(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}function Me(t,e,n,r){this.curve=t,this.x=e,this.y=n,null==r?this.z=s.ONE:this.z=r,this.zinv=null}function Ve(){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))}function Le(){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))}function Ke(t){if(t==this)return!0;if(this.isInfinity())return t.isInfinity();if(t.isInfinity())return this.isInfinity();var e,n;return e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),e.equals(s.ZERO)?(n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q),n.equals(s.ZERO)):!1}function Ue(){return null==this.x&&null==this.y?!0:this.z.equals(s.ZERO)&&!this.y.toBigInteger().equals(s.ZERO)}function qe(){return new Me(this.curve,this.x,this.y.negate(),this.z)}function We(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),n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(s.ZERO.equals(n))return s.ZERO.equals(e)?this.twice():this.curve.getInfinity();var r=new s("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),a=(t.x.toBigInteger(),t.y.toBigInteger(),n.square()),u=a.multiply(n),c=i.multiply(a),f=e.square().multiply(this.z),h=f.subtract(c.shiftLeft(1)).multiply(t.z).subtract(u).multiply(n).mod(this.curve.q),l=c.multiply(r).multiply(e).subtract(o.multiply(u)).subtract(f.multiply(e)).multiply(t.z).add(e.multiply(u)).mod(this.curve.q),d=u.multiply(this.z).multiply(t.z).mod(this.curve.q);return new Me(this.curve,this.curve.fromBigInteger(h),this.curve.fromBigInteger(l),d)}function Je(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new s("3"),e=this.x.toBigInteger(),n=this.y.toBigInteger(),r=n.multiply(this.z),i=r.multiply(n).mod(this.curve.q),o=this.curve.a.toBigInteger(),a=e.square().multiply(t);s.ZERO.equals(o)||(a=a.add(this.z.square().multiply(o))),a=a.mod(this.curve.q);var u=a.square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),c=a.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.square().multiply(a)).mod(this.curve.q),f=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new Me(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(c),f)}function ze(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new s("3")),i=this.negate(),o=this;for(e=r.bitLength()-2;e>0;--e){o=o.twice();var a=r.testBit(e),u=n.testBit(e);a!=u&&(o=o.add(a?this:i))}return o}function Ye(t,e,n){var r;r=t.bitLength()>n.bitLength()?t.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),s=this.add(e);r>=0;)i=i.twice(),t.testBit(r)?i=n.testBit(r)?i.add(s):i.add(this):n.testBit(r)&&(i=i.add(e)),--r;return i}function Ge(t,e,n){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(n),this.infinity=new Me(this,null,null)}function Xe(){return this.q}function $e(){return this.a}function Ze(){return this.b}function Qe(t){return t==this?!0:this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}function tn(){return this.infinity}function en(t){return new Ie(this.q,t)}function nn(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,n=t.substr(2,e),r=t.substr(e+2,e);return new Me(this,this.fromBigInteger(new s(n,16)),this.fromBigInteger(new s(r,16)));default:return null}}function rn(t){for(var e=new Array,n=0;nr||r>255)throw"integer not in range 0-255";var i=("00"+r.toString(16)).slice(-2);return i}).join("");return e}catch(n){throw"malformed integer array string: "+n}}/*! rsapem-1.1.js (c) 2012 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
function On(t){var e=t;return e=e.replace("-----BEGIN RSA PRIVATE KEY-----",""),e=e.replace("-----END RSA PRIVATE KEY-----",""),e=e.replace(/[ \n]+/g,"")}function Cn(t){var e=new Array,n=Er.getStartPosOfV_AtObj(t,0),r=Er.getPosOfNextSibling_AtObj(t,n),i=Er.getPosOfNextSibling_AtObj(t,r),s=Er.getPosOfNextSibling_AtObj(t,i),o=Er.getPosOfNextSibling_AtObj(t,s),a=Er.getPosOfNextSibling_AtObj(t,o),u=Er.getPosOfNextSibling_AtObj(t,a),c=Er.getPosOfNextSibling_AtObj(t,u),f=Er.getPosOfNextSibling_AtObj(t,c);return e.push(n,r,i,s,o,a,u,c,f),e}function In(t){var e=Cn(t),n=Er.getHexOfV_AtObj(t,e[0]),r=Er.getHexOfV_AtObj(t,e[1]),i=Er.getHexOfV_AtObj(t,e[2]),s=Er.getHexOfV_AtObj(t,e[3]),o=Er.getHexOfV_AtObj(t,e[4]),a=Er.getHexOfV_AtObj(t,e[5]),u=Er.getHexOfV_AtObj(t,e[6]),c=Er.getHexOfV_AtObj(t,e[7]),f=Er.getHexOfV_AtObj(t,e[8]),h=new Array;return h.push(n,r,i,s,o,a,u,c,f),h}function Tn(t){var e=In(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function jn(t){var e=On(t),n=r(e),i=In(n);this.setPrivateEx(i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8])}function Rn(t,e){for(var n="",r=e/4-t.length,i=0;r>i;i++)n+="0";return n+t}function Dn(t,e){var n=function(t){return xr.crypto.Util.hashString(t,e)},r=n(t);return this.signWithMessageHash(r,e)}function Hn(t,e){var n=xr.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),r=le(n,16),i=this.doPrivate(r),s=i.toString(16);return Rn(s,this.n.bitLength())}function kn(t){return Dn.call(this,t,"sha1")}function Nn(t){return Dn.call(this,t,"sha256")}function Bn(t,e,n){for(var r="",i=0;r.length>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function Mn(t,e,n){var r=function(t){return xr.crypto.Util.hashHex(t,e)},i=r(bn(t));return void 0===n&&(n=-1),this.signWithMessageHashPSS(i,e,n)}function Vn(t,e,n){var r,i=Sn(t),o=i.length,a=this.n.bitLength()-1,u=Math.ceil(a/8),c=function(t){return xr.crypto.Util.hashHex(t,e)};if(-1===n||void 0===n)n=o;else if(-2===n)n=u-o-2;else if(-2>n)throw"invalid salt length";if(o+n+2>u)throw"data too long";var f="";n>0&&(f=new Array(n),(new he).nextBytes(f),f=String.fromCharCode.apply(String,f));var h=Sn(c(bn("\x00\x00\x00\x00\x00\x00\x00\x00"+i+f))),l=[];for(r=0;u-n-o-2>r;r+=1)l[r]=0;var d=String.fromCharCode.apply(String,l)+""+f,p=Bn(h,d.length,c),g=[];for(r=0;r>8*u-a&255;for(g[0]&=~y,r=0;o>r;r++)g.push(h.charCodeAt(r));return g.push(188),Rn(this.doPrivate(new s(g)).toString(16),this.n.bitLength())}function Ln(t,e,n){var r=new ye;r.setPublic(e,n);var i=r.doPublic(t);return i}function Kn(t,e,n){var r=Ln(t,e,n),i=r.toString(16).replace(/^1f+00/,"");return i}function Un(t){for(var e in xr.crypto.Util.DIGESTINFOHEAD){var n=xr.crypto.Util.DIGESTINFOHEAD[e],r=n.length;if(t.substring(0,r)==n){var i=[e,t.substring(r)];return i}}return[]}function qn(t,e,n,r){var i=Kn(e,n,r),s=Un(i);if(0==s.length)return!1;var o=s[0],a=s[1],u=function(t){return xr.crypto.Util.hashString(t,o)},c=u(t);return a==c}function Wn(t,e){var n=le(t,16),r=qn(e,n,this.n.toString(16),this.e.toString(16));return r}function Jn(t,e){e=e.replace(Cr,""),e=e.replace(/[ \n]+/g,"");var n=le(e,16);if(n.bitLength()>this.n.bitLength())return 0;var r=this.doPublic(n),i=r.toString(16).replace(/^1f+00/,""),s=Un(i);if(0==s.length)return!1;var o=s[0],a=s[1],u=function(t){return xr.crypto.Util.hashString(t,o)},c=u(t);return a==c}function zn(t,e){e=e.replace(Cr,""),e=e.replace(/[ \n]+/g,"");var n=le(e,16);if(n.bitLength()>this.n.bitLength())return 0;var r=this.doPublic(n),i=r.toString(16).replace(/^1f+00/,""),s=Un(i);if(0==s.length)return!1;var o=(s[0],s[1]);return o==t}function Yn(t,e,n,r){var i=function(t){return xr.crypto.Util.hashHex(t,n)},s=i(bn(t));return void 0===r&&(r=-1),this.verifyWithMessageHashPSS(s,e,n,r)}function Gn(t,e,n,r){var i=new s(e,16);if(i.bitLength()>this.n.bitLength())return!1;var o,a=function(t){return xr.crypto.Util.hashHex(t,n)},u=Sn(t),c=u.length,f=this.n.bitLength()-1,h=Math.ceil(f/8);if(-1===r||void 0===r)r=c;else if(-2===r)r=h-c-2;else if(-2>r)throw"invalid salt length";if(c+r+2>h)throw"data too long";var l=this.doPublic(i).toByteArray();for(o=0;o>8*h-f&255;if(0!==(d.charCodeAt(0)&g))throw"bits beyond keysize not zero";var y=Bn(p,d.length,a),v=[];for(o=0;oo;o+=1)if(0!==v[o])throw"leftmost octets not zero";if(1!==v[m])throw"0x01 marker not found";return p===Sn(a(bn("\x00\x00\x00\x00\x00\x00\x00\x00"+u+String.fromCharCode.apply(String,v.slice(-r)))))}/*! x509-1.1.9.js (c) 2012-2016 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
function Xn(){this.subjectPublicKeyRSA=null,this.subjectPublicKeyRSA_hN=null,this.subjectPublicKeyRSA_hE=null,this.hex=null,this.getSerialNumberHex=function(){return Er.getDecendantHexVByNthList(this.hex,0,[0,1])},this.getSignatureAlgorithmField=function(){var t=Er.getDecendantHexVByNthList(this.hex,0,[0,2,0]),e=xr.asn1.ASN1Util.oidHexToInt(t),n=xr.asn1.x509.OID.oid2name(e);return n},this.getIssuerHex=function(){return Er.getDecendantHexTLVByNthList(this.hex,0,[0,3])},this.getIssuerString=function(){return Xn.hex2dn(Er.getDecendantHexTLVByNthList(this.hex,0,[0,3]))},this.getSubjectHex=function(){return Er.getDecendantHexTLVByNthList(this.hex,0,[0,5])},this.getSubjectString=function(){return Xn.hex2dn(Er.getDecendantHexTLVByNthList(this.hex,0,[0,5]))},this.getNotBefore=function(){var t=Er.getDecendantHexVByNthList(this.hex,0,[0,4,0]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.getNotAfter=function(){var t=Er.getDecendantHexVByNthList(this.hex,0,[0,4,1]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.readCertPEM=function(t){var e=Xn.pemToHex(t),n=Xn.getPublicKeyHexArrayFromCertHex(e),r=new ye;r.setPublic(n[0],n[1]),this.subjectPublicKeyRSA=r,this.subjectPublicKeyRSA_hN=n[0],this.subjectPublicKeyRSA_hE=n[1],this.hex=e},this.readCertPEMWithoutRSAInit=function(t){var e=Xn.pemToHex(t),n=Xn.getPublicKeyHexArrayFromCertHex(e);this.subjectPublicKeyRSA.setPublic(n[0],n[1]),this.subjectPublicKeyRSA_hN=n[0],this.subjectPublicKeyRSA_hE=n[1],this.hex=e},this.getInfo=function(){var 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";var e=Xn.getSubjectPublicKeyInfoPosFromCertHex(this.hex),n=Er.getHexOfTLV_AtObj(this.hex,e),r=Or.getKey(n,null,"pkcs8pub");r instanceof ye&&(t+=" key algorithm: RSA\n",t+=" n="+r.n.toString(16).substr(0,16)+"...\n",t+=" e="+r.e.toString(16)+"\n"),t+="X509v3 Extensions:\n";for(var i=Xn.getV3ExtInfoListOfCertHex(this.hex),s=0;s":">",'"':""","'":"'","/":"/","`":"`"},a=["toString","valueOf"],u={isArray:function(t){return e.toString.apply(t)===n},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t||e.toString.apply(t)===r},isNull:function(t){return null===t},isNumber:function(t){return"number"==typeof t&&isFinite(t)},isObject:function(e){return e&&("object"==typeof e||t.isFunction(e))||!1},isString:function(t){return"string"==typeof t},isUndefined:function(t){return"undefined"==typeof t},_IEEnumFix:Qn.env.ua.ie?function(n,r){var i,s,o;for(i=0;i"'\/`]/g,function(t){return o[t]})},extend:function(n,r,i){if(!r||!n)throw new Error("extend failed, please check that all dependencies are included.");var s,o=function(){};if(o.prototype=r.prototype,n.prototype=new o,n.prototype.constructor=n,n.superclass=r.prototype,r.prototype.constructor==e.constructor&&(r.prototype.constructor=r),i){for(s in i)t.hasOwnProperty(i,s)&&(n.prototype[s]=i[s]);t._IEEnumFix(n.prototype,i)}},augmentObject:function(e,n){if(!n||!e)throw new Error("Absorb failed, verify dependencies.");var r,i,s=arguments,o=s[2];if(o&&o!==!0)for(r=2;r ";if(!t.isObject(e))return e+"";if(e instanceof Date||"nodeType"in e&&"tagName"in e)return e;if(t.isFunction(e))return a;if(n=t.isNumber(n)?n:3,t.isArray(e)){for(s.push("["),r=0,i=e.length;i>r;r+=1)t.isObject(e[r])?s.push(n>0?t.dump(e[r],n-1):o):s.push(e[r]),s.push(u);s.length>1&&s.pop(),s.push("]")}else{s.push("{");for(r in e)t.hasOwnProperty(e,r)&&(s.push(r+c),t.isObject(e[r])?s.push(n>0?t.dump(e[r],n-1):o):s.push(e[r]),s.push(u));s.length>1&&s.pop(),s.push("}")}return s.join("")},substitute:function(e,n,r,s){for(var o,a,u,c,f,h,l,d,p,g=[],y=e.length,v="dump",m=" ",S="{",b="}";(o=e.lastIndexOf(S,y),!(0>o))&&(a=e.indexOf(b,o),!(o+1>a));)l=e.substring(o+1,a),c=l,h=null,u=c.indexOf(m),u>-1&&(h=c.substring(u+1),c=c.substring(0,u)),f=n[c],r&&(f=r(c,f,h)),t.isObject(f)?t.isArray(f)?f=t.dump(f,parseInt(h,10)):(h=h||"",d=h.indexOf(v),d>-1&&(h=h.substring(4)),p=f.toString(),f=p===i||d>-1?t.dump(f,parseInt(h,10)):p):t.isString(f)||t.isNumber(f)||(f="~-"+g.length+"-~",g[g.length]=l),e=e.substring(0,o)+f+e.substring(a+1),s===!1&&(y=o-1);for(o=g.length-1;o>=0;o-=1)e=e.replace(new RegExp("~-"+o+"-~"),"{"+g[o]+"}","g");return e},trim:function(t){try{return t.replace(/^\s+|\s+$/g,"")}catch(e){return t}},merge:function(){var e,n={},r=arguments,i=r.length;for(e=0;i>e;e+=1)t.augmentObject(n,r[e],!0);return n},later:function(e,n,r,i,o){e=e||0,n=n||{};var a,u,c=r,f=i;if(t.isString(r)&&(c=n[r]),!c)throw new TypeError("method undefined");return t.isUndefined(i)||t.isArray(f)||(f=[i]),a=function(){c.apply(n,f||s)},u=o?setInterval(a,e):setTimeout(a,e),{interval:o,cancel:function(){this.interval?clearInterval(u):clearTimeout(u)}}},isValue:function(e){return t.isObject(e)||t.isString(e)||t.isNumber(e)||t.isBoolean(e)}};t.hasOwnProperty=e.hasOwnProperty?function(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}:function(e,n){return!t.isUndefined(e[n])&&e.constructor.prototype[n]!==e[n]},u.augmentObject(t,u,!0),Qn.util.Lang=t,t.augment=t.augmentProto,Qn.augment=t.augmentProto,Qn.extend=t.extend}(),Qn.register("yahoo",Qn,{version:"2.9.0",build:"2800"});/*! 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 tr=tr||function(t,e){var n={},r=n.lib={},i=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=r.WordArray=i.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var s=0;i>s;s++){var o=n[s>>>2]>>>24-s%4*8&255;e[r+s>>>2]|=o<<24-(r+s)%4*8}else for(var s=0;i>s;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n=[],r=0;e>r;r+=4)n.push(4294967296*t.random()|0);return new s.init(n,e)}}),o=n.enc={},a=o.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;n>i;i++){var s=e[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(n,e/2)}},u=o.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;n>i;i++){var s=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(n,e)}},c=o.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=4*o,u=i/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*o,f=t.min(4*c,i);if(c){for(var h=0;c>h;h+=o)this._doProcessBlock(r,h);var l=r.splice(0,c);n.sigBytes-=f}return new s.init(l,f)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(r.Hasher=f.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}}),n.algo={});return n}(Math);!function(t){var e=tr,n=e.lib,r=n.Base,i=n.WordArray,e=e.x64={};e.Word=r.extend({init:function(t,e){this.high=t,this.low=e}}),e.WordArray=r.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:8*e.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;e>r;r++){var s=t[r];n.push(s.high),n.push(s.low)}return i.create(n,this.sigBytes)},clone:function(){for(var t=r.clone.call(this),e=t.words=this.words.slice(0),n=e.length,i=0;n>i;i++)e[i]=e[i].clone();return t}})}(),tr.lib.Cipher||function(t){var e=tr,n=e.lib,r=n.Base,i=n.WordArray,s=n.BufferedBlockAlgorithm,o=e.enc.Base64,a=e.algo.EvpKDF,u=n.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,n,r){return("string"==typeof n?p:d).encrypt(t,e,n,r)},decrypt:function(e,n,r){return("string"==typeof n?p:d).decrypt(t,e,n,r)}}}});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=e.mode={},f=function(e,n,r){var i=this._iv;i?this._iv=t:i=this._prevBlock;for(var s=0;r>s;s++)e[n+s]^=i[s]},h=(n.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}})).extend();h.Encryptor=h.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;f.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),h.Decryptor=h.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=t.slice(e,e+r);n.decryptBlock(t,e),f.call(this,t,e,r),this._prevBlock=i}}),c=c.CBC=h,h=(e.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,n=n-t.sigBytes%n,r=n<<24|n<<16|n<<8|n,s=[],o=0;n>o;o+=4)s.push(r);n=i.create(s,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:c,padding:h}),reset:function(){u.reset.call(this);var t=this.cfg,e=t.iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var l=n.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),c=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return t=t.salt,(t?i.create([1398893684,1701076831]).concat(t).concat(e):e).toString(o)},parse:function(t){t=o.parse(t);var e=t.words;if(1398893684==e[0]&&1701076831==e[1]){var n=i.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return l.create({ciphertext:t,salt:n})}},d=n.SerializableCipher=r.extend({cfg:r.extend({format:c}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r);return e=i.finalize(e),i=i.cfg,l.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),e=(e.kdf={}).OpenSSL={execute:function(t,e,n,r){return r||(r=i.random(8)),t=a.create({keySize:e+n}).compute(t,r),n=i.create(t.words.slice(e),4*n),t.sigBytes=4*e,l.create({key:t,iv:n,salt:r})}},p=n.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:e}),encrypt:function(t,e,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,t.keySize,t.ivSize),r.iv=n.iv,t=d.encrypt.call(this,t,e,n.key,r),t.mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.execute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,d.decrypt.call(this,t,e,n.key,r)}})}(),function(){for(var t=tr,e=t.lib.BlockCipher,n=t.algo,r=[],i=[],s=[],o=[],a=[],u=[],c=[],f=[],h=[],l=[],d=[],p=0;256>p;p++)d[p]=128>p?p<<1:p<<1^283;for(var g=0,y=0,p=0;256>p;p++){var v=y^y<<1^y<<2^y<<3^y<<4,v=v>>>8^255&v^99;r[g]=v,i[v]=g;var m=d[g],S=d[m],b=d[S],w=257*d[v]^16843008*v;s[g]=w<<24|w>>>8,o[g]=w<<16|w>>>16,a[g]=w<<8|w>>>24,u[g]=w,w=16843009*b^65537*S^257*m^16843008*g,c[v]=w<<24|w>>>8,f[v]=w<<16|w>>>16,h[v]=w<<8|w>>>24,l[v]=w,g?(g=m^d[d[d[b^m]]],y^=d[d[y]]):g=y=1}var E=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes/4,t=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],s=0;t>s;s++)if(n>s)i[s]=e[s];else{var o=i[s-1];s%n?n>6&&4==s%n&&(o=r[o>>>24]<<24|r[o>>>16&255]<<16|r[o>>>8&255]<<8|r[255&o]):(o=o<<8|o>>>24,o=r[o>>>24]<<24|r[o>>>16&255]<<16|r[o>>>8&255]<<8|r[255&o],o^=E[s/n|0]<<24),i[s]=i[s-n]^o}for(e=this._invKeySchedule=[],n=0;t>n;n++)s=t-n,o=n%4?i[s]:i[s-4],e[n]=4>n||4>=s?o:c[r[o>>>24]]^f[r[o>>>16&255]]^h[r[o>>>8&255]]^l[r[255&o]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,o,a,u,r)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,c,f,h,l,i),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,s,o,a){for(var u=this._nRounds,c=t[e]^n[0],f=t[e+1]^n[1],h=t[e+2]^n[2],l=t[e+3]^n[3],d=4,p=1;u>p;p++)var g=r[c>>>24]^i[f>>>16&255]^s[h>>>8&255]^o[255&l]^n[d++],y=r[f>>>24]^i[h>>>16&255]^s[l>>>8&255]^o[255&c]^n[d++],v=r[h>>>24]^i[l>>>16&255]^s[c>>>8&255]^o[255&f]^n[d++],l=r[l>>>24]^i[c>>>16&255]^s[f>>>8&255]^o[255&h]^n[d++],c=g,f=y,h=v;g=(a[c>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^n[d++],y=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&c])^n[d++],v=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[c>>>8&255]<<8|a[255&f])^n[d++],l=(a[l>>>24]<<24|a[c>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],t[e]=g,t[e+1]=y,t[e+2]=v,t[e+3]=l},keySize:8});t.AES=e._createHelper(n)}(),function(){function t(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<n;n++){var r=o[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(t=this._subKeys=[],r=0;16>r;r++){for(var i=t[r]=[],s=u[r],n=0;24>n;n++)i[n/6|0]|=e[(a[n]-1+s)%28]<<31-n%6,i[4+(n/6|0)]|=e[28+(a[n+24]-1+s)%28]<<31-n%6;for(i[0]=i[0]<<1|i[0]>>>31,n=1;7>n;n++)i[n]>>>=4*(n-1)+3;i[7]=i[7]<<5|i[7]>>>27}for(e=this._invSubKeys=[],n=0;16>n;n++)e[n]=t[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(n,r,i){this._lBlock=n[r],this._rBlock=n[r+1],t.call(this,4,252645135),t.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),t.call(this,1,1431655765);for(var s=0;16>s;s++){for(var o=i[s],a=this._lBlock,u=this._rBlock,h=0,l=0;8>l;l++)h|=c[l][((u^o[l])&f[l])>>>0];this._lBlock=u,this._rBlock=a^h}i=this._lBlock,this._lBlock=this._rBlock,this._rBlock=i,t.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),n[r]=this._lBlock,n[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});n.DES=r._createHelper(h),s=s.TripleDES=r.extend({_doReset:function(){var t=this._key.words;this._des1=h.createEncryptor(i.create(t.slice(0,2))),this._des2=h.createEncryptor(i.create(t.slice(2,4))),this._des3=h.createEncryptor(i.create(t.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2}),n.TripleDES=r._createHelper(s)}(),function(){var t=tr,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp(),t=[];for(var i=0;n>i;i+=3)for(var s=(e[i>>>2]>>>24-8*(i%4)&255)<<16|(e[i+1>>>2]>>>24-8*((i+1)%4)&255)<<8|e[i+2>>>2]>>>24-8*((i+2)%4)&255,o=0;4>o&&n>i+.75*o;o++)t.push(r.charAt(s>>>6*(3-o)&63));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var n=t.length,r=this._map,i=r.charAt(64);i&&(i=t.indexOf(i),-1!=i&&(n=i));for(var i=[],s=0,o=0;n>o;o++)if(o%4){var a=r.indexOf(t.charAt(o-1))<<2*(o%4),u=r.indexOf(t.charAt(o))>>>6-2*(o%4);i[s>>>2]|=(a|u)<<24-8*(s%4),s++}return e.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){function e(t,e,n,r,i,s,o){return t=t+(e&n|~e&r)+i+o,(t<>>32-s)+e}function n(t,e,n,r,i,s,o){return t=t+(e&r|n&~r)+i+o,(t<>>32-s)+e}function r(t,e,n,r,i,s,o){return t=t+(e^n^r)+i+o,(t<>>32-s)+e}function i(t,e,n,r,i,s,o){return t=t+(n^(e|~r))+i+o,(t<>>32-s)+e}for(var s=tr,o=s.lib,a=o.WordArray,u=o.Hasher,o=s.algo,c=[],f=0;64>f;f++)c[f]=4294967296*t.abs(t.sin(f+1))|0;o=o.MD5=u.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,s){for(var o=0;16>o;o++){var a=s+o,u=t[a];t[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var o=this._hash.words,a=t[s+0],u=t[s+1],f=t[s+2],h=t[s+3],l=t[s+4],d=t[s+5],p=t[s+6],g=t[s+7],y=t[s+8],v=t[s+9],m=t[s+10],S=t[s+11],b=t[s+12],w=t[s+13],E=t[s+14],x=t[s+15],_=o[0],A=o[1],F=o[2],P=o[3],_=e(_,A,F,P,a,7,c[0]),P=e(P,_,A,F,u,12,c[1]),F=e(F,P,_,A,f,17,c[2]),A=e(A,F,P,_,h,22,c[3]),_=e(_,A,F,P,l,7,c[4]),P=e(P,_,A,F,d,12,c[5]),F=e(F,P,_,A,p,17,c[6]),A=e(A,F,P,_,g,22,c[7]),_=e(_,A,F,P,y,7,c[8]),P=e(P,_,A,F,v,12,c[9]),F=e(F,P,_,A,m,17,c[10]),A=e(A,F,P,_,S,22,c[11]),_=e(_,A,F,P,b,7,c[12]),P=e(P,_,A,F,w,12,c[13]),F=e(F,P,_,A,E,17,c[14]),A=e(A,F,P,_,x,22,c[15]),_=n(_,A,F,P,u,5,c[16]),P=n(P,_,A,F,p,9,c[17]),F=n(F,P,_,A,S,14,c[18]),A=n(A,F,P,_,a,20,c[19]),_=n(_,A,F,P,d,5,c[20]),P=n(P,_,A,F,m,9,c[21]),F=n(F,P,_,A,x,14,c[22]),A=n(A,F,P,_,l,20,c[23]),_=n(_,A,F,P,v,5,c[24]),P=n(P,_,A,F,E,9,c[25]),F=n(F,P,_,A,h,14,c[26]),A=n(A,F,P,_,y,20,c[27]),_=n(_,A,F,P,w,5,c[28]),P=n(P,_,A,F,f,9,c[29]),F=n(F,P,_,A,g,14,c[30]),A=n(A,F,P,_,b,20,c[31]),_=r(_,A,F,P,d,4,c[32]),P=r(P,_,A,F,y,11,c[33]),F=r(F,P,_,A,S,16,c[34]),A=r(A,F,P,_,E,23,c[35]),_=r(_,A,F,P,u,4,c[36]),P=r(P,_,A,F,l,11,c[37]),F=r(F,P,_,A,g,16,c[38]),A=r(A,F,P,_,m,23,c[39]),_=r(_,A,F,P,w,4,c[40]),P=r(P,_,A,F,a,11,c[41]),F=r(F,P,_,A,h,16,c[42]),A=r(A,F,P,_,p,23,c[43]),_=r(_,A,F,P,v,4,c[44]),P=r(P,_,A,F,b,11,c[45]),F=r(F,P,_,A,x,16,c[46]),A=r(A,F,P,_,f,23,c[47]),_=i(_,A,F,P,a,6,c[48]),P=i(P,_,A,F,g,10,c[49]),F=i(F,P,_,A,E,15,c[50]),A=i(A,F,P,_,d,21,c[51]),_=i(_,A,F,P,b,6,c[52]),P=i(P,_,A,F,h,10,c[53]),F=i(F,P,_,A,m,15,c[54]),A=i(A,F,P,_,u,21,c[55]),_=i(_,A,F,P,y,6,c[56]),P=i(P,_,A,F,x,10,c[57]),F=i(F,P,_,A,p,15,c[58]),A=i(A,F,P,_,w,21,c[59]),_=i(_,A,F,P,l,6,c[60]),P=i(P,_,A,F,S,10,c[61]),F=i(F,P,_,A,f,15,c[62]),A=i(A,F,P,_,v,21,c[63]);o[0]=o[0]+_|0,o[1]=o[1]+A|0,o[2]=o[2]+F|0,o[3]=o[3]+P|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var s=t.floor(r/4294967296);for(n[(i+64>>>9<<4)+15]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(n.length+1),this._process(),e=this._hash,n=e.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}}),s.MD5=u._createHelper(o),s.HmacMD5=u._createHmacHelper(o)}(Math),function(){var t=tr,e=t.lib,n=e.WordArray,r=e.Hasher,i=[],e=t.algo.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],s=n[1],o=n[2],a=n[3],u=n[4],c=0;80>c;c++){if(16>c)i[c]=0|t[e+c];else{var f=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=f<<1|f>>>31}f=(r<<5|r>>>27)+u+i[c],f=20>c?f+((s&o|~s&a)+1518500249):40>c?f+((s^o^a)+1859775393):60>c?f+((s&o|s&a|o&a)-1894007588):f+((s^o^a)-899497514),u=a,a=o,o=s<<30|s>>>2,s=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+s|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),e[(r+64>>>9<<4)+15]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(e),t.HmacSHA1=r._createHmacHelper(e)}(),function(t){for(var e=tr,n=e.lib,r=n.WordArray,i=n.Hasher,n=e.algo,s=[],o=[],a=function(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;h>=l;l++)if(!(f%l)){f=!1;break t}f=!0}f&&(8>c&&(s[c]=a(t.pow(u,.5))),o[c]=a(t.pow(u,1/3)),c++),u++}var d=[],n=n.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=n[5],f=n[6],h=n[7],l=0;64>l;l++){if(16>l)d[l]=0|t[e+l];else{var p=d[l-15],g=d[l-2];d[l]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[l-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+d[l-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&f)+o[l]+d[l],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&s^i&s),h=f,f=c,c=u,u=a+p|0,a=s,s=i,i=r,r=p+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(n),e.HmacSHA256=i._createHmacHelper(n)}(Math),function(){var t=tr,e=t.lib.WordArray,n=t.algo,r=n.SHA256,n=n.SHA224=r.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(n),t.HmacSHA224=r._createHmacHelper(n)}(),function(){function t(){return i.create.apply(i,arguments)}for(var e=tr,n=e.lib.Hasher,r=e.x64,i=r.Word,s=r.WordArray,r=e.algo,o=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],a=[],u=0;80>u;u++)a[u]=t();r=r.SHA512=n.extend({_doReset:function(){this._hash=new s.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],u=n[3],c=n[4],f=n[5],h=n[6],n=n[7],l=r.high,d=r.low,p=i.high,g=i.low,y=s.high,v=s.low,m=u.high,S=u.low,b=c.high,w=c.low,E=f.high,x=f.low,_=h.high,A=h.low,F=n.high,P=n.low,O=l,C=d,I=p,T=g,j=y,R=v,D=m,H=S,k=b,N=w,B=E,M=x,V=_,L=A,K=F,U=P,q=0;80>q;q++){var W=a[q];if(16>q)var J=W.high=0|t[e+2*q],z=W.low=0|t[e+2*q+1];else{var J=a[q-15],z=J.high,Y=J.low,J=(z>>>1|Y<<31)^(z>>>8|Y<<24)^z>>>7,Y=(Y>>>1|z<<31)^(Y>>>8|z<<24)^(Y>>>7|z<<25),G=a[q-2],z=G.high,X=G.low,G=(z>>>19|X<<13)^(z<<3|X>>>29)^z>>>6,X=(X>>>19|z<<13)^(X<<3|z>>>29)^(X>>>6|z<<26),z=a[q-7],$=z.high,Z=a[q-16],Q=Z.high,Z=Z.low,z=Y+z.low,J=J+$+(Y>>>0>z>>>0?1:0),z=z+X,J=J+G+(X>>>0>z>>>0?1:0),z=z+Z,J=J+Q+(Z>>>0>z>>>0?1:0);W.high=J,W.low=z}var $=k&B^~k&V,Z=N&M^~N&L,W=O&I^O&j^I&j,tt=C&T^C&R^T&R,Y=(O>>>28|C<<4)^(O<<30|C>>>2)^(O<<25|C>>>7),G=(C>>>28|O<<4)^(C<<30|O>>>2)^(C<<25|O>>>7),X=o[q],et=X.high,nt=X.low,X=U+((N>>>14|k<<18)^(N>>>18|k<<14)^(N<<23|k>>>9)),Q=K+((k>>>14|N<<18)^(k>>>18|N<<14)^(k<<23|N>>>9))+(U>>>0>X>>>0?1:0),X=X+Z,Q=Q+$+(Z>>>0>X>>>0?1:0),X=X+nt,Q=Q+et+(nt>>>0>X>>>0?1:0),X=X+z,Q=Q+J+(z>>>0>X>>>0?1:0),z=G+tt,W=Y+W+(G>>>0>z>>>0?1:0),K=V,U=L,V=B,L=M,B=k,M=N,N=H+X|0,k=D+Q+(H>>>0>N>>>0?1:0)|0,D=j,H=R,j=I,R=T,I=O,T=C,C=X+z|0,O=Q+W+(X>>>0>C>>>0?1:0)|0}d=r.low=d+C,r.high=l+O+(C>>>0>d>>>0?1:0),g=i.low=g+T,i.high=p+I+(T>>>0>g>>>0?1:0),v=s.low=v+R,s.high=y+j+(R>>>0>v>>>0?1:0),S=u.low=S+H,u.high=m+D+(H>>>0>S>>>0?1:0),w=c.low=w+N,c.high=b+k+(N>>>0>w>>>0?1:0),x=f.low=x+M,f.high=E+B+(M>>>0>x>>>0?1:0),A=h.low=A+L,h.high=_+V+(L>>>0>A>>>0?1:0),P=n.low=P+U,n.high=F+K+(U>>>0>P>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),e[(r+128>>>10<<5)+31]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=n._createHelper(r),e.HmacSHA512=n._createHmacHelper(r)}(),function(){var t=tr,e=t.x64,n=e.Word,r=e.WordArray,e=t.algo,i=e.SHA512,e=e.SHA384=i.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=i._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=i._createHelper(e),t.HmacSHA384=i._createHmacHelper(e)}(),function(){var t=tr,e=t.lib,n=e.WordArray,r=e.Hasher,e=t.algo,i=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),o=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),c=n.create([1352829926,1548603684,1836072691,2053994217,0]),e=e.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;16>n;n++){var r=e+n,f=t[r];
t[r]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var h,l,d,p,g,y,v,m,S,b,r=this._hash.words,f=u.words,w=c.words,E=i.words,x=s.words,_=o.words,A=a.words;y=h=r[0],v=l=r[1],m=d=r[2],S=p=r[3],b=g=r[4];for(var F,n=0;80>n;n+=1)F=h+t[e+E[n]]|0,F=16>n?F+((l^d^p)+f[0]):32>n?F+((l&d|~l&p)+f[1]):48>n?F+(((l|~d)^p)+f[2]):64>n?F+((l&p|d&~p)+f[3]):F+((l^(d|~p))+f[4]),F|=0,F=F<<_[n]|F>>>32-_[n],F=F+g|0,h=g,g=p,p=d<<10|d>>>22,d=l,l=F,F=y+t[e+x[n]]|0,F=16>n?F+((v^(m|~S))+w[0]):32>n?F+((v&S|m&~S)+w[1]):48>n?F+(((v|~m)^S)+w[2]):64>n?F+((v&m|~v&S)+w[3]):F+((v^m^S)+w[4]),F|=0,F=F<>>32-A[n],F=F+b|0,y=b,b=S,S=m<<10|m>>>22,m=v,v=F;F=r[1]+d+S|0,r[1]=r[2]+p+b|0,r[2]=r[3]+g+y|0,r[3]=r[4]+h+v|0,r[4]=r[0]+l+m|0,r[0]=F},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;for(e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process(),t=this._hash,e=t.words,n=0;5>n;n++)r=e[n],e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.RIPEMD160=r._createHelper(e),t.HmacRIPEMD160=r._createHmacHelper(e)}(Math),function(){var t=tr,e=t.enc.Utf8;t.algo.HMAC=t.lib.Base.extend({init:function(t,n){t=this._hasher=new t.init,"string"==typeof n&&(n=e.parse(n));var r=t.blockSize,i=4*r;n.sigBytes>i&&(n=t.finalize(n)),n.clamp();for(var s=this._oKey=n.clone(),o=this._iKey=n.clone(),a=s.words,u=o.words,c=0;r>c;c++)a[c]^=1549556828,u[c]^=909522486;s.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher;return t=e.finalize(t),e.reset(),e.finalize(this._oKey.clone().concat(t))}})}(),function(){var t=tr,e=t.lib,n=e.Base,r=e.WordArray,e=t.algo,i=e.HMAC,s=e.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:e.SHA1,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,s=i.create(n.hasher,t),o=r.create(),a=r.create([1]),u=o.words,c=a.words,f=n.keySize,n=n.iterations;u.lengthg;g++){p=s.finalize(p),s.reset();for(var y=p.words,v=0;d>v;v++)l[v]^=y[v]}o.concat(h),c[0]++}return o.sigBytes=4*f,o}});t.PBKDF2=function(t,e,n){return s.create(n).compute(t,e)}}();/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
var er,nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rr="=",ir=0xdeadbeefcafe,sr=15715070==(16777215&ir);sr&&"Microsoft Internet Explorer"==$n.appName?(s.prototype.am=u,er=30):sr&&"Netscape"!=$n.appName?(s.prototype.am=a,er=26):(s.prototype.am=c,er=28),s.prototype.DB=er,s.prototype.DM=(1<=ur;++ur)fr[ar++]=ur;for(ar="a".charCodeAt(0),ur=10;36>ur;++ur)fr[ar++]=ur;for(ar="A".charCodeAt(0),ur=10;36>ur;++ur)fr[ar++]=ur;j.prototype.convert=R,j.prototype.revert=D,j.prototype.reduce=H,j.prototype.mulTo=k,j.prototype.sqrTo=N,M.prototype.convert=V,M.prototype.revert=L,M.prototype.reduce=K,M.prototype.mulTo=q,M.prototype.sqrTo=U,s.prototype.copyTo=l,s.prototype.fromInt=d,s.prototype.fromString=g,s.prototype.clamp=y,s.prototype.dlShiftTo=x,s.prototype.drShiftTo=_,s.prototype.lShiftTo=A,s.prototype.rShiftTo=F,s.prototype.subTo=P,s.prototype.multiplyTo=O,s.prototype.squareTo=C,s.prototype.divRemTo=I,s.prototype.invDigit=B,s.prototype.isEven=W,s.prototype.exp=J,s.prototype.toString=v,s.prototype.negate=m,s.prototype.abs=S,s.prototype.compareTo=b,s.prototype.bitLength=E,s.prototype.mod=T,s.prototype.modPowInt=z,s.ZERO=p(0),s.ONE=p(1),Bt.prototype.convert=Mt,Bt.prototype.revert=Mt,Bt.prototype.mulTo=Vt,Bt.prototype.sqrTo=Lt,Wt.prototype.convert=Jt,Wt.prototype.revert=zt,Wt.prototype.reduce=Yt,Wt.prototype.mulTo=Xt,Wt.prototype.sqrTo=Gt;var hr=[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],lr=(1<<26)/hr[hr.length-1];s.prototype.chunkSize=Z,s.prototype.toRadix=tt,s.prototype.fromRadix=et,s.prototype.fromNumber=nt,s.prototype.bitwiseTo=at,s.prototype.changeBit=_t,s.prototype.addTo=Ot,s.prototype.dMultiply=kt,s.prototype.dAddOffset=Nt,s.prototype.multiplyLowerTo=Ut,s.prototype.multiplyUpperTo=qt,s.prototype.modInt=Qt,s.prototype.millerRabin=ne,s.prototype.clone=Y,s.prototype.intValue=G,s.prototype.byteValue=X,s.prototype.shortValue=$,s.prototype.signum=Q,s.prototype.toByteArray=rt,s.prototype.equals=it,s.prototype.min=st,s.prototype.max=ot,s.prototype.and=ct,s.prototype.or=ht,s.prototype.xor=dt,s.prototype.andNot=gt,s.prototype.not=yt,s.prototype.shiftLeft=vt,s.prototype.shiftRight=mt,s.prototype.getLowestSetBit=bt,s.prototype.bitCount=Et,s.prototype.testBit=xt,s.prototype.setBit=At,s.prototype.clearBit=Ft,s.prototype.flipBit=Pt,s.prototype.add=Ct,s.prototype.subtract=It,s.prototype.multiply=Tt,s.prototype.divide=Rt,s.prototype.remainder=Dt,s.prototype.divideAndRemainder=Ht,s.prototype.modPow=$t,s.prototype.modInverse=te,s.prototype.pow=Kt,s.prototype.gcd=Zt,s.prototype.isProbablePrime=ee,s.prototype.square=jt,re.prototype.init=ie,re.prototype.next=se;var dr,pr,gr,yr=256;if(null==pr){pr=new Array,gr=0;var vr;if(Zn.crypto&&Zn.crypto.getRandomValues){var mr=new Uint8Array(32);for(Zn.crypto.getRandomValues(mr),vr=0;32>vr;++vr)pr[gr++]=mr[vr]}if("Netscape"==$n.appName&&$n.appVersion<"5"&&Zn.crypto){var Sr=Zn.crypto.random(32);for(vr=0;vrgr;)vr=Math.floor(65536*Math.random()),pr[gr++]=vr>>>8,pr[gr++]=255&vr;gr=0,ue()}he.prototype.nextBytes=fe;var br=20;ye.prototype.doPublic=me,ye.prototype.setPublic=ve,ye.prototype.encrypt=Se,ye.prototype.encryptOAEP=be,ye.prototype.type="RSA";var br=20;ye.prototype.doPrivate=Pe,ye.prototype.setPrivate=_e,ye.prototype.setPrivateEx=Ae,ye.prototype.generate=Fe,ye.prototype.decrypt=Oe,ye.prototype.decryptOAEP=Ce,Ie.prototype.equals=Te,Ie.prototype.toBigInteger=je,Ie.prototype.negate=Re,Ie.prototype.add=De,Ie.prototype.subtract=He,Ie.prototype.multiply=ke,Ie.prototype.square=Ne,Ie.prototype.divide=Be,Me.prototype.getX=Ve,Me.prototype.getY=Le,Me.prototype.equals=Ke,Me.prototype.isInfinity=Ue,Me.prototype.negate=qe,Me.prototype.add=We,Me.prototype.twice=Je,Me.prototype.multiply=ze,Me.prototype.multiplyTwo=Ye,Ge.prototype.getQ=Xe,Ge.prototype.getA=$e,Ge.prototype.getB=Ze,Ge.prototype.equals=Qe,Ge.prototype.getInfinity=tn,Ge.prototype.fromBigInteger=en,Ge.prototype.decodePointHex=nn,/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib
*/
Ie.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},Me.prototype.getEncoded=function(t){var e=function(t,e){var n=t.toByteArrayUnsigned();if(en.length;)n.unshift(0);return n},n=this.getX().toBigInteger(),r=this.getY().toBigInteger(),i=e(n,32);return t?r.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(e(r,32))),i},Me.decodeFrom=function(t,e){var n=(e[0],e.length-1),r=e.slice(1,1+n/2),i=e.slice(1+n/2,1+n);r.unshift(0),i.unshift(0);var o=new s(r),a=new s(i);return new Me(t,t.fromBigInteger(o),t.fromBigInteger(a))},Me.decodeFromHex=function(t,e){var n=(e.substr(0,2),e.length-2),r=e.substr(2,n/2),i=e.substr(2+n/2,n/2),o=new s(r,16),a=new s(i,16);return new Me(t,t.fromBigInteger(o),t.fromBigInteger(a))},Me.prototype.add2D=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;if(this.x.equals(t.x))return this.y.equals(t.y)?this.twice():this.curve.getInfinity();var e=t.x.subtract(this.x),n=t.y.subtract(this.y),r=n.divide(e),i=r.square().subtract(this.x).subtract(t.x),s=r.multiply(this.x.subtract(i)).subtract(this.y);return new Me(this.curve,i,s)},Me.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(s.valueOf(2)),e=this.curve.fromBigInteger(s.valueOf(3)),n=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)),r=n.square().subtract(this.x.multiply(t)),i=n.multiply(this.x.subtract(r)).subtract(this.y);return new Me(this.curve,r,i)},Me.prototype.multiply2D=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new s("3")),i=this.negate(),o=this;for(e=r.bitLength()-2;e>0;--e){o=o.twice();var a=r.testBit(e),u=n.testBit(e);a!=u&&(o=o.add2D(a?this:i))}return o},Me.prototype.isOnCurve=function(){var t=this.getX().toBigInteger(),e=this.getY().toBigInteger(),n=this.curve.getA().toBigInteger(),r=this.curve.getB().toBigInteger(),i=this.curve.getQ(),s=e.multiply(e).mod(i),o=t.multiply(t).multiply(t).add(n.multiply(t)).add(r).mod(i);return s.equals(o)},Me.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},Me.prototype.validate=function(){var t=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var e=this.getX().toBigInteger(),n=this.getY().toBigInteger();if(e.compareTo(s.ONE)<0||e.compareTo(t.subtract(s.ONE))>0)throw new Error("x coordinate out of bounds");if(n.compareTo(s.ONE)<0||n.compareTo(t.subtract(s.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(t).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
*/
var wr=function(){function t(t,e,n){return e?o[e]:String.fromCharCode(parseInt(n,16))}var e="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",n='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',r='(?:"'+n+'*")',i=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+e+"|"+r+")","g"),s=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),o={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},a=new String(""),u="\\",c=({"{":Object,"[":Array},Object.hasOwnProperty);return function(e,n){var r,o=e.match(i),f=o[0],h=!1;"{"===f?r={}:"["===f?r=[]:(r=[],h=!0);for(var l,d=[r],p=1-h,g=o.length;g>p;++p){f=o[p];var y;switch(f.charCodeAt(0)){default:y=d[0],y[l||y.length]=+f,l=void 0;break;case 34:if(f=f.substring(1,f.length-1),-1!==f.indexOf(u)&&(f=f.replace(s,t)),y=d[0],!l){if(!(y instanceof Array)){l=f||a;break}l=y.length}y[l]=f,l=void 0;break;case 91:y=d[0],d.unshift(y[l||y.length]=[]),l=void 0;break;case 93:d.shift();break;case 102:y=d[0],y[l||y.length]=!1,l=void 0;break;case 110:y=d[0],y[l||y.length]=null,l=void 0;break;case 116:y=d[0],y[l||y.length]=!0,l=void 0;break;case 123:y=d[0],d.unshift(y[l||y.length]={}),l=void 0;break;case 125:d.shift()}}if(h){if(1!==d.length)throw new Error;r=r[0]}else if(d.length)throw new Error;if(n){var v=function(t,e){var r=t[e];if(r&&"object"==typeof r){var i=null;for(var s in r)if(c.call(r,s)&&r!==t){var o=v(r,s);void 0!==o?r[s]=o:(i||(i=[]),i.push(s))}if(i)for(var a=i.length;--a>=0;)delete r[i[a]]}return n.call(t,e,r)};r=v({"":r},"")}return r}}();/*! asn1-1.0.11.js (c) 2013-2016 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
"undefined"!=typeof xr&&xr||(xr={}),"undefined"!=typeof xr.asn1&&xr.asn1||(xr.asn1={}),xr.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),r=n.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",o=0;r>o;o++)i+="f";var a=new s(i,16),u=a.xor(t).add(s.ONE);e=u.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){var n=wn(t),r=n.replace(/(.{64})/g,"$1\r\n");return r=r.replace(/\r\n$/,""),"-----BEGIN "+e+"-----\r\n"+r+"\r\n-----END "+e+"-----\r\n"},this.newObject=function(t){var e=xr.asn1,n=Object.keys(t);if(1!=n.length)throw"key of param shall be only one.";var r=n[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+r+":"))throw"undefined key: "+r;if("bool"==r)return new e.DERBoolean(t[r]);if("int"==r)return new e.DERInteger(t[r]);if("bitstr"==r)return new e.DERBitString(t[r]);if("octstr"==r)return new e.DEROctetString(t[r]);if("null"==r)return new e.DERNull(t[r]);if("oid"==r)return new e.DERObjectIdentifier(t[r]);if("enum"==r)return new e.DEREnumerated(t[r]);if("utf8str"==r)return new e.DERUTF8String(t[r]);if("numstr"==r)return new e.DERNumericString(t[r]);if("prnstr"==r)return new e.DERPrintableString(t[r]);if("telstr"==r)return new e.DERTeletexString(t[r]);if("ia5str"==r)return new e.DERIA5String(t[r]);if("utctime"==r)return new e.DERUTCTime(t[r]);if("gentime"==r)return new e.DERGeneralizedTime(t[r]);if("seq"==r){for(var i=t[r],s=[],o=0;ou;u++)a+="0";i=a+i;for(var u=0;ue)return n;var r=n.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var i=128+r;return i.toString(16)+n},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},xr.asn1.DERAbstractString=function(t){xr.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=an(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("string"==typeof t?this.setString(t):"undefined"!=typeof t.str?this.setString(t.str):"undefined"!=typeof t.hex&&this.setStringHex(t.hex))},Qn.lang.extend(xr.asn1.DERAbstractString,xr.asn1.ASN1Object),xr.asn1.DERAbstractTime=function(t){xr.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),s=String(i.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=r(String(i.getMonth()+1),2),a=r(String(i.getDate()),2),u=r(String(i.getHours()),2),c=r(String(i.getMinutes()),2),f=r(String(i.getSeconds()),2),h=s+o+a+u+c+f;if(n===!0){var l=i.getMilliseconds();if(0!=l){var d=r(String(l),3);d=d.replace(/[0]+$/,""),h=h+"."+d}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=an(t)},this.setByDateValue=function(t,e,n,r,i,s){var o=new Date(Date.UTC(t,e-1,n,r,i,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},Qn.lang.extend(xr.asn1.DERAbstractTime,xr.asn1.ASN1Object),xr.asn1.DERAbstractStructured=function(t){xr.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,"undefined"!=typeof t&&"undefined"!=typeof t.array&&(this.asn1Array=t.array)},Qn.lang.extend(xr.asn1.DERAbstractStructured,xr.asn1.ASN1Object),xr.asn1.DERBoolean=function(){xr.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Qn.lang.extend(xr.asn1.DERBoolean,xr.asn1.ASN1Object),xr.asn1.DERInteger=function(t){xr.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=xr.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new s(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.bigint?this.setByBigInteger(t.bigint):"undefined"!=typeof t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):"undefined"!=typeof t.hex&&this.setValueHex(t.hex))},Qn.lang.extend(xr.asn1.DERInteger,xr.asn1.ASN1Object),xr.asn1.DERBitString=function(t){if(void 0!==t&&"undefined"!=typeof t.obj){var e=xr.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}xr.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(0>t||t>7)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var e=8-t.length%8;8==e&&(e=0);for(var n=0;e>=n;n++)t+="0";for(var r="",n=0;nn;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):"undefined"!=typeof t.hex?this.setHexValueIncludingUnusedBits(t.hex):"undefined"!=typeof t.bin?this.setByBinaryString(t.bin):"undefined"!=typeof t.array&&this.setByBooleanArray(t.array))},Qn.lang.extend(xr.asn1.DERBitString,xr.asn1.ASN1Object),xr.asn1.DEROctetString=function(t){if(void 0!==t&&"undefined"!=typeof t.obj){var e=xr.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}xr.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},Qn.lang.extend(xr.asn1.DEROctetString,xr.asn1.DERAbstractString),xr.asn1.DERNull=function(){xr.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Qn.lang.extend(xr.asn1.DERNull,xr.asn1.ASN1Object),xr.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new s(t,10),i=r.toString(2),o=7-i.length%7;7==o&&(o=0);for(var a="",u=0;o>u;u++)a+="0";i=a+i;for(var u=0;u0&&10>n?n+1:-2},this.getHexOfL_AtObj=function(t,e){var n=this.getByteLengthOfL_AtObj(t,e);return 1>n?"":t.substring(e+2,e+2+2*n)},this.getIntOfL_AtObj=function(t,e){var n=this.getHexOfL_AtObj(t,e);if(""==n)return-1;var r;return r=parseInt(n.substring(0,1))<8?new s(n,16):new s(n.substring(2),16),r.intValue()},this.getStartPosOfV_AtObj=function(t,e){var n=this.getByteLengthOfL_AtObj(t,e);return 0>n?n:e+2*(n+1)},this.getHexOfV_AtObj=function(t,e){var n=this.getStartPosOfV_AtObj(t,e),r=this.getIntOfL_AtObj(t,e);return t.substring(n,n+2*r)},this.getHexOfTLV_AtObj=function(t,e){var n=t.substr(e,2),r=this.getHexOfL_AtObj(t,e),i=this.getHexOfV_AtObj(t,e);return n+r+i},this.getPosOfNextSibling_AtObj=function(t,e){var n=this.getStartPosOfV_AtObj(t,e),r=this.getIntOfL_AtObj(t,e);return n+2*r},this.getPosArrayOfChildren_AtObj=function(t,e){var n=new Array,r=this.getStartPosOfV_AtObj(t,e);n.push(r);for(var i=this.getIntOfL_AtObj(t,e),s=r,o=0;;){var a=this.getPosOfNextSibling_AtObj(t,s);if(null==a||a-r>=2*i)break;if(o>=200)break;n.push(a),s=a,o++}return n},this.getNthChildIndex_AtObj=function(t,e,n){var r=this.getPosArrayOfChildren_AtObj(t,e);return r[n]},this.getDecendantIndexByNthList=function(t,e,n){if(0==n.length)return e;var r=n.shift(),i=this.getPosArrayOfChildren_AtObj(t,e);return this.getDecendantIndexByNthList(t,i[r],n)},this.getDecendantHexTLVByNthList=function(t,e,n){var r=this.getDecendantIndexByNthList(t,e,n);return this.getHexOfTLV_AtObj(t,r)},this.getDecendantHexVByNthList=function(t,e,n){var r=this.getDecendantIndexByNthList(t,e,n);return this.getHexOfV_AtObj(t,r)}};Er.getVbyList=function(t,e,n,r){var i=this.getDecendantIndexByNthList(t,e,n);if(void 0===i)throw"can't find nthList object";if(void 0!==r&&t.substr(i,2)!=r)throw"checking tag doesn't match: "+t.substr(i,2)+"!="+r;return this.getHexOfV_AtObj(t,i)},Er.hextooidstr=function(t){var e=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},n=[],r=t.substr(0,2),i=parseInt(r,16);n[0]=new String(Math.floor(i/40)),n[1]=new String(i%40);for(var s=t.substr(2),o=[],a=0;a0&&(f=f+"."+u.join(".")),f},Er.dump=function(t,e,n,r){var i=function(t,e){if(t.length<=2*e)return t;var n=t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e);return n};void 0===e&&(e={ommit_long_octet:32}),void 0===n&&(n=0),void 0===r&&(r="");var s=e.ommit_long_octet;if("01"==t.substr(n,2)){var o=Er.getHexOfV_AtObj(t,n);return"00"==o?r+"BOOLEAN FALSE\n":r+"BOOLEAN TRUE\n"}if("02"==t.substr(n,2)){var o=Er.getHexOfV_AtObj(t,n);return r+"INTEGER "+i(o,s)+"\n"}if("03"==t.substr(n,2)){var o=Er.getHexOfV_AtObj(t,n);return r+"BITSTRING "+i(o,s)+"\n"}if("04"==t.substr(n,2)){var o=Er.getHexOfV_AtObj(t,n);if(Er.isASN1HEX(o)){var a=r+"OCTETSTRING, encapsulates\n";return a+=Er.dump(o,e,0,r+" ")}return r+"OCTETSTRING "+i(o,s)+"\n"}if("05"==t.substr(n,2))return r+"NULL\n";if("06"==t.substr(n,2)){var u=Er.getHexOfV_AtObj(t,n),c=xr.asn1.ASN1Util.oidHexToInt(u),f=xr.asn1.x509.OID.oid2name(c),h=c.replace(/\./g," ");return""!=f?r+"ObjectIdentifier "+f+" ("+h+")\n":r+"ObjectIdentifier ("+h+")\n"}if("0c"==t.substr(n,2))return r+"UTF8String '"+mn(Er.getHexOfV_AtObj(t,n))+"'\n";if("13"==t.substr(n,2))return r+"PrintableString '"+mn(Er.getHexOfV_AtObj(t,n))+"'\n";if("14"==t.substr(n,2))return r+"TeletexString '"+mn(Er.getHexOfV_AtObj(t,n))+"'\n";if("16"==t.substr(n,2))return r+"IA5String '"+mn(Er.getHexOfV_AtObj(t,n))+"'\n";if("17"==t.substr(n,2))return r+"UTCTime "+mn(Er.getHexOfV_AtObj(t,n))+"\n";if("18"==t.substr(n,2))return r+"GeneralizedTime "+mn(Er.getHexOfV_AtObj(t,n))+"\n";if("30"==t.substr(n,2)){if("3000"==t.substr(n,4))return r+"SEQUENCE {}\n";var a=r+"SEQUENCE\n",l=Er.getPosArrayOfChildren_AtObj(t,n),d=e;if((2==l.length||3==l.length)&&"06"==t.substr(l[0],2)&&"04"==t.substr(l[l.length-1],2)){var p=Er.getHexOfV_AtObj(t,l[0]),c=xr.asn1.ASN1Util.oidHexToInt(p),f=xr.asn1.x509.OID.oid2name(c),g=JSON.parse(JSON.stringify(e));g.x509ExtName=f,d=g}for(var y=0;y0){var e=new xr.asn1.DERSequence({array:this.extensionsArray}),n=new xr.asn1.DERTaggedObject({explicit:!0,tag:"a3",obj:e});this.asn1Array.push(n)}var r=new xr.asn1.DERSequence({array:this.asn1Array});return this.hTLV=r.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},Qn.lang.extend(xr.asn1.x509.TBSCertificate,xr.asn1.ASN1Object),xr.asn1.x509.Extension=function(t){xr.asn1.x509.Extension.superclass.constructor.call(this);this.getEncodedHex=function(){var t=new xr.asn1.DERObjectIdentifier({oid:this.oid}),e=new xr.asn1.DEROctetString({hex:this.getExtnValueHex()}),n=new Array;n.push(t),this.critical&&n.push(new xr.asn1.DERBoolean),n.push(e);var r=new xr.asn1.DERSequence({array:n});return r.getEncodedHex()},this.critical=!1,"undefined"!=typeof t&&"undefined"!=typeof t.critical&&(this.critical=t.critical)},Qn.lang.extend(xr.asn1.x509.Extension,xr.asn1.ASN1Object),xr.asn1.x509.KeyUsage=function(t){xr.asn1.x509.KeyUsage.superclass.constructor.call(this,t),this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.15","undefined"!=typeof t&&"undefined"!=typeof t.bin&&(this.asn1ExtnValue=new xr.asn1.DERBitString(t))},Qn.lang.extend(xr.asn1.x509.KeyUsage,xr.asn1.x509.Extension),xr.asn1.x509.BasicConstraints=function(t){xr.asn1.x509.BasicConstraints.superclass.constructor.call(this,t);this.getExtnValueHex=function(){var t=new Array;this.cA&&t.push(new xr.asn1.DERBoolean),this.pathLen>-1&&t.push(new xr.asn1.DERInteger({"int":this.pathLen}));var e=new xr.asn1.DERSequence({array:t});return this.asn1ExtnValue=e,this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,"undefined"!=typeof t&&("undefined"!=typeof t.cA&&(this.cA=t.cA),"undefined"!=typeof t.pathLen&&(this.pathLen=t.pathLen))},Qn.lang.extend(xr.asn1.x509.BasicConstraints,xr.asn1.x509.Extension),xr.asn1.x509.CRLDistributionPoints=function(t){xr.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,t),this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.setByDPArray=function(t){this.asn1ExtnValue=new xr.asn1.DERSequence({array:t})},this.setByOneURI=function(t){var e=new xr.asn1.x509.GeneralNames([{uri:t}]),n=new xr.asn1.x509.DistributionPointName(e),r=new xr.asn1.x509.DistributionPoint({dpobj:n});this.setByDPArray([r])},this.oid="2.5.29.31","undefined"!=typeof t&&("undefined"!=typeof t.array?this.setByDPArray(t.array):"undefined"!=typeof t.uri&&this.setByOneURI(t.uri))},Qn.lang.extend(xr.asn1.x509.CRLDistributionPoints,xr.asn1.x509.Extension),xr.asn1.x509.ExtKeyUsage=function(t){xr.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,t),this.setPurposeArray=function(t){this.asn1ExtnValue=new xr.asn1.DERSequence;for(var e=0;e0){var t=new xr.asn1.DERSequence({array:this.aRevokedCert});this.asn1Array.push(t)}var e=new xr.asn1.DERSequence({array:this.asn1Array});return this.hTLV=e.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize=function(){this.asn1Version=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1ThisUpdate=null,this.asn1NextUpdate=null,this.aRevokedCert=new Array},this._initialize()},Qn.lang.extend(xr.asn1.x509.TBSCertList,xr.asn1.ASN1Object),xr.asn1.x509.CRLEntry=function(t){xr.asn1.x509.CRLEntry.superclass.constructor.call(this);this.setCertSerial=function(t){this.sn=new xr.asn1.DERInteger(t)},this.setRevocationDate=function(t){this.time=new xr.asn1.x509.Time(t)},this.getEncodedHex=function(){var t=new xr.asn1.DERSequence({array:[this.sn,this.time]});return this.TLV=t.getEncodedHex(),this.TLV},"undefined"!=typeof t&&("undefined"!=typeof t.time&&this.setRevocationDate(t.time),"undefined"!=typeof t.sn&&this.setCertSerial(t.sn))},Qn.lang.extend(xr.asn1.x509.CRLEntry,xr.asn1.ASN1Object),xr.asn1.x509.X500Name=function(t){if(xr.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=new Array,this.setByString=function(t){var e=t.split("/");e.shift();for(var n=0;n0&&(n=new e.DERTaggedObject({obj:this.dUnsignedAttrs,tag:"a1",explicit:!1}));var r=[this.dCMSVersion,this.dSignerIdentifier,this.dDigestAlgorithm,t,this.dSigAlg,this.dSig];null!=n&&r.push(n);var i=new e.DERSequence({array:r});return this.hTLV=i.getEncodedHex(),this.hTLV}},Qn.lang.extend(xr.asn1.cms.SignerInfo,xr.asn1.ASN1Object),xr.asn1.cms.EncapsulatedContentInfo=function(t){xr.asn1.cms.EncapsulatedContentInfo.superclass.constructor.call(this);var e=xr.asn1;xr.asn1.cms,xr.asn1.x509;this.dEContentType=new e.DERObjectIdentifier({name:"data"}),this.dEContent=null,this.isDetached=!1,this.eContentValueHex=null,this.setContentType=function(t){t.match(/^[0-2][.][0-9.]+$/)?this.dEContentType=new e.DERObjectIdentifier({oid:t}):this.dEContentType=new e.DERObjectIdentifier({name:t})},this.setContentValue=function(t){"undefined"!=typeof t&&("string"==typeof t.hex?this.eContentValueHex=t.hex:"string"==typeof t.str&&(this.eContentValueHex=vn(t.str)))},this.setContentValueHex=function(t){this.eContentValueHex=t},this.setContentValueStr=function(t){this.eContentValueHex=vn(t)},this.getEncodedHex=function(){if("string"!=typeof this.eContentValueHex)throw"eContentValue not yet set";var t=new e.DEROctetString({hex:this.eContentValueHex});this.dEContent=new e.DERTaggedObject({obj:t,tag:"a0",explicit:!0});var n=[this.dEContentType];this.isDetached||n.push(this.dEContent);var r=new e.DERSequence({array:n});return this.hTLV=r.getEncodedHex(),this.hTLV}},Qn.lang.extend(xr.asn1.cms.EncapsulatedContentInfo,xr.asn1.ASN1Object),xr.asn1.cms.ContentInfo=function(t){xr.asn1.cms.ContentInfo.superclass.constructor.call(this);var e=xr.asn1,n=(xr.asn1.cms,xr.asn1.x509);this.dContentType=null,this.dContent=null,this.setContentType=function(t){"string"==typeof t&&(this.dContentType=n.OID.name2obj(t))},this.getEncodedHex=function(){var t=new e.DERTaggedObject({obj:this.dContent,tag:"a0",explicit:!0}),n=new e.DERSequence({array:[this.dContentType,t]});return this.hTLV=n.getEncodedHex(),this.hTLV},"undefined"!=typeof t&&(t.type&&this.setContentType(t.type),t.obj&&t.obj instanceof e.ASN1Object&&(this.dContent=t.obj))},Qn.lang.extend(xr.asn1.cms.ContentInfo,xr.asn1.ASN1Object),xr.asn1.cms.SignedData=function(t){xr.asn1.cms.SignedData.superclass.constructor.call(this);var e=xr.asn1,n=xr.asn1.cms,r=xr.asn1.x509;this.dCMSVersion=new e.DERInteger({"int":1}),this.dDigestAlgs=null,this.digestAlgNameList=[],this.dEncapContentInfo=new n.EncapsulatedContentInfo,this.dCerts=null,this.certificateList=[],this.crlList=[],this.signerInfoList=[new n.SignerInfo],this.addCertificatesByPEM=function(t){var n=Or.getHexFromPEM(t),r=new e.ASN1Object;r.hTLV=n,this.certificateList.push(r)},this.getEncodedHex=function(){if("string"==typeof this.hTLV)return this.hTLV;if(null==this.dDigestAlgs){for(var t=[],n=0;n0){var a=new e.DERSet({array:this.certificateList});this.dCerts=new e.DERTaggedObject({obj:a,tag:"a0",explicit:!1})}null!=this.dCerts&&o.push(this.dCerts);var u=new e.DERSet({array:this.signerInfoList});o.push(u);var c=new e.DERSequence({array:o});return this.hTLV=c.getEncodedHex(),this.hTLV},this.getContentInfo=function(){this.getEncodedHex();var t=new n.ContentInfo({type:"signed-data",obj:this});return t},this.getContentInfoEncodedHex=function(){var t=this.getContentInfo(),e=t.getEncodedHex();return e},this.getPEM=function(){var t=this.getContentInfoEncodedHex(),n=e.ASN1Util.getPEMStringFromHex(t,"CMS");return n}},Qn.lang.extend(xr.asn1.cms.SignedData,xr.asn1.ASN1Object),xr.asn1.cms.CMSUtil=new function(){},xr.asn1.cms.CMSUtil.newSignedData=function(t){var e=xr.asn1.cms,n=xr.asn1.cades,r=new e.SignedData;if(r.dEncapContentInfo.setContentValue(t.content),"object"==typeof t.certs)for(var i=0;ie.length&&(n=e.length);for(var r=0;n>r;r++)if(t.charCodeAt(r)!=e.charCodeAt(r))return r;return t.length!=e.length?n:-1};/*! crypto-1.1.8.js (c) 2013-2016 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
"undefined"!=typeof xr&&xr||(xr={}),"undefined"!=typeof xr.crypto&&xr.crypto||(xr.crypto={}),xr.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:tr.algo.MD5,sha1:tr.algo.SHA1,sha224:tr.algo.SHA224,sha256:tr.algo.SHA256,sha384:tr.algo.SHA384,sha512:tr.algo.SHA512,ripemd160:tr.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if("undefined"==typeof this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,n){var r=this.getDigestInfoHex(t,e),i=n/4;if(r.length+22>i)throw"key is too short for SigAlg: keylen="+n+","+e;for(var s="0001",o="00"+r,a="",u=i-s.length-o.length,c=0;u>c;c+=2)a+="ff";var f=s+a+o;return f},this.hashString=function(t,e){var n=new xr.crypto.MessageDigest({alg:e});return n.digestString(t)},this.hashHex=function(t,e){var n=new xr.crypto.MessageDigest({alg:e});return n.digestHex(t)},this.sha1=function(t){var e=new xr.crypto.MessageDigest({alg:"sha1",prov:"cryptojs"});return e.digestString(t)},this.sha256=function(t){var e=new xr.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"});return e.digestString(t)},this.sha256Hex=function(t){var e=new xr.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"});return e.digestHex(t)},this.sha512=function(t){var e=new xr.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"});return e.digestString(t)},this.sha512Hex=function(t){var e=new xr.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"});return e.digestHex(t)},this.md5=function(t){var e=new xr.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return e.digestString(t)},this.ripemd160=function(t){var e=new xr.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"});return e.digestString(t)},this.getCryptoJSMDByName=function(t){}},xr.crypto.MessageDigest=function(t){this.setAlgAndProvider=function(t,e){if(null!=t&&void 0===e&&(e=xr.crypto.Util.DEFAULTPROVIDER[t]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t)&&"cryptojs"==e){try{this.md=xr.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create()}catch(n){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+n}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=tr.enc.Hex.parse(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return t.toString(tr.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(n){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+n}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=xr.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},xr.crypto.Mac=function(t){this.setAlgAndProvider=function(t,e){if(t=t.toLowerCase(),null==t&&(t="hmacsha1"),t=t.toLowerCase(),"hmac"!=t.substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+t;void 0===e&&(e=xr.crypto.Util.DEFAULTPROVIDER[t]),this.algProv=t+"/"+e;var n=t.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(n)&&"cryptojs"==e){try{var r=xr.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[n];this.mac=tr.algo.HMAC.create(r,this.pass)}catch(i){throw"setAlgAndProvider hash alg set fail hashAlg="+n+"/"+i}this.updateString=function(t){this.mac.update(t)},this.updateHex=function(t){var e=tr.enc.Hex.parse(t);this.mac.update(e)},this.doFinal=function(){var t=this.mac.finalize();return t.toString(tr.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=bn(t)),void(this.pass=tr.enc.Hex.parse(e))}if("object"!=typeof t)throw"KJUR.crypto.Mac unsupported password type: "+t;var 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=vn(t.utf8)),void 0!==t.rstr&&(e=bn(t.rstr)),void 0!==t.b64&&(e=r(t.b64)),void 0!==t.b64u&&(e=pn(t.b64u)),null==e)throw"KJUR.crypto.Mac unsupported password type: "+t;this.pass=tr.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=xr.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},xr.crypto.Signature=function(t){var e=null;if(this._setAlgNames=function(){this.algName.match(/^(.+)with(.+)$/)&&(this.mdAlgName=RegExp.$1.toLowerCase(),this.pubkeyAlgName=RegExp.$2.toLowerCase())},this._zeroPaddingOfSignature=function(t,e){for(var n="",r=e/4-t.length,i=0;r>i;i++)n+="0";return n+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 xr.crypto.MessageDigest({alg:this.mdAlgName})}catch(n){throw"setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+n}this.init=function(t,e){var n=null;try{n=void 0===e?Or.getKey(t):Or.getKey(t,e)}catch(r){throw"init failed:"+r}if(n.isPrivate===!0)this.prvKey=n,this.state="SIGN";else{if(n.isPublic!==!0)throw"init failed.:"+n;this.pubKey=n,this.state="VERIFY"}},this.initSign=function(t){"string"==typeof t.ecprvhex&&"string"==typeof t.eccurvename?(this.ecprvhex=t.ecprvhex,this.eccurvename=t.eccurvename):this.prvKey=t,this.state="SIGN"},this.initVerifyByPublicKey=function(t){"string"==typeof t.ecpubhex&&"string"==typeof t.eccurvename?(this.ecpubhex=t.ecpubhex,this.eccurvename=t.eccurvename):t instanceof xr.crypto.ECDSA?this.pubKey=t:t instanceof ye&&(this.pubKey=t),this.state="VERIFY"},this.initVerifyByCertificatePEM=function(t){var e=new Xn;e.readCertPEM(t),this.pubKey=e.subjectPublicKeyRSA,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(),"undefined"!=typeof this.ecprvhex&&"undefined"!=typeof this.eccurvename){var t=new xr.crypto.ECDSA({curve:this.eccurvename});this.hSign=t.signHex(this.sHashHex,this.ecprvhex)}else if(this.prvKey instanceof ye&&"rsaandmgf1"==this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof ye&&"rsa"==this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof xr.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof xr.crypto.DSA))throw"Signature: unsupported public 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(),"undefined"!=typeof this.ecpubhex&&"undefined"!=typeof this.eccurvename){var e=new xr.crypto.ECDSA({curve:this.eccurvename});return e.verifyHex(this.sHashHex,t,this.ecpubhex)}if(this.pubKey instanceof ye&&"rsaandmgf1"==this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,t,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof ye&&"rsa"==this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(this.pubKey instanceof xr.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(this.pubKey instanceof xr.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.initVerifyByPublicKey=function(t){throw"initVerifyByPublicKey(rsaPubKeyy) not supported for this alg:prov="+this.algProvName},this.initVerifyByCertificatePEM=function(t){throw"initVerifyByCertificatePEM(certPEM) not supported for this alg:prov="+this.algProvName},this.initSign=function(t){throw"initSign(prvKey) 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=xr.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{var e=new ye;e.readPrivateKeyFromPEMString(t.prvkeypem),this.initSign(e)}catch(n){throw"fatal error to load pem private key: "+n}}},xr.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"}},/*! ecdsa-modified-1.0.5.js (c) Stephan Thomas, Kenji Urushima | github.com/bitcoinjs/bitcoinjs-lib/blob/master/LICENSE
*/
"undefined"!=typeof xr&&xr||(xr={}),"undefined"!=typeof xr.crypto&&xr.crypto||(xr.crypto={}),xr.crypto.ECDSA=function(t){var e="secp256r1",n=new he;this.type="EC",this.getBigRandom=function(t){return new s(t.bitLength(),n).mod(t.subtract(s.ONE)).add(s.ONE)},this.setNamedCurve=function(t){this.ecparams=xr.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 n={};return n.x=t.substr(2,e),n.y=t.substr(2+e),n},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),n=this.ecparams.G.multiply(e),r=n.getX().toBigInteger(),i=n.getY().toBigInteger(),s=this.ecparams.keylen/4,o=("0000000000"+e.toString(16)).slice(-s),a=("0000000000"+r.toString(16)).slice(-s),u=("0000000000"+i.toString(16)).slice(-s),c="04"+a+u;return this.setPrivateKeyHex(o),this.setPublicKeyHex(c),{ecprvhex:o,ecpubhex:c}},this.signWithMessageHash=function(t){return this.signHex(t,this.prvKeyHex)},this.signHex=function(t,e){var n=new s(e,16),r=this.ecparams.n,i=new s(t,16);do var o=this.getBigRandom(r),a=this.ecparams.G,u=a.multiply(o),c=u.getX().toBigInteger().mod(r);while(c.compareTo(s.ZERO)<=0);var f=o.modInverse(r).multiply(i.add(n.multiply(c))).mod(r);return xr.crypto.ECDSA.biRSSigToASN1Sig(c,f)},this.sign=function(t,e){var n=e,r=this.ecparams.n,i=s.fromByteArrayUnsigned(t);do var o=this.getBigRandom(r),a=this.ecparams.G,u=a.multiply(o),c=u.getX().toBigInteger().mod(r);while(c.compareTo(s.ZERO)<=0);var f=o.modInverse(r).multiply(i.add(n.multiply(c))).mod(r);return this.serializeSig(c,f)},this.verifyWithMessageHash=function(t,e){return this.verifyHex(t,e,this.pubKeyHex)},this.verifyHex=function(t,e,n){var r,i,o=xr.crypto.ECDSA.parseSigHex(e);r=o.r,i=o.s;var a;a=Me.decodeFromHex(this.ecparams.curve,n);var u=new s(t,16);return this.verifyRaw(u,r,i,a)},this.verify=function(t,e,n){var r,i;if(Bitcoin.Util.isArray(e)){var o=this.parseSig(e);r=o.r,i=o.s}else{if("object"!=typeof e||!e.r||!e.s)throw"Invalid value for signature";r=e.r,i=e.s}var a;if(n instanceof Me)a=n;else{if(!Bitcoin.Util.isArray(n))throw"Invalid format for pubkey value, must be byte array or ECPointFp";a=Me.decodeFrom(this.ecparams.curve,n)}var u=s.fromByteArrayUnsigned(t);return this.verifyRaw(u,r,i,a)},this.verifyRaw=function(t,e,n,r){var i=this.ecparams.n,o=this.ecparams.G;if(e.compareTo(s.ONE)<0||e.compareTo(i)>=0)return!1;if(n.compareTo(s.ONE)<0||n.compareTo(i)>=0)return!1;var a=n.modInverse(i),u=t.multiply(a).mod(i),c=e.multiply(a).mod(i),f=o.multiply(u).add(r.multiply(c)),h=f.getX().toBigInteger().mod(i);return h.equals(e)},this.serializeSig=function(t,e){var n=t.toByteArraySigned(),r=e.toByteArraySigned(),i=[];return i.push(2),i.push(n.length),i=i.concat(n),i.push(2),i.push(r.length),i=i.concat(r),i.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(e=2,2!=t[e])throw new Error("First element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);if(e+=2+t[e+1],2!=t[e])throw new Error("Second element in signature must be a DERInteger");var r=t.slice(e+2,e+2+t[e+1]);e+=2+t[e+1];var i=s.fromByteArrayUnsigned(n),o=s.fromByteArrayUnsigned(r);return{r:i,s:o}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(0>e||e>7)throw"Invalid signature type";var n=this.ecparams.n,r=s.fromByteArrayUnsigned(t.slice(1,33)).mod(n),i=s.fromByteArrayUnsigned(t.slice(33,65)).mod(n);return{r:r,s:i,i:e}},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName=e),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},xr.crypto.ECDSA.parseSigHex=function(t){var e=xr.crypto.ECDSA.parseSigHexInHexRS(t),n=new s(e.r,16),r=new s(e.s,16);return{r:n,s:r}},xr.crypto.ECDSA.parseSigHexInHexRS=function(t){if("30"!=t.substr(0,2))throw"signature is not a ASN.1 sequence";var e=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=e.length)throw"number of signature ASN.1 sequence elements seem wrong";var n=e[0],r=e[1];if("02"!=t.substr(n,2))throw"1st item of sequene of signature is not ASN.1 integer";if("02"!=t.substr(r,2))throw"2nd item of sequene of signature is not ASN.1 integer";var i=Er.getHexOfV_AtObj(t,n),s=Er.getHexOfV_AtObj(t,r);return{r:i,s:s}},xr.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=xr.crypto.ECDSA.parseSigHexInHexRS(t),n=e.r,r=e.s;if("00"==n.substr(0,2)&&n.length/2*8%128==8&&(n=n.substr(2)),"00"==r.substr(0,2)&&r.length/2*8%128==8&&(r=r.substr(2)),n.length/2*8%128!=0)throw"unknown ECDSA sig r length error";if(r.length/2*8%128!=0)throw"unknown ECDSA sig s length error";return n+r},xr.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),n=t.substr(t.length/2);return xr.crypto.ECDSA.hexRSSigToASN1Sig(e,n)},xr.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var n=new s(t,16),r=new s(e,16);return xr.crypto.ECDSA.biRSSigToASN1Sig(n,r)},xr.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var n=new xr.asn1.DERInteger({bigint:t}),r=new xr.asn1.DERInteger({bigint:e}),i=new xr.asn1.DERSequence({array:[n,r]});return i.getEncodedHex()},/*! ecparam-1.0.0.js (c) 2013 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
"undefined"!=typeof xr&&xr||(xr={}),"undefined"!=typeof xr.crypto&&xr.crypto||(xr.crypto={}),xr.crypto.ECParameterDB=new function(){function t(t){return new s(t,16)}var e={},n={};this.getByName=function(t){var r=t;if("undefined"!=typeof n[r]&&(r=n[t]),"undefined"!=typeof e[r])return e[r];throw"unregistered EC curve name: "+r},this.regist=function(r,i,s,o,a,u,c,f,h,l,d,p){e[r]={};var g=t(s),y=t(o),v=t(a),m=t(u),S=t(c),b=new Ge(g,y,v),w=b.decodePointHex("04"+f+h);e[r].name=r,e[r].keylen=i,e[r].curve=b,e[r].G=w,e[r].n=m,e[r].h=S,e[r].oid=d,e[r].info=p;for(var E=0;E11&&10!=e&&8>e?2:e;case 28:return e>11&&8>e?11:e;case 32:return e>10&&8>e?8:e;default:return util.print_debug("DSA select hash algorithm: returning null for an unknown length of q"),null}}function n(t,e,n,r,i,o,a,u){var c=xr.crypto.Util.hashString(r,t.toLowerCase()),c=c.substr(0,o.bitLength()/4),f=new s(c,16);if(s.ZERO.compareTo(e)>0||e.compareTo(o)>0||s.ZERO.compareTo(n)>0||n.compareTo(o)>0)return util.print_error("invalid DSA Signature"),null;var h=n.modInverse(o),l=f.multiply(h).mod(o),d=e.multiply(h).mod(o),p=a.modPow(l,i).multiply(u.modPow(d,i)).mod(i).mod(o);return 0==p.compareTo(e)}function r(t,e){if(!(e.compareTo(t)<=0)){for(var n=e.subtract(t),r=i(n.bitLength());r>n;)r=i(n.bitLength());return t.add(r)}}function i(t){if(0>t)return null;var e=Math.floor((t+7)/8),n=o(e);return t%8>0&&(n=String.fromCharCode(Math.pow(2,t%8)-1&n.charCodeAt(0))+n.substring(1)),new s(u(n),16)}function o(t){for(var e="",n=0;t>n;n++)e+=String.fromCharCode(a());return e}function a(){var t=new Uint32Array(1);return Zn.crypto.getRandomValues(t),255&t[0]}function u(t){if(null==t)return"";for(var e,n=[],r=t.length,i=0;r>i;){for(e=t[i++].charCodeAt().toString(16);e.length<2;)e="0"+e;n.push(""+e)}return n.join("")}this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.setPrivate=function(t,e,n,r,i){this.isPrivate=!0,this.p=t,this.q=e,this.g=n,this.y=r,this.x=i},this.setPublic=function(t,e,n,r){this.isPublic=!0,this.p=t,this.q=e,this.g=n,this.y=r,this.x=null},this.signWithMessageHash=function(t){var e=this.p,n=this.q,i=this.g,o=(this.y,this.x),a=(t.substr(0,n.bitLength()/4),new s(t,16)),u=r(s.ONE.add(s.ONE),n.subtract(s.ONE)),c=i.modPow(u,e).mod(n),f=u.modInverse(n).multiply(a.add(o.multiply(c))).mod(n),h=xr.asn1.ASN1Util.jsonToASN1HEX({seq:[{"int":{bigint:c}},{"int":{bigint:f}}]});return h},this.verifyWithMessageHash=function(t,e){var n=this.p,r=this.q,i=this.g,o=this.y,a=this.parseASN1Signature(e),u=a[0],c=a[1],t=t.substr(0,r.bitLength()/4),f=new s(t,16);if(s.ZERO.compareTo(u)>0||u.compareTo(r)>0||s.ZERO.compareTo(c)>0||c.compareTo(r)>0)throw"invalid DSA signature";var h=c.modInverse(r),l=f.multiply(h).mod(r),d=u.multiply(h).mod(r),p=i.modPow(l,n).multiply(o.modPow(d,n)).mod(n).mod(r);return 0==p.compareTo(u)},this.parseASN1Signature=function(t){try{var e=new s(Er.getVbyList(t,0,[0],"02"),16),n=new s(Er.getVbyList(t,0,[1],"02"),16);return[e,n]}catch(r){throw"malformed DSA signature"}},this.select_hash_algorithm=e,this.sign=t,this.verify=n,this.getRandomBigIntegerInRange=r,this.getRandomBigInteger=i,this.getRandomBytes=o};/*! pkcs5pkey-1.0.6.js (c) 2013-2014 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
var Pr=function(){var t=function(t,e,r){return n(tr.AES,t,e,r)},e=function(t,e,r){return n(tr.TripleDES,t,e,r)},n=function(t,e,n,r){var i=tr.enc.Hex.parse(e),s=tr.enc.Hex.parse(n),o=tr.enc.Hex.parse(r),a={};a.key=s,a.iv=o,a.ciphertext=i;var u=t.decrypt(a,s,{iv:o});return tr.enc.Hex.stringify(u)},i=function(t,e,n){return o(tr.AES,t,e,n)},s=function(t,e,n){return o(tr.TripleDES,t,e,n)},o=function(t,e,n,r){var i=tr.enc.Hex.parse(e),s=tr.enc.Hex.parse(n),o=tr.enc.Hex.parse(r),a=t.encrypt(i,s,{iv:o}),u=tr.enc.Hex.parse(a.toString()),c=tr.enc.Base64.stringify(u);return c},a={"AES-256-CBC":{proc:t,eproc:i,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:i,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:i,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:e,eproc:s,keylen:24,ivlen:8}},u=function(t){return a[t].proc},c=function(t){var e=tr.lib.WordArray.random(t),n=tr.enc.Hex.stringify(e);return n},f=function(t){var e={};t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"))&&(e.cipher=RegExp.$1,e.ivsalt=RegExp.$2),t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"))&&(e.type=RegExp.$1);var n=-1,r=0;-1!=t.indexOf("\r\n\r\n")&&(n=t.indexOf("\r\n\r\n"),r=2),-1!=t.indexOf("\n\n")&&(n=t.indexOf("\n\n"),r=1);var i=t.indexOf("-----END");if(-1!=n&&-1!=i){var s=t.substring(n+2*r,i-r);s=s.replace(/\s+/g,""),e.data=s}return e},h=function(t,e,n){for(var r=n.substring(0,16),i=tr.enc.Hex.parse(r),s=tr.enc.Utf8.parse(e),o=a[t].keylen+a[t].ivlen,u="",c=null;;){var f=tr.algo.MD5.create();if(null!=c&&f.update(c),f.update(s),f.update(i),c=f.finalize(),u+=tr.enc.Hex.stringify(c),u.length>=2*o)break}var h={};return h.keyhex=u.substr(0,2*a[t].keylen),h.ivhex=u.substr(2*a[t].keylen,2*a[t].ivlen),h},l=function(t,e,n,r){var i=tr.enc.Base64.parse(t),s=tr.enc.Hex.stringify(i),o=a[e].proc,u=o(s,n,r);return u},d=function(t,e,n,r){var i=a[e].eproc,s=i(t,n,r);return s};return{version:"1.0.5",getHexFromPEM:function(t,e){var n=t;if(-1==n.indexOf("BEGIN "+e))throw"can't find PEM header: "+e;n=n.replace("-----BEGIN "+e+"-----",""),n=n.replace("-----END "+e+"-----","");var i=n.replace(/\s+/g,""),s=r(i);return s},getDecryptedKeyHexByKeyIV:function(t,e,n,r){var i=u(e);return i(t,n,r)},parsePKCS5PEM:function(t){return f(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,n){return h(t,e,n)},decryptKeyB64:function(t,e,n,r){return l(t,e,n,r)},getDecryptedKeyHex:function(t,e){var n=f(t),r=(n.type,n.cipher),i=n.ivsalt,s=n.data,o=h(r,e,i),a=o.keyhex,u=l(s,r,a,i);return u},getRSAKeyFromEncryptedPKCS5PEM:function(t,e){var n=this.getDecryptedKeyHex(t,e),r=new ye;return r.readPrivateKeyFromASN1HexString(n),r},getEryptedPKCS5PEMFromPrvKeyHex:function(t,e,n,r){var i="";if("undefined"!=typeof n&&null!=n||(n="AES-256-CBC"),"undefined"==typeof a[n])throw"PKCS5PKEY unsupported algorithm: "+n;if("undefined"==typeof r||null==r){var s=a[n].ivlen,o=c(s);r=o.toUpperCase()}var u=h(n,e,r),f=u.keyhex,l=d(t,n,f,r),p=l.replace(/(.{64})/g,"$1\r\n"),i="-----BEGIN RSA PRIVATE KEY-----\r\n";return i+="Proc-Type: 4,ENCRYPTED\r\n",i+="DEK-Info: "+n+","+r+"\r\n",i+="\r\n",i+=p,i+="\r\n-----END RSA PRIVATE KEY-----\r\n"},getEryptedPKCS5PEMFromRSAKey:function(t,e,n,r){var i=new xr.asn1.DERInteger({"int":0}),s=new xr.asn1.DERInteger({bigint:t.n}),o=new xr.asn1.DERInteger({"int":t.e}),a=new xr.asn1.DERInteger({bigint:t.d}),u=new xr.asn1.DERInteger({bigint:t.p}),c=new xr.asn1.DERInteger({bigint:t.q}),f=new xr.asn1.DERInteger({bigint:t.dmp1}),h=new xr.asn1.DERInteger({bigint:t.dmq1}),l=new xr.asn1.DERInteger({bigint:t.coeff}),d=new xr.asn1.DERSequence({array:[i,s,o,a,u,c,f,h,l]}),p=d.getEncodedHex();return this.getEryptedPKCS5PEMFromPrvKeyHex(p,e,n,r)},newEncryptedPKCS5PEM:function(t,e,n,r){"undefined"!=typeof e&&null!=e||(e=1024),"undefined"!=typeof n&&null!=n||(n="10001");var i=new ye;i.generate(e,n);var s=null;return s="undefined"==typeof r||null==r?this.getEncryptedPKCS5PEMFromRSAKey(pkey,t):this.getEncryptedPKCS5PEMFromRSAKey(pkey,t,r)},getRSAKeyFromPlainPKCS8PEM:function(t){if(t.match(/ENCRYPTED/))throw"pem shall be not ENCRYPTED";var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getRSAKeyFromPlainPKCS8Hex(e);return n},getRSAKeyFromPlainPKCS8Hex:function(t){var e=Er.getPosArrayOfChildren_AtObj(t,0);if(3!=e.length)throw"outer DERSequence shall have 3 elements: "+e.length;var n=Er.getHexOfTLV_AtObj(t,e[1]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmIdentifier is not rsaEnc: "+n;var n=Er.getHexOfTLV_AtObj(t,e[1]),r=Er.getHexOfTLV_AtObj(t,e[2]),i=Er.getHexOfV_AtObj(r,0),s=new ye;return s.readPrivateKeyFromASN1HexString(i),s},parseHexOfEncryptedPKCS8:function(t){var e={},n=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed format: SEQUENCE(0).items != 2: "+n.length;e.ciphertext=Er.getHexOfV_AtObj(t,n[1]);var r=Er.getPosArrayOfChildren_AtObj(t,n[0]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+r.length;if("2a864886f70d01050d"!=Er.getHexOfV_AtObj(t,r[0]))throw"this only supports pkcs5PBES2";var i=Er.getPosArrayOfChildren_AtObj(t,r[1]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+i.length;var s=Er.getPosArrayOfChildren_AtObj(t,i[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+s.length;if("2a864886f70d0307"!=Er.getHexOfV_AtObj(t,s[0]))throw"this only supports TripleDES";e.encryptionSchemeAlg="TripleDES",e.encryptionSchemeIV=Er.getHexOfV_AtObj(t,s[1]);var o=Er.getPosArrayOfChildren_AtObj(t,i[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+o.length;if("2a864886f70d01050c"!=Er.getHexOfV_AtObj(t,o[0]))throw"this only supports pkcs5PBKDF2";var a=Er.getPosArrayOfChildren_AtObj(t,o[1]);if(a.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+a.length;e.pbkdf2Salt=Er.getHexOfV_AtObj(t,a[0]);var u=Er.getHexOfV_AtObj(t,a[1]);try{e.pbkdf2Iter=parseInt(u,16)}catch(c){throw"malformed format pbkdf2Iter: "+u}return e},getPBKDF2KeyHexFromParam:function(t,e){var n=tr.enc.Hex.parse(t.pbkdf2Salt),r=t.pbkdf2Iter,i=tr.PBKDF2(e,n,{keySize:6,iterations:r}),s=tr.enc.Hex.stringify(i);return s},getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var n=this.getHexFromPEM(t,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=Pr.getPBKDF2KeyHexFromParam(r,e),s={};s.ciphertext=tr.enc.Hex.parse(r.ciphertext);var o=tr.enc.Hex.parse(i),a=tr.enc.Hex.parse(r.encryptionSchemeIV),u=tr.TripleDES.decrypt(s,o,{iv:a}),c=tr.enc.Hex.stringify(u);return c},getRSAKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getRSAKeyFromPlainPKCS8Hex(n);return r},getKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getKeyFromPlainPrivatePKCS8Hex(n);return r},parsePlainPrivatePKCS8Hex:function(t){var e={};if(e.algparam=null,"30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var n=Er.getPosArrayOfChildren_AtObj(t,0);if(3!=n.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(n[1],2))throw"malformed PKCS8 private key(code:003)";var r=Er.getPosArrayOfChildren_AtObj(t,n[1]);if(2!=r.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(r[0],2))throw"malformed PKCS8 private key(code:005)";if(e.algoid=Er.getHexOfV_AtObj(t,r[0]),"06"==t.substr(r[1],2)&&(e.algparam=Er.getHexOfV_AtObj(t,r[1])),"04"!=t.substr(n[2],2))throw"malformed PKCS8 private key(code:006)";return e.keyidx=Er.getStartPosOfV_AtObj(t,n[2]),e},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getKeyFromPlainPrivatePKCS8Hex(e);return n},getKeyFromPlainPrivatePKCS8Hex:function(t){var e=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==e.algoid){this.parsePrivateRawRSAKeyHexAtObj(t,e);var n=e.key,r=new ye;return r.setPrivateEx(n.n,n.e,n.d,n.p,n.q,n.dp,n.dq,n.co),r}if("2a8648ce3d0201"==e.algoid){if(this.parsePrivateRawECKeyHexAtObj(t,e),void 0===xr.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=xr.crypto.OID.oidhex2name[e.algparam],r=new xr.crypto.ECDSA({curve:i,prv:e.key});return r}throw"unsupported private key algorithm"},getRSAKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getRSAKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8Hex:function(t){var e=this.parsePublicPKCS8Hex(t);if("2a864886f70d010101"==e.algoid){var n=this.parsePublicRawRSAKeyHex(e.key),r=new ye;return r.setPublic(n.n,n.e),r}if("2a8648ce3d0201"==e.algoid){if(void 0===xr.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=xr.crypto.OID.oidhex2name[e.algparam],r=new xr.crypto.ECDSA({curve:i,pub:e.key});return r}throw"unsupported public key algorithm"},parsePublicRawRSAKeyHex:function(t){var e={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var n=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(n[0],2))throw"malformed RSA key(code:003)";if(e.n=Er.getHexOfV_AtObj(t,n[0]),"02"!=t.substr(n[1],2))throw"malformed RSA key(code:004)";return e.e=Er.getHexOfV_AtObj(t,n[1]),e},parsePrivateRawRSAKeyHexAtObj:function(t,e){var n=e.keyidx;if("30"!=t.substr(n,2))throw"malformed RSA private key(code:001)";var r=Er.getPosArrayOfChildren_AtObj(t,n);if(9!=r.length)throw"malformed RSA private key(code:002)";e.key={},e.key.n=Er.getHexOfV_AtObj(t,r[1]),e.key.e=Er.getHexOfV_AtObj(t,r[2]),e.key.d=Er.getHexOfV_AtObj(t,r[3]),e.key.p=Er.getHexOfV_AtObj(t,r[4]),e.key.q=Er.getHexOfV_AtObj(t,r[5]),e.key.dp=Er.getHexOfV_AtObj(t,r[6]),e.key.dq=Er.getHexOfV_AtObj(t,r[7]),e.key.co=Er.getHexOfV_AtObj(t,r[8])},parsePrivateRawECKeyHexAtObj:function(t,e){var n=e.keyidx;if("30"!=t.substr(n,2))throw"malformed ECC private key(code:001)";var r=Er.getPosArrayOfChildren_AtObj(t,n);if(3!=r.length)throw"malformed ECC private key(code:002)";if("04"!=t.substr(r[1],2))throw"malformed ECC private key(code:003)";e.key=Er.getHexOfV_AtObj(t,r[1])},parsePublicPKCS8Hex:function(t){var e={};e.algparam=null;var n=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"outer DERSequence shall have 2 elements: "+n.length;var r=n[0];if("30"!=t.substr(r,2))throw"malformed PKCS8 public key(code:001)";var i=Er.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(i[0],2))throw"malformed PKCS8 public key(code:003)";if(e.algoid=Er.getHexOfV_AtObj(t,i[0]),"06"==t.substr(i[1],2)&&(e.algparam=Er.getHexOfV_AtObj(t,i[1])),"03"!=t.substr(n[1],2))throw"malformed PKCS8 public key(code:004)";return e.key=Er.getHexOfV_AtObj(t,n[1]).substr(2),e},getRSAKeyFromPublicPKCS8Hex:function(t){var e=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=e.length)throw"outer DERSequence shall have 2 elements: "+e.length;var n=Er.getHexOfTLV_AtObj(t,e[0]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmId is not rsaEncryption";if("03"!=t.substr(e[1],2))throw"PKCS8 Public Key is not BITSTRING encapslated.";var r=Er.getStartPosOfV_AtObj(t,e[1])+2;if("30"!=t.substr(r,2))throw"PKCS8 Public Key is not SEQUENCE.";var i=Er.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"inner DERSequence shall have 2 elements: "+i.length;if("02"!=t.substr(i[0],2))throw"N is not ASN.1 INTEGER";if("02"!=t.substr(i[1],2))throw"E is not ASN.1 INTEGER";var s=Er.getHexOfV_AtObj(t,i[0]),o=Er.getHexOfV_AtObj(t,i[1]),a=new ye;return a.setPublic(s,o),a}}}(),Or=function(){var t=function(t,e,n){return i(tr.AES,t,e,n)},e=function(t,e,n){return i(tr.TripleDES,t,e,n)},n=function(t,e,n){return i(tr.DES,t,e,n)},i=function(t,e,n,r){var i=tr.enc.Hex.parse(e),s=tr.enc.Hex.parse(n),o=tr.enc.Hex.parse(r),a={};a.key=s,a.iv=o,a.ciphertext=i;var u=t.decrypt(a,s,{iv:o});return tr.enc.Hex.stringify(u)},o=function(t,e,n){return c(tr.AES,t,e,n)},a=function(t,e,n){return c(tr.TripleDES,t,e,n)},u=function(t,e,n){return c(tr.DES,t,e,n)},c=function(t,e,n,r){var i=tr.enc.Hex.parse(e),s=tr.enc.Hex.parse(n),o=tr.enc.Hex.parse(r),a=t.encrypt(i,s,{iv:o}),u=tr.enc.Hex.parse(a.toString()),c=tr.enc.Base64.stringify(u);return c},f={"AES-256-CBC":{proc:t,eproc:o,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:o,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:o,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:e,eproc:a,keylen:24,ivlen:8},"DES-CBC":{proc:n,eproc:u,keylen:8,ivlen:8}},h=function(t){return f[t].proc},l=function(t){var e=tr.lib.WordArray.random(t),n=tr.enc.Hex.stringify(e);return n},d=function(t){var e={};t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"))&&(e.cipher=RegExp.$1,e.ivsalt=RegExp.$2),t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"))&&(e.type=RegExp.$1);var n=-1,r=0;-1!=t.indexOf("\r\n\r\n")&&(n=t.indexOf("\r\n\r\n"),r=2),-1!=t.indexOf("\n\n")&&(n=t.indexOf("\n\n"),r=1);var i=t.indexOf("-----END");if(-1!=n&&-1!=i){var s=t.substring(n+2*r,i-r);s=s.replace(/\s+/g,""),e.data=s}return e},p=function(t,e,n){for(var r=n.substring(0,16),i=tr.enc.Hex.parse(r),s=tr.enc.Utf8.parse(e),o=f[t].keylen+f[t].ivlen,a="",u=null;;){var c=tr.algo.MD5.create();if(null!=u&&c.update(u),c.update(s),c.update(i),u=c.finalize(),a+=tr.enc.Hex.stringify(u),a.length>=2*o)break}var h={};return h.keyhex=a.substr(0,2*f[t].keylen),h.ivhex=a.substr(2*f[t].keylen,2*f[t].ivlen),h},g=function(t,e,n,r){var i=tr.enc.Base64.parse(t),s=tr.enc.Hex.stringify(i),o=f[e].proc,a=o(s,n,r);return a},y=function(t,e,n,r){var i=f[e].eproc,s=i(t,n,r);return s};return{version:"1.0.0",getHexFromPEM:function(t,e){var n=t;if(-1==n.indexOf("-----BEGIN "))throw"can't find PEM header: "+e;"string"==typeof e&&""!=e?(n=n.replace("-----BEGIN "+e+"-----",""),n=n.replace("-----END "+e+"-----","")):(n=n.replace(/-----BEGIN [^-]+-----/,""),n=n.replace(/-----END [^-]+-----/,""));var i=n.replace(/\s+/g,""),s=r(i);return s},getDecryptedKeyHexByKeyIV:function(t,e,n,r){var i=h(e);return i(t,n,r)},parsePKCS5PEM:function(t){return d(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,n){return p(t,e,n)},decryptKeyB64:function(t,e,n,r){return g(t,e,n,r)},getDecryptedKeyHex:function(t,e){var n=d(t),r=(n.type,n.cipher),i=n.ivsalt,s=n.data,o=p(r,e,i),a=o.keyhex,u=g(s,r,a,i);return u},getRSAKeyFromEncryptedPKCS5PEM:function(t,e){var n=this.getDecryptedKeyHex(t,e),r=new ye;return r.readPrivateKeyFromASN1HexString(n),r},getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,n,r,i){var s="";if("undefined"!=typeof r&&null!=r||(r="AES-256-CBC"),"undefined"==typeof f[r])throw"KEYUTIL unsupported algorithm: "+r;if("undefined"==typeof i||null==i){var o=f[r].ivlen,a=l(o);i=a.toUpperCase()}var u=p(r,n,i),c=u.keyhex,h=y(e,r,c,i),d=h.replace(/(.{64})/g,"$1\r\n"),s="-----BEGIN "+t+" PRIVATE KEY-----\r\n";return s+="Proc-Type: 4,ENCRYPTED\r\n",s+="DEK-Info: "+r+","+i+"\r\n",s+="\r\n",s+=d,s+="\r\n-----END "+t+" PRIVATE KEY-----\r\n"},getEncryptedPKCS5PEMFromRSAKey:function(t,e,n,r){var i=new xr.asn1.DERInteger({"int":0}),s=new xr.asn1.DERInteger({bigint:t.n}),o=new xr.asn1.DERInteger({"int":t.e}),a=new xr.asn1.DERInteger({bigint:t.d}),u=new xr.asn1.DERInteger({bigint:t.p}),c=new xr.asn1.DERInteger({bigint:t.q}),f=new xr.asn1.DERInteger({bigint:t.dmp1}),h=new xr.asn1.DERInteger({bigint:t.dmq1}),l=new xr.asn1.DERInteger({bigint:t.coeff}),d=new xr.asn1.DERSequence({array:[i,s,o,a,u,c,f,h,l]}),p=d.getEncodedHex();return this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",p,e,n,r)},newEncryptedPKCS5PEM:function(t,e,n,r){"undefined"!=typeof e&&null!=e||(e=1024),"undefined"!=typeof n&&null!=n||(n="10001");var i=new ye;i.generate(e,n);var s=null;return s="undefined"==typeof r||null==r?this.getEncryptedPKCS5PEMFromRSAKey(i,t):this.getEncryptedPKCS5PEMFromRSAKey(i,t,r)},getRSAKeyFromPlainPKCS8PEM:function(t){if(t.match(/ENCRYPTED/))throw"pem shall be not ENCRYPTED";var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getRSAKeyFromPlainPKCS8Hex(e);return n},getRSAKeyFromPlainPKCS8Hex:function(t){var e=Er.getPosArrayOfChildren_AtObj(t,0);if(3!=e.length)throw"outer DERSequence shall have 3 elements: "+e.length;var n=Er.getHexOfTLV_AtObj(t,e[1]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmIdentifier is not rsaEnc: "+n;var n=Er.getHexOfTLV_AtObj(t,e[1]),r=Er.getHexOfTLV_AtObj(t,e[2]),i=Er.getHexOfV_AtObj(r,0),s=new ye;return s.readPrivateKeyFromASN1HexString(i),s},parseHexOfEncryptedPKCS8:function(t){var e={},n=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed format: SEQUENCE(0).items != 2: "+n.length;e.ciphertext=Er.getHexOfV_AtObj(t,n[1]);var r=Er.getPosArrayOfChildren_AtObj(t,n[0]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+r.length;if("2a864886f70d01050d"!=Er.getHexOfV_AtObj(t,r[0]))throw"this only supports pkcs5PBES2";var i=Er.getPosArrayOfChildren_AtObj(t,r[1]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+i.length;var s=Er.getPosArrayOfChildren_AtObj(t,i[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+s.length;if("2a864886f70d0307"!=Er.getHexOfV_AtObj(t,s[0]))throw"this only supports TripleDES";e.encryptionSchemeAlg="TripleDES",e.encryptionSchemeIV=Er.getHexOfV_AtObj(t,s[1]);var o=Er.getPosArrayOfChildren_AtObj(t,i[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+o.length;if("2a864886f70d01050c"!=Er.getHexOfV_AtObj(t,o[0]))throw"this only supports pkcs5PBKDF2";var a=Er.getPosArrayOfChildren_AtObj(t,o[1]);if(a.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+a.length;e.pbkdf2Salt=Er.getHexOfV_AtObj(t,a[0]);var u=Er.getHexOfV_AtObj(t,a[1]);try{e.pbkdf2Iter=parseInt(u,16)}catch(c){throw"malformed format pbkdf2Iter: "+u}return e},getPBKDF2KeyHexFromParam:function(t,e){var n=tr.enc.Hex.parse(t.pbkdf2Salt),r=t.pbkdf2Iter,i=tr.PBKDF2(e,n,{keySize:6,iterations:r}),s=tr.enc.Hex.stringify(i);return s},getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var n=this.getHexFromPEM(t,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=Or.getPBKDF2KeyHexFromParam(r,e),s={};s.ciphertext=tr.enc.Hex.parse(r.ciphertext);var o=tr.enc.Hex.parse(i),a=tr.enc.Hex.parse(r.encryptionSchemeIV),u=tr.TripleDES.decrypt(s,o,{iv:a}),c=tr.enc.Hex.stringify(u);return c},getRSAKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getRSAKeyFromPlainPKCS8Hex(n);return r},getKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getKeyFromPlainPrivatePKCS8Hex(n);return r},parsePlainPrivatePKCS8Hex:function(t){var e={};if(e.algparam=null,"30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var n=Er.getPosArrayOfChildren_AtObj(t,0);if(3!=n.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(n[1],2))throw"malformed PKCS8 private key(code:003)";var r=Er.getPosArrayOfChildren_AtObj(t,n[1]);if(2!=r.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(r[0],2))throw"malformed PKCS8 private key(code:005)";if(e.algoid=Er.getHexOfV_AtObj(t,r[0]),"06"==t.substr(r[1],2)&&(e.algparam=Er.getHexOfV_AtObj(t,r[1])),"04"!=t.substr(n[2],2))throw"malformed PKCS8 private key(code:006)";return e.keyidx=Er.getStartPosOfV_AtObj(t,n[2]),e},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getKeyFromPlainPrivatePKCS8Hex(e);return n},getKeyFromPlainPrivatePKCS8Hex:function(t){var e=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==e.algoid){this.parsePrivateRawRSAKeyHexAtObj(t,e);var n=e.key,r=new ye;return r.setPrivateEx(n.n,n.e,n.d,n.p,n.q,n.dp,n.dq,n.co),r}if("2a8648ce3d0201"==e.algoid){if(this.parsePrivateRawECKeyHexAtObj(t,e),void 0===xr.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=xr.crypto.OID.oidhex2name[e.algparam],r=new xr.crypto.ECDSA({curve:i});return r.setPublicKeyHex(e.pubkey),r.setPrivateKeyHex(e.key),r.isPublic=!1,r}if("2a8648ce380401"==e.algoid){var o=Er.getVbyList(t,0,[1,1,0],"02"),a=Er.getVbyList(t,0,[1,1,1],"02"),u=Er.getVbyList(t,0,[1,1,2],"02"),c=Er.getVbyList(t,0,[2,0],"02"),f=new s(o,16),h=new s(a,16),l=new s(u,16),d=new s(c,16),r=new xr.crypto.DSA;return r.setPrivate(f,h,l,null,d),r}throw"unsupported private key algorithm"},getRSAKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getRSAKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8Hex:function(t){var e=this.parsePublicPKCS8Hex(t);if("2a864886f70d010101"==e.algoid){var n=this.parsePublicRawRSAKeyHex(e.key),r=new ye;return r.setPublic(n.n,n.e),r}if("2a8648ce3d0201"==e.algoid){if(void 0===xr.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=xr.crypto.OID.oidhex2name[e.algparam],r=new xr.crypto.ECDSA({curve:i,pub:e.key});return r}if("2a8648ce380401"==e.algoid){var o=e.algparam,a=Er.getHexOfV_AtObj(e.key,0),r=new xr.crypto.DSA;return r.setPublic(new s(o.p,16),new s(o.q,16),new s(o.g,16),new s(a,16)),r}throw"unsupported public key algorithm"},parsePublicRawRSAKeyHex:function(t){var e={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var n=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(n[0],2))throw"malformed RSA key(code:003)";if(e.n=Er.getHexOfV_AtObj(t,n[0]),"02"!=t.substr(n[1],2))throw"malformed RSA key(code:004)";return e.e=Er.getHexOfV_AtObj(t,n[1]),e},parsePrivateRawRSAKeyHexAtObj:function(t,e){var n=e.keyidx;if("30"!=t.substr(n,2))throw"malformed RSA private key(code:001)";var r=Er.getPosArrayOfChildren_AtObj(t,n);if(9!=r.length)throw"malformed RSA private key(code:002)";e.key={},e.key.n=Er.getHexOfV_AtObj(t,r[1]),e.key.e=Er.getHexOfV_AtObj(t,r[2]),e.key.d=Er.getHexOfV_AtObj(t,r[3]),e.key.p=Er.getHexOfV_AtObj(t,r[4]),e.key.q=Er.getHexOfV_AtObj(t,r[5]),e.key.dp=Er.getHexOfV_AtObj(t,r[6]),e.key.dq=Er.getHexOfV_AtObj(t,r[7]),e.key.co=Er.getHexOfV_AtObj(t,r[8])},parsePrivateRawECKeyHexAtObj:function(t,e){var n=e.keyidx,r=Er.getVbyList(t,n,[1],"04"),i=Er.getVbyList(t,n,[2,0],"03").substr(2);e.key=r,e.pubkey=i},parsePublicPKCS8Hex:function(t){var e={};e.algparam=null;var n=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"outer DERSequence shall have 2 elements: "+n.length;var r=n[0];if("30"!=t.substr(r,2))throw"malformed PKCS8 public key(code:001)";var i=Er.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(i[0],2))throw"malformed PKCS8 public key(code:003)";if(e.algoid=Er.getHexOfV_AtObj(t,i[0]),"06"==t.substr(i[1],2)?e.algparam=Er.getHexOfV_AtObj(t,i[1]):"30"==t.substr(i[1],2)&&(e.algparam={},e.algparam.p=Er.getVbyList(t,i[1],[0],"02"),e.algparam.q=Er.getVbyList(t,i[1],[1],"02"),e.algparam.g=Er.getVbyList(t,i[1],[2],"02")),"03"!=t.substr(n[1],2))throw"malformed PKCS8 public key(code:004)";return e.key=Er.getHexOfV_AtObj(t,n[1]).substr(2),e},getRSAKeyFromPublicPKCS8Hex:function(t){var e=Er.getPosArrayOfChildren_AtObj(t,0);if(2!=e.length)throw"outer DERSequence shall have 2 elements: "+e.length;var n=Er.getHexOfTLV_AtObj(t,e[0]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmId is not rsaEncryption";if("03"!=t.substr(e[1],2))throw"PKCS8 Public Key is not BITSTRING encapslated.";var r=Er.getStartPosOfV_AtObj(t,e[1])+2;if("30"!=t.substr(r,2))throw"PKCS8 Public Key is not SEQUENCE.";var i=Er.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"inner DERSequence shall have 2 elements: "+i.length;if("02"!=t.substr(i[0],2))throw"N is not ASN.1 INTEGER";if("02"!=t.substr(i[1],2))throw"E is not ASN.1 INTEGER";var s=Er.getHexOfV_AtObj(t,i[0]),o=Er.getHexOfV_AtObj(t,i[1]),a=new ye;return a.setPublic(s,o),a}}}();Or.getKey=function(t,e,n){if("undefined"!=typeof ye&&t instanceof ye)return t;if("undefined"!=typeof xr.crypto.ECDSA&&t instanceof xr.crypto.ECDSA)return t;if("undefined"!=typeof xr.crypto.DSA&&t instanceof xr.crypto.DSA)return t;if(void 0!==t.curve&&void 0!==t.xy&&void 0===t.d)return new xr.crypto.ECDSA({pub:t.xy,curve:t.curve});if(void 0!==t.curve&&void 0!==t.d)return new xr.crypto.ECDSA({prv:t.d,curve:t.curve});if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d){var r=new ye;return r.setPublic(t.n,t.e),r}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){var r=new ye;return r.setPrivateEx(t.n,t.e,t.d,t.p,t.q,t.dp,t.dq,t.co),r}if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0===t.p){var r=new ye;return r.setPrivate(t.n,t.e,t.d),r}if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0===t.x){var r=new xr.crypto.DSA;return r.setPublic(t.p,t.q,t.g,t.y),r}if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0!==t.x){var r=new xr.crypto.DSA;return r.setPrivate(t.p,t.q,t.g,t.y,t.x),r}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d){var r=new ye;return r.setPublic(pn(t.n),pn(t.e)),r}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){var r=new ye;return r.setPrivateEx(pn(t.n),pn(t.e),pn(t.d),pn(t.p),pn(t.q),pn(t.dp),pn(t.dq),pn(t.qi)),r}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d){var r=new ye;return r.setPrivate(pn(t.n),pn(t.e),pn(t.d)),r}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0===t.d){var i=new xr.crypto.ECDSA({curve:t.crv}),o=i.ecparams.keylen/4,a=("0000000000"+pn(t.x)).slice(-o),u=("0000000000"+pn(t.y)).slice(-o),c="04"+a+u;return i.setPublicKeyHex(c),i}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0!==t.d){var i=new xr.crypto.ECDSA({curve:t.crv}),o=i.ecparams.keylen/4,a=("0000000000"+pn(t.x)).slice(-o),u=("0000000000"+pn(t.y)).slice(-o),c="04"+a+u,f=("0000000000"+pn(t.d)).slice(-o);return i.setPublicKeyHex(c),i.setPrivateKeyHex(f),i}if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Xn.getPublicKeyFromCertPEM(t);if("pkcs8pub"===n)return Or.getKeyFromPublicPKCS8Hex(t);if(-1!=t.indexOf("-END PUBLIC KEY-"))return Or.getKeyFromPublicPKCS8PEM(t);if("pkcs5prv"===n){var r=new ye;return r.readPrivateKeyFromASN1HexString(t),r}if("pkcs5prv"===n){var r=new ye;return r.readPrivateKeyFromASN1HexString(t),r}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var h=Or.getHexFromPEM(t,"RSA PRIVATE KEY");return Or.getKey(h,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var l=this.getHexFromPEM(t,"DSA PRIVATE KEY"),d=Er.getVbyList(l,0,[1],"02"),p=Er.getVbyList(l,0,[2],"02"),g=Er.getVbyList(l,0,[3],"02"),y=Er.getVbyList(l,0,[4],"02"),v=Er.getVbyList(l,0,[5],"02"),r=new xr.crypto.DSA;return r.setPrivate(new s(d,16),new s(p,16),new s(g,16),new s(y,16),new s(v,16)),r}if(-1!=t.indexOf("-END PRIVATE KEY-"))return Or.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED"))return Or.getRSAKeyFromEncryptedPKCS5PEM(t,e);if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var l=Or.getDecryptedKeyHex(t,e),r=Er.getVbyList(l,0,[1],"04"),m=Er.getVbyList(l,0,[2,0],"06"),S=Er.getVbyList(l,0,[3,0],"03").substr(2),b="";if(void 0===xr.crypto.OID.oidhex2name[m])throw"undefined OID(hex) in KJUR.crypto.OID: "+m;b=xr.crypto.OID.oidhex2name[m];var i=new xr.crypto.ECDSA({name:b});return i.setPublicKeyHex(S),i.setPrivateKeyHex(r),i.isPublic=!1,i}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var l=Or.getDecryptedKeyHex(t,e),d=Er.getVbyList(l,0,[1],"02"),p=Er.getVbyList(l,0,[2],"02"),g=Er.getVbyList(l,0,[3],"02"),y=Er.getVbyList(l,0,[4],"02"),v=Er.getVbyList(l,0,[5],"02"),r=new xr.crypto.DSA;return r.setPrivate(new s(d,16),new s(p,16),new s(g,16),new s(y,16),new s(v,16)),r}if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return Or.getKeyFromEncryptedPKCS8PEM(t,e);throw"not supported argument"},Or.generateKeypair=function(t,e){if("RSA"==t){var n=e,r=new ye;r.generate(n,"10001"),r.isPrivate=!0,r.isPublic=!0;var i=new ye,s=r.n.toString(16),o=r.e.toString(16);i.setPublic(s,o),i.isPrivate=!1,i.isPublic=!0;var a={};return a.prvKeyObj=r,a.pubKeyObj=i,a}if("EC"==t){var u=e,c=new xr.crypto.ECDSA({curve:u}),f=c.generateKeyPairHex(),r=new xr.crypto.ECDSA({curve:u});r.setPublicKeyHex(f.ecpubhex),r.setPrivateKeyHex(f.ecprvhex),r.isPrivate=!0,r.isPublic=!1;var i=new xr.crypto.ECDSA({curve:u});i.setPublicKeyHex(f.ecpubhex),i.isPrivate=!1,i.isPublic=!0;var a={};return a.prvKeyObj=r,a.pubKeyObj=i,a}throw"unknown algorithm: "+t},Or.getPEM=function(t,e,n,r,i){function s(t){var e=xr.asn1.ASN1Util.newObject({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}}]});return e}function o(t){var e=xr.asn1.ASN1Util.newObject({seq:[{"int":1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]});return e}function a(t){var e=xr.asn1.ASN1Util.newObject({seq:[{"int":0},{"int":{bigint:t.p}},{"int":{bigint:t.q}},{"int":{bigint:t.g}},{"int":{bigint:t.y}},{"int":{bigint:t.x}}]});return e}var u=xr.asn1,c=xr.crypto;if(("undefined"!=typeof ye&&t instanceof ye||"undefined"!=typeof c.DSA&&t instanceof c.DSA||"undefined"!=typeof c.ECDSA&&t instanceof c.ECDSA)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e)){var f=new xr.asn1.x509.SubjectPublicKeyInfo(t),h=f.getEncodedHex();return u.ASN1Util.getPEMStringFromHex(h,"PUBLIC KEY")}if("PKCS1PRV"==e&&"undefined"!=typeof ye&&t instanceof ye&&(void 0===n||null==n)&&1==t.isPrivate){var f=s(t),h=f.getEncodedHex();return u.ASN1Util.getPEMStringFromHex(h,"RSA PRIVATE KEY")}if("PKCS1PRV"==e&&"undefined"!=typeof ye&&t instanceof xr.crypto.ECDSA&&(void 0===n||null==n)&&1==t.isPrivate){var l=new xr.asn1.DERObjectIdentifier({name:t.curveName}),d=l.getEncodedHex(),p=o(t),g=p.getEncodedHex(),y="";return y+=u.ASN1Util.getPEMStringFromHex(d,"EC PARAMETERS"),y+=u.ASN1Util.getPEMStringFromHex(g,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&"undefined"!=typeof xr.crypto.DSA&&t instanceof xr.crypto.DSA&&(void 0===n||null==n)&&1==t.isPrivate){var f=a(t),h=f.getEncodedHex();return u.ASN1Util.getPEMStringFromHex(h,"DSA PRIVATE KEY")}if("PKCS5PRV"==e&&"undefined"!=typeof ye&&t instanceof ye&&void 0!==n&&null!=n&&1==t.isPrivate){var f=s(t),h=f.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",h,n,r)}if("PKCS5PRV"==e&&"undefined"!=typeof xr.crypto.ECDSA&&t instanceof xr.crypto.ECDSA&&void 0!==n&&null!=n&&1==t.isPrivate){var f=o(t),h=f.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",h,n,r)}if("PKCS5PRV"==e&&"undefined"!=typeof xr.crypto.DSA&&t instanceof xr.crypto.DSA&&void 0!==n&&null!=n&&1==t.isPrivate){var f=a(t),h=f.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",h,n,r)}var v=function(t,e){var n=m(t,e),r=new xr.asn1.ASN1Util.newObject({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:n.pbkdf2Salt}},{"int":n.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:n.encryptionSchemeIV}}]}]}]},{octstr:{hex:n.ciphertext}}]});return r.getEncodedHex()},m=function(t,e){var n=100,r=tr.lib.WordArray.random(8),i="DES-EDE3-CBC",s=tr.lib.WordArray.random(8),o=tr.PBKDF2(e,r,{keySize:6,iterations:n}),a=tr.enc.Hex.parse(t),u=tr.TripleDES.encrypt(a,o,{iv:s})+"",c={};return c.ciphertext=u,c.pbkdf2Salt=tr.enc.Hex.stringify(r),c.pbkdf2Iter=n,c.encryptionSchemeAlg=i,c.encryptionSchemeIV=tr.enc.Hex.stringify(s),c};if("PKCS8PRV"==e&&"undefined"!=typeof ye&&t instanceof ye&&1==t.isPrivate){var S=s(t),b=S.getEncodedHex(),f=xr.asn1.ASN1Util.newObject({seq:[{"int":0},{seq:[{oid:{name:"rsaEncryption"}},{"null":!0}]},{octstr:{hex:b}}]}),h=f.getEncodedHex();if(void 0===n||null==n)return u.ASN1Util.getPEMStringFromHex(h,"PRIVATE KEY");
var g=v(h,n);return u.ASN1Util.getPEMStringFromHex(g,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&"undefined"!=typeof xr.crypto.ECDSA&&t instanceof xr.crypto.ECDSA&&1==t.isPrivate){var S=new xr.asn1.ASN1Util.newObject({seq:[{"int":1},{octstr:{hex:t.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]}),b=S.getEncodedHex(),f=xr.asn1.ASN1Util.newObject({seq:[{"int":0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:b}}]}),h=f.getEncodedHex();if(void 0===n||null==n)return u.ASN1Util.getPEMStringFromHex(h,"PRIVATE KEY");var g=v(h,n);return u.ASN1Util.getPEMStringFromHex(g,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&"undefined"!=typeof xr.crypto.DSA&&t instanceof xr.crypto.DSA&&1==t.isPrivate){var S=new xr.asn1.DERInteger({bigint:t.x}),b=S.getEncodedHex(),f=xr.asn1.ASN1Util.newObject({seq:[{"int":0},{seq:[{oid:{name:"dsa"}},{seq:[{"int":{bigint:t.p}},{"int":{bigint:t.q}},{"int":{bigint:t.g}}]}]},{octstr:{hex:b}}]}),h=f.getEncodedHex();if(void 0===n||null==n)return u.ASN1Util.getPEMStringFromHex(h,"PRIVATE KEY");var g=v(h,n);return u.ASN1Util.getPEMStringFromHex(g,"ENCRYPTED PRIVATE KEY")}throw"unsupported object nor format"},Or.getKeyFromCSRPEM=function(t){var e=Or.getHexFromPEM(t,"CERTIFICATE REQUEST"),n=Or.getKeyFromCSRHex(e);return n},Or.getKeyFromCSRHex=function(t){var e=Or.parseCSRHex(t),n=Or.getKey(e.p8pubkeyhex,null,"pkcs8pub");return n},Or.parseCSRHex=function(t){var e={},n=t;if("30"!=n.substr(0,2))throw"malformed CSR(code:001)";var r=Er.getPosArrayOfChildren_AtObj(n,0);if(r.length<1)throw"malformed CSR(code:002)";if("30"!=n.substr(r[0],2))throw"malformed CSR(code:003)";var i=Er.getPosArrayOfChildren_AtObj(n,r[0]);if(i.length<3)throw"malformed CSR(code:004)";return e.p8pubkeyhex=Er.getHexOfTLV_AtObj(n,i[2]),e},Or.getJWKFromKey=function(t){var e={};if(t instanceof ye&&t.isPrivate)return e.kty="RSA",e.n=dn(t.n.toString(16)),e.e=dn(t.e.toString(16)),e.d=dn(t.d.toString(16)),e.p=dn(t.p.toString(16)),e.q=dn(t.q.toString(16)),e.dp=dn(t.dmp1.toString(16)),e.dq=dn(t.dmq1.toString(16)),e.qi=dn(t.coeff.toString(16)),e;if(t instanceof ye&&t.isPublic)return e.kty="RSA",e.n=dn(t.n.toString(16)),e.e=dn(t.e.toString(16)),e;if(t instanceof xr.crypto.ECDSA&&t.isPrivate){var n=t.getShortNISTPCurveName();if("P-256"!==n&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;var r=t.getPublicKeyXYHex();return e.kty="EC",e.crv=n,e.x=dn(r.x),e.y=dn(r.y),e.d=dn(t.prvKeyHex),e}if(t instanceof xr.crypto.ECDSA&&t.isPublic){var n=t.getShortNISTPCurveName();if("P-256"!==n&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;var r=t.getPublicKeyXYHex();return e.kty="EC",e.crv=n,e.x=dn(r.x),e.y=dn(r.y),e}throw"not supported key object"},ye.prototype.readPrivateKeyFromPEMString=jn,ye.prototype.readPrivateKeyFromASN1HexString=Tn;/*! rsasign-1.2.7.js (c) 2012 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
var Cr=new RegExp("");Cr.compile("[^0-9a-f]","gi"),ye.prototype.signWithMessageHash=Hn,ye.prototype.signString=Dn,ye.prototype.signStringWithSHA1=kn,ye.prototype.signStringWithSHA256=Nn,ye.prototype.sign=Dn,ye.prototype.signWithSHA1=kn,ye.prototype.signWithSHA256=Nn,ye.prototype.signWithMessageHashPSS=Vn,ye.prototype.signStringPSS=Mn,ye.prototype.signPSS=Mn,ye.SALT_LEN_HLEN=-1,ye.SALT_LEN_MAX=-2,ye.prototype.verifyWithMessageHash=zn,ye.prototype.verifyString=Jn,ye.prototype.verifyHexSignatureForMessage=Wn,ye.prototype.verify=Jn,ye.prototype.verifyHexSignatureForByteArrayMessage=Wn,ye.prototype.verifyWithMessageHashPSS=Gn,ye.prototype.verifyStringPSS=Yn,ye.prototype.verifyPSS=Yn,ye.SALT_LEN_RECOVER=-2,Xn.pemToBase64=function(t){var e=t;return e=e.replace("-----BEGIN CERTIFICATE-----",""),e=e.replace("-----END CERTIFICATE-----",""),e=e.replace(/[ \n]+/g,"")},Xn.pemToHex=function(t){var e=Xn.pemToBase64(t),n=r(e);return n},Xn.getSubjectPublicKeyPosFromCertHex=function(t){var e=Xn.getSubjectPublicKeyInfoPosFromCertHex(t);if(-1==e)return-1;var n=Er.getPosArrayOfChildren_AtObj(t,e);if(2!=n.length)return-1;var r=n[1];if("03"!=t.substring(r,r+2))return-1;var i=Er.getStartPosOfV_AtObj(t,r);return"00"!=t.substring(i,i+2)?-1:i+2},Xn.getSubjectPublicKeyInfoPosFromCertHex=function(t){var e=Er.getStartPosOfV_AtObj(t,0),n=Er.getPosArrayOfChildren_AtObj(t,e);return n.length<1?-1:"a003020102"==t.substring(n[0],n[0]+10)?n.length<6?-1:n[6]:n.length<5?-1:n[5]},Xn.getPublicKeyHexArrayFromCertHex=function(t){var e=Xn.getSubjectPublicKeyPosFromCertHex(t),n=Er.getPosArrayOfChildren_AtObj(t,e);if(2!=n.length)return[];var r=Er.getHexOfV_AtObj(t,n[0]),i=Er.getHexOfV_AtObj(t,n[1]);return null!=r&&null!=i?[r,i]:[]},Xn.getHexTbsCertificateFromCert=function(t){var e=Er.getStartPosOfV_AtObj(t,0);return e},Xn.getPublicKeyHexArrayFromCertPEM=function(t){var e=Xn.pemToHex(t),n=Xn.getPublicKeyHexArrayFromCertHex(e);return n},Xn.hex2dn=function(t){for(var e="",n=Er.getPosArrayOfChildren_AtObj(t,0),r=0;ra;a++)o[a]=Xn.getV3ExtItemInfo_AtObj(t,i[a]);return o},Xn.getV3ExtItemInfo_AtObj=function(t,e){var n={};n.posTLV=e;var r=Er.getPosArrayOfChildren_AtObj(t,e);if(2!=r.length&&3!=r.length)throw"malformed X.509v3 Ext (code:001)";if("06"!=t.substr(r[0],2))throw"malformed X.509v3 Ext (code:002)";var i=Er.getHexOfV_AtObj(t,r[0]);n.oid=Er.hextooidstr(i),n.critical=!1,3==r.length&&(n.critical=!0);var s=r[r.length-1];if("04"!=t.substr(s,2))throw"malformed X.509v3 Ext (code:003)";return n.posV=Er.getStartPosOfV_AtObj(t,s),n},Xn.getHexOfTLV_V3ExtValue=function(t,e){var n=Xn.getPosOfTLV_V3ExtValue(t,e);return-1==n?null:Er.getHexOfTLV_AtObj(t,n)},Xn.getHexOfV_V3ExtValue=function(t,e){var n=Xn.getPosOfTLV_V3ExtValue(t,e);return-1==n?null:Er.getHexOfV_AtObj(t,n)},Xn.getPosOfTLV_V3ExtValue=function(t,e){var n=e;if(e.match(/^[0-9.]+$/)||(n=xr.asn1.x509.OID.name2oid(e)),""==n)return-1;for(var r=Xn.getV3ExtInfoListOfCertHex(t),i=0;i0){var l=":"+n.join(":")+":";if(-1==l.indexOf(":"+f+":"))throw"algorithm '"+f+"' not accepted in the list"}if("none"!=f&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=Or.getKey(e)),!("RS"!=h&&"PS"!=h||e instanceof ye))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==h&&!(e instanceof xr.crypto.ECDSA))throw"key shall be a ECDSA obj for ES* algs";var d=null;if(void 0===r.jwsalg2sigalg[c.alg])throw"unsupported alg name: "+f;if(d=r.jwsalg2sigalg[f],"none"==d)throw"not supported";if("Hmac"==d.substr(0,4)){var p=null;if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var g=new xr.crypto.Mac({alg:d,pass:e});return g.updateString(a),p=g.doFinal(),u==p}if(-1!=d.indexOf("withECDSA")){var y=null;try{y=xr.crypto.ECDSA.concatSigToASN1Sig(u)}catch(v){return!1}var m=new xr.crypto.Signature({alg:d});return m.init(e),m.updateString(a),m.verify(y)}var m=new xr.crypto.Signature({alg:d});return m.init(e),m.updateString(a),m.verify(u)},xr.jws.JWS.parse=function(t){var e,n,r,i=t.split("."),s={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=i[0],n=i[1],3==i.length&&(r=i[2]),s.headerObj=xr.jws.JWS.readSafeJSONString(Ar(e)),s.payloadObj=xr.jws.JWS.readSafeJSONString(Ar(n)),s.headerPP=JSON.stringify(s.headerObj,null," "),null==s.payloadObj?s.payloadPP=Ar(n):s.payloadPP=JSON.stringify(s.payloadObj,null," "),void 0!==r&&(s.sigHex=pn(r)),s},xr.jws.JWS.verifyJWT=function(t,e,n){var r=xr.jws.JWS,i=t.split("."),s=i[0],o=i[1],a=(pn(i[2]),r.readSafeJSONString(Ar(s))),u=r.readSafeJSONString(Ar(o));if(void 0===a.alg)return!1;if(void 0===n.alg)throw"acceptField.alg shall be specified";if(!r.inArray(a.alg,n.alg))return!1;if(void 0!==u.iss&&"object"==typeof n.iss&&!r.inArray(u.iss,n.iss))return!1;if(void 0!==u.sub&&"object"==typeof n.sub&&!r.inArray(u.sub,n.sub))return!1;if(void 0!==u.aud&&"object"==typeof n.aud)if("string"==typeof u.aud){if(!r.inArray(u.aud,n.aud))return!1}else if("object"==typeof u.aud&&!r.includedArray(u.aud,n.aud))return!1;var c=xr.jws.IntDate.getNow();return void 0!==n.verifyAt&&"number"==typeof n.verifyAt&&(c=n.verifyAt),void 0!==n.gracePeriod&&"number"==typeof n.gracePeriod||(n.gracePeriod=0),void 0!==u.exp&&"number"==typeof u.exp&&u.exp+n.gracePeriod=50&&100>r)r=1900+r;else{if(!(r>=0&&50>r))throw"malformed year string for UTCTime";r=2e3+r}}var i=parseInt(RegExp.$2)-1,s=parseInt(RegExp.$3),o=parseInt(RegExp.$4),a=parseInt(RegExp.$5),u=parseInt(RegExp.$6),c=new Date(Date.UTC(r,i,s,o,a,u));return~~(c/1e3)}throw"unsupported format: "+t},xr.jws.IntDate.getNow=function(){var t=~~(new Date/1e3);return t},xr.jws.IntDate.intDate2UTCString=function(t){var e=new Date(1e3*t);return e.toUTCString()},xr.jws.IntDate.intDate2Zulu=function(t){var e=new Date(1e3*t),n=("0000"+e.getUTCFullYear()).slice(-4),r=("00"+(e.getUTCMonth()+1)).slice(-2),i=("00"+e.getUTCDate()).slice(-2),s=("00"+e.getUTCHours()).slice(-2),o=("00"+e.getUTCMinutes()).slice(-2),a=("00"+e.getUTCSeconds()).slice(-2);return n+r+i+s+o+a+"Z"},/*! jwsjs-2.1.0 (c) 2010-2016 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
"undefined"!=typeof xr&&xr||(xr={}),"undefined"!=typeof xr.jws&&xr.jws||(xr.jws={}),xr.jws.JWSJS=function(){var t=xr.jws.JWS,e=xr.jws.JWS;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(t){this.init();var e=t.split(".");if(3!=e.length)throw"malformed input JWS";this.aHeader.push(e[0]),this.sPayload=e[1],this.aSignature.push(e[2])},this.addSignature=function(t,e,n,r){if(void 0===this.sPayload||null===this.sPayload)throw"there's no JSON-JS signature to add.";var i=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var s=xr.jws.JWS.sign(t,e,this.sPayload,n,r),o=s.split(".");o[0],o[2];this.aHeader.push(o[0]),this.aSignature.push(o[2])}catch(a){throw this.aHeader.length>i&&this.aHeader.pop(),this.aSignature.length>i&&this.aSignature.pop(),"addSignature failed: "+a}},this.addSignatureByHeaderKey=function(t,e){var n=Ar(this.sPayload),r=new xr.jws.JWS;r.generateJWSByP1PrvKey(t,n,e);this.aHeader.push(r.parsedJWS.headB64U),this.aSignature.push(r.parsedJWS.sigvalB64U)},this.addSignatureByHeaderPayloadKey=function(t,e,n){var r=new xr.jws.JWS;r.generateJWSByP1PrvKey(t,e,n);this.aHeader.push(r.parsedJWS.headB64U),this.sPayload=r.parsedJWS.payloadB64U,this.aSignature.push(r.parsedJWS.sigvalB64U)},this.verifyAll=function(t){if(this.aHeader.length!==t.length||this.aSignature.length!==t.length)return!1;for(var e=0;e0))throw"malformed header";if(this.aHeader=e.headers,"string"!=typeof e.payload)throw"malformed signatures";if(this.sPayload=e.payload,!(e.signatures.length>0))throw"malformed signatures";this.signatures=e.signatures}catch(r){throw"malformed JWS-JS JSON object: "+r}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return 0==this.aHeader.length?1:0}},e.SecureRandom=he,e.rng_seed_time=ue,e.BigInteger=s,e.RSAKey=ye,e.ECDSA=xr.crypto.ECDSA,e.DSA=xr.crypto.DSA,e.Signature=xr.crypto.Signature,e.MessageDigest=xr.crypto.MessageDigest,e.Mac=xr.crypto.Mac,e.KEYUTIL=Or,e.ASN1HEX=Er,e.X509=Xn,e.CryptoJS=tr,e.b64tohex=r,e.b64toBA=i,e.stoBA=rn,e.BAtos=sn,e.BAtohex=on,e.stohex=an,e.stob64=un,e.stob64u=cn,e.b64utos=fn,e.b64tob64u=hn,e.b64utob64=ln,e.hex2b64=n,e.hextob64u=dn,e.b64utohex=pn,e.b64tohex=r,e.utf8tob64u=_r,e.b64utoutf8=Ar,e.utf8tob64=gn,e.b64toutf8=yn,e.utf8tohex=vn,e.hextoutf8=mn,e.hextorstr=Sn,e.rstrtohex=bn,e.newline_toUnix=An,e.newline_toDos=Fn,e.intarystrtohex=Pn,e.strdiffidx=Fr,e.KJUR=xr,e.crypto=xr.crypto,e.asn1=xr.asn1,e.jws=xr.jws,e.lang=xr.lang}).call(e,n(304).Buffer)},function(t,e,n){(function(t,r){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
*/
"use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(n){return!1}}function s(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?o(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):u(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function o(e,n){if(e=g(e,0>n?0:0|y(n)),!t.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)e[r]=0;return e}function a(t,e,n){"string"==typeof n&&""!==n||(n="utf8");var r=0|m(e,n);return t=g(t,r),t.write(e,n),t}function u(e,n){if(t.isBuffer(n))return c(e,n);if(X(n))return f(e,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return h(e,n);if(n instanceof ArrayBuffer)return l(e,n)}return n.length?d(e,n):p(e,n)}function c(t,e){var n=0|y(e.length);return t=g(t,n),e.copy(t,0,0,n),t}function f(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function h(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function l(e,n){return t.TYPED_ARRAY_SUPPORT?(n.byteLength,e=t._augment(new Uint8Array(n))):e=h(e,new Uint8Array(n)),e}function d(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function p(t,e){var n,r=0;"Buffer"===e.type&&X(e.data)&&(n=e.data,r=0|y(n.length)),t=g(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function g(e,n){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(n)),e.__proto__=t.prototype):(e.length=n,e._isBuffer=!0);var r=0!==n&&n<=t.poolSize>>>1;return r&&(e.parent=$),e}function y(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function v(e,n){if(!(this instanceof v))return new v(e,n);var r=new t(e,n);return delete r.parent,r}function m(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function S(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return C(this,e,n);case"binary":return I(this,e,n);case"base64":return F(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var s=e.length;if(s%2!==0)throw new Error("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;r>o;o++){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[n+o]=a}return o}function w(t,e,n,r){return z(U(e,t.length-n),t,n,r)}function E(t,e,n,r){return z(q(e),t,n,r)}function x(t,e,n,r){return E(t,e,n,r)}function _(t,e,n,r){return z(J(e),t,n,r)}function A(t,e,n,r){return z(W(e,t.length-n),t,n,r)}function F(t,e,n){return 0===e&&n===t.length?Y.fromByteArray(t):Y.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;n>i;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(n>=i+a){var u,c,f,h;switch(a){case 1:128>s&&(o=s);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&s)<<6|63&u,h>127&&(o=h));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(h=(15&s)<<12|(63&u)<<6|63&c,h>2047&&(55296>h||h>57343)&&(o=h));break;case 4:u=t[i+1],c=t[i+2],f=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&f)&&(h=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&f,h>65535&&1114112>h&&(o=h))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return O(r)}function O(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Z));return n}function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",s=e;n>s;s++)i+=K(t[s]);return i}function j(t,e,n){for(var r=t.slice(e,n),i="",s=0;st)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,n,r,i,s,o){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(n>s||o>n)throw new RangeError("value is out of bounds");if(r+i>e.length)throw new RangeError("index out of range")}function H(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-n,2);s>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function k(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-n,4);s>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function N(t,e,n,r,i,s){if(e>i||s>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function B(t,e,n,r,i){return i||N(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,i){return i||N(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(t,e,n,r,52,8),n+8}function V(t){if(t=L(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function L(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function K(t){return 16>t?"0"+t.toString(16):t.toString(16)}function U(t,e){e=e||1/0;for(var n,r=t.length,i=null,s=[],o=0;r>o;o++){if(n=t.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,128>n){if((e-=1)<0)break;s.push(n)}else if(2048>n){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(t){for(var e=[],n=0;n>8,i=n%256,s.push(i),s.push(r);return s}function J(t){return Y.toByteArray(V(t))}function z(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}var Y=n(305),G=n(306),X=n(307);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var $={};t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,s=0,o=Math.min(r,i);o>s&&e[s]===n[s];)++s;return s!==o&&(r=e[s],i=n[s]),i>r?-1:r>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,n){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var r;if(void 0===n)for(n=0,r=0;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,n){function r(t,e,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,n);if(t.isBuffer(e))return r(this,e,n);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,n):r(this,[e],n);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return E(this,t,e,n);case"binary":return x(this,t,e,n);case"base64":return _(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),e>n&&(n=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,n));else{var s=n-e;i=new t(s,void 0);for(var o=0;s>o;o++)i[o]=this[o+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||R(t,e,this.length);for(var r=this[t],i=1,s=0;++s0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||R(t,e,this.length);for(var r=this[t],i=1,s=0;++s=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||R(t,e,this.length);for(var r=e,i=1,s=this[t+--r];r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},t.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),G.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),G.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),G.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),G.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||D(this,t,e,n,Math.pow(2,8*n),0);var i=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+i]=t/s&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):H(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):H(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):k(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):k(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var s=0,o=1,a=0>t?1:0;for(this[e]=255&t;++s>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var s=n-1,o=1,a=0>t?1:0;for(this[e+s]=255&t;--s>=0&&(o*=256);)this[e+s]=(t/o>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):H(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):H(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):k(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n=0|n,r||D(this,e,n,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):k(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-nr&&i>n)for(s=o-1;s>=0;s--)e[s+n]=this[s+r];else if(1e3>o||!t.TYPED_ARRAY_SUPPORT)for(s=0;o>s;s++)e[s+n]=this[s+r];else e._set(this.subarray(r,r+o),n);return o},t.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=U(t.toString()),s=i.length;for(r=e;n>r;r++)this[r]=i[r%s]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),n=0,r=e.length;r>n;n+=1)e[n]=this[n];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Q=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=Q.get,e.set=Q.set,e.write=Q.write,e.toString=Q.toString,e.toLocaleString=Q.toString,e.toJSON=Q.toJSON,e.equals=Q.equals,e.compare=Q.compare,e.indexOf=Q.indexOf,e.copy=Q.copy,e.slice=Q.slice,e.readUIntLE=Q.readUIntLE,e.readUIntBE=Q.readUIntBE,e.readUInt8=Q.readUInt8,e.readUInt16LE=Q.readUInt16LE,e.readUInt16BE=Q.readUInt16BE,e.readUInt32LE=Q.readUInt32LE,e.readUInt32BE=Q.readUInt32BE,e.readIntLE=Q.readIntLE,e.readIntBE=Q.readIntBE,e.readInt8=Q.readInt8,e.readInt16LE=Q.readInt16LE,e.readInt16BE=Q.readInt16BE,e.readInt32LE=Q.readInt32LE,e.readInt32BE=Q.readInt32BE,e.readFloatLE=Q.readFloatLE,e.readFloatBE=Q.readFloatBE,e.readDoubleLE=Q.readDoubleLE,e.readDoubleBE=Q.readDoubleBE,e.writeUInt8=Q.writeUInt8,e.writeUIntLE=Q.writeUIntLE,e.writeUIntBE=Q.writeUIntBE,e.writeUInt16LE=Q.writeUInt16LE,e.writeUInt16BE=Q.writeUInt16BE,e.writeUInt32LE=Q.writeUInt32LE,e.writeUInt32BE=Q.writeUInt32BE,e.writeIntLE=Q.writeIntLE,e.writeIntBE=Q.writeIntBE,e.writeInt8=Q.writeInt8,e.writeInt16LE=Q.writeInt16LE,e.writeInt16BE=Q.writeInt16BE,e.writeInt32LE=Q.writeInt32LE,e.writeInt32BE=Q.writeInt32BE,e.writeFloatLE=Q.writeFloatLE,e.writeFloatBE=Q.writeFloatBE,e.writeDoubleLE=Q.writeDoubleLE,e.writeDoubleBE=Q.writeDoubleBE,e.fill=Q.fill,e.inspect=Q.inspect,e.toArrayBuffer=Q.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(304).Buffer,function(){return this}())},function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===o||e===h?62:e===a||e===l?63:u>e?-1:u+10>e?e-u+26+26:f+26>e?e-f:c+26>e?e-c+26:void 0}function n(t){function n(t){c[h++]=t}var r,i,o,a,u,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;u="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,c=new s(3*t.length/4-u),o=u>0?t.length-4:t.length;var h=0;for(r=0,i=0;o>r;r+=4,i+=3)a=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&a)):1===u&&(a=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(a>>8&255),n(255&a)),c}function i(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,s,o,a=t.length%3,u="";for(i=0,o=t.length-a;o>i;i+=3)s=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=n(s);switch(a){case 1:s=t[t.length-1],u+=e(s>>2),u+=e(s<<4&63),u+="==";break;case 2:s=(t[t.length-2]<<8)+t[t.length-1],u+=e(s>>10),u+=e(s>>4&63),u+=e(s<<2&63),u+="="}return u}var s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0),h="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,n,r,i){var s,o,a=8*i-r-1,u=(1<>1,f=-7,h=n?i-1:0,l=n?-1:1,d=t[e+h];for(h+=l,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=256*s+t[e+h],h+=l,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=r;f>0;o=256*o+t[e+h],h+=l,f-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,r),s-=c}return(d?-1:1)*o*Math.pow(2,s-r)},e.write=function(t,e,n,r,i,s){var o,a,u,c=8*s-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:s-1,p=r?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),e+=o+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(o++,u/=2),o+h>=f?(a=0,o=f):o+h>=1?(a=(e*u-1)*Math.pow(2,i),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(o=o<0;t[n+d]=255&o,d+=p,o/=256,c-=8);t[n+d-p]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=n(309),u=r(a),c=n(310),f=r(c),h=function(){function t(e){var n=e.url,r=e.client_id,s=e.redirect_uri,a=e.response_type,c=e.scope,h=e.authority,l=e.data,d=e.prompt,p=e.display,g=e.max_age,y=e.ui_locales,v=e.id_token_hint,m=e.login_hint,S=e.acr_values,b=e.resource;if(i(this,t),!n)throw o.default.error("No url passed to SigninRequest"),new Error("url");if(!r)throw o.default.error("No client_id passed to SigninRequest"),new Error("client_id");if(!s)throw o.default.error("No redirect_uri passed to SigninRequest"),new Error("redirect_uri");if(!a)throw o.default.error("No response_type passed to SigninRequest"),new Error("response_type");if(!c)throw o.default.error("No scope passed to SigninRequest"),new Error("scope");if(!h)throw o.default.error("No authority passed to SigninRequest"),new Error("authority");var w=t.isOidc(a);this.state=new f.default({nonce:w,data:l,client_id:r,authority:h}),n=u.default.addQueryParam(n,"client_id",r),n=u.default.addQueryParam(n,"redirect_uri",s),n=u.default.addQueryParam(n,"response_type",a),n=u.default.addQueryParam(n,"scope",c),n=u.default.addQueryParam(n,"state",this.state.id),w&&(n=u.default.addQueryParam(n,"nonce",this.state.nonce));var E={prompt:d,display:p,max_age:g,ui_locales:y,id_token_hint:v,login_hint:m,acr_values:S,resource:b};for(var x in E)E[x]&&(n=u.default.addQueryParam(n,x,E[x]));this.url=n}return t.isOidc=function(t){var e=t.split(/\s+/g).filter(function(t){return"id_token"===t});return!!e[0]},t.isOAuth=function(t){var e=t.split(/\s+/g).filter(function(t){return"token"===t});return!!e[0]},t}();e.default=h,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=n(296),u=r(a),c=function(){function t(){i(this,t)}return t.addQueryParam=function(t,e,n){return t.indexOf("?")<0&&(t+="?"),"?"!==t[t.length-1]&&(t+="&"),t+=encodeURIComponent(e),t+="=",t+=encodeURIComponent(n)},t.parseUrlFragment=function(t){var e=arguments.length<=1||void 0===arguments[1]?"#":arguments[1],n=arguments.length<=2||void 0===arguments[2]?u.default:arguments[2];o.default.info("UrlUtility.parseUrlFragment"),"string"!=typeof t&&(t=n.location.href);var r=t.lastIndexOf(e);r>=0&&(t=t.substr(r+1));for(var i,s={},a=/([^&=]+)=([^&]*)/g,c=0;i=a.exec(t);)if(s[decodeURIComponent(i[1])]=decodeURIComponent(i[2]),c++>50)return o.default.error("response exceeded expected number of parameters",t),{error:"Response exceeded expected number of parameters"};for(var f in s)return s;return{}},t}();e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0?this._created=s:this._created=parseInt(Date.now()/1e3)}return t.prototype.toStorageString=function(){return a.default.info("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created})},t.fromStorageString=function(e){return a.default.info("State.fromStorageString"),new t(JSON.parse(e))},t.clearStaleState=function(e,n){a.default.info("State.clearStaleState");var r=Date.now()/1e3-n;return e.getAllKeys().then(function(n){a.default.info("got keys",n);var i=[],s=!0,o=!1,u=void 0;try{for(var c,f=function(){var n=c.value;l=e.get(n).then(function(i){var s=!1;if(i)try{var o=t.fromStorageString(i);a.default.info("got item from key: ",n,o.created),o.created<=r&&(s=!0)}catch(u){a.default.error("Error parsing state for key",n,u.message),s=!0}else a.default.info("no item in storage for key: ",n),s=!0;return s?(a.default.info("removed item for key: ",n),e.remove(n)):void 0}),i.push(l)},h=n[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var l;f()}}catch(d){o=!0,u=d}finally{try{!s&&h.return&&h.return()}finally{if(o)throw u}}return a.default.info("waiting on promise count:",i.length),Promise.all(i)})},s(t,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"created",get:function(){return this._created}}]),t}();e.default=f,t.exports=e.default},function(t,e){"use strict";
// @preserve Copyright (c) Microsoft Open Technologies, Inc.
function n(){for(var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx",e="0123456789abcdef",n=0,r="",i=0;i0){var s=parseInt(Date.now()/1e3);this.expires_at=s+r}}return s(t,[{key:"expires_in",get:function(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}}},{key:"expired",get:function(){var t=this.expires_in;return void 0!==t?0>=t:void 0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf(u)>=0}}]),t}();e.default=c,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=n(309),u=r(a),c=n(311),f=r(c),h=function l(t){var e=t.url,n=t.id_token_hint,r=t.post_logout_redirect_uri,s=t.data;if(i(this,l),!e)throw o.default.error("No url passed to SignoutRequest"),new Error("url");n&&(e=u.default.addQueryParam(e,"id_token_hint",n),r&&(e=u.default.addQueryParam(e,"post_logout_redirect_uri",r),s&&(this.state=new f.default({data:s}),e=u.default.addQueryParam(e,"state",this.state.id)))),this.url=e};e.default=h,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(309),o=r(s),a=function u(t){i(this,u);var e=o.default.parseUrlFragment(t,"?");this.error=e.error,this.error_description=e.error_description,this.error_uri=e.error_uri,this.state=e.state};e.default=a,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n=0?(c.default.info("no need to revoke due to no token or JWT"),Promise.resolve()):this._getRevocationClient().then(function(t){return c.default.info("calling token revocation endpoint"),t.revoke(e)})},e.prototype._getRevocationClient=function(){var t=this;return this._tokenRevocationClient?(c.default.info("_getRevocationClient found in cache"),Promise.resolve(this._tokenRevocationClient)):(c.default.info("_getRevocationClient not found in cache"),this.metadataService.getRevocationEndpoint().then(function(e){if(!e)throw c.default.error("Revocation not supported"),new Error("Revocation not supported");return t._tokenRevocationClient=new t._TokenRevocationClientCtor({url:e,client_id:t._settings.client_id}),c.default.info("TokenRevocationClient created and cached"),t._tokenRevocationClient}))},e.prototype._signin=function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.default.info("_signin"),this._signinStart(t,e,r).then(function(t){return n._signinEnd(t.url)})},e.prototype._signinCallback=function(t,e){return c.default.info("_signinCallback"),e.callback(t)},e.prototype._signout=function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.default.info("_signout"),this._signoutStart(t,e,r).then(function(t){return n._signoutEnd(t.url)})},e.prototype._signoutCallback=function(t,e){return c.default.info("_signoutCallback"),e.callback(t)},e.prototype.signinRedirect=function(t){return c.default.info("UserManager.signinRedirect"),this._signinStart(t,this._redirectNavigator)},e.prototype.signinRedirectCallback=function(t){return c.default.info("UserManager.signinRedirectCallback"),this._signinEnd(t||this._redirectNavigator.url)},e.prototype.signoutRedirect=function(t){return c.default.info("UserManager.signoutRedirect"),this._signoutStart(t,this._redirectNavigator)},e.prototype.signoutPopup=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c.default.info("UserManager.signoutPopup");var e=t.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return e?this._signout(t,this._popupNavigator,{startUrl:e,popupWindowFeatures:t.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:t.popupWindowTarget||this.settings.popupWindowTarget}):(c.default.error("No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},e.prototype.signoutRedirectCallback=function(t){return c.default.info("UserManager.signoutRedirectCallback"),this._signoutEnd(t||this._redirectNavigator.url)},e.prototype._signinStart=function(t,e){var n=this,r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.default.info("_signinStart"),e.prepare(r).then(function(e){return c.default.info("got navigator window handle"),n.createSigninRequest(t).then(function(t){return c.default.info("got signin request"),r.url=t.url,e.navigate(r)})})},e.prototype._signinEnd=function(t){var e=this;return c.default.info("_signinEnd"),this.processSigninResponse(t).then(function(t){c.default.info("got signin response");var n=new g.default(t);return e._storeUser(n).then(function(){return c.default.info("user stored"),e._events.load(n),n})})},e.prototype._signoutStart=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=this,n=arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return c.default.info("_signoutStart"),n.prepare(r).then(function(n){return c.default.info("got navigator window handle"),e.getUser().then(function(i){return c.default.info("loaded current user from storage"),e._revokeInternal().then(function(){var s=t.id_token_hint||i&&i.id_token;return s&&(c.default.info("Setting id_token into signout request"),t.id_token_hint=s),e.removeUser().then(function(){return c.default.info("user removed, creating signout request"),e.createSignoutRequest(t).then(function(t){return c.default.info("got signout request"),r.url=t.url,n.navigate(r)})})})})})},e.prototype._signoutEnd=function(t){return c.default.info("_signoutEnd"),this.processSignoutResponse(t).then(function(t){return c.default.info("got signout response"),t})},e.prototype._loadUser=function(){return c.default.info("_loadUser"),this._userStore.get(this._userStoreKey).then(function(t){return t?(c.default.info("user storageString loaded"),g.default.fromStorageString(t)):(c.default.info("no user storageString"),null)})},e.prototype._storeUser=function(t){if(t){c.default.info("_storeUser storing user");var e=t.toStorageString();return this._userStore.set(this._userStoreKey,e)}return c.default.info("_storeUser removing user storage"),this._userStore.remove(this._userStoreKey)},a(e,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),e}(h.default);e.default=_,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n=t:void 0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),t}();e.default=u,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(292),u=r(a),c=n(326),f=r(c),h=n(328),l=r(h),d=function(t){function e(n){i(this,e);var r=s(this,t.call(this,n));return r._userLoaded=new l.default("User loaded"),r._userUnloaded=new l.default("User unloaded"),r._silentRenewError=new l.default("Silent renew error"),r._userSignedOut=new l.default("User signed out"),r._userSessionChanged=new l.default("User session changed"),r}return o(e,t),e.prototype.load=function(e){var n=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];u.default.info("UserManagerEvents.load"),t.prototype.load.call(this,e),n&&this._userLoaded.raise(e)},e.prototype.unload=function(){u.default.info("UserManagerEvents.unload"),t.prototype.unload.call(this),this._userUnloaded.raise()},e.prototype.addUserLoaded=function(t){this._userLoaded.addHandler(t)},e.prototype.removeUserLoaded=function(t){this._userLoaded.removeHandler(t)},e.prototype.addUserUnloaded=function(t){this._userUnloaded.addHandler(t)},e.prototype.removeUserUnloaded=function(t){this._userUnloaded.removeHandler(t)},e.prototype.addSilentRenewError=function(t){this._silentRenewError.addHandler(t)},e.prototype.removeSilentRenewError=function(t){this._silentRenewError.removeHandler(t)},e.prototype._raiseSilentRenewError=function(t){u.default.info("UserManagerEvents._raiseSilentRenewError",t.message),this._silentRenewError.raise(t)},e.prototype.addUserSignedOut=function(t){this._userSignedOut.addHandler(t)},e.prototype.removeUserSignedOut=function(t){this._userSignedOut.removeHandler(t)},e.prototype._raiseUserSignedOut=function(t){u.default.info("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise(t)},e.prototype.addUserSessionChanged=function(t){this._userSessionChanged.addHandler(t)},e.prototype.removeUserSessionChanged=function(t){this._userSessionChanged.removeHandler(t)},e.prototype._raiseUserSessionChanged=function(t){u.default.info("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise(t)},e}(f.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=n(327),u=r(a),c=60,f=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.accessTokenExpiringNotificationTime,r=void 0===n?c:n,s=e.accessTokenExpiringTimer,o=void 0===s?new u.default("Access token expiring"):s,a=e.accessTokenExpiredTimer,f=void 0===a?new u.default("Access token expired"):a;i(this,t),this._accessTokenExpiringNotificationTime=r,this._accessTokenExpiring=o,this._accessTokenExpired=f}return t.prototype.load=function(t){if(o.default.info("AccessTokenEvents.load"),this._cancelTimers(),t.access_token){var e=t.expires_in;if(o.default.info("access token present, remaining duration:",e),e>0){var n=e-this._accessTokenExpiringNotificationTime;0>=n&&(n=1),o.default.info("registering expiring timer in:",n),this._accessTokenExpiring.init(n)}var r=e+1;o.default.info("registering expired timer in:",r),this._accessTokenExpired.init(r)}},t.prototype.unload=function(){o.default.info("AccessTokenEvents.unload"),this._cancelTimers()},t.prototype._cancelTimers=function(){o.default.info("canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},t.prototype.addAccessTokenExpiring=function(t){this._accessTokenExpiring.addHandler(t)},t.prototype.removeAccessTokenExpiring=function(t){this._accessTokenExpiring.removeHandler(t)},t.prototype.addAccessTokenExpired=function(t){this._accessTokenExpired.addHandler(t)},t.prototype.removeAccessTokenExpired=function(t){this._accessTokenExpired.removeHandler(t)},t}();e.default=f,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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}function o(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)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(292),u=(r(a),n(296)),c=r(u),f=n(328),h=r(f),l=function(t){function e(n){var r=arguments.length<=1||void 0===arguments[1]?c.default.timer:arguments[1];i(this,e);var o=s(this,t.call(this,n));return o._timer=r,o}return o(e,t),e.prototype.init=function(t){this.cancel(),0>=t&&(t=1),this._timerHandle=this._timer.setTimeout(this._callback.bind(this),1e3*t)},e.prototype.cancel=function(){this._timerHandle&&(this._timer.clearTimeout(this._timerHandle),this._timerHandle=null)},e.prototype._callback=function(){this._timerHandle=null,t.prototype.raise.call(this)},e}(h.default);e.default=l,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{
value:!0});var s=n(292),o=r(s),a=function(){function t(e){i(this,t),this._name=e,this._callbacks=[]}return t.prototype.addHandler=function(t){this._callbacks.push(t)},t.prototype.removeHandler=function(t){var e=this._callbacks.findIndex(function(e){return e===t});e>=0&&this._callbacks.splice(e,1)},t.prototype.raise=function(){o.default.info("Raising event: "+this._name);var t=!0,e=!1,n=void 0;try{for(var r,i=this._callbacks[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var s=r.value;s.apply(void 0,arguments)}}catch(a){e=!0,n=a}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}},t}();e.default=a,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(292),o=r(s),a=function(){function t(e){i(this,t),this._userManager=e,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring.bind(this)),this._userManager.getUser().then(function(t){}).catch(function(t){o.default.error("Error from getUser:",t.message)})}return t.prototype._tokenExpiring=function(){var t=this;o.default.info("SilentRenewService automatically renewing access token"),this._userManager.signinSilent().then(function(t){o.default.info("Silent token renewal successful")},function(e){o.default.error("Error from signinSilent:",e.message),t._userManager.events._raiseSilentRenewError(e)})},t}();e.default=a,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n