solidus_nexio 0.6.4 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,394 @@
1
- /*! For license information please see checkout.js.LICENSE.txt */
2
- (()=>{var t={498:(t,e,n)=>{"use strict";const i=window.Rails||window.$.rails;var r=function(t){var e=t.headers,n=t.status;return 404===n||500<=n?Promise.reject({headers:e,status:n}):-1!==(t.headers.get("Content-Type")+"").indexOf("json")&&204!==t.status?t.json().then((function(t){return{headers:e,status:n,json:t}}),(function(){return{headers:e,status:n,json:null}})):{headers:e,status:n,json:null}};const o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={method:e,credentials:"include",headers:new Headers};return o.headers.append("X-CSRF-Token",i.csrfToken()),o.headers.append("accept","application/json"),n.body&&(n.body instanceof FormData?o.body=n.body:(o.body=JSON.stringify(n.body),o.headers.append("content-type","application/json"))),window.fetch(t,o).then(r,(function(t){return Promise.reject(t)}))};var s=function(t){var e=t.paths,n=t.data;return o(e.oneTimeToken,"POST",{body:{data:n}}).then((function(t){return 201===t.status?t.json.data:Promise.reject(t)}),(function(t){return Promise.reject(t)}))},a=function(t){return 200!==t.status||"checkout"===t.json.data.state?null:t.json.data.state},h=function(t){return o(t).then(a,(function(){return"failed"}))};function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var l=window.nexioErrorMessages||{default_error:"Something went wrong"},c=function(t,e,n,i){var r=function(t,e){var n=document.createElement("label");return n.setAttribute("data-nexio-error",t),n.classList.add("error","nexio-error"),n.innerHTML=function(t,e){return e&&e.includes(" ")?e:l[t]&&l[t][e]||l.base&&l.base[e]||l.default_error}(t,e),n}(e,n);"base"===e?t.appendChild(r):i&&(i.classList.add("error"),i.parentNode.appendChild(r))},f=function(t){return t.querySelectorAll("[data-nexio-error]").forEach((function(t){var e=t.parentNode;e.removeChild(t);var n=e.querySelector("[name].error");n&&n.classList.remove("error")}))},d={number:"card_number",cc_type:"card_type",name:"card_name",expiry:"card_expiration",verification_value:"card_code"},p=function(t,e,n){var i=d[e]||e,r=t.querySelector('[data-hook="'.concat(i,'"]'));return!!r&&(r.value=n,!0)};function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var y=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e,this.config=n}var e,n;return e=t,(n=[{key:"setup",value:function(t,e){e.classList.add("solidus-nexio-apm"),s(this.config).then((function(n){var i=document.createElement("iframe");window.addEventListener("message",(function(n){if(i.contentWindow===n.source){var r=n.data;if(r&&"object"===m(r))switch(r.event){case"loaded":e.classList.add("solidus-nexio-apm--loaded");break;case"success":!function(t,e,n){p(e,"nexio_apm_transaction_id",n.id),n.apm&&p(e,"gateway_payment_profile_id",n.apm.token),t.submit()}(t,e,r.data);break;case"error":f(e),c(e,"base",r.data.message||"nexio_apm_payment_failed")}}})),i.setAttribute("src",n.iframe_url),i.classList.add("solidus-nexio-apm-iframe"),e.appendChild(i)}))}}])&&g(e.prototype,n),t}();function v(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function b(t,e){return t&e}function w(t,e){return t|e}function S(t,e){return t^e}function T(t,e){return t&~e}function x(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 E(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var D,O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function B(t){var e,n,i="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),i+=O.charAt(n>>6)+O.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),i+=O.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),i+=O.charAt(n>>2)+O.charAt((3&n)<<4));(3&i.length)>0;)i+="=";return i}function A(t){var e,n="",i=0,r=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var o=O.indexOf(t.charAt(e));o<0||(0==i?(n+=v(o>>2),r=3&o,i=1):1==i?(n+=v(r<<2|o>>4),r=15&o,i=2):2==i?(n+=v(r),n+=v(o>>2),r=3&o,i=3):(n+=v(r<<2|o>>4),n+=v(15&o),i=0))}return 1==i&&(n+=v(r<<2)),n}var _,C={decode:function(t){var e;if(void 0===_){var n="= \f\n\r\t \u2028\u2029";for(_=Object.create(null),e=0;e<64;++e)_["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(_["-"]=62,_._=63,e=0;e<n.length;++e)_[n.charAt(e)]=-1}var i=[],r=0,o=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=_[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);r|=s,++o>=4?(i[i.length]=r>>16,i[i.length]=r>>8&255,i[i.length]=255&r,r=0,o=0):r<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=r>>10;break;case 3:i[i.length]=r>>16,i[i.length]=r>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=C.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return C.decode(t)}},R=1e13,k=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,i,r=this.buf,o=r.length;for(n=0;n<o;++n)(i=r[n]*t+e)<R?e=0:i-=(e=0|i/R)*R,r[n]=i;e>0&&(r[n]=e)},t.prototype.sub=function(t){var e,n,i=this.buf,r=i.length;for(e=0;e<r;++e)(n=i[e]-t)<0?(n+=R,t=1):t=0,i[e]=n;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),i=e.length-2;i>=0;--i)n+=(R+e[i]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=e*R+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),I=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,V=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function N(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var P,L=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var i="",r=t;r<e;++r)if(i+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var i=this.get(n);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",i=t;i<e;++i)n+=String.fromCharCode(this.get(i));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",i=t;i<e;){var r=this.get(i++);n+=r<128?String.fromCharCode(r):r>191&&r<224?String.fromCharCode((31&r)<<6|63&this.get(i++)):String.fromCharCode((15&r)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,i,r="",o=t;o<e;)n=this.get(o++),i=this.get(o++),r+=String.fromCharCode(n<<8|i);return r},t.prototype.parseTime=function(t,e,n){var i=this.parseStringISO(t,e),r=(n?I:V).exec(i);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(t,e){for(var n,i=this.get(t),r=i>127,o=r?255:0,s="";i==o&&++t<e;)i=this.get(t);if(0==(n=e-t))return r?-1:0;if(n>4){for(s=i,n<<=3;0==(128&(+s^o));)s=+s<<1,--n;s="("+n+" bit)\n"}r&&(i-=256);for(var a=new k(i),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return s+a.toString()},t.prototype.parseBitString=function(t,e,n){for(var i=this.get(t),r="("+((e-t-1<<3)-i)+" bit)\n",o="",s=t+1;s<e;++s){for(var a=this.get(s),h=s==e-1?i:0,u=7;u>=h;--u)o+=a>>u&1?"1":"0";if(o.length>n)return r+N(o,n)}return r+o},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return N(this.parseStringISO(t,e),n);var i=e-t,r="("+i+" byte)\n";i>(n/=2)&&(e=t+n);for(var o=t;o<e;++o)r+=this.hexByte(this.get(o));return i>n&&(r+="…"),r},t.prototype.parseOID=function(t,e,n){for(var i="",r=new k,o=0,s=t;s<e;++s){var a=this.get(s);if(r.mulAdd(128,127&a),o+=7,!(128&a)){if(""===i)if((r=r.simplify())instanceof k)r.sub(80),i="2."+r.toString();else{var h=r<80?r<40?0:1:2;i=h+"."+(r-40*h)}else i+="."+r.toString();if(i.length>n)return N(i,n);r=new k,o=0}}return o>0&&(i+=".incomplete"),i},t}(),j=function(){function t(t,e,n,i,r){if(!(i instanceof F))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=i,this.sub=r}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return N(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return N(this.stream.parseStringISO(e,e+n),t);case 30:return N(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,i=this.sub.length;n<i;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var i=0;i<n;++i)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof L?e:new L(e,0);var i=new L(n),r=new F(n),o=t.decodeLength(n),s=n.pos,a=s-i.pos,h=null,u=function(){var e=[];if(null!==o){for(var i=s+o;n.pos<i;)e[e.length]=t.decode(n);if(n.pos!=i)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var r=t.decode(n);if(r.tag.isEOC())break;e[e.length]=r}o=s-n.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(r.tagConstructed)h=u();else if(r.isUniversal()&&(3==r.tagNumber||4==r.tagNumber))try{if(3==r.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=u();for(var l=0;l<h.length;++l)if(h[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);n.pos=s+Math.abs(o)}return new t(i,a,o,r,h)},t}(),F=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new k;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),M=[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],q=(1<<26)/M[M.length-1],H=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(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,i=(1<<e)-1,r=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(r=!0,o=v(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&i,a<=0&&(a+=this.DB,--s)),n>0&&(r=!0),r&&(o+=v(n));return r?o:"0"},t.prototype.negate=function(){var e=$();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+et(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=$();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new K(e):new z(e),this.exp(t,n)},t.prototype.clone=function(){var t=$();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,i=this.DB-t*this.DB%8,r=0;if(t-- >0)for(i<this.DB&&(n=this[t]>>i)!=(this.s&this.DM)>>i&&(e[r++]=n|this.s<<this.DB-i);t>=0;)i<8?(n=(this[t]&(1<<i)-1)<<8-i,n|=this[--t]>>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(r>0||n!=this.s)&&(e[r++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=$();return this.bitwiseTo(t,b,e),e},t.prototype.or=function(t){var e=$();return this.bitwiseTo(t,w,e),e},t.prototype.xor=function(t){var e=$();return this.bitwiseTo(t,S,e),e},t.prototype.andNot=function(t){var e=$();return this.bitwiseTo(t,T,e),e},t.prototype.not=function(){for(var t=$(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=$();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=$();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+x(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=E(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,w)},t.prototype.clearBit=function(t){return this.changeBit(t,T)},t.prototype.flipBit=function(t){return this.changeBit(t,S)},t.prototype.add=function(t){var e=$();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=$();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=$();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=$();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=$();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=$(),n=$();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,i,r=t.bitLength(),o=tt(1);if(r<=0)return o;n=r<18?1:r<48?3:r<144?4:r<768?5:6,i=r<8?new K(e):e.isEven()?new G(e):new z(e);var s=[],a=3,h=n-1,u=(1<<n)-1;if(s[1]=i.convert(this),n>1){var l=$();for(i.sqrTo(s[1],l);a<=u;)s[a]=$(),i.mulTo(l,s[a-2],s[a]),a+=2}var c,f,d=t.t-1,p=!0,m=$();for(r=et(t[d])-1;d>=0;){for(r>=h?c=t[d]>>r-h&u:(c=(t[d]&(1<<r+1)-1)<<h-r,d>0&&(c|=t[d-1]>>this.DB+r-h)),a=n;0==(1&c);)c>>=1,--a;if((r-=a)<0&&(r+=this.DB,--d),p)s[c].copyTo(o),p=!1;else{for(;a>1;)i.sqrTo(o,m),i.sqrTo(m,o),a-=2;a>0?i.sqrTo(o,m):(f=o,o=m,m=f),i.mulTo(m,s[c],o)}for(;d>=0&&0==(t[d]&1<<r);)i.sqrTo(o,m),f=o,o=m,m=f,--r<0&&(r=this.DB-1,--d)}return i.revert(o)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var i=e.clone(),r=this.clone(),o=tt(1),s=tt(0),a=tt(0),h=tt(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),n?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(e,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);i.compareTo(r)>=0?(i.subTo(r,i),n&&o.subTo(a,o),s.subTo(h,s)):(r.subTo(i,r),n&&a.subTo(o,a),h.subTo(s,h))}return 0!=r.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new U)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var i=e;e=n,n=i}var r=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(r<o&&(o=r),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(r=e.getLowestSetBit())>0&&e.rShiftTo(r,e),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=M[M.length-1]){for(e=0;e<M.length;++e)if(n[0]==M[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<M.length;){for(var i=M[e],r=e+1;r<M.length&&i<q;)i*=M[r++];for(i=n.modInt(i);e<r;)if(i%M[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var i;if(16==n)i=4;else if(8==n)i=3;else if(256==n)i=8;else if(2==n)i=1;else if(32==n)i=5;else{if(4!=n)return void this.fromRadix(e,n);i=2}this.t=0,this.s=0;for(var r=e.length,o=!1,s=0;--r>=0;){var a=8==i?255&+e[r]:Q(e,r);a<0?"-"==e.charAt(r)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=i)>=this.DB&&(s-=this.DB))}8==i&&0!=(128&+e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(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},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,i=this.DB-n,r=(1<<i)-1,o=Math.floor(t/this.DB),s=this.s<<n&this.DM,a=this.t-1;a>=0;--a)e[a+o+1]=this[a]>>i|s,s=(this[a]&r)<<n;for(a=o-1;a>=0;--a)e[a]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var i=t%this.DB,r=this.DB-i,o=(1<<i)-1;e[0]=this[n]>>i;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<r,e[s-n]=this[s]>>i;i>0&&(e[this.t-n-1]|=(this.s&o)<<r),e.t=this.t-n,e.clamp()}},t.prototype.subTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]-t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i-=t[n],e[n++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=this.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var i=this.abs(),r=e.abs(),o=i.t;for(n.t=o+r.t;--o>=0;)n[o]=0;for(o=0;o<r.t;++o)n[o+i.t]=i.am(0,r[o],n,o,0,i.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var i=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,i,e.t-n-1))>=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()},t.prototype.divRemTo=function(e,n,i){var r=e.abs();if(!(r.t<=0)){var o=this.abs();if(o.t<r.t)return null!=n&&n.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=$());var s=$(),a=this.s,h=e.s,u=this.DB-et(r[r.t-1]);u>0?(r.lShiftTo(u,s),o.lShiftTo(u,i)):(r.copyTo(s),o.copyTo(i));var l=s.t,c=s[l-1];if(0!=c){var f=c*(1<<this.F1)+(l>1?s[l-2]>>this.F2:0),d=this.FV/f,p=(1<<this.F1)/f,m=1<<this.F2,g=i.t,y=g-l,v=null==n?$():n;for(s.dlShiftTo(y,v),i.compareTo(v)>=0&&(i[i.t++]=1,i.subTo(v,i)),t.ONE.dlShiftTo(l,v),v.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--y>=0;){var b=i[--g]==c?this.DM:Math.floor(i[g]*d+(i[g-1]+m)*p);if((i[g]+=s.am(0,b,i,y,0,l))<b)for(s.dlShiftTo(y,v),i.subTo(v,i);i[g]<--b;)i.subTo(v,i)}null!=n&&(i.drShiftTo(l,n),a!=h&&t.ZERO.subTo(n,n)),i.t=l,i.clamp(),u>0&&i.rShiftTo(u,i),a<0&&t.ZERO.subTo(i,i)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||e<1)return t.ONE;var i=$(),r=$(),o=n.convert(this),s=et(e)-1;for(o.copyTo(i);--s>=0;)if(n.sqrTo(i,r),(e&1<<s)>0)n.mulTo(r,o,i);else{var a=i;i=r,r=a}return n.revert(i)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=tt(n),r=$(),o=$(),s="";for(this.divRemTo(i,r,o);r.signum()>0;)s=(n+o.intValue()).toString(t).substr(1)+s,r.divRemTo(i,r,o);return o.intValue().toString(t)+s},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var i=this.chunkSize(n),r=Math.pow(n,i),o=!1,s=0,a=0,h=0;h<e.length;++h){var u=Q(e,h);u<0?"-"==e.charAt(h)&&0==this.signum()&&(o=!0):(a=n*a+u,++s>=i&&(this.dMultiply(r),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(n,s)),this.dAddOffset(a,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,i){if("number"==typeof n)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),w,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var r=[],o=7&e;r.length=1+(e>>3),n.nextBytes(r),o>0?r[0]&=(1<<o)-1:r[0]=0,this.fromString(r,256)}},t.prototype.bitwiseTo=function(t,e,n){var i,r,o=Math.min(t.t,this.t);for(i=0;i<o;++i)n[i]=e(this[i],t[i]);if(t.t<this.t){for(r=t.s&this.DM,i=o;i<this.t;++i)n[i]=e(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=o;i<t.t;++i)n[i]=e(r,t[i]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var i=t.ONE.shiftLeft(e);return this.bitwiseTo(i,n,i),i},t.prototype.addTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]+t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i+=t[n],e[n++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=this.DV+i),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(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]}},t.prototype.multiplyLowerTo=function(t,e,n){var i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(var r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){--e;var i=n.t=this.t+t.t-e;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)n[this.t+i-e]=this.am(e-i,t[i],n,0,0,this.t+i-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(t<=0)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 i=this.t-1;i>=0;--i)n=(e*n+this[i])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),i=n.getLowestSetBit();if(i<=0)return!1;var r=n.shiftRight(i);(e=e+1>>1)>M.length&&(e=M.length);for(var o=$(),s=0;s<e;++s){o.fromInt(M[Math.floor(Math.random()*M.length)]);var a=o.modPow(r,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(n)){for(var h=1;h++<i&&0!=a.compareTo(n);)if(0==(a=a.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=a.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=$();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(n.compareTo(i)<0){var r=n;n=i,i=r}var o=n.getLowestSetBit(),s=i.getLowestSetBit();if(s<0)e(n);else{o<s&&(s=o),s>0&&(n.rShiftTo(s,n),i.rShiftTo(s,i));var a=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=i.getLowestSetBit())>0&&i.rShiftTo(o,i),n.compareTo(i)>=0?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),n.signum()>0?setTimeout(a,0):(s>0&&i.lShiftTo(s,i),setTimeout((function(){e(i)}),0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,n,i,r){if("number"==typeof n)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),w,this),this.isEven()&&this.dAddOffset(1,0);var o=this,s=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(t.ONE.shiftLeft(e-1),o),o.isProbablePrime(n)?setTimeout((function(){r()}),0):setTimeout(s,0)};setTimeout(s,0)}else{var a=[],h=7&e;a.length=1+(e>>3),n.nextBytes(a),h>0?a[0]&=(1<<h)-1:a[0]=0,this.fromString(a,256)}},t}(),U=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),K=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),z=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=$();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(H.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=$();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],i=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,i,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)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),G=function(){function t(t){this.m=t,this.r2=$(),this.q3=$(),H.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=$();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(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)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function $(){return new H(null)}function Z(t,e){return new H(t,e)}var W="undefined"!=typeof navigator;W&&"Microsoft Internet Explorer"==navigator.appName?(H.prototype.am=function(t,e,n,i,r,o){for(var s=32767&e,a=e>>15;--o>=0;){var h=32767&this[t],u=this[t++]>>15,l=a*h+u*s;r=((h=s*h+((32767&l)<<15)+n[i]+(1073741823&r))>>>30)+(l>>>15)+a*u+(r>>>30),n[i++]=1073741823&h}return r},P=30):W&&"Netscape"!=navigator.appName?(H.prototype.am=function(t,e,n,i,r,o){for(;--o>=0;){var s=e*this[t++]+n[i]+r;r=Math.floor(s/67108864),n[i++]=67108863&s}return r},P=26):(H.prototype.am=function(t,e,n,i,r,o){for(var s=16383&e,a=e>>14;--o>=0;){var h=16383&this[t],u=this[t++]>>14,l=a*h+u*s;r=((h=s*h+((16383&l)<<14)+n[i]+r)>>28)+(l>>14)+a*u,n[i++]=268435455&h}return r},P=28),H.prototype.DB=P,H.prototype.DM=(1<<P)-1,H.prototype.DV=1<<P,H.prototype.FV=Math.pow(2,52),H.prototype.F1=52-P,H.prototype.F2=2*P-52;var Y,X,J=[];for(Y="0".charCodeAt(0),X=0;X<=9;++X)J[Y++]=X;for(Y="a".charCodeAt(0),X=10;X<36;++X)J[Y++]=X;for(Y="A".charCodeAt(0),X=10;X<36;++X)J[Y++]=X;function Q(t,e){var n=J[t.charCodeAt(e)];return null==n?-1:n}function tt(t){var e=$();return e.fromInt(t),e}function et(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}H.ZERO=tt(0),H.ONE=tt(1);var nt,it,rt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,i;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[n],this.S[n]=i;this.i=0,this.j=0},t.prototype.next=function(){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]},t}(),ot=null;if(null==ot){ot=[],it=0;var st=void 0;if(window.crypto&&window.crypto.getRandomValues){var at=new Uint32Array(256);for(window.crypto.getRandomValues(at),st=0;st<at.length;++st)ot[it++]=255&at[st]}var ht=0,ut=function(t){if((ht=ht||0)>=256||it>=256)window.removeEventListener?window.removeEventListener("mousemove",ut,!1):window.detachEvent&&window.detachEvent("onmousemove",ut);else try{var e=t.x+t.y;ot[it++]=255&e,ht+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",ut,!1):window.attachEvent&&window.attachEvent("onmousemove",ut)}function lt(){if(null==nt){for(nt=new rt;it<256;){var t=Math.floor(65536*Math.random());ot[it++]=255&t}for(nt.init(ot),it=0;it<ot.length;++it)ot[it]=0;it=0}return nt.next()}var ct=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=lt()},t}(),ft=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(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)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Z(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,n=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],i=t.length-1;i>=0&&e>0;){var r=t.charCodeAt(i--);r<128?n[--e]=r:r>127&&r<2048?(n[--e]=63&r|128,n[--e]=r>>6|192):(n[--e]=63&r|128,n[--e]=r>>6&63|128,n[--e]=r>>12|224)}n[--e]=0;for(var o=new ct,s=[];e>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);n[--e]=s[0]}return n[--e]=2,n[--e]=0,new H(n)}(t,e);if(null==n)return null;var i=this.doPublic(n);if(null==i)return null;for(var r=i.toString(16),o=r.length,s=0;s<2*e-o;s++)r="0"+r;return r},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Z(t,16),this.e=parseInt(e,16),this.d=Z(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,i,r,o,s,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Z(t,16),this.e=parseInt(e,16),this.d=Z(n,16),this.p=Z(i,16),this.q=Z(r,16),this.dmp1=Z(o,16),this.dmq1=Z(s,16),this.coeff=Z(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new ct,i=t>>1;this.e=parseInt(e,16);for(var r=new H(e,16);;){for(;this.p=new H(t-i,1,n),0!=this.p.subtract(H.ONE).gcd(r).compareTo(H.ONE)||!this.p.isProbablePrime(10););for(;this.q=new H(i,1,n),0!=this.q.subtract(H.ONE).gcd(r).compareTo(H.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(H.ONE),a=this.q.subtract(H.ONE),h=s.multiply(a);if(0==h.gcd(r).compareTo(H.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(h),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=Z(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),i=0;i<n.length&&0==n[i];)++i;if(n.length-i!=e-1||2!=n[i])return null;for(++i;0!=n[i];)if(++i>=n.length)return null;for(var r="";++i<n.length;){var o=255&n[i];o<128?r+=String.fromCharCode(o):o>191&&o<224?(r+=String.fromCharCode((31&o)<<6|63&n[i+1]),++i):(r+=String.fromCharCode((15&o)<<12|(63&n[i+1])<<6|63&n[i+2]),i+=2)}return r}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var i=new ct,r=t>>1;this.e=parseInt(e,16);var o=new H(e,16),s=this,a=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(H.ONE),i=s.q.subtract(H.ONE),r=e.multiply(i);0==r.gcd(o).compareTo(H.ONE)?(s.n=s.p.multiply(s.q),s.d=o.modInverse(r),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(i),s.coeff=s.q.modInverse(s.p),setTimeout((function(){n()}),0)):setTimeout(a,0)},h=function(){s.q=$(),s.q.fromNumberAsync(r,1,i,(function(){s.q.subtract(H.ONE).gcda(o,(function(t){0==t.compareTo(H.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)}))}))},u=function(){s.p=$(),s.p.fromNumberAsync(t-r,1,i,(function(){s.p.subtract(H.ONE).gcda(o,(function(t){0==t.compareTo(H.ONE)&&s.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,n){var i=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,i="",r=0;r<n;r+=2)i+="ff";return Z("0001"+i+"00"+t,16)}((dt[n]||"")+e(t).toString(),this.n.bitLength()/4);if(null==i)return null;var r=this.doPrivate(i);if(null==r)return null;var o=r.toString(16);return 0==(1&o.length)?o:"0"+o},t.prototype.verify=function(t,e,n){var i=Z(e,16),r=this.doPublic(i);return null==r?null:function(t){for(var e in dt)if(dt.hasOwnProperty(e)){var n=dt[e],i=n.length;if(t.substr(0,i)==n)return t.substr(i)}return t}(r.toString(16).replace(/^1f+00/,""))==n(t).toString()},t}(),dt={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},pt={};pt.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var r;for(r in n)t.prototype[r]=n[r];var o=function(){},s=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(r=0;r<s.length;r+=1){var n=s[r],i=e[n];"function"==typeof i&&i!=Object.prototype[n]&&(t[n]=i)}})}catch(t){}o(t.prototype,n)}}};var mt={};void 0!==mt.asn1&&mt.asn1||(mt.asn1={}),mt.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).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var i="",r=0;r<n;r++)i+="f";e=new H(i,16).xor(t).add(H.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=mt.asn1,n=e.DERBoolean,i=e.DERInteger,r=e.DERBitString,o=e.DEROctetString,s=e.DERNull,a=e.DERObjectIdentifier,h=e.DEREnumerated,u=e.DERUTF8String,l=e.DERNumericString,c=e.DERPrintableString,f=e.DERTeletexString,d=e.DERIA5String,p=e.DERUTCTime,m=e.DERGeneralizedTime,g=e.DERSequence,y=e.DERSet,v=e.DERTaggedObject,b=e.ASN1Util.newObject,w=Object.keys(t);if(1!=w.length)throw"key of param shall be only one.";var S=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new n(t[S]);if("int"==S)return new i(t[S]);if("bitstr"==S)return new r(t[S]);if("octstr"==S)return new o(t[S]);if("null"==S)return new s(t[S]);if("oid"==S)return new a(t[S]);if("enum"==S)return new h(t[S]);if("utf8str"==S)return new u(t[S]);if("numstr"==S)return new l(t[S]);if("prnstr"==S)return new c(t[S]);if("telstr"==S)return new f(t[S]);if("ia5str"==S)return new d(t[S]);if("utctime"==S)return new p(t[S]);if("gentime"==S)return new m(t[S]);if("seq"==S){for(var T=t[S],x=[],E=0;E<T.length;E++){var D=b(T[E]);x.push(D)}return new g({array:x})}if("set"==S){for(T=t[S],x=[],E=0;E<T.length;E++)D=b(T[E]),x.push(D);return new y({array:x})}if("tag"==S){var O=t[S];if("[object Array]"===Object.prototype.toString.call(O)&&3==O.length){var B=b(O[2]);return new v({tag:O[0],explicit:O[1],obj:B})}var A={};if(void 0!==O.explicit&&(A.explicit=O.explicit),void 0!==O.tag&&(A.tag=O.tag),void 0===O.obj)throw"obj shall be specified for 'tag'.";return A.obj=b(O.obj),new v(A)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},mt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),i=(e=Math.floor(n/40)+"."+n%40,""),r=2;r<t.length;r+=2){var o=("00000000"+parseInt(t.substr(r,2),16).toString(2)).slice(-8);i+=o.substr(1,7),"0"==o.substr(0,1)&&(e=e+"."+new H(i,2).toString(10),i="")}return e},mt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",i=new H(t,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",s=0;s<r;s++)o+="0";for(i=o+i,s=0;s<i.length-1;s+=7){var a=i.substr(s,7);s!=i.length-7&&(a="1"+a),n+=e(parseInt(a,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",r=t.split("."),o=40*parseInt(r[0])+parseInt(r[1]);i+=e(o),r.splice(0,2);for(var s=0;s<r.length;s++)i+=n(r[s]);return i},mt.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},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""}},mt.asn1.DERAbstractString=function(t){mt.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=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},pt.lang.extend(mt.asn1.DERAbstractString,mt.asn1.ASN1Object),mt.asn1.DERAbstractTime=function(t){mt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var i=this.zeroPadding,r=this.localDateToUTC(t),o=String(r.getFullYear());"utc"==e&&(o=o.substr(2,2));var s=o+i(String(r.getMonth()+1),2)+i(String(r.getDate()),2)+i(String(r.getHours()),2)+i(String(r.getMinutes()),2)+i(String(r.getSeconds()),2);if(!0===n){var a=r.getMilliseconds();if(0!=a){var h=i(String(a),3);s=s+"."+(h=h.replace(/[0]+$/,""))}}return s+"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=stohex(t)},this.setByDateValue=function(t,e,n,i,r,o){var s=new Date(Date.UTC(t,e-1,n,i,r,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},pt.lang.extend(mt.asn1.DERAbstractTime,mt.asn1.ASN1Object),mt.asn1.DERAbstractStructured=function(t){mt.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,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},pt.lang.extend(mt.asn1.DERAbstractStructured,mt.asn1.ASN1Object),mt.asn1.DERBoolean=function(){mt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},pt.lang.extend(mt.asn1.DERBoolean,mt.asn1.ASN1Object),mt.asn1.DERInteger=function(t){mt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=mt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new H(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},pt.lang.extend(mt.asn1.DERInteger,mt.asn1.ASN1Object),mt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=mt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}mt.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(t<0||7<t)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){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var i="";for(n=0;n<t.length-1;n+=8){var r=t.substr(n,8),o=parseInt(r,2).toString(16);1==o.length&&(o="0"+o),i+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},pt.lang.extend(mt.asn1.DERBitString,mt.asn1.ASN1Object),mt.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=mt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}mt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},pt.lang.extend(mt.asn1.DEROctetString,mt.asn1.DERAbstractString),mt.asn1.DERNull=function(){mt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},pt.lang.extend(mt.asn1.DERNull,mt.asn1.ASN1Object),mt.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="",i=new H(t,10).toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",s=0;s<r;s++)o+="0";for(i=o+i,s=0;s<i.length-1;s+=7){var a=i.substr(s,7);s!=i.length-7&&(a="1"+a),n+=e(parseInt(a,2))}return n};mt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",r=t.split("."),o=40*parseInt(r[0])+parseInt(r[1]);i+=e(o),r.splice(0,2);for(var s=0;s<r.length;s++)i+=n(r[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(t){var e=mt.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},pt.lang.extend(mt.asn1.DERObjectIdentifier,mt.asn1.ASN1Object),mt.asn1.DEREnumerated=function(t){mt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=mt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new H(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},pt.lang.extend(mt.asn1.DEREnumerated,mt.asn1.ASN1Object),mt.asn1.DERUTF8String=function(t){mt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},pt.lang.extend(mt.asn1.DERUTF8String,mt.asn1.DERAbstractString),mt.asn1.DERNumericString=function(t){mt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},pt.lang.extend(mt.asn1.DERNumericString,mt.asn1.DERAbstractString),mt.asn1.DERPrintableString=function(t){mt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},pt.lang.extend(mt.asn1.DERPrintableString,mt.asn1.DERAbstractString),mt.asn1.DERTeletexString=function(t){mt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},pt.lang.extend(mt.asn1.DERTeletexString,mt.asn1.DERAbstractString),mt.asn1.DERIA5String=function(t){mt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},pt.lang.extend(mt.asn1.DERIA5String,mt.asn1.DERAbstractString),mt.asn1.DERUTCTime=function(t){mt.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},pt.lang.extend(mt.asn1.DERUTCTime,mt.asn1.DERAbstractTime),mt.asn1.DERGeneralizedTime=function(t){mt.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},pt.lang.extend(mt.asn1.DERGeneralizedTime,mt.asn1.DERAbstractTime),mt.asn1.DERSequence=function(t){mt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++)t+=this.asn1Array[e].getEncodedHex();return this.hV=t,this.hV}},pt.lang.extend(mt.asn1.DERSequence,mt.asn1.DERAbstractStructured),mt.asn1.DERSet=function(t){mt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},pt.lang.extend(mt.asn1.DERSet,mt.asn1.DERAbstractStructured),mt.asn1.DERTaggedObject=function(t){mt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},pt.lang.extend(mt.asn1.DERTaggedObject,mt.asn1.ASN1Object);var gt,yt=(gt=function(t,e){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}gt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),vt=function(t){function e(n){var i=t.call(this)||this;return n&&("string"==typeof n?i.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&i.parsePropertiesFrom(n)),i}return yt(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?function(t){var e;if(void 0===D){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(D={},e=0;e<16;++e)D[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)D[n.charAt(e)]=e;for(e=0;e<i.length;++e)D[i.charAt(e)]=-1}var r=[],o=0,s=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=D[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);o|=a,++s>=2?(r[r.length]=o,o=0,s=0):o<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return r}(t):C.unarmor(t),r=j.decode(i);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){e=r.sub[1].getHexStringValue(),this.n=Z(e,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=r.sub[3].getHexStringValue();this.d=Z(o,16);var s=r.sub[4].getHexStringValue();this.p=Z(s,16);var a=r.sub[5].getHexStringValue();this.q=Z(a,16);var h=r.sub[6].getHexStringValue();this.dmp1=Z(h,16);var u=r.sub[7].getHexStringValue();this.dmq1=Z(u,16);var l=r.sub[8].getHexStringValue();this.coeff=Z(l,16)}else{if(2!==r.sub.length)return!1;var c=r.sub[1].sub[0];e=c.sub[0].getHexStringValue(),this.n=Z(e,16),n=c.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new mt.asn1.DERInteger({int:0}),new mt.asn1.DERInteger({bigint:this.n}),new mt.asn1.DERInteger({int:this.e}),new mt.asn1.DERInteger({bigint:this.d}),new mt.asn1.DERInteger({bigint:this.p}),new mt.asn1.DERInteger({bigint:this.q}),new mt.asn1.DERInteger({bigint:this.dmp1}),new mt.asn1.DERInteger({bigint:this.dmq1}),new mt.asn1.DERInteger({bigint:this.coeff})]};return new mt.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return B(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new mt.asn1.DERSequence({array:[new mt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new mt.asn1.DERNull]}),e=new mt.asn1.DERSequence({array:[new mt.asn1.DERInteger({bigint:this.n}),new mt.asn1.DERInteger({int:this.e})]}),n=new mt.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new mt.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return B(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(ft);const bt=function(){function t(t){t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new vt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(A(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return B(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return B(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,A(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new vt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.2.0",t}();var wt=n(584),St=n.n(wt),Tt=document.createElement("style");Tt.setAttribute("type","text/css"),Tt.innerHTML='.tingle-modal * {\n box-sizing: border-box;\n}\n\n.tingle-modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n display: flex;\n visibility: hidden;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n -webkit-overflow-scrolling: touch;\n background: rgba(0, 0, 0, .2);\n opacity: 0;\n}\n\n@supports (backdrop-filter: blur(12px)) {\n .tingle-modal {\n backdrop-filter: blur(12px);\n }\n}\n\n/* confirm and alerts\n-------------------------------------------------------------- */\n\n.tingle-modal--confirm .tingle-modal-box {\n text-align: center;\n}\n\n/* modal\n-------------------------------------------------------------- */\n\n.tingle-modal--noOverlayClose {\n cursor: default;\n}\n\n.tingle-modal--noClose .tingle-modal__close {\n display: none;\n}\n\n.tingle-modal__close {\n position: fixed;\n top: 2.5rem;\n right: 2.5rem;\n z-index: 1000;\n padding: 0;\n width: 2rem;\n height: 2rem;\n border: none;\n background-color: transparent;\n color: #fff;\n cursor: pointer;\n}\n\n.tingle-modal__close svg * {\n fill: currentColor;\n}\n\n.tingle-modal__closeLabel {\n display: none;\n}\n\n.tingle-modal__close:hover {\n color: #fff;\n}\n\n.tingle-modal-box {\n position: relative;\n flex-shrink: 0;\n margin-top: auto;\n margin-bottom: auto;\n width: 60%;\n border-radius: 4px;\n background: #fff;\n opacity: 1;\n cursor: auto;\n will-change: transform, opacity;\n}\n\n.tingle-modal-box__content {\n padding: 0;\n}\n\n.tingle-modal-box__footer {\n padding: 1.5rem 2rem;\n width: auto;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n background-color: #f5f5f5;\n cursor: auto;\n}\n\n.tingle-modal-box__footer::after {\n display: table;\n clear: both;\n content: "";\n}\n\n.tingle-modal-box__footer--sticky {\n position: fixed;\n bottom: -200px; /* TODO : find a better way */\n z-index: 10001;\n opacity: 1;\n transition: bottom .3s ease-in-out .3s;\n}\n\n/* state\n-------------------------------------------------------------- */\n\n.tingle-enabled {\n position: fixed;\n right: 0;\n left: 0;\n overflow: hidden;\n}\n\n.tingle-modal--visible .tingle-modal-box__footer {\n bottom: 0;\n}\n\n.tingle-modal--visible {\n visibility: visible;\n opacity: 1;\n}\n\n.tingle-modal--visible .tingle-modal-box {\n animation: scale .2s cubic-bezier(.68, -.55, .265, 1.55) forwards;\n}\n\n.tingle-modal--overflow {\n overflow-y: scroll;\n padding-top: 8vh;\n}\n\n/* btn\n-------------------------------------------------------------- */\n\n.tingle-btn {\n display: inline-block;\n margin: 0 .5rem;\n padding: 1rem 2rem;\n border: none;\n background-color: grey;\n box-shadow: none;\n color: #fff;\n vertical-align: middle;\n text-decoration: none;\n font-size: inherit;\n font-family: inherit;\n line-height: normal;\n cursor: pointer;\n transition: background-color .4s ease;\n}\n\n.tingle-btn--primary {\n background-color: #3498db;\n}\n\n.tingle-btn--danger {\n background-color: #e74c3c;\n}\n\n.tingle-btn--default {\n background-color: #34495e;\n}\n\n.tingle-btn--pull-left {\n float: left;\n}\n\n.tingle-btn--pull-right {\n float: right;\n}\n\n/* responsive\n-------------------------------------------------------------- */\n\n@media (max-width : 540px) {\n .tingle-modal {\n top: 0px;\n display: block;\n padding-top: 60px;\n width: 100%;\n }\n\n .tingle-modal-box {\n width: auto;\n border-radius: 0;\n }\n\n .tingle-modal-box__content {\n overflow-y: scroll;\n }\n\n .tingle-modal--noClose {\n top: 0;\n }\n\n .tingle-modal--noOverlayClose {\n padding-top: 0;\n }\n\n .tingle-modal-box__footer .tingle-btn {\n display: block;\n float: none;\n margin-bottom: 1rem;\n width: 100%;\n }\n\n .tingle-modal__close {\n top: 0;\n right: 0;\n left: 0;\n display: block;\n width: 100%;\n height: 60px;\n border: none;\n background-color: #2c3e50;\n box-shadow: none;\n color: #fff;\n }\n\n .tingle-modal__closeLabel {\n display: inline-block;\n vertical-align: middle;\n font-size: 1.6rem;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;\n }\n\n .tingle-modal__closeIcon {\n display: inline-block;\n margin-right: .8rem;\n width: 1.6rem;\n vertical-align: middle;\n font-size: 0;\n }\n}\n\n/* animations\n-------------------------------------------------------------- */\n\n@keyframes scale {\n 0% {\n opacity: 0;\n transform: scale(.9);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n.tingle-modal-box__iframe {\n border: 0;\n height: 500px;\n width: 100%;\n}\n',document.head.appendChild(Tt);var xt=function t(e,n,i){h(e).then((function(r){r?(n.isOpen()&&n.close(),i(r)):n.isOpen()?setTimeout(t.bind(null,e,n,i),2e3):h(e).then((function(t){return i(t||"invalid")}))}))};const Et=function(t,e){var n=new(St().modal)({closeMethods:["overlay","button","escape"],closeLabel:"Close",onOpen:function(){setTimeout((function(){return xt(t.check_path,n,e)}),3e3)},onClose:function(){n.$closed=!0}});n.setContent('<iframe src="'.concat(t.redirect_url,'" class="tingle-modal-box__iframe" />')),n.open()};var Dt,Ot,Bt,At,_t=function(t){return t&&t.trim().length};window.$&&window.$.payment?(Dt=window.$.payment.validateCardNumber,Ot=window.$.payment.validateCardCVC,Bt=window.$.payment.validateCardExpiry,At=window.$.payment.cardExpiryVal):(Ot=_t,Bt=function(t,e){return _t(t)&&_t(e)},At=function(t){var e=(t||"").split("/");return{month:(e[0]||"").trim(),year:(e[1]||"").trim()}});var Ct=At,Rt=function(t,e,n){t[e]||(t[e]=[]),t[e].push(n)},kt=function(t,e){var n={};return _t(t)?Ot(t,e)||Rt(n,"verification_value","invalid"):Rt(n,"verification_value","blank"),n},It=["number"];function Vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);s=!0);}catch(t){a=!0,r=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Nt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Pt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lt(Object(n),!0).forEach((function(e){Ft(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ft(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mt=function(t){var e=t.slice(0,6),n=t.slice(t.length-4),i="*".repeat(t.length-10);return"".concat(e).concat(i).concat(n)},qt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=e,this.token=null,this.config=n,this.onTokenGenerationFail=this.onTokenGenerationFail.bind(this),this.onCardTokenGenerationFail=this.onCardTokenGenerationFail.bind(this)}var e,n;return e=t,(n=[{key:"setup",value:function(t,e){var n=this;this.form=t,this.fields=e,this.baseErrorContainer=t.querySelector('[data-hook="checkout_payment_step"]')||t,e&&(e.nexioOwnForm=this),this.refreshToken().then((function(){t.addEventListener("submit",(function(i){if(n.withNewCardForm()&&0<e.clientHeight)f(t),i.preventDefault(),n.addNewCardFlow();else if(n.isNexioCardSelected()){f(t);var r=document.getElementById("nexio_cvc_confirm_".concat(n.currentSourceId()))||document.getElementById("nexio_cvc_confirm");if(r){var o=kt(r.value);if(0<Object.keys(o).length)return Object.entries(o).forEach((function(t){var e=Vt(t,2),n=e[0],i=e[1];return c(r.parentNode,n,i[0],r)})),i.preventDefault(),void n.unlockForm();r.setAttribute("name","cvc_confirm")}n.config.threeDSecure&&(i.preventDefault(),n.submitFormToProcess())}}))}))}},{key:"withNewCardForm",value:function(){return["default","newCard","addWalletCard"].includes(this.config.type)}},{key:"showError",value:function(t,e){var n,i="base"===t?this.baseErrorContainer:this.fields||this.baseErrorContainer;this.id&&(n=i.querySelector('[name="payment_source['.concat(this.id,"][").concat(t,']"]'))),c(i,t,e,n)}},{key:"refreshToken",value:function(){var t=this;return this.withNewCardForm()&&null===this.token?s(this.config).then((function(e){return t.token=e.token,n=e.fraud_url,new Promise((function(t){var e=document.createElement("script");e.onload=t,e.src=n,document.body.appendChild(e)}));var n}),this.onTokenGenerationFail):new Promise((function(t){return t()}))}},{key:"addNewCardFlow",value:function(){var t,e=this,n=(t=this.fields,Object.entries(d).reduce((function(e,n){var i,r,o=(r=2,function(t){if(Array.isArray(t))return t}(i=n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);s=!0);}catch(t){a=!0,r=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(i,r)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(i,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],a=o[1],h=t.querySelector('[data-hook="'.concat(a,'"]'));if(h)if(["INPUT","SELECT"].includes(h.nodeName))e[s]=h.value;else{var l=h.querySelector("input[name], select[name]");l&&(e[s]=l.value)}return e}),{}));Object.assign(n,Ct(n.expiry));var i=function(t){var e=kt(t.verification_value,t.cc_type);return["number","name","expiry"].forEach((function(n){return _t(t[n])?null:Rt(e,n,"blank")})),_t(t.number)&&!Dt(t.number)&&Rt(e,"number","invalid"),_t(t.expiry)&&!Bt(t.month,t.year)&&Rt(e,"expiry","invalid"),e}(n);if(0<Object.keys(i).length)return this.onCardValidationFail(i);this.fields.setAttribute("disabled","disabled");var r,s,a=function(t,e,n){var i=e.number,r=function(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}(e,It);i=i.replace(/\D+/g,"");var o=new bt;return o.setPublicKey(t.publicKey),jt(jt({},t.data),{},{one_time_token:n,card:jt(jt({},r),{},{encrypted_number:o.encrypt(i),number:Mt(i)})})}(this.config,n,this.token);return this.token=null,(r=this.config,s=a,o(r.paths.creditCard,"POST",{body:{data:s}}).then((function(t){return 201===t.status?t.json.data:Promise.reject(t)}),(function(t){return Promise.reject(t)}))).then((function(t){if(p(e.fields,"card_gateway_payment_profile_id",t.token),e.fields.removeAttribute("disabled"),e.config.threeDSecure&&"addWalletCard"!==e.config.type)return e.submitFormToProcess();"addWalletCard"===e.config.type&&(p(e.fields,"number",a.card.number),p(e.fields,"verification_value","")),e.form.submit()}),this.onCardTokenGenerationFail).catch((function(){return e.resetFormOnError()}))}},{key:"submitFormToProcess",value:function(){var t=this,e=new FormData(this.form);e.delete("_method");var n={body:e};return function(t,e){return o(t,"POST",e).then((function(t){return 200===t.status?t.json:Promise.reject(t)}),(function(t){return Promise.reject(t)}))}(this.config.paths.payment,n).then((function(e){switch(e.state){case"success":return t.submitForm();case"three_d_secure":return t.onThreeDSecureRedirect(e.data);case"error":return t.resetFormOnError(e.data&&e.data.error||"fail_process_payment");default:t.resetFormOnError()}}),(function(){return t.resetFormOnError()}))}},{key:"isNexioCardSelected",value:function(){var t=this.config.walletCardIds;if(!Array.isArray(t))return!1;var e=this.currentSourceId();return null!==e&&t.includes(e)}},{key:"currentSourceId",value:function(){var t=new FormData(this.form).get("order[wallet_payment_source_id]");return t?parseInt(t):null}},{key:"onThreeDSecureRedirect",value:function(t){var e=this;Et(t,(function(t){["invalid","failed"].includes(t)?e.resetFormOnError("fail_three_d_secure_check"):e.submitForm()}))}},{key:"submitForm",value:function(){this.form.querySelectorAll('fieldset#payment, fieldset[data-hook="payment"], [data-nexio-3ds-disable]').forEach((function(t){return t.setAttribute("disabled","disabled")}));var t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","order[nexio_placeholder]"),t.setAttribute("value","1"),this.form.appendChild(t),this.form.submit()}},{key:"unlockForm",value:function(){var t=this;return new Promise((function(e){setTimeout((function(){t.fields&&t.fields.removeAttribute("disabled");var n=t.form.querySelector(i.formEnableSelector);n&&(n.removeAttribute("disabled"),n.classList.remove("disabled"));var r=new Error("nexio_fail");e(r)}),100)}))}},{key:"resetFormOnError",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default_error";return this.showError("base",e),this.refreshToken().then((function(){return t.unlockForm()}))}},{key:"onCardValidationFail",value:function(t){var e=this;return Object.entries(t).forEach((function(t){var n=Vt(t,2),i=n[0];return n[1].forEach((function(t){return e.showError(i,t)}))})),this.unlockForm()}},{key:"onTokenGenerationFail",value:function(){return this.showError("base","token_generation_failed"),Promise.reject()}},{key:"onCardTokenGenerationFail",value:function(){var t=this;return this.refreshToken().then((function(){return t.showError("base","fail_process_card"),Promise.reject()}))}}])&&Pt(e.prototype,n),t}();function Ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var Ut=[],Kt=function(){Ut.forEach((function(t){var e,n,i=(n=2,function(t){if(Array.isArray(t))return t}(e=t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(o.push(i.value),!e||o.length!==e);s=!0);}catch(t){a=!0,r=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,n)||function(t,e){if(t){if("string"==typeof t)return Ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ht(t,e):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=i[0],o=i[1],s=document.querySelector(r);if(s){var a=s.closest("form");o.setup(a,s)}else console.warn("SolidusNexio: ".concat(r," is not found, the payment method ").concat(o.id," is not initialized."))})),Ut.length=0};window.addNexioOwnForm=function(t,e){var n;n="walletCards"==e.type?'[data-nexio-wallet-cards="'.concat(t,'"]'):'[data-nexio-own-form-id="'.concat(t,'"]'),Ut.push([n,new qt(t,e)])},window.addNexioAPM=function(t,e){return Ut.push(['[data-nexio-apm="'.concat(t,'"]'),new y(t,e)])},window.setupNexio=Kt,Spree.ready((function(t){Kt();var e=function(){t('[data-hook="nexio_cvc_confirm_row"]').hide();var e=t(".existing-cc-radio:checked").val();e&&t("#spree_wallet_payment_source_".concat(e,"_cvc_confirm")).show()};e(),t("#existing_cards").on("change",".existing-cc-radio",e)}))},584:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){var t=!1;function e(t){this.opts=function(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])arguments[t].hasOwnProperty(e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]}({},{onClose:null,onOpen:null,beforeOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:"Close",closeMethods:["overlay","button","escape"]},t),this.init()}function n(){this.modalBoxFooter&&(this.modalBoxFooter.style.width=this.modalBox.clientWidth+"px",this.modalBoxFooter.style.left=this.modalBox.offsetLeft+"px")}return e.prototype.init=function(){if(!this.modal)return function(){this.modal=document.createElement("div"),this.modal.classList.add("tingle-modal"),0!==this.opts.closeMethods.length&&-1!==this.opts.closeMethods.indexOf("overlay")||this.modal.classList.add("tingle-modal--noOverlayClose"),this.modal.style.display="none",this.opts.cssClass.forEach((function(t){"string"==typeof t&&this.modal.classList.add(t)}),this),-1!==this.opts.closeMethods.indexOf("button")&&(this.modalCloseBtn=document.createElement("button"),this.modalCloseBtn.type="button",this.modalCloseBtn.classList.add("tingle-modal__close"),this.modalCloseBtnIcon=document.createElement("span"),this.modalCloseBtnIcon.classList.add("tingle-modal__closeIcon"),this.modalCloseBtnIcon.innerHTML='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.3 9.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3L5 6.4l3.3 3.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L6.4 5l3.3-3.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L5 3.6 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4L3.6 5 .3 8.3c-.4.4-.4 1 0 1.4z" fill="#000" fill-rule="nonzero"/></svg>',this.modalCloseBtnLabel=document.createElement("span"),this.modalCloseBtnLabel.classList.add("tingle-modal__closeLabel"),this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel,this.modalCloseBtn.appendChild(this.modalCloseBtnIcon),this.modalCloseBtn.appendChild(this.modalCloseBtnLabel)),this.modalBox=document.createElement("div"),this.modalBox.classList.add("tingle-modal-box"),this.modalBoxContent=document.createElement("div"),this.modalBoxContent.classList.add("tingle-modal-box__content"),this.modalBox.appendChild(this.modalBoxContent),-1!==this.opts.closeMethods.indexOf("button")&&this.modal.appendChild(this.modalCloseBtn),this.modal.appendChild(this.modalBox)}.call(this),function(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:function(t){var e=this.modal.offsetWidth-this.modal.clientWidth,n=t.clientX>=this.modal.offsetWidth-15,i=this.modal.scrollHeight!==this.modal.offsetHeight;"MacIntel"===navigator.platform&&0==e&&n&&i||-1!==this.opts.closeMethods.indexOf("overlay")&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains("tingle-modal"););return t}(t.target)&&t.clientX<this.modal.clientWidth&&this.close()}.bind(this),resize:this.checkOverflow.bind(this),keyboardNav:function(t){-1!==this.opts.closeMethods.indexOf("escape")&&27===t.which&&this.isOpen()&&this.close()}.bind(this)},-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.addEventListener("click",this._events.clickCloseBtn),this.modal.addEventListener("mousedown",this._events.clickOverlay),window.addEventListener("resize",this._events.resize),document.addEventListener("keydown",this._events.keyboardNav)}.call(this),document.body.appendChild(this.modal,document.body.firstChild),this.opts.footer&&this.addFooter(),this},e.prototype._busy=function(e){t=e},e.prototype._isBusy=function(){return t},e.prototype.destroy=function(){null!==this.modal&&(this.isOpen()&&this.close(!0),function(){-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.removeEventListener("click",this._events.clickCloseBtn),this.modal.removeEventListener("mousedown",this._events.clickOverlay),window.removeEventListener("resize",this._events.resize),document.removeEventListener("keydown",this._events.keyboardNav)}.call(this),this.modal.parentNode.removeChild(this.modal),this.modal=null)},e.prototype.isOpen=function(){return!!this.modal.classList.contains("tingle-modal--visible")},e.prototype.open=function(){if(!this._isBusy()){this._busy(!0);var t=this;return"function"==typeof t.opts.beforeOpen&&t.opts.beforeOpen(),this.modal.style.removeProperty?this.modal.style.removeProperty("display"):this.modal.style.removeAttribute("display"),document.getSelection().removeAllRanges(),this._scrollPosition=window.pageYOffset,document.body.classList.add("tingle-enabled"),document.body.style.top=-this._scrollPosition+"px",this.setStickyFooter(this.opts.stickyFooter),this.modal.classList.add("tingle-modal--visible"),"function"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),t._busy(!1),this.checkOverflow(),this}},e.prototype.close=function(t){if(!this._isBusy()){if(this._busy(!0),"function"==typeof this.opts.beforeClose&&!this.opts.beforeClose.call(this))return void this._busy(!1);document.body.classList.remove("tingle-enabled"),document.body.style.top=null,window.scrollTo({top:this._scrollPosition,behavior:"instant"}),this.modal.classList.remove("tingle-modal--visible");var e=this;e.modal.style.display="none","function"==typeof e.opts.onClose&&e.opts.onClose.call(this),e._busy(!1)}},e.prototype.setContent=function(t){return"string"==typeof t?this.modalBoxContent.innerHTML=t:(this.modalBoxContent.innerHTML="",this.modalBoxContent.appendChild(t)),this.isOpen()&&this.checkOverflow(),this},e.prototype.getContent=function(){return this.modalBoxContent},e.prototype.addFooter=function(){return function(){this.modalBoxFooter=document.createElement("div"),this.modalBoxFooter.classList.add("tingle-modal-box__footer"),this.modalBox.appendChild(this.modalBoxFooter)}.call(this),this},e.prototype.setFooterContent=function(t){return this.modalBoxFooter.innerHTML=t,this},e.prototype.getFooterContent=function(){return this.modalBoxFooter},e.prototype.setStickyFooter=function(t){return this.isOverflow()||(t=!1),t?this.modalBox.contains(this.modalBoxFooter)&&(this.modalBox.removeChild(this.modalBoxFooter),this.modal.appendChild(this.modalBoxFooter),this.modalBoxFooter.classList.add("tingle-modal-box__footer--sticky"),n.call(this),this.modalBoxContent.style["padding-bottom"]=this.modalBoxFooter.clientHeight+20+"px"):this.modalBoxFooter&&(this.modalBox.contains(this.modalBoxFooter)||(this.modal.removeChild(this.modalBoxFooter),this.modalBox.appendChild(this.modalBoxFooter),this.modalBoxFooter.style.width="auto",this.modalBoxFooter.style.left="",this.modalBoxContent.style["padding-bottom"]="",this.modalBoxFooter.classList.remove("tingle-modal-box__footer--sticky"))),this},e.prototype.addFooterBtn=function(t,e,n){var i=document.createElement("button");return i.innerHTML=t,i.addEventListener("click",n),"string"==typeof e&&e.length&&e.split(" ").forEach((function(t){i.classList.add(t)})),this.modalBoxFooter.appendChild(i),i},e.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")},e.prototype.isOverflow=function(){return window.innerHeight<=this.modalBox.clientHeight},e.prototype.checkOverflow=function(){this.modal.classList.contains("tingle-modal--visible")&&(this.isOverflow()?this.modal.classList.add("tingle-modal--overflow"):this.modal.classList.remove("tingle-modal--overflow"),!this.isOverflow()&&this.opts.stickyFooter?this.setStickyFooter(!1):this.isOverflow()&&this.opts.stickyFooter&&(n.call(this),this.setStickyFooter(!0)))},{modal:e}})?i.call(e,n,e,t):i)||(t.exports=r)}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(498)})();
1
+ /*
2
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3
+ * This devtool is neither made for production nor for readable output files.
4
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
5
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6
+ * or disable the default devtool with "devtool: false".
7
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
+ */
9
+ /******/ (() => { // webpackBootstrap
10
+ /******/ var __webpack_modules__ = ({
11
+
12
+ /***/ "./src/api.js":
13
+ /*!********************!*\
14
+ !*** ./src/api.js ***!
15
+ \********************/
16
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
+
18
+ "use strict";
19
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getOneTimeToken\": () => (/* binding */ getOneTimeToken),\n/* harmony export */ \"getPaymentState\": () => (/* binding */ getPaymentState),\n/* harmony export */ \"startPayment\": () => (/* binding */ startPayment),\n/* harmony export */ \"tokenizeCreditCard\": () => (/* binding */ tokenizeCreditCard)\n/* harmony export */ });\n/* harmony import */ var _fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fetch */ \"./src/fetch.js\");\n\nvar getOneTimeToken = function getOneTimeToken(_ref) {\n var paths = _ref.paths,\n data = _ref.data;\n return (0,_fetch__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(paths.oneTimeToken, 'POST', {\n body: {\n data: data\n }\n }).then(function (resp) {\n if (resp.status === 201) {\n var _data = resp.json.data;\n return _data;\n } else {\n return Promise.reject(resp);\n }\n }, function (err) {\n return Promise.reject(err);\n });\n};\nvar tokenizeCreditCard = function tokenizeCreditCard(config, data) {\n return (0,_fetch__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(config.paths.creditCard, 'POST', {\n body: {\n data: data\n }\n }).then(function (resp) {\n if (resp.status === 201) {\n return resp.json.data;\n } else {\n return Promise.reject(resp);\n }\n }, function (err) {\n return Promise.reject(err);\n });\n};\nvar startPayment = function startPayment(url, config) {\n return (0,_fetch__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(url, 'POST', config).then(function (resp) {\n if (resp.status === 200) {\n return resp.json;\n } else {\n return Promise.reject(resp);\n }\n }, function (err) {\n return Promise.reject(err);\n });\n};\nvar detectPaymentState = function detectPaymentState(resp) {\n return resp.status !== 200 || resp.json.data.state === 'checkout' ? null : resp.json.data.state;\n};\nvar getPaymentState = function getPaymentState(path) {\n return (0,_fetch__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(path).then(detectPaymentState, function () {\n return 'failed';\n });\n};\n\n//# sourceURL=webpack://solidus_nexio/./src/api.js?");
20
+
21
+ /***/ }),
22
+
23
+ /***/ "./src/apm.js":
24
+ /*!********************!*\
25
+ !*** ./src/apm.js ***!
26
+ \********************/
27
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28
+
29
+ "use strict";
30
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _default)\n/* harmony export */ });\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./api */ \"./src/api.js\");\n/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dom */ \"./src/dom.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n\nvar nexioApmIFrameClass = 'solidus-nexio-apm-iframe';\nvar fetchValidEvent = function fetchValidEvent(data) {\n switch (_typeof(data)) {\n case 'object':\n return data.event;\n case 'string':\n var request;\n try {\n request = Object.values(JSON.parse(data))[0][0];\n } catch (e) {\n return false;\n }\n return request.name;\n default:\n return false;\n }\n};\nvar stretchIFrame = function stretchIFrame() {\n var iframe = $('iframe.' + nexioApmIFrameClass);\n iframe.css('height', '100%');\n iframe.css('position', 'fixed');\n iframe.css('width', '100%');\n iframe.css('top', '0');\n iframe.css('left', '0');\n iframe.css('z-index', '100');\n};\nvar restoreIFrameSize = function restoreIFrameSize() {\n var iframe = $('iframe.' + nexioApmIFrameClass);\n iframe.css('height', '50px');\n iframe.css('position', '');\n iframe.css('width', '');\n iframe.css('top', '');\n iframe.css('left', '');\n iframe.css('z-index', '');\n};\nvar _default = /*#__PURE__*/function () {\n function _default(id, config) {\n _classCallCheck(this, _default);\n this.id = id;\n this.config = config;\n }\n _createClass(_default, [{\n key: \"setup\",\n value: function setup(form, fields) {\n fields.classList.add('solidus-nexio-apm');\n (0,_api__WEBPACK_IMPORTED_MODULE_0__.getOneTimeToken)(this.config).then(function (data) {\n var iframe = document.createElement('iframe');\n window.addEventListener('message', function (e) {\n if (iframe.contentWindow !== e.source) return;\n var data = e.data;\n var iframe_event = fetchValidEvent(data);\n switch (iframe_event) {\n case 'loaded':\n fields.classList.add('solidus-nexio-apm--loaded');\n break;\n case 'zoid_delegate_paypal_checkout':\n stretchIFrame();\n break;\n case 'success':\n restoreIFrameSize();\n submitForm(form, fields, data.data);\n break;\n case 'error':\n restoreIFrameSize();\n (0,_dom__WEBPACK_IMPORTED_MODULE_1__.hideErrors)(fields);\n (0,_dom__WEBPACK_IMPORTED_MODULE_1__.showError)(fields, 'base', data.data.message || 'nexio_apm_payment_failed');\n break;\n }\n });\n iframe.setAttribute('src', data.iframe_url);\n iframe.classList.add(nexioApmIFrameClass);\n iframe.setAttribute('scrolling', 'no');\n iframe.style.cssText = 'overflow:hidden';\n fields.appendChild(iframe);\n });\n }\n }]);\n return _default;\n}();\n\n\n//# sourceURL=webpack://solidus_nexio/./src/apm.js?");
31
+
32
+ /***/ }),
33
+
34
+ /***/ "./src/card.js":
35
+ /*!*********************!*\
36
+ !*** ./src/card.js ***!
37
+ \*********************/
38
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
39
+
40
+ "use strict";
41
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cardExpiryVal\": () => (/* binding */ cardExpiryVal),\n/* harmony export */ \"validateCVC\": () => (/* binding */ validateCVC),\n/* harmony export */ \"validator\": () => (/* binding */ validator)\n/* harmony export */ });\nvar isPresent = function isPresent(value) {\n return value && value.trim().length;\n};\nvar validateCardNumber, validateCardCVC, validateCardExpiry;\nvar _cardExpiryVal;\nif (window.$ && window.$.payment) {\n validateCardNumber = window.$.payment.validateCardNumber;\n validateCardCVC = window.$.payment.validateCardCVC;\n validateCardExpiry = window.$.payment.validateCardExpiry;\n _cardExpiryVal = window.$.payment.cardExpiryVal;\n} else {\n validateCardNumber, validateCardCVC = isPresent;\n validateCardExpiry = function validateCardExpiry(month, year) {\n return isPresent(month) && isPresent(year);\n };\n _cardExpiryVal = function _cardExpiryVal(value) {\n var parts = (value || '').split('/');\n return {\n month: (parts[0] || '').trim(),\n year: (parts[1] || '').trim()\n };\n };\n}\nvar cardExpiryVal = _cardExpiryVal;\nvar addError = function addError(errors, key, reason) {\n errors[key] || (errors[key] = []);\n errors[key].push(reason);\n};\nvar validateCVC = function validateCVC(cvc, ccType) {\n var errors = {};\n if (isPresent(cvc)) {\n if (!validateCardCVC(cvc, ccType)) {\n addError(errors, 'verification_value', 'invalid');\n }\n } else {\n addError(errors, 'verification_value', 'blank');\n }\n return errors;\n};\nvar validator = function validator(card) {\n var errors = validateCVC(card.verification_value, card.cc_type);\n ['number', 'name', 'expiry'].forEach(function (key) {\n return isPresent(card[key]) ? null : addError(errors, key, 'blank');\n });\n if (isPresent(card.number) && !validateCardNumber(card.number)) {\n addError(errors, 'number', 'invalid');\n }\n if (isPresent(card.expiry) && !validateCardExpiry(card.month, card.year)) {\n addError(errors, 'expiry', 'invalid');\n }\n return errors;\n};\n\n//# sourceURL=webpack://solidus_nexio/./src/card.js?");
42
+
43
+ /***/ }),
44
+
45
+ /***/ "./src/dom.js":
46
+ /*!********************!*\
47
+ !*** ./src/dom.js ***!
48
+ \********************/
49
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
50
+
51
+ "use strict";
52
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getCardData\": () => (/* binding */ getCardData),\n/* harmony export */ \"hideErrors\": () => (/* binding */ hideErrors),\n/* harmony export */ \"injectScript\": () => (/* binding */ injectScript),\n/* harmony export */ \"setCardValue\": () => (/* binding */ setCardValue),\n/* harmony export */ \"showError\": () => (/* binding */ showError)\n/* harmony export */ });\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar ERROR_MESSAGES = window.nexioErrorMessages || {\n default_error: 'Something went wrong'\n};\nvar toErrorMessage = function toErrorMessage(attr, err) {\n // handle case when translated error is set\n if (err && err.includes(' ')) {\n return err;\n }\n return ERROR_MESSAGES[attr] && ERROR_MESSAGES[attr][err] || ERROR_MESSAGES.base && ERROR_MESSAGES.base[err] || ERROR_MESSAGES.default_error;\n};\nvar toErrorLabel = function toErrorLabel(attr, err) {\n var node = document.createElement('label');\n node.setAttribute('data-nexio-error', attr);\n node.classList.add('error', 'nexio-error');\n node.innerHTML = toErrorMessage(attr, err);\n return node;\n};\nvar showError = function showError(fields, attr, err, input) {\n var label = toErrorLabel(attr, err);\n if (attr === 'base') {\n fields.appendChild(label);\n } else {\n if (input) {\n input.classList.add('error');\n input.parentNode.appendChild(label);\n }\n }\n};\nvar hideErrors = function hideErrors(form) {\n return form.querySelectorAll(\"[data-nexio-error]\").forEach(function (node) {\n var parentNode = node.parentNode;\n parentNode.removeChild(node);\n var input = parentNode.querySelector('[name].error');\n if (input) {\n input.classList.remove('error');\n }\n });\n};\nvar injectScript = function injectScript(src) {\n return new Promise(function (resolve) {\n var fraudScripNode = document.createElement('script');\n fraudScripNode.onload = resolve;\n fraudScripNode.src = src;\n document.body.appendChild(fraudScripNode);\n });\n};\nvar FIELDS = {\n number: 'card_number',\n cc_type: 'card_type',\n name: 'card_name',\n expiry: 'card_expiration',\n verification_value: 'card_code'\n};\nvar setCardValue = function setCardValue(fields, attr, value) {\n var selector = FIELDS[attr] || attr;\n var node = fields.querySelector(\"[data-hook=\\\"\".concat(selector, \"\\\"]\"));\n if (node) {\n node.value = value;\n return true;\n } else {\n return false;\n }\n};\nvar getCardData = function getCardData(fields) {\n return Object.entries(FIELDS).reduce(function (acc, _ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n selector = _ref2[1];\n var field = fields.querySelector(\"[data-hook=\\\"\".concat(selector, \"\\\"]\"));\n if (field) {\n if (['INPUT', 'SELECT'].includes(field.nodeName)) {\n acc[key] = field.value;\n } else {\n var node = field.querySelector('input[name], select[name]');\n if (node) {\n acc[key] = node.value;\n }\n }\n }\n return acc;\n }, {});\n};\n\n//# sourceURL=webpack://solidus_nexio/./src/dom.js?");
53
+
54
+ /***/ }),
55
+
56
+ /***/ "./src/fetch.js":
57
+ /*!**********************!*\
58
+ !*** ./src/fetch.js ***!
59
+ \**********************/
60
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
61
+
62
+ "use strict";
63
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _rails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rails */ \"./src/rails.js\");\n\nvar responseHandler = function responseHandler(resp) {\n var headers = resp.headers,\n status = resp.status;\n if (status === 404 || 500 <= status) {\n return Promise.reject({\n headers: headers,\n status: status\n });\n } else if ((resp.headers.get('Content-Type') + '').indexOf('json') !== -1 && resp.status !== 204) {\n return resp.json().then(function (json) {\n return {\n headers: headers,\n status: status,\n json: json\n };\n }, function () {\n return {\n headers: headers,\n status: status,\n json: null\n };\n });\n } else {\n return {\n headers: headers,\n status: status,\n json: null\n };\n }\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (path) {\n var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GET';\n var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var payload = {\n method: method,\n credentials: 'include',\n headers: new Headers()\n };\n payload.headers.append('X-CSRF-Token', _rails__WEBPACK_IMPORTED_MODULE_0__[\"default\"].csrfToken());\n payload.headers.append('accept', 'application/json');\n if (config.body) {\n if (config.body instanceof FormData) {\n payload.body = config.body;\n } else {\n payload.body = JSON.stringify(config.body);\n payload.headers.append('content-type', 'application/json');\n }\n }\n return window.fetch(path, payload).then(responseHandler, function (err) {\n return Promise.reject(err);\n });\n});\n\n//# sourceURL=webpack://solidus_nexio/./src/fetch.js?");
64
+
65
+ /***/ }),
66
+
67
+ /***/ "./src/index-assets.js":
68
+ /*!*****************************!*\
69
+ !*** ./src/index-assets.js ***!
70
+ \*****************************/
71
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
72
+
73
+ "use strict";
74
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _solidus_nexio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./solidus-nexio */ \"./src/solidus-nexio.js\");\n\nwindow.addNexioOwnForm = _solidus_nexio__WEBPACK_IMPORTED_MODULE_0__.addNexioOwnForm;\nwindow.addNexioAPM = _solidus_nexio__WEBPACK_IMPORTED_MODULE_0__.addNexioAPM;\nwindow.setupNexio = _solidus_nexio__WEBPACK_IMPORTED_MODULE_0__.setupNexio;\nSpree.ready(function ($) {\n (0,_solidus_nexio__WEBPACK_IMPORTED_MODULE_0__.setupNexio)();\n var showExistingCardCvv = function showExistingCardCvv() {\n $('[data-hook=\"nexio_cvc_confirm_row\"]').hide();\n var id = $('.existing-cc-radio:checked').val();\n if (id) {\n $(\"#spree_wallet_payment_source_\".concat(id, \"_cvc_confirm\")).show();\n }\n };\n showExistingCardCvv();\n $('#existing_cards').on('change', '.existing-cc-radio', showExistingCardCvv);\n});\n\n//# sourceURL=webpack://solidus_nexio/./src/index-assets.js?");
75
+
76
+ /***/ }),
77
+
78
+ /***/ "./src/own-form.js":
79
+ /*!*************************!*\
80
+ !*** ./src/own-form.js ***!
81
+ \*************************/
82
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
83
+
84
+ "use strict";
85
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ _default)\n/* harmony export */ });\n/* harmony import */ var jsencrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jsencrypt */ \"./node_modules/jsencrypt/lib/index.js\");\n/* harmony import */ var _rails__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rails */ \"./src/rails.js\");\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./api */ \"./src/api.js\");\n/* harmony import */ var _three_d_challenge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./three-d-challenge */ \"./src/three-d-challenge.js\");\n/* harmony import */ var _card__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./card */ \"./src/card.js\");\n/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dom */ \"./src/dom.js\");\nvar _excluded = [\"number\"];\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n\n\n\n\n\nvar maskCardNumber = function maskCardNumber(number) {\n var head = number.slice(0, 6);\n var tail = number.slice(number.length - 4);\n var base = '*'.repeat(number.length - 10);\n return \"\".concat(head).concat(base).concat(tail);\n};\nvar toCardParams = function toCardParams(config, card, token) {\n var number = card.number,\n cardRest = _objectWithoutProperties(card, _excluded);\n number = number.replace(/\\D+/g, '');\n var crypto = new jsencrypt__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n crypto.setPublicKey(config.publicKey);\n return _objectSpread(_objectSpread({}, config.data), {}, {\n one_time_token: token,\n card: _objectSpread(_objectSpread({}, cardRest), {}, {\n encrypted_number: crypto.encrypt(number),\n number: maskCardNumber(number)\n })\n });\n};\nvar _default = /*#__PURE__*/function () {\n function _default(id, config) {\n _classCallCheck(this, _default);\n this.id = id;\n this.token = null;\n this.config = config;\n this.onTokenGenerationFail = this.onTokenGenerationFail.bind(this);\n this.onCardTokenGenerationFail = this.onCardTokenGenerationFail.bind(this);\n }\n _createClass(_default, [{\n key: \"setup\",\n value: function setup(form, fields) {\n var _this = this;\n this.form = form;\n this.fields = fields;\n this.baseErrorContainer = form.querySelector('[data-hook=\"checkout_payment_step\"]') || form;\n if (fields) {\n fields.nexioOwnForm = this;\n }\n this.refreshToken().then(function () {\n form.addEventListener('submit', function (e) {\n // check if a new card fields visible\n if (_this.withNewCardForm() && 0 < fields.clientHeight) {\n (0,_dom__WEBPACK_IMPORTED_MODULE_5__.hideErrors)(form);\n e.preventDefault();\n _this.addNewCardFlow();\n } else if (_this.isNexioCardSelected()) {\n (0,_dom__WEBPACK_IMPORTED_MODULE_5__.hideErrors)(form);\n var input = document.getElementById(\"nexio_cvc_confirm_\".concat(_this.currentSourceId())) || document.getElementById('nexio_cvc_confirm');\n if (input) {\n var errors = (0,_card__WEBPACK_IMPORTED_MODULE_4__.validateCVC)(input.value);\n if (0 < Object.keys(errors).length) {\n Object.entries(errors).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n list = _ref2[1];\n return (0,_dom__WEBPACK_IMPORTED_MODULE_5__.showError)(input.parentNode, key, list[0], input);\n });\n e.preventDefault();\n _this.unlockForm();\n return;\n } else {\n input.setAttribute('name', 'cvc_confirm');\n }\n }\n if (_this.config.threeDSecure) {\n e.preventDefault();\n _this.submitFormToProcess();\n }\n }\n });\n });\n }\n }, {\n key: \"withNewCardForm\",\n value: function withNewCardForm() {\n return ['default', 'newCard', 'addWalletCard'].includes(this.config.type);\n }\n }, {\n key: \"showError\",\n value: function showError(attr, err) {\n var container = attr === 'base' ? this.baseErrorContainer : this.fields || this.baseErrorContainer;\n var input;\n if (this.id) {\n input = container.querySelector(\"[name=\\\"payment_source[\".concat(this.id, \"][\").concat(attr, \"]\\\"]\"));\n }\n (0,_dom__WEBPACK_IMPORTED_MODULE_5__.showError)(container, attr, err, input);\n }\n }, {\n key: \"refreshToken\",\n value: function refreshToken() {\n var _this2 = this;\n if (this.withNewCardForm() && this.token === null) {\n return (0,_api__WEBPACK_IMPORTED_MODULE_2__.getOneTimeToken)(this.config).then(function (data) {\n _this2.token = data.token;\n return (0,_dom__WEBPACK_IMPORTED_MODULE_5__.injectScript)(data.fraud_url);\n }, this.onTokenGenerationFail);\n } else {\n return new Promise(function (resolve) {\n return resolve();\n });\n }\n }\n }, {\n key: \"addNewCardFlow\",\n value: function addNewCardFlow() {\n var _this3 = this;\n var card = (0,_dom__WEBPACK_IMPORTED_MODULE_5__.getCardData)(this.fields);\n Object.assign(card, (0,_card__WEBPACK_IMPORTED_MODULE_4__.cardExpiryVal)(card.expiry));\n var errors = (0,_card__WEBPACK_IMPORTED_MODULE_4__.validator)(card);\n if (0 < Object.keys(errors).length) {\n return this.onCardValidationFail(errors);\n }\n this.fields.setAttribute('disabled', 'disabled');\n var params = toCardParams(this.config, card, this.token);\n // mark that next time token should be added\n this.token = null;\n return (0,_api__WEBPACK_IMPORTED_MODULE_2__.tokenizeCreditCard)(this.config, params).then(function (data) {\n (0,_dom__WEBPACK_IMPORTED_MODULE_5__.setCardValue)(_this3.fields, 'card_gateway_payment_profile_id', data.token);\n _this3.fields.removeAttribute('disabled');\n if (!_this3.config.threeDSecure || _this3.config.type === 'addWalletCard') {\n if (_this3.config.type === 'addWalletCard') {\n (0,_dom__WEBPACK_IMPORTED_MODULE_5__.setCardValue)(_this3.fields, 'number', params.card.number);\n (0,_dom__WEBPACK_IMPORTED_MODULE_5__.setCardValue)(_this3.fields, 'verification_value', '');\n }\n _this3.form.submit();\n } else {\n return _this3.submitFormToProcess();\n }\n }, this.onCardTokenGenerationFail)[\"catch\"](function () {\n return _this3.resetFormOnError();\n });\n }\n }, {\n key: \"submitFormToProcess\",\n value: function submitFormToProcess() {\n var _this4 = this;\n var formData = new FormData(this.form);\n formData[\"delete\"]('_method');\n var config = {\n body: formData\n };\n return (0,_api__WEBPACK_IMPORTED_MODULE_2__.startPayment)(this.config.paths.payment, config).then(function (json) {\n switch (json.state) {\n case 'success':\n return _this4.submitForm();\n case 'three_d_secure':\n return _this4.onThreeDSecureRedirect(json.data);\n case 'error':\n return _this4.resetFormOnError(json.data && json.data.error || 'fail_process_payment');\n default:\n _this4.resetFormOnError();\n }\n }, function () {\n return _this4.resetFormOnError();\n });\n }\n }, {\n key: \"isNexioCardSelected\",\n value: function isNexioCardSelected() {\n var walletCardIds = this.config.walletCardIds;\n if (!Array.isArray(walletCardIds)) return false;\n var id = this.currentSourceId();\n return id === null ? false : walletCardIds.includes(id);\n }\n }, {\n key: \"currentSourceId\",\n value: function currentSourceId() {\n var formData = new FormData(this.form);\n var value = formData.get('order[wallet_payment_source_id]');\n return value ? parseInt(value) : null;\n }\n }, {\n key: \"onThreeDSecureRedirect\",\n value: function onThreeDSecureRedirect(urls) {\n var _this5 = this;\n (0,_three_d_challenge__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(urls, function (status) {\n if (['invalid', 'failed'].includes(status)) {\n _this5.resetFormOnError('fail_three_d_secure_check');\n } else {\n _this5.submitForm();\n }\n });\n }\n }, {\n key: \"submitForm\",\n value: function submitForm() {\n this.form.querySelectorAll('fieldset#payment, fieldset[data-hook=\"payment\"], [data-nexio-3ds-disable]').forEach(function (node) {\n return node.setAttribute('disabled', 'disabled');\n });\n var nodePlaceholder = document.createElement('input');\n nodePlaceholder.setAttribute('type', 'hidden');\n nodePlaceholder.setAttribute('name', 'order[nexio_placeholder]');\n nodePlaceholder.setAttribute('value', '1');\n this.form.appendChild(nodePlaceholder);\n this.form.submit();\n }\n }, {\n key: \"unlockForm\",\n value: function unlockForm() {\n var _this6 = this;\n return new Promise(function (resolve) {\n // to prevent Spree.disableSaveOnClick\n setTimeout(function () {\n if (_this6.fields) {\n _this6.fields.removeAttribute('disabled');\n }\n var submitButton = _this6.form.querySelector(_rails__WEBPACK_IMPORTED_MODULE_1__[\"default\"].formEnableSelector);\n if (submitButton) {\n submitButton.removeAttribute('disabled');\n submitButton.classList.remove('disabled');\n }\n var error = new Error('nexio_fail');\n resolve(error);\n }, 100);\n });\n }\n\n // errors handlers\n }, {\n key: \"resetFormOnError\",\n value: function resetFormOnError() {\n var _this7 = this;\n var err = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default_error';\n this.showError('base', err);\n return this.refreshToken().then(function () {\n return _this7.unlockForm();\n });\n }\n }, {\n key: \"onCardValidationFail\",\n value: function onCardValidationFail(errors) {\n var _this8 = this;\n Object.entries(errors).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n attr = _ref4[0],\n list = _ref4[1];\n return list.forEach(function (item) {\n return _this8.showError(attr, item);\n });\n });\n return this.unlockForm();\n }\n }, {\n key: \"onTokenGenerationFail\",\n value: function onTokenGenerationFail() {\n this.showError('base', 'token_generation_failed');\n return Promise.reject();\n }\n }, {\n key: \"onCardTokenGenerationFail\",\n value: function onCardTokenGenerationFail() {\n var _this9 = this;\n // refresh one time token\n return this.refreshToken().then(function () {\n _this9.showError('base', 'fail_process_card');\n return Promise.reject();\n });\n }\n }]);\n return _default;\n}();\n\n\n//# sourceURL=webpack://solidus_nexio/./src/own-form.js?");
86
+
87
+ /***/ }),
88
+
89
+ /***/ "./src/rails.js":
90
+ /*!**********************!*\
91
+ !*** ./src/rails.js ***!
92
+ \**********************/
93
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
94
+
95
+ "use strict";
96
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (window.Rails || window.$.rails);\n\n//# sourceURL=webpack://solidus_nexio/./src/rails.js?");
97
+
98
+ /***/ }),
99
+
100
+ /***/ "./src/solidus-nexio.js":
101
+ /*!******************************!*\
102
+ !*** ./src/solidus-nexio.js ***!
103
+ \******************************/
104
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
105
+
106
+ "use strict";
107
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"addNexioAPM\": () => (/* binding */ addNexioAPM),\n/* harmony export */ \"addNexioOwnForm\": () => (/* binding */ addNexioOwnForm),\n/* harmony export */ \"setupNexio\": () => (/* binding */ setupNexio)\n/* harmony export */ });\n/* harmony import */ var _apm__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./apm */ \"./src/apm.js\");\n/* harmony import */ var _own_form__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./own-form */ \"./src/own-form.js\");\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\nvar payments = [];\nvar addNexioOwnForm = function addNexioOwnForm(id, config) {\n var selector;\n if (config.type == 'walletCards') {\n selector = \"[data-nexio-wallet-cards=\\\"\".concat(id, \"\\\"]\");\n } else {\n selector = \"[data-nexio-own-form-id=\\\"\".concat(id, \"\\\"]\");\n }\n payments.push([selector, new _own_form__WEBPACK_IMPORTED_MODULE_1__[\"default\"](id, config)]);\n};\nvar addNexioAPM = function addNexioAPM(id, config) {\n return payments.push([\"[data-nexio-apm=\\\"\".concat(id, \"\\\"]\"), new _apm__WEBPACK_IMPORTED_MODULE_0__[\"default\"](id, config)]);\n};\nvar setupNexio = function setupNexio() {\n payments.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n selector = _ref2[0],\n payment = _ref2[1];\n var fields = document.querySelector(selector);\n if (fields) {\n var form = fields.closest('form');\n payment.setup(form, fields);\n } else {\n console.warn(\"SolidusNexio: \".concat(selector, \" is not found, the payment method \").concat(payment.id, \" is not initialized.\"));\n }\n });\n payments.length = 0;\n};\n\n//# sourceURL=webpack://solidus_nexio/./src/solidus-nexio.js?");
108
+
109
+ /***/ }),
110
+
111
+ /***/ "./src/three-d-challenge.js":
112
+ /*!**********************************!*\
113
+ !*** ./src/three-d-challenge.js ***!
114
+ \**********************************/
115
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
116
+
117
+ "use strict";
118
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./api */ \"./src/api.js\");\n/* harmony import */ var tingle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tingle.js */ \"./node_modules/tingle.js/dist/tingle.min.js\");\n/* harmony import */ var tingle_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tingle_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var raw_loader_tingle_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! raw-loader!./tingle.css */ \"./node_modules/raw-loader/dist/cjs.js!./src/tingle.css\");\n\n\n\nvar style = document.createElement('style');\nstyle.setAttribute('type', 'text/css');\nstyle.innerHTML = raw_loader_tingle_css__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\ndocument.head.appendChild(style);\nvar checkPaymentState = function checkPaymentState(path, modal, cb) {\n (0,_api__WEBPACK_IMPORTED_MODULE_0__.getPaymentState)(path).then(function (state) {\n if (state) {\n if (modal.isOpen()) {\n modal.close();\n }\n cb(state);\n } else if (!modal.isOpen()) {\n // check the most recent state\n (0,_api__WEBPACK_IMPORTED_MODULE_0__.getPaymentState)(path).then(function (state) {\n return cb(state || 'invalid');\n });\n } else {\n setTimeout(checkPaymentState.bind(null, path, modal, cb), 2000);\n }\n });\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (urls, cb) {\n var modal = new (tingle_js__WEBPACK_IMPORTED_MODULE_1___default().modal)({\n closeMethods: ['overlay', 'button', 'escape'],\n closeLabel: 'Close',\n onOpen: function onOpen() {\n setTimeout(function () {\n return checkPaymentState(urls.check_path, modal, cb);\n }, 3000);\n },\n onClose: function onClose() {\n modal.$closed = true;\n }\n });\n modal.setContent(\"<iframe src=\\\"\".concat(urls.redirect_url, \"\\\" class=\\\"tingle-modal-box__iframe\\\" />\"));\n modal.open();\n});\n\n//# sourceURL=webpack://solidus_nexio/./src/three-d-challenge.js?");
119
+
120
+ /***/ }),
121
+
122
+ /***/ "./node_modules/jsencrypt/lib/JSEncrypt.js":
123
+ /*!*************************************************!*\
124
+ !*** ./node_modules/jsencrypt/lib/JSEncrypt.js ***!
125
+ \*************************************************/
126
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
127
+
128
+ "use strict";
129
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncrypt\": () => (/* binding */ JSEncrypt)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./node_modules/jsencrypt/lib/lib/jsbn/base64.js\");\n/* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ \"./node_modules/jsencrypt/lib/JSEncryptRSAKey.js\");\n/* harmony import */ var _version_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version.json */ \"./node_modules/jsencrypt/lib/version.json\");\n\n\n\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n options = options || {};\n this.default_key_size = options.default_key_size ? parseInt(options.default_key_size, 10) : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey(key);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt((0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\n JSEncrypt.version = _version_json__WEBPACK_IMPORTED_MODULE_2__.version;\n return JSEncrypt;\n}());\n\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/JSEncrypt.js?");
130
+
131
+ /***/ }),
132
+
133
+ /***/ "./node_modules/jsencrypt/lib/JSEncryptRSAKey.js":
134
+ /*!*******************************************************!*\
135
+ !*** ./node_modules/jsencrypt/lib/JSEncryptRSAKey.js ***!
136
+ \*******************************************************/
137
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
138
+
139
+ "use strict";
140
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncryptRSAKey\": () => (/* binding */ JSEncryptRSAKey)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./node_modules/jsencrypt/lib/lib/jsbn/base64.js\");\n/* harmony import */ var _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/asn1js/hex */ \"./node_modules/jsencrypt/lib/lib/asn1js/hex.js\");\n/* harmony import */ var _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/asn1js/base64 */ \"./node_modules/jsencrypt/lib/lib/asn1js/base64.js\");\n/* harmony import */ var _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/asn1js/asn1 */ \"./node_modules/jsencrypt/lib/lib/asn1js/asn1.js\");\n/* harmony import */ var _lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/jsbn/rsa */ \"./node_modules/jsencrypt/lib/lib/jsbn/rsa.js\");\n/* harmony import */ var _lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/jsbn/jsbn */ \"./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/jsrsasign/asn1-1.0 */ \"./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n/**\n * Create a new JSEncryptRSAKey that extends Tom Wu's RSA key object.\n * This object is just a decorator for parsing the key parameter\n * @param {string|Object} key - The key in string format, or an object containing\n * the parameters needed to build a RSAKey object.\n * @constructor\n */\nvar JSEncryptRSAKey = /** @class */ (function (_super) {\n __extends(JSEncryptRSAKey, _super);\n function JSEncryptRSAKey(key) {\n var _this = _super.call(this) || this;\n // Call the super constructor.\n // RSAKey.call(this);\n // If a key key was provided.\n if (key) {\n // If this is a string...\n if (typeof key === \"string\") {\n _this.parseKey(key);\n }\n else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||\n JSEncryptRSAKey.hasPublicKeyProperty(key)) {\n // Set the values for the key.\n _this.parsePropertiesFrom(key);\n }\n }\n return _this;\n }\n /**\n * Method to parse a pem encoded string containing both a public or private key.\n * The method will translate the pem encoded string in a der encoded string and\n * will parse private key and public key parameters. This method accepts public key\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\n *\n * @todo Check how many rsa formats use the same format of pkcs #1.\n *\n * The format is defined as:\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * it's possible to examine the structure of the keys obtained from openssl using\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\n * @private\n */\n JSEncryptRSAKey.prototype.parseKey = function (pem) {\n try {\n var modulus = 0;\n var public_exponent = 0;\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\n var der = reHex.test(pem) ? _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__.Hex.decode(pem) : _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__.Base64.unarmor(pem);\n var asn1 = _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__.ASN1.decode(der);\n // Fixes a bug with OpenSSL 1.0+ private keys\n if (asn1.sub.length === 3) {\n asn1 = asn1.sub[2].sub[0];\n }\n if (asn1.sub.length === 9) {\n // Parse the private key.\n modulus = asn1.sub[1].getHexStringValue(); // bigint\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[2].getHexStringValue(); // int\n this.e = parseInt(public_exponent, 16);\n var private_exponent = asn1.sub[3].getHexStringValue(); // bigint\n this.d = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(private_exponent, 16);\n var prime1 = asn1.sub[4].getHexStringValue(); // bigint\n this.p = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime1, 16);\n var prime2 = asn1.sub[5].getHexStringValue(); // bigint\n this.q = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime2, 16);\n var exponent1 = asn1.sub[6].getHexStringValue(); // bigint\n this.dmp1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent1, 16);\n var exponent2 = asn1.sub[7].getHexStringValue(); // bigint\n this.dmq1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent2, 16);\n var coefficient = asn1.sub[8].getHexStringValue(); // bigint\n this.coeff = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(coefficient, 16);\n }\n else if (asn1.sub.length === 2) {\n // Parse the public key.\n var bit_string = asn1.sub[1];\n var sequence = bit_string.sub[0];\n modulus = sequence.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = sequence.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n else {\n return false;\n }\n return true;\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa key.\n *\n * The translation follow the ASN.1 notation :\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER, -- (inverse of q) mod p\n * }\n * @returns {string} DER Encoded String representing the rsa private key\n * @private\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {\n var options = {\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: 0 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.d }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.p }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.q }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmp1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmq1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.coeff })\n ]\n };\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPrivateBaseKey());\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\n * The representation follow the ASN.1 notation :\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * @returns {string} DER Encoded String representing the rsa public key\n * @private\n */\n JSEncryptRSAKey.prototype.getPublicBaseKey = function () {\n var first_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERObjectIdentifier({ oid: \"1.2.840.113549.1.1.1\" }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERNull()\n ]\n });\n var second_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e })\n ]\n });\n var bit_string = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERBitString({\n hex: \"00\" + second_sequence.getEncodedHex()\n });\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n first_sequence,\n bit_string\n ]\n });\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPublicBaseKey());\n };\n /**\n * wrap the string in block of width chars. The default value for rsa keys is 64\n * characters.\n * @param {string} str the pem encoded string without header and footer\n * @param {Number} [width=64] - the length the string has to be wrapped at\n * @returns {string}\n * @private\n */\n JSEncryptRSAKey.wordwrap = function (str, width) {\n width = width || 64;\n if (!str) {\n return str;\n }\n var regex = \"(.{1,\" + width + \"})( +|$\\n?)|(.{1,\" + width + \"})\";\n return str.match(RegExp(regex, \"g\")).join(\"\\n\");\n };\n /**\n * Retrieve the pem encoded private key\n * @returns {string} the pem encoded private key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateKey = function () {\n var key = \"-----BEGIN RSA PRIVATE KEY-----\\n\";\n key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + \"\\n\";\n key += \"-----END RSA PRIVATE KEY-----\";\n return key;\n };\n /**\n * Retrieve the pem encoded public key\n * @returns {string} the pem encoded public key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicKey = function () {\n var key = \"-----BEGIN PUBLIC KEY-----\\n\";\n key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + \"\\n\";\n key += \"-----END PUBLIC KEY-----\";\n return key;\n };\n /**\n * Check if the object contains the necessary parameters to populate the rsa modulus\n * and public exponent parameters.\n * @param {Object} [obj={}] - An object that may contain the two public key\n * parameters\n * @returns {boolean} true if the object contains both the modulus and the public exponent\n * properties (n and e)\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\n * be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty(\"n\") &&\n obj.hasOwnProperty(\"e\"));\n };\n /**\n * Check if the object contains ALL the parameters of an RSA key.\n * @param {Object} [obj={}] - An object that may contain nine rsa key\n * parameters\n * @returns {boolean} true if the object contains all the parameters needed\n * @todo check for types of the parameters all the parameters but the public exponent\n * should be parseable bigint objects, the public exponent should be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty(\"n\") &&\n obj.hasOwnProperty(\"e\") &&\n obj.hasOwnProperty(\"d\") &&\n obj.hasOwnProperty(\"p\") &&\n obj.hasOwnProperty(\"q\") &&\n obj.hasOwnProperty(\"dmp1\") &&\n obj.hasOwnProperty(\"dmq1\") &&\n obj.hasOwnProperty(\"coeff\"));\n };\n /**\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\n * include the modulus and public exponent (n, e) parameters.\n * @param {Object} obj - the object containing rsa parameters\n * @private\n */\n JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {\n this.n = obj.n;\n this.e = obj.e;\n if (obj.hasOwnProperty(\"d\")) {\n this.d = obj.d;\n this.p = obj.p;\n this.q = obj.q;\n this.dmp1 = obj.dmp1;\n this.dmq1 = obj.dmq1;\n this.coeff = obj.coeff;\n }\n };\n return JSEncryptRSAKey;\n}(_lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__.RSAKey));\n\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/JSEncryptRSAKey.js?");
141
+
142
+ /***/ }),
143
+
144
+ /***/ "./node_modules/jsencrypt/lib/index.js":
145
+ /*!*********************************************!*\
146
+ !*** ./node_modules/jsencrypt/lib/index.js ***!
147
+ \*********************************************/
148
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
149
+
150
+ "use strict";
151
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncrypt\": () => (/* reexport safe */ _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./JSEncrypt */ \"./node_modules/jsencrypt/lib/JSEncrypt.js\");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt);\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/index.js?");
152
+
153
+ /***/ }),
154
+
155
+ /***/ "./node_modules/jsencrypt/lib/lib/asn1js/asn1.js":
156
+ /*!*******************************************************!*\
157
+ !*** ./node_modules/jsencrypt/lib/lib/asn1js/asn1.js ***!
158
+ \*******************************************************/
159
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
160
+
161
+ "use strict";
162
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ASN1\": () => (/* binding */ ASN1),\n/* harmony export */ \"ASN1Tag\": () => (/* binding */ ASN1Tag),\n/* harmony export */ \"Stream\": () => (/* binding */ Stream)\n/* harmony export */ });\n/* harmony import */ var _int10__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./int10 */ \"./node_modules/jsencrypt/lib/lib/asn1js/int10.js\");\n// ASN.1 JavaScript decoder\n// Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\n/*global oids */\n\nvar ellipsis = \"\\u2026\";\nvar reTimeS = /^(\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nvar reTimeL = /^(\\d\\d\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nfunction stringCut(str, len) {\n if (str.length > len) {\n str = str.substring(0, len) + ellipsis;\n }\n return str;\n}\nvar Stream = /** @class */ (function () {\n function Stream(enc, pos) {\n this.hexDigits = \"0123456789ABCDEF\";\n if (enc instanceof Stream) {\n this.enc = enc.enc;\n this.pos = enc.pos;\n }\n else {\n // enc should be an array or a binary string\n this.enc = enc;\n this.pos = pos;\n }\n }\n Stream.prototype.get = function (pos) {\n if (pos === undefined) {\n pos = this.pos++;\n }\n if (pos >= this.enc.length) {\n throw new Error(\"Requesting byte offset \" + pos + \" on a stream of length \" + this.enc.length);\n }\n return (\"string\" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];\n };\n Stream.prototype.hexByte = function (b) {\n return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);\n };\n Stream.prototype.hexDump = function (start, end, raw) {\n var s = \"\";\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n if (raw !== true) {\n switch (i & 0xF) {\n case 0x7:\n s += \" \";\n break;\n case 0xF:\n s += \"\\n\";\n break;\n default:\n s += \" \";\n }\n }\n }\n return s;\n };\n Stream.prototype.isASCII = function (start, end) {\n for (var i = start; i < end; ++i) {\n var c = this.get(i);\n if (c < 32 || c > 176) {\n return false;\n }\n }\n return true;\n };\n Stream.prototype.parseStringISO = function (start, end) {\n var s = \"\";\n for (var i = start; i < end; ++i) {\n s += String.fromCharCode(this.get(i));\n }\n return s;\n };\n Stream.prototype.parseStringUTF = function (start, end) {\n var s = \"\";\n for (var i = start; i < end;) {\n var c = this.get(i++);\n if (c < 128) {\n s += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));\n }\n else {\n s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));\n }\n }\n return s;\n };\n Stream.prototype.parseStringBMP = function (start, end) {\n var str = \"\";\n var hi;\n var lo;\n for (var i = start; i < end;) {\n hi = this.get(i++);\n lo = this.get(i++);\n str += String.fromCharCode((hi << 8) | lo);\n }\n return str;\n };\n Stream.prototype.parseTime = function (start, end, shortYear) {\n var s = this.parseStringISO(start, end);\n var m = (shortYear ? reTimeS : reTimeL).exec(s);\n if (!m) {\n return \"Unrecognized time: \" + s;\n }\n if (shortYear) {\n // to avoid querying the timer, use the fixed range [1970, 2069]\n // it will conform with ITU X.400 [-10, +40] sliding window until 2030\n m[1] = +m[1];\n m[1] += (+m[1] < 70) ? 2000 : 1900;\n }\n s = m[1] + \"-\" + m[2] + \"-\" + m[3] + \" \" + m[4];\n if (m[5]) {\n s += \":\" + m[5];\n if (m[6]) {\n s += \":\" + m[6];\n if (m[7]) {\n s += \".\" + m[7];\n }\n }\n }\n if (m[8]) {\n s += \" UTC\";\n if (m[8] != \"Z\") {\n s += m[8];\n if (m[9]) {\n s += \":\" + m[9];\n }\n }\n }\n return s;\n };\n Stream.prototype.parseInteger = function (start, end) {\n var v = this.get(start);\n var neg = (v > 127);\n var pad = neg ? 255 : 0;\n var len;\n var s = \"\";\n // skip unuseful bits (not allowed in DER)\n while (v == pad && ++start < end) {\n v = this.get(start);\n }\n len = end - start;\n if (len === 0) {\n return neg ? -1 : 0;\n }\n // show bit length of huge integers\n if (len > 4) {\n s = v;\n len <<= 3;\n while (((+s ^ pad) & 0x80) == 0) {\n s = +s << 1;\n --len;\n }\n s = \"(\" + len + \" bit)\\n\";\n }\n // decode the integer\n if (neg) {\n v = v - 256;\n }\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10(v);\n for (var i = start + 1; i < end; ++i) {\n n.mulAdd(256, this.get(i));\n }\n return s + n.toString();\n };\n Stream.prototype.parseBitString = function (start, end, maxLength) {\n var unusedBit = this.get(start);\n var lenBit = ((end - start - 1) << 3) - unusedBit;\n var intro = \"(\" + lenBit + \" bit)\\n\";\n var s = \"\";\n for (var i = start + 1; i < end; ++i) {\n var b = this.get(i);\n var skip = (i == end - 1) ? unusedBit : 0;\n for (var j = 7; j >= skip; --j) {\n s += (b >> j) & 1 ? \"1\" : \"0\";\n }\n if (s.length > maxLength) {\n return intro + stringCut(s, maxLength);\n }\n }\n return intro + s;\n };\n Stream.prototype.parseOctetString = function (start, end, maxLength) {\n if (this.isASCII(start, end)) {\n return stringCut(this.parseStringISO(start, end), maxLength);\n }\n var len = end - start;\n var s = \"(\" + len + \" byte)\\n\";\n maxLength /= 2; // we work in bytes\n if (len > maxLength) {\n end = start + maxLength;\n }\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n }\n if (len > maxLength) {\n s += ellipsis;\n }\n return s;\n };\n Stream.prototype.parseOID = function (start, end, maxLength) {\n var s = \"\";\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n var bits = 0;\n for (var i = start; i < end; ++i) {\n var v = this.get(i);\n n.mulAdd(128, v & 0x7F);\n bits += 7;\n if (!(v & 0x80)) { // finished\n if (s === \"\") {\n n = n.simplify();\n if (n instanceof _int10__WEBPACK_IMPORTED_MODULE_0__.Int10) {\n n.sub(80);\n s = \"2.\" + n.toString();\n }\n else {\n var m = n < 80 ? n < 40 ? 0 : 1 : 2;\n s = m + \".\" + (n - m * 40);\n }\n }\n else {\n s += \".\" + n.toString();\n }\n if (s.length > maxLength) {\n return stringCut(s, maxLength);\n }\n n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n bits = 0;\n }\n }\n if (bits > 0) {\n s += \".incomplete\";\n }\n return s;\n };\n return Stream;\n}());\n\nvar ASN1 = /** @class */ (function () {\n function ASN1(stream, header, length, tag, sub) {\n if (!(tag instanceof ASN1Tag)) {\n throw new Error(\"Invalid tag value.\");\n }\n this.stream = stream;\n this.header = header;\n this.length = length;\n this.tag = tag;\n this.sub = sub;\n }\n ASN1.prototype.typeName = function () {\n switch (this.tag.tagClass) {\n case 0: // universal\n switch (this.tag.tagNumber) {\n case 0x00:\n return \"EOC\";\n case 0x01:\n return \"BOOLEAN\";\n case 0x02:\n return \"INTEGER\";\n case 0x03:\n return \"BIT_STRING\";\n case 0x04:\n return \"OCTET_STRING\";\n case 0x05:\n return \"NULL\";\n case 0x06:\n return \"OBJECT_IDENTIFIER\";\n case 0x07:\n return \"ObjectDescriptor\";\n case 0x08:\n return \"EXTERNAL\";\n case 0x09:\n return \"REAL\";\n case 0x0A:\n return \"ENUMERATED\";\n case 0x0B:\n return \"EMBEDDED_PDV\";\n case 0x0C:\n return \"UTF8String\";\n case 0x10:\n return \"SEQUENCE\";\n case 0x11:\n return \"SET\";\n case 0x12:\n return \"NumericString\";\n case 0x13:\n return \"PrintableString\"; // ASCII subset\n case 0x14:\n return \"TeletexString\"; // aka T61String\n case 0x15:\n return \"VideotexString\";\n case 0x16:\n return \"IA5String\"; // ASCII\n case 0x17:\n return \"UTCTime\";\n case 0x18:\n return \"GeneralizedTime\";\n case 0x19:\n return \"GraphicString\";\n case 0x1A:\n return \"VisibleString\"; // ASCII subset\n case 0x1B:\n return \"GeneralString\";\n case 0x1C:\n return \"UniversalString\";\n case 0x1E:\n return \"BMPString\";\n }\n return \"Universal_\" + this.tag.tagNumber.toString();\n case 1:\n return \"Application_\" + this.tag.tagNumber.toString();\n case 2:\n return \"[\" + this.tag.tagNumber.toString() + \"]\"; // Context\n case 3:\n return \"Private_\" + this.tag.tagNumber.toString();\n }\n };\n ASN1.prototype.content = function (maxLength) {\n if (this.tag === undefined) {\n return null;\n }\n if (maxLength === undefined) {\n maxLength = Infinity;\n }\n var content = this.posContent();\n var len = Math.abs(this.length);\n if (!this.tag.isUniversal()) {\n if (this.sub !== null) {\n return \"(\" + this.sub.length + \" elem)\";\n }\n return this.stream.parseOctetString(content, content + len, maxLength);\n }\n switch (this.tag.tagNumber) {\n case 0x01: // BOOLEAN\n return (this.stream.get(content) === 0) ? \"false\" : \"true\";\n case 0x02: // INTEGER\n return this.stream.parseInteger(content, content + len);\n case 0x03: // BIT_STRING\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\n this.stream.parseBitString(content, content + len, maxLength);\n case 0x04: // OCTET_STRING\n return this.sub ? \"(\" + this.sub.length + \" elem)\" :\n this.stream.parseOctetString(content, content + len, maxLength);\n // case 0x05: // NULL\n case 0x06: // OBJECT_IDENTIFIER\n return this.stream.parseOID(content, content + len, maxLength);\n // case 0x07: // ObjectDescriptor\n // case 0x08: // EXTERNAL\n // case 0x09: // REAL\n // case 0x0A: // ENUMERATED\n // case 0x0B: // EMBEDDED_PDV\n case 0x10: // SEQUENCE\n case 0x11: // SET\n if (this.sub !== null) {\n return \"(\" + this.sub.length + \" elem)\";\n }\n else {\n return \"(no elem)\";\n }\n case 0x0C: // UTF8String\n return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);\n case 0x12: // NumericString\n case 0x13: // PrintableString\n case 0x14: // TeletexString\n case 0x15: // VideotexString\n case 0x16: // IA5String\n // case 0x19: // GraphicString\n case 0x1A: // VisibleString\n // case 0x1B: // GeneralString\n // case 0x1C: // UniversalString\n return stringCut(this.stream.parseStringISO(content, content + len), maxLength);\n case 0x1E: // BMPString\n return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);\n case 0x17: // UTCTime\n case 0x18: // GeneralizedTime\n return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));\n }\n return null;\n };\n ASN1.prototype.toString = function () {\n return this.typeName() + \"@\" + this.stream.pos + \"[header:\" + this.header + \",length:\" + this.length + \",sub:\" + ((this.sub === null) ? \"null\" : this.sub.length) + \"]\";\n };\n ASN1.prototype.toPrettyString = function (indent) {\n if (indent === undefined) {\n indent = \"\";\n }\n var s = indent + this.typeName() + \" @\" + this.stream.pos;\n if (this.length >= 0) {\n s += \"+\";\n }\n s += this.length;\n if (this.tag.tagConstructed) {\n s += \" (constructed)\";\n }\n else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {\n s += \" (encapsulates)\";\n }\n s += \"\\n\";\n if (this.sub !== null) {\n indent += \" \";\n for (var i = 0, max = this.sub.length; i < max; ++i) {\n s += this.sub[i].toPrettyString(indent);\n }\n }\n return s;\n };\n ASN1.prototype.posStart = function () {\n return this.stream.pos;\n };\n ASN1.prototype.posContent = function () {\n return this.stream.pos + this.header;\n };\n ASN1.prototype.posEnd = function () {\n return this.stream.pos + this.header + Math.abs(this.length);\n };\n ASN1.prototype.toHexString = function () {\n return this.stream.hexDump(this.posStart(), this.posEnd(), true);\n };\n ASN1.decodeLength = function (stream) {\n var buf = stream.get();\n var len = buf & 0x7F;\n if (len == buf) {\n return len;\n }\n // no reason to use Int10, as it would be a huge buffer anyways\n if (len > 6) {\n throw new Error(\"Length over 48 bits not supported at position \" + (stream.pos - 1));\n }\n if (len === 0) {\n return null;\n } // undefined\n buf = 0;\n for (var i = 0; i < len; ++i) {\n buf = (buf * 256) + stream.get();\n }\n return buf;\n };\n /**\n * Retrieve the hexadecimal value (as a string) of the current ASN.1 element\n * @returns {string}\n * @public\n */\n ASN1.prototype.getHexStringValue = function () {\n var hexString = this.toHexString();\n var offset = this.header * 2;\n var length = this.length * 2;\n return hexString.substr(offset, length);\n };\n ASN1.decode = function (str) {\n var stream;\n if (!(str instanceof Stream)) {\n stream = new Stream(str, 0);\n }\n else {\n stream = str;\n }\n var streamStart = new Stream(stream);\n var tag = new ASN1Tag(stream);\n var len = ASN1.decodeLength(stream);\n var start = stream.pos;\n var header = start - streamStart.pos;\n var sub = null;\n var getSub = function () {\n var ret = [];\n if (len !== null) {\n // definite length\n var end = start + len;\n while (stream.pos < end) {\n ret[ret.length] = ASN1.decode(stream);\n }\n if (stream.pos != end) {\n throw new Error(\"Content size is not correct for container starting at offset \" + start);\n }\n }\n else {\n // undefined length\n try {\n for (;;) {\n var s = ASN1.decode(stream);\n if (s.tag.isEOC()) {\n break;\n }\n ret[ret.length] = s;\n }\n len = start - stream.pos; // undefined lengths are represented as negative values\n }\n catch (e) {\n throw new Error(\"Exception while decoding undefined length content: \" + e);\n }\n }\n return ret;\n };\n if (tag.tagConstructed) {\n // must have valid content\n sub = getSub();\n }\n else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {\n // sometimes BitString and OctetString are used to encapsulate ASN.1\n try {\n if (tag.tagNumber == 0x03) {\n if (stream.get() != 0) {\n throw new Error(\"BIT STRINGs with unused bits cannot encapsulate.\");\n }\n }\n sub = getSub();\n for (var i = 0; i < sub.length; ++i) {\n if (sub[i].tag.isEOC()) {\n throw new Error(\"EOC is not supposed to be actual content.\");\n }\n }\n }\n catch (e) {\n // but silently ignore when they don't\n sub = null;\n }\n }\n if (sub === null) {\n if (len === null) {\n throw new Error(\"We can't skip over an invalid tag with undefined length at offset \" + start);\n }\n stream.pos = start + Math.abs(len);\n }\n return new ASN1(streamStart, header, len, tag, sub);\n };\n return ASN1;\n}());\n\nvar ASN1Tag = /** @class */ (function () {\n function ASN1Tag(stream) {\n var buf = stream.get();\n this.tagClass = buf >> 6;\n this.tagConstructed = ((buf & 0x20) !== 0);\n this.tagNumber = buf & 0x1F;\n if (this.tagNumber == 0x1F) { // long tag\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n do {\n buf = stream.get();\n n.mulAdd(128, buf & 0x7F);\n } while (buf & 0x80);\n this.tagNumber = n.simplify();\n }\n }\n ASN1Tag.prototype.isUniversal = function () {\n return this.tagClass === 0x00;\n };\n ASN1Tag.prototype.isEOC = function () {\n return this.tagClass === 0x00 && this.tagNumber === 0x00;\n };\n return ASN1Tag;\n}());\n\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/asn1js/asn1.js?");
163
+
164
+ /***/ }),
165
+
166
+ /***/ "./node_modules/jsencrypt/lib/lib/asn1js/base64.js":
167
+ /*!*********************************************************!*\
168
+ !*** ./node_modules/jsencrypt/lib/lib/asn1js/base64.js ***!
169
+ \*********************************************************/
170
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
171
+
172
+ "use strict";
173
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Base64\": () => (/* binding */ Base64)\n/* harmony export */ });\n// Base64 JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Base64 = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n var ignore = \"= \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\n decoder = Object.create(null);\n for (i = 0; i < 64; ++i) {\n decoder[b64.charAt(i)] = i;\n }\n decoder['-'] = 62; //+\n decoder['_'] = 63; //-\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == \"=\") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error(\"Illegal character at offset \" + i);\n }\n bits |= c;\n if (++char_count >= 4) {\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n out[out.length] = bits & 0xFF;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 6;\n }\n }\n switch (char_count) {\n case 1:\n throw new Error(\"Base64 encoding incomplete: at least 2 bits missing\");\n case 2:\n out[out.length] = (bits >> 10);\n break;\n case 3:\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n break;\n }\n return out;\n },\n re: /-----BEGIN [^-]+-----([A-Za-z0-9+\\/=\\s]+)-----END [^-]+-----|begin-base64[^\\n]+\\n([A-Za-z0-9+\\/=\\s]+)====/,\n unarmor: function (a) {\n var m = Base64.re.exec(a);\n if (m) {\n if (m[1]) {\n a = m[1];\n }\n else if (m[2]) {\n a = m[2];\n }\n else {\n throw new Error(\"RegExp out of sync\");\n }\n }\n return Base64.decode(a);\n }\n};\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/asn1js/base64.js?");
174
+
175
+ /***/ }),
176
+
177
+ /***/ "./node_modules/jsencrypt/lib/lib/asn1js/hex.js":
178
+ /*!******************************************************!*\
179
+ !*** ./node_modules/jsencrypt/lib/lib/asn1js/hex.js ***!
180
+ \******************************************************/
181
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
182
+
183
+ "use strict";
184
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Hex\": () => (/* binding */ Hex)\n/* harmony export */ });\n// Hex JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Hex = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var hex = \"0123456789ABCDEF\";\n var ignore = \" \\f\\n\\r\\t\\u00A0\\u2028\\u2029\";\n decoder = {};\n for (i = 0; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n hex = hex.toLowerCase();\n for (i = 10; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == \"=\") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error(\"Illegal character at offset \" + i);\n }\n bits |= c;\n if (++char_count >= 2) {\n out[out.length] = bits;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 4;\n }\n }\n if (char_count) {\n throw new Error(\"Hex encoding incomplete: 4 bits missing\");\n }\n return out;\n }\n};\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/asn1js/hex.js?");
185
+
186
+ /***/ }),
187
+
188
+ /***/ "./node_modules/jsencrypt/lib/lib/asn1js/int10.js":
189
+ /*!********************************************************!*\
190
+ !*** ./node_modules/jsencrypt/lib/lib/asn1js/int10.js ***!
191
+ \********************************************************/
192
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
193
+
194
+ "use strict";
195
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Int10\": () => (/* binding */ Int10)\n/* harmony export */ });\n// Big integer base-10 printing library\n// Copyright (c) 2014 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256\nvar Int10 = /** @class */ (function () {\n function Int10(value) {\n this.buf = [+value || 0];\n }\n Int10.prototype.mulAdd = function (m, c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] * m + c;\n if (t < max) {\n c = 0;\n }\n else {\n c = 0 | (t / max);\n t -= c * max;\n }\n b[i] = t;\n }\n if (c > 0) {\n b[i] = c;\n }\n };\n Int10.prototype.sub = function (c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] - c;\n if (t < 0) {\n t += max;\n c = 1;\n }\n else {\n c = 0;\n }\n b[i] = t;\n }\n while (b[b.length - 1] === 0) {\n b.pop();\n }\n };\n Int10.prototype.toString = function (base) {\n if ((base || 10) != 10) {\n throw new Error(\"only base 10 is supported\");\n }\n var b = this.buf;\n var s = b[b.length - 1].toString();\n for (var i = b.length - 2; i >= 0; --i) {\n s += (max + b[i]).toString().substring(1);\n }\n return s;\n };\n Int10.prototype.valueOf = function () {\n var b = this.buf;\n var v = 0;\n for (var i = b.length - 1; i >= 0; --i) {\n v = v * max + b[i];\n }\n return v;\n };\n Int10.prototype.simplify = function () {\n var b = this.buf;\n return (b.length == 1) ? b[0] : this;\n };\n return Int10;\n}());\n\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/asn1js/int10.js?");
196
+
197
+ /***/ }),
198
+
199
+ /***/ "./node_modules/jsencrypt/lib/lib/jsbn/base64.js":
200
+ /*!*******************************************************!*\
201
+ !*** ./node_modules/jsencrypt/lib/lib/jsbn/base64.js ***!
202
+ \*******************************************************/
203
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
204
+
205
+ "use strict";
206
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"b64toBA\": () => (/* binding */ b64toBA),\n/* harmony export */ \"b64tohex\": () => (/* binding */ b64tohex),\n/* harmony export */ \"hex2b64\": () => (/* binding */ hex2b64)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./node_modules/jsencrypt/lib/lib/jsbn/util.js\");\n\nvar b64map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar b64pad = \"=\";\nfunction hex2b64(h) {\n var i;\n var c;\n var ret = \"\";\n for (i = 0; i + 3 <= h.length; i += 3) {\n c = parseInt(h.substring(i, i + 3), 16);\n ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\n }\n if (i + 1 == h.length) {\n c = parseInt(h.substring(i, i + 1), 16);\n ret += b64map.charAt(c << 2);\n }\n else if (i + 2 == h.length) {\n c = parseInt(h.substring(i, i + 2), 16);\n ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\n }\n while ((ret.length & 3) > 0) {\n ret += b64pad;\n }\n return ret;\n}\n// convert a base64 string to hex\nfunction b64tohex(s) {\n var ret = \"\";\n var i;\n var k = 0; // b64 state, 0-3\n var slop = 0;\n for (i = 0; i < s.length; ++i) {\n if (s.charAt(i) == b64pad) {\n break;\n }\n var v = b64map.indexOf(s.charAt(i));\n if (v < 0) {\n continue;\n }\n if (k == 0) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 1;\n }\n else if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n slop = v & 0xf;\n k = 2;\n }\n else if (k == 2) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop);\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 3;\n }\n else {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v & 0xf);\n k = 0;\n }\n }\n if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop << 2);\n }\n return ret;\n}\n// convert a base64 string to a byte/number array\nfunction b64toBA(s) {\n // piggyback on b64tohex for now, optimize later\n var h = b64tohex(s);\n var i;\n var a = [];\n for (i = 0; 2 * i < h.length; ++i) {\n a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);\n }\n return a;\n}\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsbn/base64.js?");
207
+
208
+ /***/ }),
209
+
210
+ /***/ "./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js":
211
+ /*!*****************************************************!*\
212
+ !*** ./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js ***!
213
+ \*****************************************************/
214
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
215
+
216
+ "use strict";
217
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BigInteger\": () => (/* binding */ BigInteger),\n/* harmony export */ \"intAt\": () => (/* binding */ intAt),\n/* harmony export */ \"nbi\": () => (/* binding */ nbi),\n/* harmony export */ \"nbits\": () => (/* binding */ nbits),\n/* harmony export */ \"nbv\": () => (/* binding */ nbv),\n/* harmony export */ \"parseBigInt\": () => (/* binding */ parseBigInt)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ \"./node_modules/jsencrypt/lib/lib/jsbn/util.js\");\n// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See \"LICENSE\" for details.\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n// Bits per digit\nvar dbits;\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary & 0xffffff) == 0xefcafe);\n//#region\nvar lowprimes = [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];\nvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\n//#endregion\n// (public) Constructor\nvar BigInteger = /** @class */ (function () {\n function BigInteger(a, b, c) {\n if (a != null) {\n if (\"number\" == typeof a) {\n this.fromNumber(a, b, c);\n }\n else if (b == null && \"string\" != typeof a) {\n this.fromString(a, 256);\n }\n else {\n this.fromString(a, b);\n }\n }\n }\n //#region PUBLIC\n // BigInteger.prototype.toString = bnToString;\n // (public) return string representation in given radix\n BigInteger.prototype.toString = function (b) {\n if (this.s < 0) {\n return \"-\" + this.negate().toString(b);\n }\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n return this.toRadix(b);\n }\n var km = (1 << k) - 1;\n var d;\n var m = false;\n var r = \"\";\n var i = this.t;\n var p = this.DB - (i * this.DB) % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) {\n m = true;\n }\n if (m) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n }\n }\n return m ? r : \"0\";\n };\n // BigInteger.prototype.negate = bnNegate;\n // (public) -this\n BigInteger.prototype.negate = function () {\n var r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n };\n // BigInteger.prototype.abs = bnAbs;\n // (public) |this|\n BigInteger.prototype.abs = function () {\n return (this.s < 0) ? this.negate() : this;\n };\n // BigInteger.prototype.compareTo = bnCompareTo;\n // (public) return + if this > a, - if this < a, 0 if equal\n BigInteger.prototype.compareTo = function (a) {\n var r = this.s - a.s;\n if (r != 0) {\n return r;\n }\n var i = this.t;\n r = i - a.t;\n if (r != 0) {\n return (this.s < 0) ? -r : r;\n }\n while (--i >= 0) {\n if ((r = this[i] - a[i]) != 0) {\n return r;\n }\n }\n return 0;\n };\n // BigInteger.prototype.bitLength = bnBitLength;\n // (public) return the number of bits in \"this\"\n BigInteger.prototype.bitLength = function () {\n if (this.t <= 0) {\n return 0;\n }\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n };\n // BigInteger.prototype.mod = bnMod;\n // (public) this mod a\n BigInteger.prototype.mod = function (a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n a.subTo(r, r);\n }\n return r;\n };\n // BigInteger.prototype.modPowInt = bnModPowInt;\n // (public) this^e % m, 0 <= e < 2^32\n BigInteger.prototype.modPowInt = function (e, m) {\n var z;\n if (e < 256 || m.isEven()) {\n z = new Classic(m);\n }\n else {\n z = new Montgomery(m);\n }\n return this.exp(e, z);\n };\n // BigInteger.prototype.clone = bnClone;\n // (public)\n BigInteger.prototype.clone = function () {\n var r = nbi();\n this.copyTo(r);\n return r;\n };\n // BigInteger.prototype.intValue = bnIntValue;\n // (public) return value as integer\n BigInteger.prototype.intValue = function () {\n if (this.s < 0) {\n if (this.t == 1) {\n return this[0] - this.DV;\n }\n else if (this.t == 0) {\n return -1;\n }\n }\n else if (this.t == 1) {\n return this[0];\n }\n else if (this.t == 0) {\n return 0;\n }\n // assumes 16 < DB < 32\n return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];\n };\n // BigInteger.prototype.byteValue = bnByteValue;\n // (public) return value as byte\n BigInteger.prototype.byteValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 24) >> 24;\n };\n // BigInteger.prototype.shortValue = bnShortValue;\n // (public) return value as short (assumes DB>=16)\n BigInteger.prototype.shortValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 16) >> 16;\n };\n // BigInteger.prototype.signum = bnSigNum;\n // (public) 0 if this == 0, 1 if this > 0\n BigInteger.prototype.signum = function () {\n if (this.s < 0) {\n return -1;\n }\n else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {\n return 0;\n }\n else {\n return 1;\n }\n };\n // BigInteger.prototype.toByteArray = bnToByteArray;\n // (public) convert to bigendian byte array\n BigInteger.prototype.toByteArray = function () {\n var i = this.t;\n var r = [];\n r[0] = this.s;\n var p = this.DB - (i * this.DB) % 8;\n var d;\n var k = 0;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {\n r[k++] = d | (this.s << (this.DB - p));\n }\n while (i >= 0) {\n if (p < 8) {\n d = (this[i] & ((1 << p) - 1)) << (8 - p);\n d |= this[--i] >> (p += this.DB - 8);\n }\n else {\n d = (this[i] >> (p -= 8)) & 0xff;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if ((d & 0x80) != 0) {\n d |= -256;\n }\n if (k == 0 && (this.s & 0x80) != (d & 0x80)) {\n ++k;\n }\n if (k > 0 || d != this.s) {\n r[k++] = d;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.equals = function (a) {\n return (this.compareTo(a) == 0);\n };\n // BigInteger.prototype.min = bnMin;\n BigInteger.prototype.min = function (a) {\n return (this.compareTo(a) < 0) ? this : a;\n };\n // BigInteger.prototype.max = bnMax;\n BigInteger.prototype.max = function (a) {\n return (this.compareTo(a) > 0) ? this : a;\n };\n // BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.and = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_and, r);\n return r;\n };\n // BigInteger.prototype.or = bnOr;\n BigInteger.prototype.or = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_or, r);\n return r;\n };\n // BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.xor = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor, r);\n return r;\n };\n // BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.andNot = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot, r);\n return r;\n };\n // BigInteger.prototype.not = bnNot;\n // (public) ~this\n BigInteger.prototype.not = function () {\n var r = nbi();\n for (var i = 0; i < this.t; ++i) {\n r[i] = this.DM & ~this[i];\n }\n r.t = this.t;\n r.s = ~this.s;\n return r;\n };\n // BigInteger.prototype.shiftLeft = bnShiftLeft;\n // (public) this << n\n BigInteger.prototype.shiftLeft = function (n) {\n var r = nbi();\n if (n < 0) {\n this.rShiftTo(-n, r);\n }\n else {\n this.lShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.shiftRight = bnShiftRight;\n // (public) this >> n\n BigInteger.prototype.shiftRight = function (n) {\n var r = nbi();\n if (n < 0) {\n this.lShiftTo(-n, r);\n }\n else {\n this.rShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n // (public) returns index of lowest 1-bit (or -1 if none)\n BigInteger.prototype.getLowestSetBit = function () {\n for (var i = 0; i < this.t; ++i) {\n if (this[i] != 0) {\n return i * this.DB + (0,_util__WEBPACK_IMPORTED_MODULE_0__.lbit)(this[i]);\n }\n }\n if (this.s < 0) {\n return this.t * this.DB;\n }\n return -1;\n };\n // BigInteger.prototype.bitCount = bnBitCount;\n // (public) return number of set bits\n BigInteger.prototype.bitCount = function () {\n var r = 0;\n var x = this.s & this.DM;\n for (var i = 0; i < this.t; ++i) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.cbit)(this[i] ^ x);\n }\n return r;\n };\n // BigInteger.prototype.testBit = bnTestBit;\n // (public) true iff nth bit is set\n BigInteger.prototype.testBit = function (n) {\n var j = Math.floor(n / this.DB);\n if (j >= this.t) {\n return (this.s != 0);\n }\n return ((this[j] & (1 << (n % this.DB))) != 0);\n };\n // BigInteger.prototype.setBit = bnSetBit;\n // (public) this | (1<<n)\n BigInteger.prototype.setBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_or);\n };\n // BigInteger.prototype.clearBit = bnClearBit;\n // (public) this & ~(1<<n)\n BigInteger.prototype.clearBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot);\n };\n // BigInteger.prototype.flipBit = bnFlipBit;\n // (public) this ^ (1<<n)\n BigInteger.prototype.flipBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor);\n };\n // BigInteger.prototype.add = bnAdd;\n // (public) this + a\n BigInteger.prototype.add = function (a) {\n var r = nbi();\n this.addTo(a, r);\n return r;\n };\n // BigInteger.prototype.subtract = bnSubtract;\n // (public) this - a\n BigInteger.prototype.subtract = function (a) {\n var r = nbi();\n this.subTo(a, r);\n return r;\n };\n // BigInteger.prototype.multiply = bnMultiply;\n // (public) this * a\n BigInteger.prototype.multiply = function (a) {\n var r = nbi();\n this.multiplyTo(a, r);\n return r;\n };\n // BigInteger.prototype.divide = bnDivide;\n // (public) this / a\n BigInteger.prototype.divide = function (a) {\n var r = nbi();\n this.divRemTo(a, r, null);\n return r;\n };\n // BigInteger.prototype.remainder = bnRemainder;\n // (public) this % a\n BigInteger.prototype.remainder = function (a) {\n var r = nbi();\n this.divRemTo(a, null, r);\n return r;\n };\n // BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n // (public) [this/a,this%a]\n BigInteger.prototype.divideAndRemainder = function (a) {\n var q = nbi();\n var r = nbi();\n this.divRemTo(a, q, r);\n return [q, r];\n };\n // BigInteger.prototype.modPow = bnModPow;\n // (public) this^e % m (HAC 14.85)\n BigInteger.prototype.modPow = function (e, m) {\n var i = e.bitLength();\n var k;\n var r = nbv(1);\n var z;\n if (i <= 0) {\n return r;\n }\n else if (i < 18) {\n k = 1;\n }\n else if (i < 48) {\n k = 3;\n }\n else if (i < 144) {\n k = 4;\n }\n else if (i < 768) {\n k = 5;\n }\n else {\n k = 6;\n }\n if (i < 8) {\n z = new Classic(m);\n }\n else if (m.isEven()) {\n z = new Barrett(m);\n }\n else {\n z = new Montgomery(m);\n }\n // precomputation\n var g = [];\n var n = 3;\n var k1 = k - 1;\n var km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n var j = e.t - 1;\n var w;\n var is1 = true;\n var r2 = nbi();\n var t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) {\n w = (e[j] >> (i - k1)) & km;\n }\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0) {\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n }\n n = k;\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) { // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) {\n z.sqrTo(r, r2);\n }\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.modInverse = bnModInverse;\n // (public) 1/this % m (HAC 14.61)\n BigInteger.prototype.modInverse = function (m) {\n var ac = m.isEven();\n if ((this.isEven() && ac) || m.signum() == 0) {\n return BigInteger.ZERO;\n }\n var u = m.clone();\n var v = this.clone();\n var a = nbv(1);\n var b = nbv(0);\n var c = nbv(0);\n var d = nbv(1);\n while (u.signum() != 0) {\n while (u.isEven()) {\n u.rShiftTo(1, u);\n if (ac) {\n if (!a.isEven() || !b.isEven()) {\n a.addTo(this, a);\n b.subTo(m, b);\n }\n a.rShiftTo(1, a);\n }\n else if (!b.isEven()) {\n b.subTo(m, b);\n }\n b.rShiftTo(1, b);\n }\n while (v.isEven()) {\n v.rShiftTo(1, v);\n if (ac) {\n if (!c.isEven() || !d.isEven()) {\n c.addTo(this, c);\n d.subTo(m, d);\n }\n c.rShiftTo(1, c);\n }\n else if (!d.isEven()) {\n d.subTo(m, d);\n }\n d.rShiftTo(1, d);\n }\n if (u.compareTo(v) >= 0) {\n u.subTo(v, u);\n if (ac) {\n a.subTo(c, a);\n }\n b.subTo(d, b);\n }\n else {\n v.subTo(u, v);\n if (ac) {\n c.subTo(a, c);\n }\n d.subTo(b, d);\n }\n }\n if (v.compareTo(BigInteger.ONE) != 0) {\n return BigInteger.ZERO;\n }\n if (d.compareTo(m) >= 0) {\n return d.subtract(m);\n }\n if (d.signum() < 0) {\n d.addTo(m, d);\n }\n else {\n return d;\n }\n if (d.signum() < 0) {\n return d.add(m);\n }\n else {\n return d;\n }\n };\n // BigInteger.prototype.pow = bnPow;\n // (public) this^e\n BigInteger.prototype.pow = function (e) {\n return this.exp(e, new NullExp());\n };\n // BigInteger.prototype.gcd = bnGCD;\n // (public) gcd(this,a) (HAC 14.54)\n BigInteger.prototype.gcd = function (a) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n return x;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n while (x.signum() > 0) {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n }\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n return y;\n };\n // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n // (public) test primality with certainty >= 1-.5^t\n BigInteger.prototype.isProbablePrime = function (t) {\n var i;\n var x = this.abs();\n if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {\n for (i = 0; i < lowprimes.length; ++i) {\n if (x[0] == lowprimes[i]) {\n return true;\n }\n }\n return false;\n }\n if (x.isEven()) {\n return false;\n }\n i = 1;\n while (i < lowprimes.length) {\n var m = lowprimes[i];\n var j = i + 1;\n while (j < lowprimes.length && m < lplim) {\n m *= lowprimes[j++];\n }\n m = x.modInt(m);\n while (i < j) {\n if (m % lowprimes[i++] == 0) {\n return false;\n }\n }\n }\n return x.millerRabin(t);\n };\n //#endregion PUBLIC\n //#region PROTECTED\n // BigInteger.prototype.copyTo = bnpCopyTo;\n // (protected) copy this to r\n BigInteger.prototype.copyTo = function (r) {\n for (var i = this.t - 1; i >= 0; --i) {\n r[i] = this[i];\n }\n r.t = this.t;\n r.s = this.s;\n };\n // BigInteger.prototype.fromInt = bnpFromInt;\n // (protected) set from integer value x, -DV <= x < DV\n BigInteger.prototype.fromInt = function (x) {\n this.t = 1;\n this.s = (x < 0) ? -1 : 0;\n if (x > 0) {\n this[0] = x;\n }\n else if (x < -1) {\n this[0] = x + this.DV;\n }\n else {\n this.t = 0;\n }\n };\n // BigInteger.prototype.fromString = bnpFromString;\n // (protected) set from string and radix\n BigInteger.prototype.fromString = function (s, b) {\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 256) {\n k = 8;\n /* byte array */\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n this.fromRadix(s, b);\n return;\n }\n this.t = 0;\n this.s = 0;\n var i = s.length;\n var mi = false;\n var sh = 0;\n while (--i >= 0) {\n var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == \"-\") {\n mi = true;\n }\n continue;\n }\n mi = false;\n if (sh == 0) {\n this[this.t++] = x;\n }\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = (x >> (this.DB - sh));\n }\n else {\n this[this.t - 1] |= x << sh;\n }\n sh += k;\n if (sh >= this.DB) {\n sh -= this.DB;\n }\n }\n if (k == 8 && ((+s[0]) & 0x80) != 0) {\n this.s = -1;\n if (sh > 0) {\n this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\n }\n }\n this.clamp();\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.clamp = bnpClamp;\n // (protected) clamp off excess high words\n BigInteger.prototype.clamp = function () {\n var c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c) {\n --this.t;\n }\n };\n // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n // (protected) r = this << n*DB\n BigInteger.prototype.dlShiftTo = function (n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + n] = this[i];\n }\n for (i = n - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r.t = this.t + n;\n r.s = this.s;\n };\n // BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n // (protected) r = this >> n*DB\n BigInteger.prototype.drShiftTo = function (n, r) {\n for (var i = n; i < this.t; ++i) {\n r[i - n] = this[i];\n }\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n };\n // BigInteger.prototype.lShiftTo = bnpLShiftTo;\n // (protected) r = this << n\n BigInteger.prototype.lShiftTo = function (n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB);\n var c = (this.s << bs) & this.DM;\n for (var i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (var i = ds - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n };\n // BigInteger.prototype.rShiftTo = bnpRShiftTo;\n // (protected) r = this >> n\n BigInteger.prototype.rShiftTo = function (n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) {\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n }\n r.t = this.t - ds;\n r.clamp();\n };\n // BigInteger.prototype.subTo = bnpSubTo;\n // (protected) r = this - a\n BigInteger.prototype.subTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c < -1) {\n r[i++] = this.DV + c;\n }\n else if (c > 0) {\n r[i++] = c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // \"this\" should be the larger one if appropriate.\n BigInteger.prototype.multiplyTo = function (a, r) {\n var x = this.abs();\n var y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < y.t; ++i) {\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n }\n r.s = 0;\n r.clamp();\n if (this.s != a.s) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.squareTo = bnpSquareTo;\n // (protected) r = this^2, r != this (HAC 14.16)\n BigInteger.prototype.squareTo = function (r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) {\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n }\n r.s = 0;\n r.clamp();\n };\n // BigInteger.prototype.divRemTo = bnpDivRemTo;\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n BigInteger.prototype.divRemTo = function (m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) {\n return;\n }\n var pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) {\n q.fromInt(0);\n }\n if (r != null) {\n this.copyTo(r);\n }\n return;\n }\n if (r == null) {\n r = nbi();\n }\n var y = nbi();\n var ts = this.s;\n var ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) {\n return;\n }\n var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt;\n var d2 = (1 << this.F1) / yt;\n var e = 1 << this.F2;\n var i = r.t;\n var j = i - ys;\n var t = (q == null) ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y); // \"negative\" y so we can replace sub with am later\n while (y.t < ys) {\n y[y.t++] = 0;\n }\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd) {\n r.subTo(t, r);\n }\n }\n }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) {\n BigInteger.ZERO.subTo(q, q);\n }\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) {\n r.rShiftTo(nsh, r);\n } // Denormalize remainder\n if (ts < 0) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.invDigit = bnpInvDigit;\n // (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply \"overflows\" differently from C/C++, so care is needed here.\n BigInteger.prototype.invDigit = function () {\n if (this.t < 1) {\n return 0;\n }\n var x = this[0];\n if ((x & 1) == 0) {\n return 0;\n }\n var y = x & 3; // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y > 0) ? this.DV - y : -y;\n };\n // BigInteger.prototype.isEven = bnpIsEven;\n // (protected) true iff this is even\n BigInteger.prototype.isEven = function () {\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n };\n // BigInteger.prototype.exp = bnpExp;\n // (protected) this^e, e < 2^32, doing sqr and mul with \"r\" (HAC 14.79)\n BigInteger.prototype.exp = function (e, z) {\n if (e > 0xffffffff || e < 1) {\n return BigInteger.ONE;\n }\n var r = nbi();\n var r2 = nbi();\n var g = z.convert(this);\n var i = nbits(e) - 1;\n g.copyTo(r);\n while (--i >= 0) {\n z.sqrTo(r, r2);\n if ((e & (1 << i)) > 0) {\n z.mulTo(r2, g, r);\n }\n else {\n var t = r;\n r = r2;\n r2 = t;\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.chunkSize = bnpChunkSize;\n // (protected) return x s.t. r^x < DV\n BigInteger.prototype.chunkSize = function (r) {\n return Math.floor(Math.LN2 * this.DB / Math.log(r));\n };\n // BigInteger.prototype.toRadix = bnpToRadix;\n // (protected) convert to radix string\n BigInteger.prototype.toRadix = function (b) {\n if (b == null) {\n b = 10;\n }\n if (this.signum() == 0 || b < 2 || b > 36) {\n return \"0\";\n }\n var cs = this.chunkSize(b);\n var a = Math.pow(b, cs);\n var d = nbv(a);\n var y = nbi();\n var z = nbi();\n var r = \"\";\n this.divRemTo(d, y, z);\n while (y.signum() > 0) {\n r = (a + z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d, y, z);\n }\n return z.intValue().toString(b) + r;\n };\n // BigInteger.prototype.fromRadix = bnpFromRadix;\n // (protected) convert from radix string\n BigInteger.prototype.fromRadix = function (s, b) {\n this.fromInt(0);\n if (b == null) {\n b = 10;\n }\n var cs = this.chunkSize(b);\n var d = Math.pow(b, cs);\n var mi = false;\n var j = 0;\n var w = 0;\n for (var i = 0; i < s.length; ++i) {\n var x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == \"-\" && this.signum() == 0) {\n mi = true;\n }\n continue;\n }\n w = b * w + x;\n if (++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w, 0);\n j = 0;\n w = 0;\n }\n }\n if (j > 0) {\n this.dMultiply(Math.pow(b, j));\n this.dAddOffset(w, 0);\n }\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.fromNumber = bnpFromNumber;\n // (protected) alternate constructor\n BigInteger.prototype.fromNumber = function (a, b, c) {\n if (\"number\" == typeof b) {\n // new BigInteger(int,int,RNG)\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n } // force odd\n while (!this.isProbablePrime(b)) {\n this.dAddOffset(2, 0);\n if (this.bitLength() > a) {\n this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);\n }\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n // (protected) r = this op a (bitwise)\n BigInteger.prototype.bitwiseTo = function (a, op, r) {\n var i;\n var f;\n var m = Math.min(a.t, this.t);\n for (i = 0; i < m; ++i) {\n r[i] = op(this[i], a[i]);\n }\n if (a.t < this.t) {\n f = a.s & this.DM;\n for (i = m; i < this.t; ++i) {\n r[i] = op(this[i], f);\n }\n r.t = this.t;\n }\n else {\n f = this.s & this.DM;\n for (i = m; i < a.t; ++i) {\n r[i] = op(f, a[i]);\n }\n r.t = a.t;\n }\n r.s = op(this.s, a.s);\n r.clamp();\n };\n // BigInteger.prototype.changeBit = bnpChangeBit;\n // (protected) this op (1<<n)\n BigInteger.prototype.changeBit = function (n, op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r, op, r);\n return r;\n };\n // BigInteger.prototype.addTo = bnpAddTo;\n // (protected) r = this + a\n BigInteger.prototype.addTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c > 0) {\n r[i++] = c;\n }\n else if (c < -1) {\n r[i++] = this.DV + c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.dMultiply = bnpDMultiply;\n // (protected) this *= n, this >= 0, 1 < n < DV\n BigInteger.prototype.dMultiply = function (n) {\n this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);\n ++this.t;\n this.clamp();\n };\n // BigInteger.prototype.dAddOffset = bnpDAddOffset;\n // (protected) this += n << w words, this >= 0\n BigInteger.prototype.dAddOffset = function (n, w) {\n if (n == 0) {\n return;\n }\n while (this.t <= w) {\n this[this.t++] = 0;\n }\n this[w] += n;\n while (this[w] >= this.DV) {\n this[w] -= this.DV;\n if (++w >= this.t) {\n this[this.t++] = 0;\n }\n ++this[w];\n }\n };\n // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n // (protected) r = lower n words of \"this * a\", a.t <= n\n // \"this\" should be the larger one if appropriate.\n BigInteger.prototype.multiplyLowerTo = function (a, n, r) {\n var i = Math.min(this.t + a.t, n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while (i > 0) {\n r[--i] = 0;\n }\n for (var j = r.t - this.t; i < j; ++i) {\n r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);\n }\n for (var j = Math.min(a.t, n); i < j; ++i) {\n this.am(0, a[i], r, i, 0, n - i);\n }\n r.clamp();\n };\n // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n // (protected) r = \"this * a\" without lower n words, n > 0\n // \"this\" should be the larger one if appropriate.\n BigInteger.prototype.multiplyUpperTo = function (a, n, r) {\n --n;\n var i = r.t = this.t + a.t - n;\n r.s = 0; // assumes a,this >= 0\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = Math.max(n - this.t, 0); i < a.t; ++i) {\n r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);\n }\n r.clamp();\n r.drShiftTo(1, r);\n };\n // BigInteger.prototype.modInt = bnpModInt;\n // (protected) this % n, n < 2^26\n BigInteger.prototype.modInt = function (n) {\n if (n <= 0) {\n return 0;\n }\n var d = this.DV % n;\n var r = (this.s < 0) ? n - 1 : 0;\n if (this.t > 0) {\n if (d == 0) {\n r = this[0] % n;\n }\n else {\n for (var i = this.t - 1; i >= 0; --i) {\n r = (d * r + this[i]) % n;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.millerRabin = bnpMillerRabin;\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n BigInteger.prototype.millerRabin = function (t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if (k <= 0) {\n return false;\n }\n var r = n1.shiftRight(k);\n t = (t + 1) >> 1;\n if (t > lowprimes.length) {\n t = lowprimes.length;\n }\n var a = nbi();\n for (var i = 0; i < t; ++i) {\n // Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\n var y = a.modPow(r, this);\n if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while (j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2, this);\n if (y.compareTo(BigInteger.ONE) == 0) {\n return false;\n }\n }\n if (y.compareTo(n1) != 0) {\n return false;\n }\n }\n }\n return true;\n };\n // BigInteger.prototype.square = bnSquare;\n // (public) this^2\n BigInteger.prototype.square = function () {\n var r = nbi();\n this.squareTo(r);\n return r;\n };\n //#region ASYNC\n // Public API method\n BigInteger.prototype.gcda = function (a, callback) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n callback(x);\n return;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.\n var gcda1 = function () {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n if (!(x.signum() > 0)) {\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n setTimeout(function () { callback(y); }, 0); // escape\n }\n else {\n setTimeout(gcda1, 0);\n }\n };\n setTimeout(gcda1, 10);\n };\n // (protected) alternate constructor\n BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {\n if (\"number\" == typeof b) {\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n }\n var bnp_1 = this;\n var bnpfn1_1 = function () {\n bnp_1.dAddOffset(2, 0);\n if (bnp_1.bitLength() > a) {\n bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);\n }\n if (bnp_1.isProbablePrime(b)) {\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(bnpfn1_1, 0);\n }\n };\n setTimeout(bnpfn1_1, 0);\n }\n }\n else {\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n return BigInteger;\n}());\n\n//#region REDUCERS\n//#region NullExp\nvar NullExp = /** @class */ (function () {\n function NullExp() {\n }\n // NullExp.prototype.convert = nNop;\n NullExp.prototype.convert = function (x) {\n return x;\n };\n // NullExp.prototype.revert = nNop;\n NullExp.prototype.revert = function (x) {\n return x;\n };\n // NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n };\n // NullExp.prototype.sqrTo = nSqrTo;\n NullExp.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n };\n return NullExp;\n}());\n// Modular reduction using \"classic\" algorithm\nvar Classic = /** @class */ (function () {\n function Classic(m) {\n this.m = m;\n }\n // Classic.prototype.convert = cConvert;\n Classic.prototype.convert = function (x) {\n if (x.s < 0 || x.compareTo(this.m) >= 0) {\n return x.mod(this.m);\n }\n else {\n return x;\n }\n };\n // Classic.prototype.revert = cRevert;\n Classic.prototype.revert = function (x) {\n return x;\n };\n // Classic.prototype.reduce = cReduce;\n Classic.prototype.reduce = function (x) {\n x.divRemTo(this.m, null, x);\n };\n // Classic.prototype.mulTo = cMulTo;\n Classic.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Classic.prototype.sqrTo = cSqrTo;\n Classic.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Classic;\n}());\n//#endregion\n//#region Montgomery\n// Montgomery reduction\nvar Montgomery = /** @class */ (function () {\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n }\n // Montgomery.prototype.convert = montConvert;\n // xR mod m\n Montgomery.prototype.convert = function (x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n this.m.subTo(r, r);\n }\n return r;\n };\n // Montgomery.prototype.revert = montRevert;\n // x/R mod m\n Montgomery.prototype.revert = function (x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n };\n // Montgomery.prototype.reduce = montReduce;\n // x = x/R mod m (HAC 14.32)\n Montgomery.prototype.reduce = function (x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Montgomery.prototype.mulTo = montMulTo;\n // r = \"xy/R mod m\"; x,y != r\n Montgomery.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Montgomery.prototype.sqrTo = montSqrTo;\n // r = \"x^2/R mod m\"; x != r\n Montgomery.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Montgomery;\n}());\n//#endregion Montgomery\n//#region Barrett\n// Barrett modular reduction\nvar Barrett = /** @class */ (function () {\n function Barrett(m) {\n this.m = m;\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);\n this.mu = this.r2.divide(m);\n }\n // Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.convert = function (x) {\n if (x.s < 0 || x.t > 2 * this.m.t) {\n return x.mod(this.m);\n }\n else if (x.compareTo(this.m) < 0) {\n return x;\n }\n else {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n };\n // Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.revert = function (x) {\n return x;\n };\n // Barrett.prototype.reduce = barrettReduce;\n // x = x mod m (HAC 14.42)\n Barrett.prototype.reduce = function (x) {\n x.drShiftTo(this.m.t - 1, this.r2);\n if (x.t > this.m.t + 1) {\n x.t = this.m.t + 1;\n x.clamp();\n }\n this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\n this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\n while (x.compareTo(this.r2) < 0) {\n x.dAddOffset(1, this.m.t + 1);\n }\n x.subTo(this.r2, x);\n while (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Barrett.prototype.mulTo = barrettMulTo;\n // r = x*y mod m; x,y != r\n Barrett.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Barrett.prototype.sqrTo = barrettSqrTo;\n // r = x^2 mod m; x != r\n Barrett.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Barrett;\n}());\n//#endregion\n//#endregion REDUCERS\n// return new, unset BigInteger\nfunction nbi() { return new BigInteger(null); }\nfunction parseBigInt(str, r) {\n return new BigInteger(str, r);\n}\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\nvar inBrowser = typeof navigator !== \"undefined\";\nif (inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n BigInteger.prototype.am = function am2(i, x, w, j, c, n) {\n var xl = x & 0x7fff;\n var xh = x >> 15;\n while (--n >= 0) {\n var l = this[i] & 0x7fff;\n var h = this[i++] >> 15;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n };\n dbits = 30;\n}\nelse if (inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n BigInteger.prototype.am = function am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n };\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n BigInteger.prototype.am = function am3(i, x, w, j, c, n) {\n var xl = x & 0x3fff;\n var xh = x >> 14;\n while (--n >= 0) {\n var l = this[i] & 0x3fff;\n var h = this[i++] >> 14;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n };\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = ((1 << dbits) - 1);\nBigInteger.prototype.DV = (1 << dbits);\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nvar BI_RC = [];\nvar rr;\nvar vv;\nrr = \"0\".charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = \"a\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = \"A\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c == null) ? -1 : c;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n var r = nbi();\n r.fromInt(i);\n return r;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1;\n var t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js?");
218
+
219
+ /***/ }),
220
+
221
+ /***/ "./node_modules/jsencrypt/lib/lib/jsbn/prng4.js":
222
+ /*!******************************************************!*\
223
+ !*** ./node_modules/jsencrypt/lib/lib/jsbn/prng4.js ***!
224
+ \******************************************************/
225
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
226
+
227
+ "use strict";
228
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Arcfour\": () => (/* binding */ Arcfour),\n/* harmony export */ \"prng_newstate\": () => (/* binding */ prng_newstate),\n/* harmony export */ \"rng_psize\": () => (/* binding */ rng_psize)\n/* harmony export */ });\n// prng4.js - uses Arcfour as a PRNG\nvar Arcfour = /** @class */ (function () {\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = [];\n }\n // Arcfour.prototype.init = ARC4init;\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n Arcfour.prototype.init = function (key) {\n var i;\n var j;\n var t;\n for (i = 0; i < 256; ++i) {\n this.S[i] = i;\n }\n j = 0;\n for (i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n };\n // Arcfour.prototype.next = ARC4next;\n Arcfour.prototype.next = function () {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n };\n return Arcfour;\n}());\n\n// Plug in your RNG constructor here\nfunction prng_newstate() {\n return new Arcfour();\n}\n// Pool size must be a multiple of 4 and greater than 32.\n// An array of bytes the size of the pool will be passed to init()\nvar rng_psize = 256;\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsbn/prng4.js?");
229
+
230
+ /***/ }),
231
+
232
+ /***/ "./node_modules/jsencrypt/lib/lib/jsbn/rng.js":
233
+ /*!****************************************************!*\
234
+ !*** ./node_modules/jsencrypt/lib/lib/jsbn/rng.js ***!
235
+ \****************************************************/
236
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
237
+
238
+ "use strict";
239
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SecureRandom\": () => (/* binding */ SecureRandom)\n/* harmony export */ });\n/* harmony import */ var _prng4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prng4 */ \"./node_modules/jsencrypt/lib/lib/jsbn/prng4.js\");\n// Random number generator - requires a PRNG backend, e.g. prng4.js\n\nvar rng_state;\nvar rng_pool = null;\nvar rng_pptr;\n// Initialize the pool with junk if needed.\nif (rng_pool == null) {\n rng_pool = [];\n rng_pptr = 0;\n var t = void 0;\n if (window.crypto && window.crypto.getRandomValues) {\n // Extract entropy (2048 bits) from RNG if available\n var z = new Uint32Array(256);\n window.crypto.getRandomValues(z);\n for (t = 0; t < z.length; ++t) {\n rng_pool[rng_pptr++] = z[t] & 255;\n }\n }\n // Use mouse events for entropy, if we do not have enough entropy by the time\n // we need it, entropy will be generated by Math.random.\n var count = 0;\n var onMouseMoveListener_1 = function (ev) {\n count = count || 0;\n if (count >= 256 || rng_pptr >= _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n if (window.removeEventListener) {\n window.removeEventListener(\"mousemove\", onMouseMoveListener_1, false);\n }\n else if (window.detachEvent) {\n window.detachEvent(\"onmousemove\", onMouseMoveListener_1);\n }\n return;\n }\n try {\n var mouseCoordinates = ev.x + ev.y;\n rng_pool[rng_pptr++] = mouseCoordinates & 255;\n count += 1;\n }\n catch (e) {\n // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.\n }\n };\n if (window.addEventListener) {\n window.addEventListener(\"mousemove\", onMouseMoveListener_1, false);\n }\n else if (window.attachEvent) {\n window.attachEvent(\"onmousemove\", onMouseMoveListener_1);\n }\n}\nfunction rng_get_byte() {\n if (rng_state == null) {\n rng_state = (0,_prng4__WEBPACK_IMPORTED_MODULE_0__.prng_newstate)();\n // At this point, we may not have collected enough entropy. If not, fall back to Math.random\n while (rng_pptr < _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n var random = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = random & 255;\n }\n rng_state.init(rng_pool);\n for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {\n rng_pool[rng_pptr] = 0;\n }\n rng_pptr = 0;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n}\nvar SecureRandom = /** @class */ (function () {\n function SecureRandom() {\n }\n SecureRandom.prototype.nextBytes = function (ba) {\n for (var i = 0; i < ba.length; ++i) {\n ba[i] = rng_get_byte();\n }\n };\n return SecureRandom;\n}());\n\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsbn/rng.js?");
240
+
241
+ /***/ }),
242
+
243
+ /***/ "./node_modules/jsencrypt/lib/lib/jsbn/rsa.js":
244
+ /*!****************************************************!*\
245
+ !*** ./node_modules/jsencrypt/lib/lib/jsbn/rsa.js ***!
246
+ \****************************************************/
247
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
248
+
249
+ "use strict";
250
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RSAKey\": () => (/* binding */ RSAKey)\n/* harmony export */ });\n/* harmony import */ var _jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsbn */ \"./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _rng__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng */ \"./node_modules/jsencrypt/lib/lib/jsbn/rng.js\");\n// Depends on jsbn.js and rng.js\n// Version 1.1: support utf-8 encoding in pkcs1pad2\n// convert a (hex) string to a bignum object\n\n\n// function linebrk(s,n) {\n// var ret = \"\";\n// var i = 0;\n// while(i + n < s.length) {\n// ret += s.substring(i,i+n) + \"\\n\";\n// i += n;\n// }\n// return ret + s.substring(i,s.length);\n// }\n// function byte2Hex(b) {\n// if(b < 0x10)\n// return \"0\" + b.toString(16);\n// else\n// return b.toString(16);\n// }\nfunction pkcs1pad1(s, n) {\n if (n < s.length + 22) {\n console.error(\"Message too long for RSA\");\n return null;\n }\n var len = n - s.length - 6;\n var filler = \"\";\n for (var f = 0; f < len; f += 2) {\n filler += \"ff\";\n }\n var m = \"0001\" + filler + \"00\" + s;\n return (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(m, 16);\n}\n// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint\nfunction pkcs1pad2(s, n) {\n if (n < s.length + 11) { // TODO: fix for utf-8\n console.error(\"Message too long for RSA\");\n return null;\n }\n var ba = [];\n var i = s.length - 1;\n while (i >= 0 && n > 0) {\n var c = s.charCodeAt(i--);\n if (c < 128) { // encode using utf-8\n ba[--n] = c;\n }\n else if ((c > 127) && (c < 2048)) {\n ba[--n] = (c & 63) | 128;\n ba[--n] = (c >> 6) | 192;\n }\n else {\n ba[--n] = (c & 63) | 128;\n ba[--n] = ((c >> 6) & 63) | 128;\n ba[--n] = (c >> 12) | 224;\n }\n }\n ba[--n] = 0;\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var x = [];\n while (n > 2) { // random non-zero pad\n x[0] = 0;\n while (x[0] == 0) {\n rng.nextBytes(x);\n }\n ba[--n] = x[0];\n }\n ba[--n] = 2;\n ba[--n] = 0;\n return new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(ba);\n}\n// \"empty\" RSA key constructor\nvar RSAKey = /** @class */ (function () {\n function RSAKey() {\n this.n = null;\n this.e = 0;\n this.d = null;\n this.p = null;\n this.q = null;\n this.dmp1 = null;\n this.dmq1 = null;\n this.coeff = null;\n }\n //#region PROTECTED\n // protected\n // RSAKey.prototype.doPublic = RSADoPublic;\n // Perform raw public operation on \"x\": return x^e (mod n)\n RSAKey.prototype.doPublic = function (x) {\n return x.modPowInt(this.e, this.n);\n };\n // RSAKey.prototype.doPrivate = RSADoPrivate;\n // Perform raw private operation on \"x\": return x^d (mod n)\n RSAKey.prototype.doPrivate = function (x) {\n if (this.p == null || this.q == null) {\n return x.modPow(this.d, this.n);\n }\n // TODO: re-calculate any missing CRT params\n var xp = x.mod(this.p).modPow(this.dmp1, this.p);\n var xq = x.mod(this.q).modPow(this.dmq1, this.q);\n while (xp.compareTo(xq) < 0) {\n xp = xp.add(this.p);\n }\n return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);\n };\n //#endregion PROTECTED\n //#region PUBLIC\n // RSAKey.prototype.setPublic = RSASetPublic;\n // Set the public key fields N and e from hex strings\n RSAKey.prototype.setPublic = function (N, E) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n }\n else {\n console.error(\"Invalid RSA public key\");\n }\n };\n // RSAKey.prototype.encrypt = RSAEncrypt;\n // Return the PKCS#1 RSA encryption of \"text\" as an even-length hex string\n RSAKey.prototype.encrypt = function (text) {\n var maxLength = (this.n.bitLength() + 7) >> 3;\n var m = pkcs1pad2(text, maxLength);\n if (m == null) {\n return null;\n }\n var c = this.doPublic(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n var length = h.length;\n // fix zero before result\n for (var i = 0; i < maxLength * 2 - length; i++) {\n h = \"0\" + h;\n }\n return h;\n };\n // RSAKey.prototype.setPrivate = RSASetPrivate;\n // Set the private key fields N, e, and d from hex strings\n RSAKey.prototype.setPrivate = function (N, E, D) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n }\n else {\n console.error(\"Invalid RSA private key\");\n }\n };\n // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;\n // Set the private key fields N, e, d and CRT params from hex strings\n RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n this.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(P, 16);\n this.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(Q, 16);\n this.dmp1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DP, 16);\n this.dmq1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DQ, 16);\n this.coeff = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(C, 16);\n }\n else {\n console.error(\"Invalid RSA private key\");\n }\n };\n // RSAKey.prototype.generate = RSAGenerate;\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generate = function (B, E) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n for (;;) {\n for (;;) {\n this.p = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(B - qs, 1, rng);\n if (this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {\n break;\n }\n }\n for (;;) {\n this.q = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(qs, 1, rng);\n if (this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {\n break;\n }\n }\n if (this.p.compareTo(this.q) <= 0) {\n var t = this.p;\n this.p = this.q;\n this.q = t;\n }\n var p1 = this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n this.n = this.p.multiply(this.q);\n this.d = ee.modInverse(phi);\n this.dmp1 = this.d.mod(p1);\n this.dmq1 = this.d.mod(q1);\n this.coeff = this.q.modInverse(this.p);\n break;\n }\n }\n };\n // RSAKey.prototype.decrypt = RSADecrypt;\n // Return the PKCS#1 RSA decryption of \"ctext\".\n // \"ctext\" is an even-length hex string and the output is a plain string.\n RSAKey.prototype.decrypt = function (ctext) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(ctext, 16);\n var m = this.doPrivate(c);\n if (m == null) {\n return null;\n }\n return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);\n };\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generateAsync = function (B, E, callback) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n var rsa = this;\n // These functions have non-descript names because they were originally for(;;) loops.\n // I don't know about cryptography to give them better names than loop1-4.\n var loop1 = function () {\n var loop4 = function () {\n if (rsa.p.compareTo(rsa.q) <= 0) {\n var t = rsa.p;\n rsa.p = rsa.q;\n rsa.q = t;\n }\n var p1 = rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n rsa.n = rsa.p.multiply(rsa.q);\n rsa.d = ee.modInverse(phi);\n rsa.dmp1 = rsa.d.mod(p1);\n rsa.dmq1 = rsa.d.mod(q1);\n rsa.coeff = rsa.q.modInverse(rsa.p);\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(loop1, 0);\n }\n };\n var loop3 = function () {\n rsa.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.q.fromNumberAsync(qs, 1, rng, function () {\n rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.q.isProbablePrime(10)) {\n setTimeout(loop4, 0);\n }\n else {\n setTimeout(loop3, 0);\n }\n });\n });\n };\n var loop2 = function () {\n rsa.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.p.fromNumberAsync(B - qs, 1, rng, function () {\n rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.p.isProbablePrime(10)) {\n setTimeout(loop3, 0);\n }\n else {\n setTimeout(loop2, 0);\n }\n });\n });\n };\n setTimeout(loop2, 0);\n };\n setTimeout(loop1, 0);\n };\n RSAKey.prototype.sign = function (text, digestMethod, digestName) {\n var header = getDigestHeader(digestName);\n var digest = header + digestMethod(text).toString();\n var m = pkcs1pad1(digest, this.n.bitLength() / 4);\n if (m == null) {\n return null;\n }\n var c = this.doPrivate(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n if ((h.length & 1) == 0) {\n return h;\n }\n else {\n return \"0\" + h;\n }\n };\n RSAKey.prototype.verify = function (text, signature, digestMethod) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(signature, 16);\n var m = this.doPublic(c);\n if (m == null) {\n return null;\n }\n var unpadded = m.toString(16).replace(/^1f+00/, \"\");\n var digest = removeDigestHeader(unpadded);\n return digest == digestMethod(text).toString();\n };\n return RSAKey;\n}());\n\n// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext\nfunction pkcs1unpad2(d, n) {\n var b = d.toByteArray();\n var i = 0;\n while (i < b.length && b[i] == 0) {\n ++i;\n }\n if (b.length - i != n - 1 || b[i] != 2) {\n return null;\n }\n ++i;\n while (b[i] != 0) {\n if (++i >= b.length) {\n return null;\n }\n }\n var ret = \"\";\n while (++i < b.length) {\n var c = b[i] & 255;\n if (c < 128) { // utf-8 decode\n ret += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));\n ++i;\n }\n else {\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));\n i += 2;\n }\n }\n return ret;\n}\n// https://tools.ietf.org/html/rfc3447#page-43\nvar DIGEST_HEADERS = {\n md2: \"3020300c06082a864886f70d020205000410\",\n md5: \"3020300c06082a864886f70d020505000410\",\n sha1: \"3021300906052b0e03021a05000414\",\n sha224: \"302d300d06096086480165030402040500041c\",\n sha256: \"3031300d060960864801650304020105000420\",\n sha384: \"3041300d060960864801650304020205000430\",\n sha512: \"3051300d060960864801650304020305000440\",\n ripemd160: \"3021300906052b2403020105000414\"\n};\nfunction getDigestHeader(name) {\n return DIGEST_HEADERS[name] || \"\";\n}\nfunction removeDigestHeader(str) {\n for (var name_1 in DIGEST_HEADERS) {\n if (DIGEST_HEADERS.hasOwnProperty(name_1)) {\n var header = DIGEST_HEADERS[name_1];\n var len = header.length;\n if (str.substr(0, len) == header) {\n return str.substr(len);\n }\n }\n }\n return str;\n}\n// Return the PKCS#1 RSA encryption of \"text\" as a Base64-encoded string\n// function RSAEncryptB64(text) {\n// var h = this.encrypt(text);\n// if(h) return hex2b64(h); else return null;\n// }\n// public\n// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsbn/rsa.js?");
251
+
252
+ /***/ }),
253
+
254
+ /***/ "./node_modules/jsencrypt/lib/lib/jsbn/util.js":
255
+ /*!*****************************************************!*\
256
+ !*** ./node_modules/jsencrypt/lib/lib/jsbn/util.js ***!
257
+ \*****************************************************/
258
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
259
+
260
+ "use strict";
261
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cbit\": () => (/* binding */ cbit),\n/* harmony export */ \"int2char\": () => (/* binding */ int2char),\n/* harmony export */ \"lbit\": () => (/* binding */ lbit),\n/* harmony export */ \"op_and\": () => (/* binding */ op_and),\n/* harmony export */ \"op_andnot\": () => (/* binding */ op_andnot),\n/* harmony export */ \"op_or\": () => (/* binding */ op_or),\n/* harmony export */ \"op_xor\": () => (/* binding */ op_xor)\n/* harmony export */ });\nvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\n//#region BIT_OPERATIONS\n// (public) this & a\nfunction op_and(x, y) {\n return x & y;\n}\n// (public) this | a\nfunction op_or(x, y) {\n return x | y;\n}\n// (public) this ^ a\nfunction op_xor(x, y) {\n return x ^ y;\n}\n// (public) this & ~a\nfunction op_andnot(x, y) {\n return x & ~y;\n}\n// return index of lowest 1-bit in x, x < 2^31\nfunction lbit(x) {\n if (x == 0) {\n return -1;\n }\n var r = 0;\n if ((x & 0xffff) == 0) {\n x >>= 16;\n r += 16;\n }\n if ((x & 0xff) == 0) {\n x >>= 8;\n r += 8;\n }\n if ((x & 0xf) == 0) {\n x >>= 4;\n r += 4;\n }\n if ((x & 3) == 0) {\n x >>= 2;\n r += 2;\n }\n if ((x & 1) == 0) {\n ++r;\n }\n return r;\n}\n// return number of 1 bits in x\nfunction cbit(x) {\n var r = 0;\n while (x != 0) {\n x &= x - 1;\n ++r;\n }\n return r;\n}\n//#endregion BIT_OPERATIONS\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsbn/util.js?");
262
+
263
+ /***/ }),
264
+
265
+ /***/ "./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js":
266
+ /*!**************************************************************!*\
267
+ !*** ./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js ***!
268
+ \**************************************************************/
269
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
270
+
271
+ "use strict";
272
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KJUR\": () => (/* binding */ KJUR)\n/* harmony export */ });\n/* harmony import */ var _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsbn/jsbn */ \"./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _yahoo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./yahoo */ \"./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js\");\n/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license\n */\n/*\n * asn1.js - ASN.1 DER encoder classes\n *\n * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)\n *\n * This software is licensed under the terms of the MIT License.\n * https://kjur.github.io/jsrsasign/license\n *\n * The above copyright and license notice shall be\n * included in all copies or substantial portions of the Software.\n */\n\n\n/**\n * @fileOverview\n * @name asn1-1.0.js\n * @author Kenji Urushima kenji.urushima@gmail.com\n * @version asn1 1.0.13 (2017-Jun-02)\n * @since jsrsasign 2.1\n * @license <a href=\"https://kjur.github.io/jsrsasign/license/\">MIT License</a>\n */\n/**\n * kjur's class library name space\n * <p>\n * This name space provides following name spaces:\n * <ul>\n * <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>\n * <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>\n * <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature\n * class and utilities</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\n * @name KJUR\n * @namespace kjur's class library name space\n */\nvar KJUR = {};\n/**\n * kjur's ASN.1 class library name space\n * <p>\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to\n * org.bouncycastle.asn1 package of\n * well known BouncyCaslte Cryptography Library.\n * <h4>PROVIDING ASN.1 PRIMITIVES</h4>\n * Here are ASN.1 DER primitive classes.\n * <ul>\n * <li>0x01 {@link KJUR.asn1.DERBoolean}</li>\n * <li>0x02 {@link KJUR.asn1.DERInteger}</li>\n * <li>0x03 {@link KJUR.asn1.DERBitString}</li>\n * <li>0x04 {@link KJUR.asn1.DEROctetString}</li>\n * <li>0x05 {@link KJUR.asn1.DERNull}</li>\n * <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>\n * <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>\n * <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>\n * <li>0x12 {@link KJUR.asn1.DERNumericString}</li>\n * <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>\n * <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>\n * <li>0x16 {@link KJUR.asn1.DERIA5String}</li>\n * <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>\n * <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>\n * <li>0x30 {@link KJUR.asn1.DERSequence}</li>\n * <li>0x31 {@link KJUR.asn1.DERSet}</li>\n * </ul>\n * <h4>OTHER ASN.1 CLASSES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.ASN1Object}</li>\n * <li>{@link KJUR.asn1.DERAbstractString}</li>\n * <li>{@link KJUR.asn1.DERAbstractTime}</li>\n * <li>{@link KJUR.asn1.DERAbstractStructured}</li>\n * <li>{@link KJUR.asn1.DERTaggedObject}</li>\n * </ul>\n * <h4>SUB NAME SPACES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>\n * <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>\n * <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>\n * <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>\n * <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace.\n * This caused by a bug of jsdoc2.\n * @name KJUR.asn1\n * @namespace\n */\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1)\n KJUR.asn1 = {};\n/**\n * ASN1 utilities class\n * @name KJUR.asn1.ASN1Util\n * @class ASN1 utilities class\n * @since asn1 1.0.2\n */\nKJUR.asn1.ASN1Util = new function () {\n this.integerToByteHex = function (i) {\n var h = i.toString(16);\n if ((h.length % 2) == 1)\n h = '0' + h;\n return h;\n };\n this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {\n var h = bigIntegerValue.toString(16);\n if (h.substr(0, 1) != '-') {\n if (h.length % 2 == 1) {\n h = '0' + h;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n h = '00' + h;\n }\n }\n }\n else {\n var hPos = h.substr(1);\n var xorLen = hPos.length;\n if (xorLen % 2 == 1) {\n xorLen += 1;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n xorLen += 2;\n }\n }\n var hMask = '';\n for (var i = 0; i < xorLen; i++) {\n hMask += 'f';\n }\n var biMask = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(hMask, 16);\n var biNeg = biMask.xor(bigIntegerValue).add(_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n h = biNeg.toString(16).replace(/^-/, '');\n }\n return h;\n };\n /**\n * get PEM string from hexadecimal data and header string\n * @name getPEMStringFromHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} dataHex hexadecimal string of PEM body\n * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')\n * @return {String} PEM formatted string of input data\n * @description\n * This method converts a hexadecimal string to a PEM string with\n * a specified header. Its line break will be CRLF(\"\\r\\n\").\n * @example\n * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');\n * // value of pem will be:\n * -----BEGIN PRIVATE KEY-----\n * YWFh\n * -----END PRIVATE KEY-----\n */\n this.getPEMStringFromHex = function (dataHex, pemHeader) {\n return hextopem(dataHex, pemHeader);\n };\n /**\n * generate ASN1Object specifed by JSON parameters\n * @name newObject\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return {KJUR.asn1.ASN1Object} generated object\n * @since asn1 1.0.3\n * @description\n * generate any ASN1Object specified by JSON param\n * including ASN.1 primitive or structured.\n * Generally 'param' can be described as follows:\n * <blockquote>\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\n * </blockquote>\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\n * <ul>\n * <li>'bool' - DERBoolean</li>\n * <li>'int' - DERInteger</li>\n * <li>'bitstr' - DERBitString</li>\n * <li>'octstr' - DEROctetString</li>\n * <li>'null' - DERNull</li>\n * <li>'oid' - DERObjectIdentifier</li>\n * <li>'enum' - DEREnumerated</li>\n * <li>'utf8str' - DERUTF8String</li>\n * <li>'numstr' - DERNumericString</li>\n * <li>'prnstr' - DERPrintableString</li>\n * <li>'telstr' - DERTeletexString</li>\n * <li>'ia5str' - DERIA5String</li>\n * <li>'utctime' - DERUTCTime</li>\n * <li>'gentime' - DERGeneralizedTime</li>\n * <li>'seq' - DERSequence</li>\n * <li>'set' - DERSet</li>\n * <li>'tag' - DERTaggedObject</li>\n * </ul>\n * @example\n * newObject({'prnstr': 'aaa'});\n * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})\n * // ASN.1 Tagged Object\n * newObject({'tag': {'tag': 'a1',\n * 'explicit': true,\n * 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});\n * // more simple representation of ASN.1 Tagged Object\n * newObject({'tag': ['a1',\n * true,\n * {'seq': [\n * {'int': 3},\n * {'prnstr': 'aaa'}]}\n * ]});\n */\n this.newObject = function (param) {\n var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;\n var keys = Object.keys(param);\n if (keys.length != 1)\n throw \"key of param shall be only one.\";\n var key = keys[0];\n if (\":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:\".indexOf(\":\" + key + \":\") == -1)\n throw \"undefined key: \" + key;\n if (key == \"bool\")\n return new _DERBoolean(param[key]);\n if (key == \"int\")\n return new _DERInteger(param[key]);\n if (key == \"bitstr\")\n return new _DERBitString(param[key]);\n if (key == \"octstr\")\n return new _DEROctetString(param[key]);\n if (key == \"null\")\n return new _DERNull(param[key]);\n if (key == \"oid\")\n return new _DERObjectIdentifier(param[key]);\n if (key == \"enum\")\n return new _DEREnumerated(param[key]);\n if (key == \"utf8str\")\n return new _DERUTF8String(param[key]);\n if (key == \"numstr\")\n return new _DERNumericString(param[key]);\n if (key == \"prnstr\")\n return new _DERPrintableString(param[key]);\n if (key == \"telstr\")\n return new _DERTeletexString(param[key]);\n if (key == \"ia5str\")\n return new _DERIA5String(param[key]);\n if (key == \"utctime\")\n return new _DERUTCTime(param[key]);\n if (key == \"gentime\")\n return new _DERGeneralizedTime(param[key]);\n if (key == \"seq\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSequence({ 'array': a });\n }\n if (key == \"set\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSet({ 'array': a });\n }\n if (key == \"tag\") {\n var tagParam = param[key];\n if (Object.prototype.toString.call(tagParam) === '[object Array]' &&\n tagParam.length == 3) {\n var obj = _newObject(tagParam[2]);\n return new _DERTaggedObject({ tag: tagParam[0],\n explicit: tagParam[1],\n obj: obj });\n }\n else {\n var newParam = {};\n if (tagParam.explicit !== undefined)\n newParam.explicit = tagParam.explicit;\n if (tagParam.tag !== undefined)\n newParam.tag = tagParam.tag;\n if (tagParam.obj === undefined)\n throw \"obj shall be specified for 'tag'.\";\n newParam.obj = _newObject(tagParam.obj);\n return new _DERTaggedObject(newParam);\n }\n }\n };\n /**\n * get encoded hexadecimal string of ASN1Object specifed by JSON parameters\n * @name jsonToASN1HEX\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return hexadecimal string of ASN1Object\n * @since asn1 1.0.4\n * @description\n * As for ASN.1 object representation of JSON object,\n * please see {@link newObject}.\n * @example\n * jsonToASN1HEX({'prnstr': 'aaa'});\n */\n this.jsonToASN1HEX = function (param) {\n var asn1Obj = this.newObject(param);\n return asn1Obj.getEncodedHex();\n };\n};\n/**\n * get dot noted oid number string from hexadecimal value of OID\n * @name oidHexToInt\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} hex hexadecimal value of object identifier\n * @return {String} dot noted string of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from hexadecimal string representation of\n * ASN.1 value of object identifier to oid number string.\n * @example\n * KJUR.asn1.ASN1Util.oidHexToInt('550406') &rarr; \"2.5.4.6\"\n */\nKJUR.asn1.ASN1Util.oidHexToInt = function (hex) {\n var s = \"\";\n var i01 = parseInt(hex.substr(0, 2), 16);\n var i0 = Math.floor(i01 / 40);\n var i1 = i01 % 40;\n var s = i0 + \".\" + i1;\n var binbuf = \"\";\n for (var i = 2; i < hex.length; i += 2) {\n var value = parseInt(hex.substr(i, 2), 16);\n var bin = (\"00000000\" + value.toString(2)).slice(-8);\n binbuf = binbuf + bin.substr(1, 7);\n if (bin.substr(0, 1) == \"0\") {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(binbuf, 2);\n s = s + \".\" + bi.toString(10);\n binbuf = \"\";\n }\n }\n ;\n return s;\n};\n/**\n * get hexadecimal value of object identifier from dot noted oid value\n * @name oidIntToHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} oidString dot noted string of object identifier\n * @return {String} hexadecimal value of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from object identifier value string.\n * to hexadecimal string representation of it.\n * @example\n * KJUR.asn1.ASN1Util.oidIntToHex(\"2.5.4.6\") &rarr; \"550406\"\n */\nKJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n return h;\n};\n// ********************************************************************\n// Abstract ASN.1 Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * base class for ASN.1 DER encoder object\n * @name KJUR.asn1.ASN1Object\n * @class base class for ASN.1 DER encoder object\n * @property {Boolean} isModified flag whether internal data was changed\n * @property {String} hTLV hexadecimal string of ASN.1 TLV\n * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)\n * @property {String} hL hexadecimal string of ASN.1 TLV length(L)\n * @property {String} hV hexadecimal string of ASN.1 TLV value(V)\n * @description\n */\nKJUR.asn1.ASN1Object = function () {\n var isModified = true;\n var hTLV = null;\n var hT = '00';\n var hL = '00';\n var hV = '';\n /**\n * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)\n * @name getLengthHexFromValue\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV length(L)\n */\n this.getLengthHexFromValue = function () {\n if (typeof this.hV == \"undefined\" || this.hV == null) {\n throw \"this.hV is null or undefined.\";\n }\n if (this.hV.length % 2 == 1) {\n throw \"value hex must be even length: n=\" + hV.length + \",v=\" + this.hV;\n }\n var n = this.hV.length / 2;\n var hN = n.toString(16);\n if (hN.length % 2 == 1) {\n hN = \"0\" + hN;\n }\n if (n < 128) {\n return hN;\n }\n else {\n var hNlen = hN.length / 2;\n if (hNlen > 15) {\n throw \"ASN.1 length too long to represent by 8x: n = \" + n.toString(16);\n }\n var head = 128 + hNlen;\n return head.toString(16) + hN;\n }\n };\n /**\n * get hexadecimal string of ASN.1 TLV bytes\n * @name getEncodedHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV\n */\n this.getEncodedHex = function () {\n if (this.hTLV == null || this.isModified) {\n this.hV = this.getFreshValueHex();\n this.hL = this.getLengthHexFromValue();\n this.hTLV = this.hT + this.hL + this.hV;\n this.isModified = false;\n //alert(\"first time: \" + this.hTLV);\n }\n return this.hTLV;\n };\n /**\n * get hexadecimal string of ASN.1 TLV value(V) bytes\n * @name getValueHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes\n */\n this.getValueHex = function () {\n this.getEncodedHex();\n return this.hV;\n };\n this.getFreshValueHex = function () {\n return '';\n };\n};\n// == BEGIN DERAbstractString ================================================\n/**\n * base class for ASN.1 DER string classes\n * @name KJUR.asn1.DERAbstractString\n * @class base class for ASN.1 DER string classes\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @property {String} s internal string of value\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERAbstractString = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var s = null;\n var hV = null;\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @return {String} string value of this string object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newS value by a string to set\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(this.s);\n };\n /**\n * set value by a hexadecimal string\n * @name setStringHex\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newHexString value by a hexadecimal string to set\n */\n this.setStringHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\") {\n this.setString(params);\n }\n else if (typeof params['str'] != \"undefined\") {\n this.setString(params['str']);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setStringHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\n// == END DERAbstractString ================================================\n// == BEGIN DERAbstractTime ==================================================\n/**\n * base class for ASN.1 DER Generalized/UTCTime class\n * @name KJUR.asn1.DERAbstractTime\n * @class base class for ASN.1 DER Generalized/UTCTime class\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractTime = function (params) {\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\n var s = null;\n var date = null;\n // --- PRIVATE METHODS --------------------\n this.localDateToUTC = function (d) {\n utc = d.getTime() + (d.getTimezoneOffset() * 60000);\n var utcDate = new Date(utc);\n return utcDate;\n };\n /*\n * format date string by Data object\n * @name formatDate\n * @memberOf KJUR.asn1.AbstractTime;\n * @param {Date} dateObject\n * @param {string} type 'utc' or 'gen'\n * @param {boolean} withMillis flag for with millisections or not\n * @description\n * 'withMillis' flag is supported from asn1 1.0.6.\n */\n this.formatDate = function (dateObject, type, withMillis) {\n var pad = this.zeroPadding;\n var d = this.localDateToUTC(dateObject);\n var year = String(d.getFullYear());\n if (type == 'utc')\n year = year.substr(2, 2);\n var month = pad(String(d.getMonth() + 1), 2);\n var day = pad(String(d.getDate()), 2);\n var hour = pad(String(d.getHours()), 2);\n var min = pad(String(d.getMinutes()), 2);\n var sec = pad(String(d.getSeconds()), 2);\n var s = year + month + day + hour + min + sec;\n if (withMillis === true) {\n var millis = d.getMilliseconds();\n if (millis != 0) {\n var sMillis = pad(String(millis), 3);\n sMillis = sMillis.replace(/[0]+$/, \"\");\n s = s + \".\" + sMillis;\n }\n }\n return s + \"Z\";\n };\n this.zeroPadding = function (s, len) {\n if (s.length >= len)\n return s;\n return new Array(len - s.length + 1).join('0') + s;\n };\n // --- PUBLIC METHODS --------------------\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @return {String} string value of this time object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {String} newS value by a string to set such like \"130430235959Z\"\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(newS);\n };\n /**\n * set value by a Date object\n * @name setByDateValue\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {Integer} year year of date (ex. 2013)\n * @param {Integer} month month of date between 1 and 12 (ex. 12)\n * @param {Integer} day day of month\n * @param {Integer} hour hours of date\n * @param {Integer} min minutes of date\n * @param {Integer} sec seconds of date\n */\n this.setByDateValue = function (year, month, day, hour, min, sec) {\n var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));\n this.setByDate(dateObject);\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\n// == END DERAbstractTime ==================================================\n// == BEGIN DERAbstractStructured ============================================\n/**\n * base class for ASN.1 DER structured class\n * @name KJUR.asn1.DERAbstractStructured\n * @class base class for ASN.1 DER structured class\n * @property {Array} asn1Array internal array of ASN1Object\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractStructured = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var asn1Array = null;\n /**\n * set value by array of ASN1Object\n * @name setByASN1ObjectArray\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {array} asn1ObjectArray array of ASN1Object to set\n */\n this.setByASN1ObjectArray = function (asn1ObjectArray) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array = asn1ObjectArray;\n };\n /**\n * append an ASN1Object to internal array\n * @name appendASN1Object\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {ASN1Object} asn1Object to add\n */\n this.appendASN1Object = function (asn1Object) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array.push(asn1Object);\n };\n this.asn1Array = new Array();\n if (typeof params != \"undefined\") {\n if (typeof params['array'] != \"undefined\") {\n this.asn1Array = params['array'];\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\n// ********************************************************************\n// ASN.1 Object Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * class for ASN.1 DER Boolean\n * @name KJUR.asn1.DERBoolean\n * @class class for ASN.1 DER Boolean\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERBoolean = function () {\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\n this.hT = \"01\";\n this.hTLV = \"0101ff\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Integer\n * @name KJUR.asn1.DERInteger\n * @class class for ASN.1 DER Integer\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERInteger = function (params) {\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\n this.hT = \"02\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n * @example\n * new KJUR.asn1.DERInteger(123);\n * new KJUR.asn1.DERInteger({'int': 123});\n * new KJUR.asn1.DERInteger({'hex': '1fad'});\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['bigint'] != \"undefined\") {\n this.setByBigInteger(params['bigint']);\n }\n else if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER encoded BitString primitive\n * @name KJUR.asn1.DERBitString\n * @class class for ASN.1 DER encoded BitString primitive\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>bin - specify binary string (ex. '10111')</li>\n * <li>array - specify array of boolean (ex. [true,false,true,true])</li>\n * <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>\n * <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}\n * argument for \"BitString encapsulates\" structure.</li>\n * </ul>\n * NOTE1: 'params' can be omitted.<br/>\n * NOTE2: 'obj' parameter have been supported since\n * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>\n * @example\n * // default constructor\n * o = new KJUR.asn1.DERBitString();\n * // initialize with binary string\n * o = new KJUR.asn1.DERBitString({bin: \"1011\"});\n * // initialize with boolean array\n * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});\n * // initialize with hexadecimal string (04 is unused bits)\n * o = new KJUR.asn1.DEROctetString({hex: \"04bac0\"});\n * // initialize with ASN1Util.newObject argument for encapsulated\n * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // BIT STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DERBitString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = \"00\" + o.getEncodedHex();\n }\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\n this.hT = \"03\";\n /**\n * set ASN.1 value(V) by a hexadecimal string including unused bits\n * @name setHexValueIncludingUnusedBits\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} newHexStringIncludingUnusedBits\n */\n this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = newHexStringIncludingUnusedBits;\n };\n /**\n * set ASN.1 value(V) by unused bit and hexadecimal string of value\n * @name setUnusedBitsAndHexValue\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {Integer} unusedBits\n * @param {String} hValue\n */\n this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {\n if (unusedBits < 0 || 7 < unusedBits) {\n throw \"unused bits shall be from 0 to 7: u = \" + unusedBits;\n }\n var hUnusedBits = \"0\" + unusedBits;\n this.hTLV = null;\n this.isModified = true;\n this.hV = hUnusedBits + hValue;\n };\n /**\n * set ASN.1 DER BitString by binary string<br/>\n * @name setByBinaryString\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} binaryString binary value string (i.e. '10111')\n * @description\n * Its unused bits will be calculated automatically by length of\n * 'binaryValue'. <br/>\n * NOTE: Trailing zeros '0' will be ignored.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray(\"01011\");\n */\n this.setByBinaryString = function (binaryString) {\n binaryString = binaryString.replace(/0+$/, '');\n var unusedBits = 8 - binaryString.length % 8;\n if (unusedBits == 8)\n unusedBits = 0;\n for (var i = 0; i <= unusedBits; i++) {\n binaryString += '0';\n }\n var h = '';\n for (var i = 0; i < binaryString.length - 1; i += 8) {\n var b = binaryString.substr(i, 8);\n var x = parseInt(b, 2).toString(16);\n if (x.length == 1)\n x = '0' + x;\n h += x;\n }\n this.hTLV = null;\n this.isModified = true;\n this.hV = '0' + unusedBits + h;\n };\n /**\n * set ASN.1 TLV value(V) by an array of boolean<br/>\n * @name setByBooleanArray\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {array} booleanArray array of boolean (ex. [true, false, true])\n * @description\n * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray([false, true, false, true, true]);\n */\n this.setByBooleanArray = function (booleanArray) {\n var s = '';\n for (var i = 0; i < booleanArray.length; i++) {\n if (booleanArray[i] == true) {\n s += '1';\n }\n else {\n s += '0';\n }\n }\n this.setByBinaryString(s);\n };\n /**\n * generate an array of falses with specified length<br/>\n * @name newFalseArray\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {Integer} nLength length of array to generate\n * @return {array} array of boolean falses\n * @description\n * This static method may be useful to initialize boolean array.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.newFalseArray(3) &rarr; [false, false, false]\n */\n this.newFalseArray = function (nLength) {\n var a = new Array(nLength);\n for (var i = 0; i < nLength; i++) {\n a[i] = false;\n }\n return a;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\" && params.toLowerCase().match(/^[0-9a-f]+$/)) {\n this.setHexValueIncludingUnusedBits(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setHexValueIncludingUnusedBits(params['hex']);\n }\n else if (typeof params['bin'] != \"undefined\") {\n this.setByBinaryString(params['bin']);\n }\n else if (typeof params['array'] != \"undefined\") {\n this.setByBooleanArray(params['array']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER OctetString<br/>\n * @name KJUR.asn1.DEROctetString\n * @class class for ASN.1 DER OctetString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * This class provides ASN.1 OctetString simple type.<br/>\n * Supported \"params\" attributes are:\n * <ul>\n * <li>str - to set a string as a value</li>\n * <li>hex - to set a hexadecimal string as a value</li>\n * <li>obj - to set a encapsulated ASN.1 value by JSON object\n * which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>\n * </ul>\n * NOTE: A parameter 'obj' have been supported\n * for \"OCTET STRING, encapsulates\" structure.\n * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).\n * @see KJUR.asn1.DERAbstractString - superclass\n * @example\n * // default constructor\n * o = new KJUR.asn1.DEROctetString();\n * // initialize with string\n * o = new KJUR.asn1.DEROctetString({str: \"aaa\"});\n * // initialize with hexadecimal string\n * o = new KJUR.asn1.DEROctetString({hex: \"616161\"});\n * // initialize with ASN1Util.newObject argument\n * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // OCTET STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DEROctetString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = o.getEncodedHex();\n }\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);\n this.hT = \"04\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER Null\n * @name KJUR.asn1.DERNull\n * @class class for ASN.1 DER Null\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERNull = function () {\n KJUR.asn1.DERNull.superclass.constructor.call(this);\n this.hT = \"05\";\n this.hTLV = \"0500\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER ObjectIdentifier\n * @name KJUR.asn1.DERObjectIdentifier\n * @class class for ASN.1 DER ObjectIdentifier\n * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERObjectIdentifier = function (params) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\n this.hT = \"06\";\n /**\n * set value by a hexadecimal string\n * @name setValueHex\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} newHexString hexadecimal value of OID bytes\n */\n this.setValueHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n /**\n * set value by a OID string<br/>\n * @name setValueOidString\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidString OID string (ex. 2.5.4.13)\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueOidString(\"2.5.4.13\");\n */\n this.setValueOidString = function (oidString) {\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = h;\n };\n /**\n * set value by a OID name\n * @name setValueName\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidName OID name (ex. 'serverAuth')\n * @since 1.0.1\n * @description\n * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.\n * Otherwise raise error.\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueName(\"serverAuth\");\n */\n this.setValueName = function (oidName) {\n var oid = KJUR.asn1.x509.OID.name2oid(oidName);\n if (oid !== '') {\n this.setValueOidString(oid);\n }\n else {\n throw \"DERObjectIdentifier oidName undefined: \" + oidName;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (params !== undefined) {\n if (typeof params === \"string\") {\n if (params.match(/^[0-2].[0-9.]+$/)) {\n this.setValueOidString(params);\n }\n else {\n this.setValueName(params);\n }\n }\n else if (params.oid !== undefined) {\n this.setValueOidString(params.oid);\n }\n else if (params.hex !== undefined) {\n this.setValueHex(params.hex);\n }\n else if (params.name !== undefined) {\n this.setValueName(params.name);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Enumerated\n * @name KJUR.asn1.DEREnumerated\n * @class class for ASN.1 DER Enumerated\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * @example\n * new KJUR.asn1.DEREnumerated(123);\n * new KJUR.asn1.DEREnumerated({int: 123});\n * new KJUR.asn1.DEREnumerated({hex: '1fad'});\n */\nKJUR.asn1.DEREnumerated = function (params) {\n KJUR.asn1.DEREnumerated.superclass.constructor.call(this);\n this.hT = \"0a\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTF8String\n * @name KJUR.asn1.DERUTF8String\n * @class class for ASN.1 DER UTF8String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERUTF8String = function (params) {\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);\n this.hT = \"0c\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER NumericString\n * @name KJUR.asn1.DERNumericString\n * @class class for ASN.1 DER NumericString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERNumericString = function (params) {\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);\n this.hT = \"12\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER PrintableString\n * @name KJUR.asn1.DERPrintableString\n * @class class for ASN.1 DER PrintableString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERPrintableString = function (params) {\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);\n this.hT = \"13\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER TeletexString\n * @name KJUR.asn1.DERTeletexString\n * @class class for ASN.1 DER TeletexString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERTeletexString = function (params) {\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);\n this.hT = \"14\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER IA5String\n * @name KJUR.asn1.DERIA5String\n * @class class for ASN.1 DER IA5String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERIA5String = function (params) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);\n this.hT = \"16\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTCTime\n * @name KJUR.asn1.DERUTCTime\n * @class class for ASN.1 DER UTCTime\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * <h4>EXAMPLES</h4>\n * @example\n * d1 = new KJUR.asn1.DERUTCTime();\n * d1.setString('130430125959Z');\n *\n * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});\n * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});\n * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');\n */\nKJUR.asn1.DERUTCTime = function (params) {\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);\n this.hT = \"17\";\n /**\n * set value by a Date object<br/>\n * @name setByDate\n * @memberOf KJUR.asn1.DERUTCTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * o = new KJUR.asn1.DERUTCTime();\n * o.setByDate(new Date(\"2016/12/31\"));\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (typeof this.date == \"undefined\" && typeof this.s == \"undefined\") {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{12}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER GeneralizedTime\n * @name KJUR.asn1.DERGeneralizedTime\n * @class class for ASN.1 DER GeneralizedTime\n * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})\n * @property {Boolean} withMillis flag to show milliseconds or not\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * <li>millis - specify flag to show milliseconds (from 1.0.6)</li>\n * </ul>\n * NOTE1: 'params' can be omitted.\n * NOTE2: 'withMillis' property is supported from asn1 1.0.6.\n */\nKJUR.asn1.DERGeneralizedTime = function (params) {\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);\n this.hT = \"18\";\n this.withMillis = false;\n /**\n * set value by a Date object\n * @name setByDate\n * @memberOf KJUR.asn1.DERGeneralizedTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * When you specify UTC time, use 'Date.UTC' method like this:<br/>\n * o1 = new DERUTCTime();\n * o1.setByDate(date);\n *\n * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (this.date === undefined && this.s === undefined) {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{14}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n if (params.millis === true) {\n this.withMillis = true;\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER Sequence\n * @name KJUR.asn1.DERSequence\n * @class class for ASN.1 DER Sequence\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERSequence = function (params) {\n KJUR.asn1.DERSequence.superclass.constructor.call(this, params);\n this.hT = \"30\";\n this.getFreshValueHex = function () {\n var h = '';\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n h += asn1Obj.getEncodedHex();\n }\n this.hV = h;\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER Set\n * @name KJUR.asn1.DERSet\n * @class class for ASN.1 DER Set\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>\n * </ul>\n * NOTE1: 'params' can be omitted.<br/>\n * NOTE2: sortflag is supported since 1.0.5.\n */\nKJUR.asn1.DERSet = function (params) {\n KJUR.asn1.DERSet.superclass.constructor.call(this, params);\n this.hT = \"31\";\n this.sortFlag = true; // item shall be sorted only in ASN.1 DER\n this.getFreshValueHex = function () {\n var a = new Array();\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n a.push(asn1Obj.getEncodedHex());\n }\n if (this.sortFlag == true)\n a.sort();\n this.hV = a.join('');\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params.sortflag != \"undefined\" &&\n params.sortflag == false)\n this.sortFlag = false;\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER TaggedObject\n * @name KJUR.asn1.DERTaggedObject\n * @class class for ASN.1 DER TaggedObject\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.\n * For example, if you find '[1]' tag in a ASN.1 dump,\n * 'tagNoHex' will be 'a1'.\n * <br/>\n * As for optional argument 'params' for constructor, you can specify *ANY* of\n * following properties:\n * <ul>\n * <li>explicit - specify true if this is explicit tag otherwise false\n * (default is 'true').</li>\n * <li>tag - specify tag (default is 'a0' which means [0])</li>\n * <li>obj - specify ASN1Object which is tagged</li>\n * </ul>\n * @example\n * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});\n * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});\n * hex = d2.getEncodedHex();\n */\nKJUR.asn1.DERTaggedObject = function (params) {\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\n this.hT = \"a0\";\n this.hV = '';\n this.isExplicit = true;\n this.asn1Object = null;\n /**\n * set value by an ASN1Object\n * @name setString\n * @memberOf KJUR.asn1.DERTaggedObject#\n * @function\n * @param {Boolean} isExplicitFlag flag for explicit/implicit tag\n * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag\n * @param {ASN1Object} asn1Object ASN.1 to encapsulate\n */\n this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {\n this.hT = tagNoHex;\n this.isExplicit = isExplicitFlag;\n this.asn1Object = asn1Object;\n if (this.isExplicit) {\n this.hV = this.asn1Object.getEncodedHex();\n this.hTLV = null;\n this.isModified = true;\n }\n else {\n this.hV = null;\n this.hTLV = asn1Object.getEncodedHex();\n this.hTLV = this.hTLV.replace(/^../, tagNoHex);\n this.isModified = false;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['tag'] != \"undefined\") {\n this.hT = params['tag'];\n }\n if (typeof params['explicit'] != \"undefined\") {\n this.isExplicit = params['explicit'];\n }\n if (typeof params['obj'] != \"undefined\") {\n this.asn1Object = params['obj'];\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js?");
273
+
274
+ /***/ }),
275
+
276
+ /***/ "./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js":
277
+ /*!***********************************************************!*\
278
+ !*** ./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js ***!
279
+ \***********************************************************/
280
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
281
+
282
+ "use strict";
283
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"YAHOO\": () => (/* binding */ YAHOO)\n/* harmony export */ });\n/*!\nCopyright (c) 2011, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://developer.yahoo.com/yui/license.html\nversion: 2.9.0\n*/\nvar YAHOO = {};\nYAHOO.lang = {\n /**\n * Utility to set up the prototype, constructor and superclass properties to\n * support an inheritance strategy that can chain constructors and methods.\n * Static members will not be inherited.\n *\n * @method extend\n * @static\n * @param {Function} subc the object to modify\n * @param {Function} superc the object to inherit\n * @param {Object} overrides additional properties/methods to add to the\n * subclass prototype. These will override the\n * matching items obtained from the superclass\n * if present.\n */\n extend: function (subc, superc, overrides) {\n if (!superc || !subc) {\n throw new Error(\"YAHOO.lang.extend failed, please check that \" +\n \"all dependencies are included.\");\n }\n var F = function () { };\n F.prototype = superc.prototype;\n subc.prototype = new F();\n subc.prototype.constructor = subc;\n subc.superclass = superc.prototype;\n if (superc.prototype.constructor == Object.prototype.constructor) {\n superc.prototype.constructor = superc;\n }\n if (overrides) {\n var i;\n for (i in overrides) {\n subc.prototype[i] = overrides[i];\n }\n /*\n * IE will not enumerate native functions in a derived object even if the\n * function was overridden. This is a workaround for specific functions\n * we care about on the Object prototype.\n * @property _IEEnumFix\n * @param {Function} r the object to receive the augmentation\n * @param {Function} s the object that supplies the properties to augment\n * @static\n * @private\n */\n var _IEEnumFix = function () { }, ADD = [\"toString\", \"valueOf\"];\n try {\n if (/MSIE/.test(navigator.userAgent)) {\n _IEEnumFix = function (r, s) {\n for (i = 0; i < ADD.length; i = i + 1) {\n var fname = ADD[i], f = s[fname];\n if (typeof f === 'function' && f != Object.prototype[fname]) {\n r[fname] = f;\n }\n }\n };\n }\n }\n catch (ex) { }\n ;\n _IEEnumFix(subc.prototype, overrides);\n }\n }\n};\n\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js?");
284
+
285
+ /***/ }),
286
+
287
+ /***/ "./node_modules/raw-loader/dist/cjs.js!./src/tingle.css":
288
+ /*!**************************************************************!*\
289
+ !*** ./node_modules/raw-loader/dist/cjs.js!./src/tingle.css ***!
290
+ \**************************************************************/
291
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
292
+
293
+ "use strict";
294
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (\".tingle-modal * {\\n box-sizing: border-box;\\n}\\n\\n.tingle-modal {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n z-index: 1000;\\n display: flex;\\n visibility: hidden;\\n flex-direction: column;\\n align-items: center;\\n overflow: hidden;\\n -webkit-overflow-scrolling: touch;\\n background: rgba(0, 0, 0, .2);\\n opacity: 0;\\n}\\n\\n@supports (backdrop-filter: blur(12px)) {\\n .tingle-modal {\\n backdrop-filter: blur(12px);\\n }\\n}\\n\\n/* confirm and alerts\\n-------------------------------------------------------------- */\\n\\n.tingle-modal--confirm .tingle-modal-box {\\n text-align: center;\\n}\\n\\n/* modal\\n-------------------------------------------------------------- */\\n\\n.tingle-modal--noOverlayClose {\\n cursor: default;\\n}\\n\\n.tingle-modal--noClose .tingle-modal__close {\\n display: none;\\n}\\n\\n.tingle-modal__close {\\n position: fixed;\\n top: 2.5rem;\\n right: 2.5rem;\\n z-index: 1000;\\n padding: 0;\\n width: 2rem;\\n height: 2rem;\\n border: none;\\n background-color: transparent;\\n color: #fff;\\n cursor: pointer;\\n}\\n\\n.tingle-modal__close svg * {\\n fill: currentColor;\\n}\\n\\n.tingle-modal__closeLabel {\\n display: none;\\n}\\n\\n.tingle-modal__close:hover {\\n color: #fff;\\n}\\n\\n.tingle-modal-box {\\n position: relative;\\n flex-shrink: 0;\\n margin-top: auto;\\n margin-bottom: auto;\\n width: 60%;\\n border-radius: 4px;\\n background: #fff;\\n opacity: 1;\\n cursor: auto;\\n will-change: transform, opacity;\\n}\\n\\n.tingle-modal-box__content {\\n padding: 0;\\n}\\n\\n.tingle-modal-box__footer {\\n padding: 1.5rem 2rem;\\n width: auto;\\n border-bottom-right-radius: 4px;\\n border-bottom-left-radius: 4px;\\n background-color: #f5f5f5;\\n cursor: auto;\\n}\\n\\n.tingle-modal-box__footer::after {\\n display: table;\\n clear: both;\\n content: \\\"\\\";\\n}\\n\\n.tingle-modal-box__footer--sticky {\\n position: fixed;\\n bottom: -200px; /* TODO : find a better way */\\n z-index: 10001;\\n opacity: 1;\\n transition: bottom .3s ease-in-out .3s;\\n}\\n\\n/* state\\n-------------------------------------------------------------- */\\n\\n.tingle-enabled {\\n position: fixed;\\n right: 0;\\n left: 0;\\n overflow: hidden;\\n}\\n\\n.tingle-modal--visible .tingle-modal-box__footer {\\n bottom: 0;\\n}\\n\\n.tingle-modal--visible {\\n visibility: visible;\\n opacity: 1;\\n}\\n\\n.tingle-modal--visible .tingle-modal-box {\\n animation: scale .2s cubic-bezier(.68, -.55, .265, 1.55) forwards;\\n}\\n\\n.tingle-modal--overflow {\\n overflow-y: scroll;\\n padding-top: 8vh;\\n}\\n\\n/* btn\\n-------------------------------------------------------------- */\\n\\n.tingle-btn {\\n display: inline-block;\\n margin: 0 .5rem;\\n padding: 1rem 2rem;\\n border: none;\\n background-color: grey;\\n box-shadow: none;\\n color: #fff;\\n vertical-align: middle;\\n text-decoration: none;\\n font-size: inherit;\\n font-family: inherit;\\n line-height: normal;\\n cursor: pointer;\\n transition: background-color .4s ease;\\n}\\n\\n.tingle-btn--primary {\\n background-color: #3498db;\\n}\\n\\n.tingle-btn--danger {\\n background-color: #e74c3c;\\n}\\n\\n.tingle-btn--default {\\n background-color: #34495e;\\n}\\n\\n.tingle-btn--pull-left {\\n float: left;\\n}\\n\\n.tingle-btn--pull-right {\\n float: right;\\n}\\n\\n/* responsive\\n-------------------------------------------------------------- */\\n\\n@media (max-width : 540px) {\\n .tingle-modal {\\n top: 0px;\\n display: block;\\n padding-top: 60px;\\n width: 100%;\\n }\\n\\n .tingle-modal-box {\\n width: auto;\\n border-radius: 0;\\n }\\n\\n .tingle-modal-box__content {\\n overflow-y: scroll;\\n }\\n\\n .tingle-modal--noClose {\\n top: 0;\\n }\\n\\n .tingle-modal--noOverlayClose {\\n padding-top: 0;\\n }\\n\\n .tingle-modal-box__footer .tingle-btn {\\n display: block;\\n float: none;\\n margin-bottom: 1rem;\\n width: 100%;\\n }\\n\\n .tingle-modal__close {\\n top: 0;\\n right: 0;\\n left: 0;\\n display: block;\\n width: 100%;\\n height: 60px;\\n border: none;\\n background-color: #2c3e50;\\n box-shadow: none;\\n color: #fff;\\n }\\n\\n .tingle-modal__closeLabel {\\n display: inline-block;\\n vertical-align: middle;\\n font-size: 1.6rem;\\n font-family: -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", \\\"Roboto\\\", \\\"Oxygen\\\", \\\"Ubuntu\\\", \\\"Cantarell\\\", \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", sans-serif;\\n }\\n\\n .tingle-modal__closeIcon {\\n display: inline-block;\\n margin-right: .8rem;\\n width: 1.6rem;\\n vertical-align: middle;\\n font-size: 0;\\n }\\n}\\n\\n/* animations\\n-------------------------------------------------------------- */\\n\\n@keyframes scale {\\n 0% {\\n opacity: 0;\\n transform: scale(.9);\\n }\\n 100% {\\n opacity: 1;\\n transform: scale(1);\\n }\\n}\\n\\n.tingle-modal-box__iframe {\\n border: 0;\\n height: 500px;\\n width: 100%;\\n}\\n\");\n\n//# sourceURL=webpack://solidus_nexio/./src/tingle.css?./node_modules/raw-loader/dist/cjs.js");
295
+
296
+ /***/ }),
297
+
298
+ /***/ "./node_modules/tingle.js/dist/tingle.min.js":
299
+ /*!***************************************************!*\
300
+ !*** ./node_modules/tingle.js/dist/tingle.min.js ***!
301
+ \***************************************************/
302
+ /***/ (function(module, exports, __webpack_require__) {
303
+
304
+ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;!function(t,o){ true?!(__WEBPACK_AMD_DEFINE_FACTORY__ = (o),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):0}(this,function(){var o=!1;function t(t){this.opts=function(){for(var t=1;t<arguments.length;t++)for(var o in arguments[t])arguments[t].hasOwnProperty(o)&&(arguments[0][o]=arguments[t][o]);return arguments[0]}({},{onClose:null,onOpen:null,beforeOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:\"Close\",closeMethods:[\"overlay\",\"button\",\"escape\"]},t),this.init()}function e(){this.modalBoxFooter&&(this.modalBoxFooter.style.width=this.modalBox.clientWidth+\"px\",this.modalBoxFooter.style.left=this.modalBox.offsetLeft+\"px\")}return t.prototype.init=function(){if(!this.modal)return function(){this.modal=document.createElement(\"div\"),this.modal.classList.add(\"tingle-modal\"),0!==this.opts.closeMethods.length&&-1!==this.opts.closeMethods.indexOf(\"overlay\")||this.modal.classList.add(\"tingle-modal--noOverlayClose\");this.modal.style.display=\"none\",this.opts.cssClass.forEach(function(t){\"string\"==typeof t&&this.modal.classList.add(t)},this),-1!==this.opts.closeMethods.indexOf(\"button\")&&(this.modalCloseBtn=document.createElement(\"button\"),this.modalCloseBtn.type=\"button\",this.modalCloseBtn.classList.add(\"tingle-modal__close\"),this.modalCloseBtnIcon=document.createElement(\"span\"),this.modalCloseBtnIcon.classList.add(\"tingle-modal__closeIcon\"),this.modalCloseBtnIcon.innerHTML='<svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M.3 9.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3L5 6.4l3.3 3.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L6.4 5l3.3-3.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L5 3.6 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4L3.6 5 .3 8.3c-.4.4-.4 1 0 1.4z\" fill=\"#000\" fill-rule=\"nonzero\"/></svg>',this.modalCloseBtnLabel=document.createElement(\"span\"),this.modalCloseBtnLabel.classList.add(\"tingle-modal__closeLabel\"),this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel,this.modalCloseBtn.appendChild(this.modalCloseBtnIcon),this.modalCloseBtn.appendChild(this.modalCloseBtnLabel));this.modalBox=document.createElement(\"div\"),this.modalBox.classList.add(\"tingle-modal-box\"),this.modalBoxContent=document.createElement(\"div\"),this.modalBoxContent.classList.add(\"tingle-modal-box__content\"),this.modalBox.appendChild(this.modalBoxContent),-1!==this.opts.closeMethods.indexOf(\"button\")&&this.modal.appendChild(this.modalCloseBtn);this.modal.appendChild(this.modalBox)}.call(this),function(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:function(t){var o=this.modal.offsetWidth-this.modal.clientWidth,e=t.clientX>=this.modal.offsetWidth-15,s=this.modal.scrollHeight!==this.modal.offsetHeight;if(\"MacIntel\"===navigator.platform&&0==o&&e&&s)return;-1!==this.opts.closeMethods.indexOf(\"overlay\")&&!function(t,o){for(;(t=t.parentElement)&&!t.classList.contains(o););return t}(t.target,\"tingle-modal\")&&t.clientX<this.modal.clientWidth&&this.close()}.bind(this),resize:this.checkOverflow.bind(this),keyboardNav:function(t){-1!==this.opts.closeMethods.indexOf(\"escape\")&&27===t.which&&this.isOpen()&&this.close()}.bind(this)},-1!==this.opts.closeMethods.indexOf(\"button\")&&this.modalCloseBtn.addEventListener(\"click\",this._events.clickCloseBtn);this.modal.addEventListener(\"mousedown\",this._events.clickOverlay),window.addEventListener(\"resize\",this._events.resize),document.addEventListener(\"keydown\",this._events.keyboardNav)}.call(this),document.body.appendChild(this.modal,document.body.firstChild),this.opts.footer&&this.addFooter(),this},t.prototype._busy=function(t){o=t},t.prototype._isBusy=function(){return o},t.prototype.destroy=function(){null!==this.modal&&(this.isOpen()&&this.close(!0),function(){-1!==this.opts.closeMethods.indexOf(\"button\")&&this.modalCloseBtn.removeEventListener(\"click\",this._events.clickCloseBtn);this.modal.removeEventListener(\"mousedown\",this._events.clickOverlay),window.removeEventListener(\"resize\",this._events.resize),document.removeEventListener(\"keydown\",this._events.keyboardNav)}.call(this),this.modal.parentNode.removeChild(this.modal),this.modal=null)},t.prototype.isOpen=function(){return!!this.modal.classList.contains(\"tingle-modal--visible\")},t.prototype.open=function(){if(!this._isBusy()){this._busy(!0);var t=this;return\"function\"==typeof t.opts.beforeOpen&&t.opts.beforeOpen(),this.modal.style.removeProperty?this.modal.style.removeProperty(\"display\"):this.modal.style.removeAttribute(\"display\"),document.getSelection().removeAllRanges(),this._scrollPosition=window.pageYOffset,document.body.classList.add(\"tingle-enabled\"),document.body.style.top=-this._scrollPosition+\"px\",this.setStickyFooter(this.opts.stickyFooter),this.modal.classList.add(\"tingle-modal--visible\"),\"function\"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),t._busy(!1),this.checkOverflow(),this}},t.prototype.close=function(t){if(!this._isBusy()){if(this._busy(!0),!1,\"function\"==typeof this.opts.beforeClose)if(!this.opts.beforeClose.call(this))return void this._busy(!1);document.body.classList.remove(\"tingle-enabled\"),document.body.style.top=null,window.scrollTo({top:this._scrollPosition,behavior:\"instant\"}),this.modal.classList.remove(\"tingle-modal--visible\");var o=this;o.modal.style.display=\"none\",\"function\"==typeof o.opts.onClose&&o.opts.onClose.call(this),o._busy(!1)}},t.prototype.setContent=function(t){return\"string\"==typeof t?this.modalBoxContent.innerHTML=t:(this.modalBoxContent.innerHTML=\"\",this.modalBoxContent.appendChild(t)),this.isOpen()&&this.checkOverflow(),this},t.prototype.getContent=function(){return this.modalBoxContent},t.prototype.addFooter=function(){return function(){this.modalBoxFooter=document.createElement(\"div\"),this.modalBoxFooter.classList.add(\"tingle-modal-box__footer\"),this.modalBox.appendChild(this.modalBoxFooter)}.call(this),this},t.prototype.setFooterContent=function(t){return this.modalBoxFooter.innerHTML=t,this},t.prototype.getFooterContent=function(){return this.modalBoxFooter},t.prototype.setStickyFooter=function(t){return this.isOverflow()||(t=!1),t?this.modalBox.contains(this.modalBoxFooter)&&(this.modalBox.removeChild(this.modalBoxFooter),this.modal.appendChild(this.modalBoxFooter),this.modalBoxFooter.classList.add(\"tingle-modal-box__footer--sticky\"),e.call(this),this.modalBoxContent.style[\"padding-bottom\"]=this.modalBoxFooter.clientHeight+20+\"px\"):this.modalBoxFooter&&(this.modalBox.contains(this.modalBoxFooter)||(this.modal.removeChild(this.modalBoxFooter),this.modalBox.appendChild(this.modalBoxFooter),this.modalBoxFooter.style.width=\"auto\",this.modalBoxFooter.style.left=\"\",this.modalBoxContent.style[\"padding-bottom\"]=\"\",this.modalBoxFooter.classList.remove(\"tingle-modal-box__footer--sticky\"))),this},t.prototype.addFooterBtn=function(t,o,e){var s=document.createElement(\"button\");return s.innerHTML=t,s.addEventListener(\"click\",e),\"string\"==typeof o&&o.length&&o.split(\" \").forEach(function(t){s.classList.add(t)}),this.modalBoxFooter.appendChild(s),s},t.prototype.resize=function(){console.warn(\"Resize is deprecated and will be removed in version 1.0\")},t.prototype.isOverflow=function(){return window.innerHeight<=this.modalBox.clientHeight},t.prototype.checkOverflow=function(){this.modal.classList.contains(\"tingle-modal--visible\")&&(this.isOverflow()?this.modal.classList.add(\"tingle-modal--overflow\"):this.modal.classList.remove(\"tingle-modal--overflow\"),!this.isOverflow()&&this.opts.stickyFooter?this.setStickyFooter(!1):this.isOverflow()&&this.opts.stickyFooter&&(e.call(this),this.setStickyFooter(!0)))},{modal:t}});\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/tingle.js/dist/tingle.min.js?");
305
+
306
+ /***/ }),
307
+
308
+ /***/ "./node_modules/jsencrypt/lib/version.json":
309
+ /*!*************************************************!*\
310
+ !*** ./node_modules/jsencrypt/lib/version.json ***!
311
+ \*************************************************/
312
+ /***/ ((module) => {
313
+
314
+ "use strict";
315
+ eval("module.exports = {\"version\":\"3.2.0\"};\n\n//# sourceURL=webpack://solidus_nexio/./node_modules/jsencrypt/lib/version.json?");
316
+
317
+ /***/ })
318
+
319
+ /******/ });
320
+ /************************************************************************/
321
+ /******/ // The module cache
322
+ /******/ var __webpack_module_cache__ = {};
323
+ /******/
324
+ /******/ // The require function
325
+ /******/ function __webpack_require__(moduleId) {
326
+ /******/ // Check if module is in cache
327
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
328
+ /******/ if (cachedModule !== undefined) {
329
+ /******/ return cachedModule.exports;
330
+ /******/ }
331
+ /******/ // Create a new module (and put it into the cache)
332
+ /******/ var module = __webpack_module_cache__[moduleId] = {
333
+ /******/ // no module.id needed
334
+ /******/ // no module.loaded needed
335
+ /******/ exports: {}
336
+ /******/ };
337
+ /******/
338
+ /******/ // Execute the module function
339
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
340
+ /******/
341
+ /******/ // Return the exports of the module
342
+ /******/ return module.exports;
343
+ /******/ }
344
+ /******/
345
+ /************************************************************************/
346
+ /******/ /* webpack/runtime/compat get default export */
347
+ /******/ (() => {
348
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
349
+ /******/ __webpack_require__.n = (module) => {
350
+ /******/ var getter = module && module.__esModule ?
351
+ /******/ () => (module['default']) :
352
+ /******/ () => (module);
353
+ /******/ __webpack_require__.d(getter, { a: getter });
354
+ /******/ return getter;
355
+ /******/ };
356
+ /******/ })();
357
+ /******/
358
+ /******/ /* webpack/runtime/define property getters */
359
+ /******/ (() => {
360
+ /******/ // define getter functions for harmony exports
361
+ /******/ __webpack_require__.d = (exports, definition) => {
362
+ /******/ for(var key in definition) {
363
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
364
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
365
+ /******/ }
366
+ /******/ }
367
+ /******/ };
368
+ /******/ })();
369
+ /******/
370
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
371
+ /******/ (() => {
372
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
373
+ /******/ })();
374
+ /******/
375
+ /******/ /* webpack/runtime/make namespace object */
376
+ /******/ (() => {
377
+ /******/ // define __esModule on exports
378
+ /******/ __webpack_require__.r = (exports) => {
379
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
380
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
381
+ /******/ }
382
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
383
+ /******/ };
384
+ /******/ })();
385
+ /******/
386
+ /************************************************************************/
387
+ /******/
388
+ /******/ // startup
389
+ /******/ // Load entry module and return exports
390
+ /******/ // This entry module can't be inlined because the eval devtool is used.
391
+ /******/ var __webpack_exports__ = __webpack_require__("./src/index-assets.js");
392
+ /******/
393
+ /******/ })()
394
+ ;