UNPKG

ldmui-test

Version:

``` npm install ```

10 lines 29.1 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["myLib"]=e():t["myLib"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="2b1f")}({2409:function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}t.exports=r},"2b1f":function(t,e,r){"use strict";if(r.r(e),"undefined"!==typeof window){var n=window.document.currentScript,i=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var o=function(){var t=this,e=t._self._c;return e("div",[t._m(0),e("input",{directives:[{name:"model",rawName:"v-model",value:t.abcd,expression:"abcd"}],staticClass:"input",attrs:{type:"text",name:"",id:"input"},domProps:{value:t.abcd},on:{input:function(e){e.target.composing||(t.abcd=e.target.value)}}}),e("div",[t._v(t._s(t.abcd))]),e("canvas",{attrs:{id:"canvasId"}})])},s=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"reverseRotate"},[e("div",{staticClass:"rotate"},[t._v("正反旋转相消3D")])])}],u=r("7e0d"),a=u["a"];r("91b5");function f(t,e,r,n,i,o,s,u){var a,f="function"===typeof t?t.options:t;if(e&&(f.render=e,f.staticRenderFns=r,f._compiled=!0),n&&(f.functional=!0),o&&(f._scopeId="data-v-"+o),s?(a=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},f._ssrRegister=a):i&&(a=u?function(){i.call(this,(f.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(f.functional){f._injectStyles=a;var h=f.render;f.render=function(t,e){return a.call(e),h(t,e)}}else{var c=f.beforeCreate;f.beforeCreate=c?[].concat(c,a):[a]}return{exports:t,options:f}}var h=f(a,o,s,!1,null,"2fd717b9",null),c=h.exports;e["default"]=c},3560:function(t,e,r){"use strict";e.byteLength=h,e.toByteArray=l,e.fromByteArray=g;for(var n=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=s.length;u<a;++u)n[u]=s[u],i[s.charCodeAt(u)]=u;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function h(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n}function c(t,e,r){return 3*(e+r)/4-r}function l(t){var e,r,n=f(t),s=n[0],u=n[1],a=new o(c(t,s,u)),h=0,l=u>0?s-4:s;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],a[h++]=e>>16&255,a[h++]=e>>8&255,a[h++]=255&e;return 2===u&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,a[h++]=255&e),1===u&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,a[h++]=e>>8&255,a[h++]=255&e),a}function p(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function d(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(p(n));return i.join("")}function g(t){for(var e,r=t.length,i=r%3,o=[],s=16383,u=0,a=r-i;u<a;u+=s)o.push(d(t,u,u+s>a?a:u+s));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"571a":function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},6104:function(t,e,r){},"7e0d":function(t,e,r){"use strict";(function(t){e["a"]={name:"myLib",data(){return{abcd:"",nums:"15346489",bufferS:new t(2)}},mounted(){this.createdFun()},methods:{createdFun(){"INPUT"===this.$el.tagName?this.abcd=this.$el.value:this.abcd=this.$el.innerHTML,this.abcd===this.bufferS.toString("hex")?this.nums=this.abcd:this.nums=this.bufferS.toString("hex"),t.isBuffer(this.bufferS)&&(this.abcd=this.abcd.toString("utf8")),"boolean"!==typeof this.abcd&&"object"!==typeof this.abcd||(this.abcd=JSON.stringify(this.abcd),console.log(this.abcd)),(!Array.isArray(this.nums)||this.nums.length<1||this.nums.length>Number.MAX_SAFE_INTEGER)&&(this.nums="15346489"),this.abcd instanceof ArrayBuffer?(this.canvas=document.getElementById("canvasId"),this.ctx=this.canvas.getContext("2d"),this.draw()):console.log("不是 ArrayBuffer 对象"),this.abcd===this.nums?console.log("相等"):console.log("不相等"),Array.isArray(this.nums)||(this.nums=[this.nums])},canvasId(){console.log("canvasId");var t=document.getElementById("canvasId"),e=t.getContext("2d");e.clearRect(0,0,100,100),e.beginPath(),e.arc(50,50,50,0,2*Math.PI,!0),e.closePath(),e.fillStyle="rgba(0, 255, 0, 0.5)",e.fill(),e.beginPath(),e.rect(50,50,100,100),e.fillStyle="rgba(0, 0, 255, 0.5)",e.fill(),e.beginPath(),e.rect(50,50,100,100),e.fillStyle="rgba(0, 255, 255, 0.5)",e.fill()},reverseRotate(){this.abcd=this.abcd.split("").reverse().join("")},rotate(){this.abcd+=this.nums},bubbleSort(){function t(t){for(let e=0;e<t.length-1;e++)for(let r=0;r<t.length-e-1;r++)if(t[r]>t[r+1]){let e=t[r];t[r]=t[r+1],t[r+1]=e}return t}this.abcd=this.abcd.split("").sort().join(""),this.abcd=t(this.abcd.split("")).join("")},changeColor(){let t=this.$el.querySelector(".rotate");t.style.background="rgb(255, 0, 0)";let e=this.$el.querySelector(".input");e.style.background="rgb(0, 255, 0)";let r=this.$el.querySelector(".reverseRotate");r.style.background="rgb(0, 255, 0)";let n=this.$el.querySelector(".nums");n.style.background="rgb(0, 255, 0)";let i=this.$el.querySelector(".input2");i.style.background="rgb(255, 0, 0)",t.style.left="200px",e.style.left="200px",r.style.left="200px",n.style.left="200px",i.style.left="200px"},addListener(){document.body.addEventListener("scroll",this.changeColor),document.querySelector("#input").addEventListener("scroll",this.changeColor),document.querySelector("#input2").addEventListener("scroll",this.changeColor),document.querySelector(".rotate").addEventListener("scroll",this.changeColor),document.querySelector(".reverseRotate").addEventListener("scroll",this.changeColor),document.querySelector(".nums").addEventListener("scroll",this.changeColor)},regexEvent(){try{document.querySelector("#input").addEventListener("scroll",this.changeColor),document.querySelector("#input2").addEventListener("scroll",this.changeColor),document.querySelector(".rotate").addEventListener("scroll",this.changeColor),document.querySelector(".reverseRotate").addEventListener("scroll",this.changeColor),document.querySelector(".nums").addEventListener("scroll",this.changeColor)}catch(t){console.log(t)}},formateData(){let t=/^[0-9.]+$/,e=document.querySelector("#input"),r=document.querySelector("#input2"),n=document.querySelector(".rotate"),i=document.querySelector(".reverseRotate"),o=document.querySelector(".nums");t.test(e.value)&&t.test(r.value)&&t.test(n.value)&&t.test(i.value)&&t.test(o.value)?this.abcd=e.value+r.value+n.value+i.value+o.value:this.abcd=""}},computed:{},watch:{abcd(t){this.nums=t}}}}).call(this,r("fd40").Buffer)},"91b5":function(t,e,r){"use strict";r("6104")},e248:function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ e.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<<u)-1,f=a>>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=u;h>0;o=256*o+t[e+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,u,a,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),e+=s+c>=1?l/a:l*Math.pow(2,1-c),e*a>=2&&(s++,a/=2),s+c>=h?(u=0,s=h):s+c>=1?(u=(e*a-1)*Math.pow(2,i),s+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*g}},fd40:function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ var n=r("3560"),i=r("e248"),o=r("571a");function s(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function u(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=f.prototype):(null===t&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(t,e,r);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return p(this,t)}return h(this,t,e,r)}function h(t,e,r,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?y(t,e,r,n):"string"===typeof e?d(t,e,r):v(t,e)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e,r,n){return c(e),e<=0?a(t,e):void 0!==r?"string"===typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function p(t,e){if(c(e),t=a(t,e<0?0:0|w(e)),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function d(t,e,r){if("string"===typeof r&&""!==r||(r="utf8"),!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|m(e,r);t=a(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function g(t,e){var r=e.length<0?0:0|w(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function y(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),f.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=f.prototype):t=g(t,e),t}function v(t,e){if(f.isBuffer(e)){var r=0|w(e.length);return t=a(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||et(e.length)?a(t,0):g(t,e);if("Buffer"===e.type&&o(e.data))return g(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),f.alloc(+t)}function m(t,e){if(f.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(n)return Z(t).length;e=(""+e).toLowerCase(),n=!0}}function E(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return D(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:R(t,e,r,n,i);if("number"===typeof e)return e&=255,f.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):R(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function R(t,e,r,n,i){var o,s=1,u=t.length,a=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=r;o<u;o++)if(f(t,o)===f(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===a)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(r+a>u&&(r=u-a),o=r;o>=0;o--){for(var c=!0,l=0;l<a;l++)if(f(t,o+l)!==f(e,l)){c=!1;break}if(c)return o}return-1}function S(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var u=parseInt(e.substr(2*s,2),16);if(isNaN(u))return s;t[r+s]=u}return s}function P(t,e,r,n){return tt(Z(e,t.length-r),t,r,n)}function T(t,e,r,n){return tt(K(e),t,r,n)}function B(t,e,r,n){return T(t,e,r,n)}function U(t,e,r,n){return tt(W(e),t,r,n)}function C(t,e,r,n){return tt(Q(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);var n=[],i=e;while(i<r){var o,s,u,a,f=t[i],h=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:o=t[i+1],128===(192&o)&&(a=(31&f)<<6|63&o,a>127&&(h=a));break;case 3:o=t[i+1],s=t[i+2],128===(192&o)&&128===(192&s)&&(a=(15&f)<<12|(63&o)<<6|63&s,a>2047&&(a<55296||a>57343)&&(h=a));break;case 4:o=t[i+1],s=t[i+2],u=t[i+3],128===(192&o)&&128===(192&s)&&128===(192&u)&&(a=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&u,a>65535&&a<1114112&&(h=a))}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return Y(n)}e.Buffer=f,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:s(),e.kMaxLength=u(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,e,r){return h(null,t,e,r)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,e,r){return l(null,t,e,r)},f.allocUnsafe=function(t){return p(null,t)},f.allocUnsafeSlow=function(t){return p(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,e){if(!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=f.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!f.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},f.byteLength=m,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)_(this,e,e+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)_(this,e,e+3),_(this,e+1,e+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,e,r,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,u=Math.min(o,s),a=this.slice(n,i),h=t.slice(e,r),c=0;c<u;++c)if(a[c]!==h[c]){o=a[c],s=h[c];break}return o<s?-1:s<o?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return A(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return A(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"===typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return P(this,t,e,r);case"ascii":return T(this,t,e,r);case"latin1":case"binary":return B(this,t,e,r);case"base64":return U(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var L=4096;function Y(t){var e=t.length;if(e<=L)return String.fromCharCode.apply(String,t);var r="",n=0;while(n<e)r+=String.fromCharCode.apply(String,t.slice(n,n+=L));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function D(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function N(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function j(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function k(t,e,r,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function q(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function $(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(t,e,r,n,o){return o||F(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function X(t,e,r,n,o){return o||F(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t),f.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=f.prototype;else{var i=e-t;r=new f(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},f.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);var n=this[t],i=1,o=0;while(++o<e&&(i*=256))n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);var n=this[t+--e],i=1;while(e>0&&(i*=256))n+=this[t+--e]*i;return n},f.prototype.readUInt8=function(t,e){return e||j(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return e||j(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return e||j(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);var n=this[t],i=1,o=0;while(++o<e&&(i*=256))n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||j(t,e,this.length);var n=e,i=1,o=this[t+--n];while(n>0&&(i*=256))o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return e||j(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return e||j(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return e||j(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return e||j(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;k(this,t,e,r,i,0)}var o=1,s=0;this[e]=255&t;while(++s<r&&(o*=256))this[e+s]=t/o&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;k(this,t,e,r,i,0)}var o=r-1,s=1;this[e+o]=255&t;while(--o>=0&&(s*=256))this[e+o]=t/s&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):q(this,t,e,!0),e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):q(this,t,e,!1),e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):$(this,t,e,!0),e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):$(this,t,e,!1),e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);k(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;this[e]=255&t;while(++o<r&&(s*=256))t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/s>>0)-u&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);k(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;this[e+o]=255&t;while(--o>=0&&(s*=256))t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s>>0)-u&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):q(this,t,e,!0),e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):q(this,t,e,!1),e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):$(this,t,e,!0),e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||k(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):$(this,t,e,!1),e+4},f.prototype.writeFloatLE=function(t,e,r){return z(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return z(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return X(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return X(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},f.prototype.fill=function(t,e,r,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=f.isBuffer(t)?t:Z(new f(t,n).toString()),u=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function J(t){if(t=G(t).replace(V,""),t.length<2)return"";while(t.length%4!==0)t+="=";return t}function G(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function Z(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function Q(t,e){for(var r,n,i,o=[],s=0;s<t.length;++s){if((e-=2)<0)break;r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n)}return o}function W(t){return n.toByteArray(J(t))}function tt(t,e,r,n){for(var i=0;i<n;++i){if(i+r>=e.length||i>=t.length)break;e[i+r]=t[i]}return i}function et(t){return t!==t}}).call(this,r("2409"))}})["default"]}));