ethers.js/packages/shims/dist/index.min.js

1 line
137 KiB
JavaScript
Raw Normal View History

2020-11-17 07:07:24 +03:00
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self)._ethers_shims={})}(this,function(t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,r,e){return t(e={path:r,exports:{},require:function(t,r){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}((void 0===r||null===r)&&e.path)}},e.exports),e.exports}var n=e(function(t){!function(r){for(var e=[null,0,{}],n=10,o=44032,i=4352,a=4449,s=4519,u=19,f=21,h=28,l=f*h,c=u*l,p=function(t,r){this.codepoint=t,this.feature=r},d={},g=[],y=0;y<=255;++y)g[y]=0;var w=[function(t,r,n){return r<60||13311<r&&r<42607?new p(r,e):t(r,n)},function(t,r,e){var o=d[r];return o||(o=t(r,e)).feature&&++g[r>>8&255]>n&&(d[r]=o),o},function(t,r,e){return e?t(r,e):new p(r,null)},function(t,r,e){var n;if(r<i||i+u<=r&&r<o||o+c<r)return t(r,e);if(i<=r&&r<i+u){var d={},g=(r-i)*f;for(n=0;n<f;++n)d[a+n]=o+h*(n+g);return new p(r,[,,d])}var y=r-o,w=y%h,C=[];if(0!==w)C[0]=[o+y-w,s+w];else for(C[0]=[i+Math.floor(y/l),a+Math.floor(y%l/h)],C[2]={},n=1;n<h;++n)C[2][s+n]=r+n;return new p(r,C)},function(t,r,n){var o=65280&r,i=(p.udata[o]||{})[r];return new p(r,i||e)}];p.fromCharCode=w.reduceRight(function(t,r){return function(e,n){return r(t,e,n)}},null),p.isHighSurrogate=function(t){return t>=55296&&t<=56319},p.isLowSurrogate=function(t){return t>=56320&&t<=57343},p.prototype.prepFeature=function(){this.feature||(this.feature=p.fromCharCode(this.codepoint,!0).feature)},p.prototype.toString=function(){if(this.codepoint<65536)return String.fromCharCode(this.codepoint);var t=this.codepoint-65536;return String.fromCharCode(Math.floor(t/1024)+55296,t%1024+56320)},p.prototype.getDecomp=function(){return this.prepFeature(),this.feature[0]||null},p.prototype.isCompatibility=function(){return this.prepFeature(),!!this.feature[1]&&256&this.feature[1]},p.prototype.isExclude=function(){return this.prepFeature(),!!this.feature[1]&&512&this.feature[1]},p.prototype.getCanonicalClass=function(){return this.prepFeature(),this.feature[1]?255&this.feature[1]:0},p.prototype.getComposite=function(t){if(this.prepFeature(),!this.feature[2])return null;var r=this.feature[2][t.codepoint];return r?p.fromCharCode(r):null};var C=function(t){this.str=t,this.cursor=0};C.prototype.next=function(){if(this.str&&this.cursor<this.str.length){var t,r=this.str.charCodeAt(this.cursor++);return p.isHighSurrogate(r)&&this.cursor<this.str.length&&p.isLowSurrogate(t=this.str.charCodeAt(this.cursor))&&(r=1024*(r-55296)+(t-56320)+65536,++this.cursor),p.fromCharCode(r)}return this.str=null,null};var m=function(t,r){this.it=t,this.canonical=r,this.resBuf=[]};m.prototype.next=function(){if(0===this.resBuf.length){var t=this.it.next();if(!t)return null;this.resBuf=function t(r,e){var n=e.getDecomp();if(!n||r&&e.isCompatibility())return[e];for(var o=[],i=0;i<n.length;++i){var a=t(r,p.fromCharCode(n[i]));o=o.concat(a)}return o}(this.canonical,t)}return this.resBuf.shift()};var v=function(t){this.it=t,this.resBuf=[]};v.prototype.next=function(){var t;if(0===this.resBuf.length)do{var r=this.it.next();if(!r)break;t=r.getCanonicalClass();var e=this.resBuf.length;if(0!==t)for(;e>0;--e){if(this.resBuf[e-1].getCanonicalClass()<=t)break}this.resBuf.splice(e,0,r)}while(0!==t);return this.resBuf.shift()};var b=function(t){this.it=t,this.procBuf=[],this.resBuf=[],this.lastClass=null};b.prototype.next=function(){for(;0===this.resBuf.length;){var t=this.it.next();if(!t){this.resBuf=this.procBuf,this.procBuf=[];break}if(0===this.procBuf.length)this.lastClass=t.getCanonicalClass(),this.procBuf.push(t);else{var r=this.procBuf[0].getComposite(t),e=t.getCanonicalClass();r&&(this.lastClass<e||0===this.lastClass)?this.procBuf[0]=r:(0===e&&(this.resBuf=this.procBuf,this.procBuf=[]),this.lastClass=e,this.procBuf.push(t))}}return this.resBuf.shift()};var A=function(t,r)