vue2-tunnel-lining
Version:
A Vue2 component for tunnel lining design with MxCAD integration
4 lines • 1.81 MB
JavaScript
!function(t,h){"object"==typeof exports&&"undefined"!=typeof module?h(exports,require("mxdraw")):"function"==typeof define&&define.amd?define(["exports","mxdraw"],h):h((t="undefined"!=typeof globalThis?globalThis:t||self).MxCAD={},t.Mx)}(this,(function(t,h){"use strict";function _classCallCheck$1(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")}function _typeof$2(t){return _typeof$2="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},_typeof$2(t)}function toPropertyKey(t){var h=function toPrimitive(t,h){if("object"!=_typeof$2(t)||!t)return t;var p=t[Symbol.toPrimitive];if(void 0!==p){var x=p.call(t,h||"default");if("object"!=_typeof$2(x))return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===h?String:Number)(t)}(t,"string");return"symbol"==_typeof$2(h)?h:String(h)}function _defineProperties$1(t,h){for(var p=0;p<h.length;p++){var x=h[p];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(t,toPropertyKey(x.key),x)}}function _createClass$1(t,h,p){return h&&_defineProperties$1(t.prototype,h),p&&_defineProperties$1(t,p),Object.defineProperty(t,"prototype",{writable:!1}),t}function _assertThisInitialized$1(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _setPrototypeOf$1(t,h){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,h){return t.__proto__=h,t},_setPrototypeOf$1(t,h)}function _inherits$1(t,h){if("function"!=typeof h&&null!==h)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(h&&h.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),h&&_setPrototypeOf$1(t,h)}function _possibleConstructorReturn$1(t,h){if(h&&("object"===_typeof$2(h)||"function"==typeof h))return h;if(void 0!==h)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(t)}function _getPrototypeOf$1(t){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf$1(t)}function getAugmentedNamespace(t){var h=t.default;if("function"==typeof h){var a=function(){return h.apply(this,arguments)};a.prototype=h.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(t).forEach((function(h){var p=Object.getOwnPropertyDescriptor(t,h);Object.defineProperty(a,h,p.get?p:{enumerable:!0,get:function(){return t[h]}})})),a}for(var p={},x={byteLength:function byteLength(t){var h=getLens(t),p=h[0],x=h[1];return 3*(p+x)/4-x},toByteArray:function toByteArray(t){var h,p,x=getLens(t),M=x[0],N=x[1],V=new I(function _byteLength(t,h,p){return 3*(h+p)/4-p}(0,M,N)),ee=0,te=N>0?M-4:M;for(p=0;p<te;p+=4)h=k[t.charCodeAt(p)]<<18|k[t.charCodeAt(p+1)]<<12|k[t.charCodeAt(p+2)]<<6|k[t.charCodeAt(p+3)],V[ee++]=h>>16&255,V[ee++]=h>>8&255,V[ee++]=255&h;2===N&&(h=k[t.charCodeAt(p)]<<2|k[t.charCodeAt(p+1)]>>4,V[ee++]=255&h);1===N&&(h=k[t.charCodeAt(p)]<<10|k[t.charCodeAt(p+1)]<<4|k[t.charCodeAt(p+2)]>>2,V[ee++]=h>>8&255,V[ee++]=255&h);return V},fromByteArray:function fromByteArray(t){for(var h,p=t.length,x=p%3,k=[],I=16383,N=0,V=p-x;N<V;N+=I)k.push(encodeChunk(t,N,N+I>V?V:N+I));1===x?(h=t[p-1],k.push(M[h>>2]+M[h<<4&63]+"==")):2===x&&(h=(t[p-2]<<8)+t[p-1],k.push(M[h>>10]+M[h>>4&63]+M[h<<2&63]+"="));return k.join("")}},M=[],k=[],I="undefined"!=typeof Uint8Array?Uint8Array:Array,N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",V=0;V<64;++V)M[V]=N[V],k[N.charCodeAt(V)]=V;function getLens(t){var h=t.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=t.indexOf("=");return-1===p&&(p=h),[p,p===h?0:4-p%4]}function encodeChunk(t,h,p){for(var x,k,I=[],N=h;N<p;N+=3)x=(t[N]<<16&16711680)+(t[N+1]<<8&65280)+(255&t[N+2]),I.push(M[(k=x)>>18&63]+M[k>>12&63]+M[k>>6&63]+M[63&k]);return I.join("")}k["-".charCodeAt(0)]=62,k["_".charCodeAt(0)]=63;var ee={};
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function _createSuper$e(t){var h=function _isNativeReflectConstruct$f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var p,x=_getPrototypeOf$1(t);if(h){var M=_getPrototypeOf$1(this).constructor;p=Reflect.construct(x,arguments,M)}else p=x.apply(this,arguments);return _possibleConstructorReturn$1(this,p)}}function asyncGeneratorStep(t,h,p,x,M,k,I){try{var N=t[k](I),V=N.value}catch(ee){return void p(ee)}N.done?h(V):Promise.resolve(V).then(x,M)}function _asyncToGenerator(t){return function(){var h=this,p=arguments;return new Promise((function(x,M){var k=t.apply(h,p);function _next(t){asyncGeneratorStep(k,x,M,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(k,x,M,_next,_throw,"throw",t)}_next(void 0)}))}}ee.read=function(t,h,p,x,M){var k,I,N=8*M-x-1,V=(1<<N)-1,ee=V>>1,te=-7,re=p?M-1:0,ne=p?-1:1,ie=t[h+re];for(re+=ne,k=ie&(1<<-te)-1,ie>>=-te,te+=N;te>0;k=256*k+t[h+re],re+=ne,te-=8);for(I=k&(1<<-te)-1,k>>=-te,te+=x;te>0;I=256*I+t[h+re],re+=ne,te-=8);if(0===k)k=1-ee;else{if(k===V)return I?NaN:1/0*(ie?-1:1);I+=Math.pow(2,x),k-=ee}return(ie?-1:1)*I*Math.pow(2,k-x)},ee.write=function(t,h,p,x,M,k){var I,N,V,ee=8*k-M-1,te=(1<<ee)-1,re=te>>1,ne=23===M?Math.pow(2,-24)-Math.pow(2,-77):0,ie=x?0:k-1,ae=x?1:-1,oe=h<0||0===h&&1/h<0?1:0;for(h=Math.abs(h),isNaN(h)||h===1/0?(N=isNaN(h)?1:0,I=te):(I=Math.floor(Math.log(h)/Math.LN2),h*(V=Math.pow(2,-I))<1&&(I--,V*=2),(h+=I+re>=1?ne/V:ne*Math.pow(2,1-re))*V>=2&&(I++,V/=2),I+re>=te?(N=0,I=te):I+re>=1?(N=(h*V-1)*Math.pow(2,M),I+=re):(N=h*Math.pow(2,re-1)*Math.pow(2,M),I=0));M>=8;t[p+ie]=255&N,ie+=ae,N/=256,M-=8);for(I=I<<M|N,ee+=M;ee>0;t[p+ie]=255&I,ie+=ae,I/=256,ee-=8);t[p+ie-ae]|=128*oe},function(t){var h=x,p=ee,M="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=Buffer,t.SlowBuffer=function SlowBuffer(t){+t!=t&&(t=0);return Buffer.alloc(+t)},t.INSPECT_MAX_BYTES=50;var k=2147483647;function createBuffer(t){if(t>k)throw new RangeError('The value "'+t+'" is invalid for option "size"');var h=new Uint8Array(t);return Object.setPrototypeOf(h,Buffer.prototype),h}function Buffer(t,h,p){if("number"==typeof t){if("string"==typeof h)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(t)}return from(t,h,p)}function from(t,h,p){if("string"==typeof t)return function fromString(t,h){"string"==typeof h&&""!==h||(h="utf8");if(!Buffer.isEncoding(h))throw new TypeError("Unknown encoding: "+h);var p=0|byteLength(t,h),x=createBuffer(p),M=x.write(t,h);M!==p&&(x=x.slice(0,M));return x}(t,h);if(ArrayBuffer.isView(t))return function fromArrayView(t){if(isInstance(t,Uint8Array)){var h=new Uint8Array(t);return fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength)}return fromArrayLike(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof$2(t));if(isInstance(t,ArrayBuffer)||t&&isInstance(t.buffer,ArrayBuffer))return fromArrayBuffer(t,h,p);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(t,SharedArrayBuffer)||t&&isInstance(t.buffer,SharedArrayBuffer)))return fromArrayBuffer(t,h,p);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var x=t.valueOf&&t.valueOf();if(null!=x&&x!==t)return Buffer.from(x,h,p);var M=function fromObject(t){if(Buffer.isBuffer(t)){var h=0|checked(t.length),p=createBuffer(h);return 0===p.length||t.copy(p,0,0,h),p}if(void 0!==t.length)return"number"!=typeof t.length||numberIsNaN(t.length)?createBuffer(0):fromArrayLike(t);if("Buffer"===t.type&&Array.isArray(t.data))return fromArrayLike(t.data)}(t);if(M)return M;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return Buffer.from(t[Symbol.toPrimitive]("string"),h,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof$2(t))}function assertSize(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function allocUnsafe(t){return assertSize(t),createBuffer(t<0?0:0|checked(t))}function fromArrayLike(t){for(var h=t.length<0?0:0|checked(t.length),p=createBuffer(h),x=0;x<h;x+=1)p[x]=255&t[x];return p}function fromArrayBuffer(t,h,p){if(h<0||t.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<h+(p||0))throw new RangeError('"length" is outside of buffer bounds');var x;return x=void 0===h&&void 0===p?new Uint8Array(t):void 0===p?new Uint8Array(t,h):new Uint8Array(t,h,p),Object.setPrototypeOf(x,Buffer.prototype),x}function checked(t){if(t>=k)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+k.toString(16)+" bytes");return 0|t}function byteLength(t,h){if(Buffer.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||isInstance(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_typeof$2(t));var p=t.length,x=arguments.length>2&&!0===arguments[2];if(!x&&0===p)return 0;for(var M=!1;;)switch(h){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*p;case"hex":return p>>>1;case"base64":return base64ToBytes(t).length;default:if(M)return x?-1:utf8ToBytes(t).length;h=(""+h).toLowerCase(),M=!0}}function slowToString(t,h,p){var x=!1;if((void 0===h||h<0)&&(h=0),h>this.length)return"";if((void 0===p||p>this.length)&&(p=this.length),p<=0)return"";if((p>>>=0)<=(h>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return hexSlice(this,h,p);case"utf8":case"utf-8":return utf8Slice(this,h,p);case"ascii":return asciiSlice(this,h,p);case"latin1":case"binary":return latin1Slice(this,h,p);case"base64":return base64Slice(this,h,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,h,p);default:if(x)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),x=!0}}function swap(t,h,p){var x=t[h];t[h]=t[p],t[p]=x}function bidirectionalIndexOf(t,h,p,x,M){if(0===t.length)return-1;if("string"==typeof p?(x=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),numberIsNaN(p=+p)&&(p=M?0:t.length-1),p<0&&(p=t.length+p),p>=t.length){if(M)return-1;p=t.length-1}else if(p<0){if(!M)return-1;p=0}if("string"==typeof h&&(h=Buffer.from(h,x)),Buffer.isBuffer(h))return 0===h.length?-1:arrayIndexOf(t,h,p,x,M);if("number"==typeof h)return h&=255,"function"==typeof Uint8Array.prototype.indexOf?M?Uint8Array.prototype.indexOf.call(t,h,p):Uint8Array.prototype.lastIndexOf.call(t,h,p):arrayIndexOf(t,[h],p,x,M);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(t,h,p,x,M){var k,I=1,N=t.length,V=h.length;if(void 0!==x&&("ucs2"===(x=String(x).toLowerCase())||"ucs-2"===x||"utf16le"===x||"utf-16le"===x)){if(t.length<2||h.length<2)return-1;I=2,N/=2,V/=2,p/=2}function read(t,h){return 1===I?t[h]:t.readUInt16BE(h*I)}if(M){var ee=-1;for(k=p;k<N;k++)if(read(t,k)===read(h,-1===ee?0:k-ee)){if(-1===ee&&(ee=k),k-ee+1===V)return ee*I}else-1!==ee&&(k-=k-ee),ee=-1}else for(p+V>N&&(p=N-V),k=p;k>=0;k--){for(var te=!0,re=0;re<V;re++)if(read(t,k+re)!==read(h,re)){te=!1;break}if(te)return k}return-1}function hexWrite(t,h,p,x){p=Number(p)||0;var M=t.length-p;x?(x=Number(x))>M&&(x=M):x=M;var k,I=h.length;for(x>I/2&&(x=I/2),k=0;k<x;++k){var N=parseInt(h.substr(2*k,2),16);if(numberIsNaN(N))return k;t[p+k]=N}return k}function utf8Write(t,h,p,x){return blitBuffer(utf8ToBytes(h,t.length-p),t,p,x)}function asciiWrite(t,h,p,x){return blitBuffer(function asciiToBytes(t){for(var h=[],p=0;p<t.length;++p)h.push(255&t.charCodeAt(p));return h}(h),t,p,x)}function base64Write(t,h,p,x){return blitBuffer(base64ToBytes(h),t,p,x)}function ucs2Write(t,h,p,x){return blitBuffer(function utf16leToBytes(t,h){for(var p,x,M,k=[],I=0;I<t.length&&!((h-=2)<0);++I)x=(p=t.charCodeAt(I))>>8,M=p%256,k.push(M),k.push(x);return k}(h,t.length-p),t,p,x)}function base64Slice(t,p,x){return 0===p&&x===t.length?h.fromByteArray(t):h.fromByteArray(t.slice(p,x))}function utf8Slice(t,h,p){p=Math.min(t.length,p);for(var x=[],M=h;M<p;){var k=t[M],N=null,V=k>239?4:k>223?3:k>191?2:1;if(M+V<=p){var ee=void 0,te=void 0,re=void 0,ne=void 0;switch(V){case 1:k<128&&(N=k);break;case 2:128==(192&(ee=t[M+1]))&&(ne=(31&k)<<6|63&ee)>127&&(N=ne);break;case 3:ee=t[M+1],te=t[M+2],128==(192&ee)&&128==(192&te)&&(ne=(15&k)<<12|(63&ee)<<6|63&te)>2047&&(ne<55296||ne>57343)&&(N=ne);break;case 4:ee=t[M+1],te=t[M+2],re=t[M+3],128==(192&ee)&&128==(192&te)&&128==(192&re)&&(ne=(15&k)<<18|(63&ee)<<12|(63&te)<<6|63&re)>65535&&ne<1114112&&(N=ne)}}null===N?(N=65533,V=1):N>65535&&(N-=65536,x.push(N>>>10&1023|55296),N=56320|1023&N),x.push(N),M+=V}return function decodeCodePointsArray(t){var h=t.length;if(h<=I)return String.fromCharCode.apply(String,t);var p="",x=0;for(;x<h;)p+=String.fromCharCode.apply(String,t.slice(x,x+=I));return p}(x)}t.kMaxLength=k,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{var t=new Uint8Array(1),h={foo:function foo(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(t,h),42===t.foo()}catch(p){return!1}}(),!Buffer.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function get(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function get(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(t,h,p){return from(t,h,p)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(t,h,p){return function alloc(t,h,p){return assertSize(t),t<=0?createBuffer(t):void 0!==h?"string"==typeof p?createBuffer(t).fill(h,p):createBuffer(t).fill(h):createBuffer(t)}(t,h,p)},Buffer.allocUnsafe=function(t){return allocUnsafe(t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(t)},Buffer.isBuffer=function isBuffer(t){return null!=t&&!0===t._isBuffer&&t!==Buffer.prototype},Buffer.compare=function compare(t,h){if(isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),isInstance(h,Uint8Array)&&(h=Buffer.from(h,h.offset,h.byteLength)),!Buffer.isBuffer(t)||!Buffer.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===h)return 0;for(var p=t.length,x=h.length,M=0,k=Math.min(p,x);M<k;++M)if(t[M]!==h[M]){p=t[M],x=h[M];break}return p<x?-1:x<p?1:0},Buffer.isEncoding=function isEncoding(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(t,h){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);var p;if(void 0===h)for(h=0,p=0;p<t.length;++p)h+=t[p].length;var x=Buffer.allocUnsafe(h),M=0;for(p=0;p<t.length;++p){var k=t[p];if(isInstance(k,Uint8Array))M+k.length>x.length?(Buffer.isBuffer(k)||(k=Buffer.from(k)),k.copy(x,M)):Uint8Array.prototype.set.call(x,k,M);else{if(!Buffer.isBuffer(k))throw new TypeError('"list" argument must be an Array of Buffers');k.copy(x,M)}M+=k.length}return x},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var h=0;h<t;h+=2)swap(this,h,h+1);return this},Buffer.prototype.swap32=function swap32(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var h=0;h<t;h+=4)swap(this,h,h+3),swap(this,h+1,h+2);return this},Buffer.prototype.swap64=function swap64(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var h=0;h<t;h+=8)swap(this,h,h+7),swap(this,h+1,h+6),swap(this,h+2,h+5),swap(this,h+3,h+4);return this},Buffer.prototype.toString=function toString(){var t=this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function inspect(){var h="",p=t.INSPECT_MAX_BYTES;return h=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(h+=" ... "),"<Buffer "+h+">"},M&&(Buffer.prototype[M]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(t,h,p,x,M){if(isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof$2(t));if(void 0===h&&(h=0),void 0===p&&(p=t?t.length:0),void 0===x&&(x=0),void 0===M&&(M=this.length),h<0||p>t.length||x<0||M>this.length)throw new RangeError("out of range index");if(x>=M&&h>=p)return 0;if(x>=M)return-1;if(h>=p)return 1;if(this===t)return 0;for(var k=(M>>>=0)-(x>>>=0),I=(p>>>=0)-(h>>>=0),N=Math.min(k,I),V=this.slice(x,M),ee=t.slice(h,p),te=0;te<N;++te)if(V[te]!==ee[te]){k=V[te],I=ee[te];break}return k<I?-1:I<k?1:0},Buffer.prototype.includes=function includes(t,h,p){return-1!==this.indexOf(t,h,p)},Buffer.prototype.indexOf=function indexOf(t,h,p){return bidirectionalIndexOf(this,t,h,p,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(t,h,p){return bidirectionalIndexOf(this,t,h,p,!1)},Buffer.prototype.write=function write(t,h,p,x){if(void 0===h)x="utf8",p=this.length,h=0;else if(void 0===p&&"string"==typeof h)x=h,p=this.length,h=0;else{if(!isFinite(h))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");h>>>=0,isFinite(p)?(p>>>=0,void 0===x&&(x="utf8")):(x=p,p=void 0)}var M=this.length-h;if((void 0===p||p>M)&&(p=M),t.length>0&&(p<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");for(var k=!1;;)switch(x){case"hex":return hexWrite(this,t,h,p);case"utf8":case"utf-8":return utf8Write(this,t,h,p);case"ascii":case"latin1":case"binary":return asciiWrite(this,t,h,p);case"base64":return base64Write(this,t,h,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,h,p);default:if(k)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),k=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function asciiSlice(t,h,p){var x="";p=Math.min(t.length,p);for(var M=h;M<p;++M)x+=String.fromCharCode(127&t[M]);return x}function latin1Slice(t,h,p){var x="";p=Math.min(t.length,p);for(var M=h;M<p;++M)x+=String.fromCharCode(t[M]);return x}function hexSlice(t,h,p){var x=t.length;(!h||h<0)&&(h=0),(!p||p<0||p>x)&&(p=x);for(var M="",k=h;k<p;++k)M+=te[t[k]];return M}function utf16leSlice(t,h,p){for(var x=t.slice(h,p),M="",k=0;k<x.length-1;k+=2)M+=String.fromCharCode(x[k]+256*x[k+1]);return M}function checkOffset(t,h,p){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+h>p)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,h,p,x,M,k){if(!Buffer.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>M||h<k)throw new RangeError('"value" argument is out of bounds');if(p+x>t.length)throw new RangeError("Index out of range")}function wrtBigUInt64LE(t,h,p,x,M){checkIntBI(h,x,M,t,p,7);var k=Number(h&BigInt(4294967295));t[p++]=k,k>>=8,t[p++]=k,k>>=8,t[p++]=k,k>>=8,t[p++]=k;var I=Number(h>>BigInt(32)&BigInt(4294967295));return t[p++]=I,I>>=8,t[p++]=I,I>>=8,t[p++]=I,I>>=8,t[p++]=I,p}function wrtBigUInt64BE(t,h,p,x,M){checkIntBI(h,x,M,t,p,7);var k=Number(h&BigInt(4294967295));t[p+7]=k,k>>=8,t[p+6]=k,k>>=8,t[p+5]=k,k>>=8,t[p+4]=k;var I=Number(h>>BigInt(32)&BigInt(4294967295));return t[p+3]=I,I>>=8,t[p+2]=I,I>>=8,t[p+1]=I,I>>=8,t[p]=I,p+8}function checkIEEE754(t,h,p,x,M,k){if(p+x>t.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function writeFloat(t,h,x,M,k){return h=+h,x>>>=0,k||checkIEEE754(t,0,x,4),p.write(t,h,x,M,23,4),x+4}function writeDouble(t,h,x,M,k){return h=+h,x>>>=0,k||checkIEEE754(t,0,x,8),p.write(t,h,x,M,52,8),x+8}Buffer.prototype.slice=function slice(t,h){var p=this.length;(t=~~t)<0?(t+=p)<0&&(t=0):t>p&&(t=p),(h=void 0===h?p:~~h)<0?(h+=p)<0&&(h=0):h>p&&(h=p),h<t&&(h=t);var x=this.subarray(t,h);return Object.setPrototypeOf(x,Buffer.prototype),x},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(t,h,p){t>>>=0,h>>>=0,p||checkOffset(t,h,this.length);for(var x=this[t],M=1,k=0;++k<h&&(M*=256);)x+=this[t+k]*M;return x},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(t,h,p){t>>>=0,h>>>=0,p||checkOffset(t,h,this.length);for(var x=this[t+--h],M=1;h>0&&(M*=256);)x+=this[t+--h]*M;return x},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(t,h){return t>>>=0,h||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(t,h){return t>>>=0,h||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(t,h){return t>>>=0,h||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(t,h){return t>>>=0,h||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(t,h){return t>>>=0,h||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(t){validateNumber(t>>>=0,"offset");var h=this[t],p=this[t+7];void 0!==h&&void 0!==p||boundsError(t,this.length-8);var x=h+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),M=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+p*Math.pow(2,24);return BigInt(x)+(BigInt(M)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(t){validateNumber(t>>>=0,"offset");var h=this[t],p=this[t+7];void 0!==h&&void 0!==p||boundsError(t,this.length-8);var x=h*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],M=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+p;return(BigInt(x)<<BigInt(32))+BigInt(M)})),Buffer.prototype.readIntLE=function readIntLE(t,h,p){t>>>=0,h>>>=0,p||checkOffset(t,h,this.length);for(var x=this[t],M=1,k=0;++k<h&&(M*=256);)x+=this[t+k]*M;return x>=(M*=128)&&(x-=Math.pow(2,8*h)),x},Buffer.prototype.readIntBE=function readIntBE(t,h,p){t>>>=0,h>>>=0,p||checkOffset(t,h,this.length);for(var x=h,M=1,k=this[t+--x];x>0&&(M*=256);)k+=this[t+--x]*M;return k>=(M*=128)&&(k-=Math.pow(2,8*h)),k},Buffer.prototype.readInt8=function readInt8(t,h){return t>>>=0,h||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function readInt16LE(t,h){t>>>=0,h||checkOffset(t,2,this.length);var p=this[t]|this[t+1]<<8;return 32768&p?4294901760|p:p},Buffer.prototype.readInt16BE=function readInt16BE(t,h){t>>>=0,h||checkOffset(t,2,this.length);var p=this[t+1]|this[t]<<8;return 32768&p?4294901760|p:p},Buffer.prototype.readInt32LE=function readInt32LE(t,h){return t>>>=0,h||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(t,h){return t>>>=0,h||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(t){validateNumber(t>>>=0,"offset");var h=this[t],p=this[t+7];void 0!==h&&void 0!==p||boundsError(t,this.length-8);var x=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(p<<24);return(BigInt(x)<<BigInt(32))+BigInt(h+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(t){validateNumber(t>>>=0,"offset");var h=this[t],p=this[t+7];void 0!==h&&void 0!==p||boundsError(t,this.length-8);var x=(h<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(x)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+p)})),Buffer.prototype.readFloatLE=function readFloatLE(t,h){return t>>>=0,h||checkOffset(t,4,this.length),p.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(t,h){return t>>>=0,h||checkOffset(t,4,this.length),p.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(t,h){return t>>>=0,h||checkOffset(t,8,this.length),p.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(t,h){return t>>>=0,h||checkOffset(t,8,this.length),p.read(this,t,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(t,h,p,x){(t=+t,h>>>=0,p>>>=0,x)||checkInt(this,t,h,p,Math.pow(2,8*p)-1,0);var M=1,k=0;for(this[h]=255&t;++k<p&&(M*=256);)this[h+k]=t/M&255;return h+p},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(t,h,p,x){(t=+t,h>>>=0,p>>>=0,x)||checkInt(this,t,h,p,Math.pow(2,8*p)-1,0);var M=p-1,k=1;for(this[h+M]=255&t;--M>=0&&(k*=256);)this[h+M]=t/k&255;return h+p},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,1,255,0),this[h]=255&t,h+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,2,65535,0),this[h]=255&t,this[h+1]=t>>>8,h+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,2,65535,0),this[h]=t>>>8,this[h+1]=255&t,h+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,4,4294967295,0),this[h+3]=t>>>24,this[h+2]=t>>>16,this[h+1]=t>>>8,this[h]=255&t,h+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,4,4294967295,0),this[h]=t>>>24,this[h+1]=t>>>16,this[h+2]=t>>>8,this[h+3]=255&t,h+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(t){return wrtBigUInt64LE(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(t){return wrtBigUInt64BE(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeIntLE=function writeIntLE(t,h,p,x){if(t=+t,h>>>=0,!x){var M=Math.pow(2,8*p-1);checkInt(this,t,h,p,M-1,-M)}var k=0,I=1,N=0;for(this[h]=255&t;++k<p&&(I*=256);)t<0&&0===N&&0!==this[h+k-1]&&(N=1),this[h+k]=(t/I>>0)-N&255;return h+p},Buffer.prototype.writeIntBE=function writeIntBE(t,h,p,x){if(t=+t,h>>>=0,!x){var M=Math.pow(2,8*p-1);checkInt(this,t,h,p,M-1,-M)}var k=p-1,I=1,N=0;for(this[h+k]=255&t;--k>=0&&(I*=256);)t<0&&0===N&&0!==this[h+k+1]&&(N=1),this[h+k]=(t/I>>0)-N&255;return h+p},Buffer.prototype.writeInt8=function writeInt8(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,1,127,-128),t<0&&(t=255+t+1),this[h]=255&t,h+1},Buffer.prototype.writeInt16LE=function writeInt16LE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,2,32767,-32768),this[h]=255&t,this[h+1]=t>>>8,h+2},Buffer.prototype.writeInt16BE=function writeInt16BE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,2,32767,-32768),this[h]=t>>>8,this[h+1]=255&t,h+2},Buffer.prototype.writeInt32LE=function writeInt32LE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,4,2147483647,-2147483648),this[h]=255&t,this[h+1]=t>>>8,this[h+2]=t>>>16,this[h+3]=t>>>24,h+4},Buffer.prototype.writeInt32BE=function writeInt32BE(t,h,p){return t=+t,h>>>=0,p||checkInt(this,t,h,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[h]=t>>>24,this[h+1]=t>>>16,this[h+2]=t>>>8,this[h+3]=255&t,h+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(t){return wrtBigUInt64LE(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(t){return wrtBigUInt64BE(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(t,h,p){return writeFloat(this,t,h,!0,p)},Buffer.prototype.writeFloatBE=function writeFloatBE(t,h,p){return writeFloat(this,t,h,!1,p)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(t,h,p){return writeDouble(this,t,h,!0,p)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(t,h,p){return writeDouble(this,t,h,!1,p)},Buffer.prototype.copy=function copy(t,h,p,x){if(!Buffer.isBuffer(t))throw new TypeError("argument should be a Buffer");if(p||(p=0),x||0===x||(x=this.length),h>=t.length&&(h=t.length),h||(h=0),x>0&&x<p&&(x=p),x===p)return 0;if(0===t.length||0===this.length)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),t.length-h<x-p&&(x=t.length-h+p);var M=x-p;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(h,p,x):Uint8Array.prototype.set.call(t,this.subarray(p,x),h),M},Buffer.prototype.fill=function fill(t,h,p,x){if("string"==typeof t){if("string"==typeof h?(x=h,h=0,p=this.length):"string"==typeof p&&(x=p,p=this.length),void 0!==x&&"string"!=typeof x)throw new TypeError("encoding must be a string");if("string"==typeof x&&!Buffer.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(1===t.length){var M=t.charCodeAt(0);("utf8"===x&&M<128||"latin1"===x)&&(t=M)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(h<0||this.length<h||this.length<p)throw new RangeError("Out of range index");if(p<=h)return this;var k;if(h>>>=0,p=void 0===p?this.length:p>>>0,t||(t=0),"number"==typeof t)for(k=h;k<p;++k)this[k]=t;else{var I=Buffer.isBuffer(t)?t:Buffer.from(t,x),N=I.length;if(0===N)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(k=0;k<p-h;++k)this[k+h]=I[k%N]}return this};var N={};function E(t,h,p){N[t]=function(p){_inherits$1(NodeError,p);var x=_createSuper$e(NodeError);function NodeError(){var p;return _classCallCheck$1(this,NodeError),p=x.call(this),Object.defineProperty(_assertThisInitialized$1(p),"message",{value:h.apply(_assertThisInitialized$1(p),arguments),writable:!0,configurable:!0}),p.name="".concat(p.name," [").concat(t,"]"),p.stack,delete p.name,p}return _createClass$1(NodeError,[{key:"code",get:function get(){return t},set:function set(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function toString(){return"".concat(this.name," [").concat(t,"]: ").concat(this.message)}}]),NodeError}(p)}function addNumericalSeparator(t){for(var h="",p=t.length,x="-"===t[0]?1:0;p>=x+4;p-=3)h="_".concat(t.slice(p-3,p)).concat(h);return"".concat(t.slice(0,p)).concat(h)}function checkIntBI(t,h,p,x,M,k){if(t>p||t<h){var I,V="bigint"==typeof h?"n":"";throw I=k>3?0===h||h===BigInt(0)?">= 0".concat(V," and < 2").concat(V," ** ").concat(8*(k+1)).concat(V):">= -(2".concat(V," ** ").concat(8*(k+1)-1).concat(V,") and < 2 ** ")+"".concat(8*(k+1)-1).concat(V):">= ".concat(h).concat(V," and <= ").concat(p).concat(V),new N.ERR_OUT_OF_RANGE("value",I,t)}!function checkBounds(t,h,p){validateNumber(h,"offset"),void 0!==t[h]&&void 0!==t[h+p]||boundsError(h,t.length-(p+1))}(x,M,k)}function validateNumber(t,h){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(h,"number",t)}function boundsError(t,h,p){if(Math.floor(t)!==t)throw validateNumber(t,p),new N.ERR_OUT_OF_RANGE(p||"offset","an integer",t);if(h<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(p||"offset",">= ".concat(p?1:0," and <= ").concat(h),t)}E("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),E("ERR_INVALID_ARG_TYPE",(function(t,h){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(_typeof$2(h))}),TypeError),E("ERR_OUT_OF_RANGE",(function(t,h,p){var x='The value of "'.concat(t,'" is out of range.'),M=p;return Number.isInteger(p)&&Math.abs(p)>Math.pow(2,32)?M=addNumericalSeparator(String(p)):"bigint"==typeof p&&(M=String(p),(p>Math.pow(BigInt(2),BigInt(32))||p<-Math.pow(BigInt(2),BigInt(32)))&&(M=addNumericalSeparator(M)),M+="n"),x+=" It must be ".concat(h,". Received ").concat(M)}),RangeError);var V=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(t,h){var p;h=h||1/0;for(var x=t.length,M=null,k=[],I=0;I<x;++I){if((p=t.charCodeAt(I))>55295&&p<57344){if(!M){if(p>56319){(h-=3)>-1&&k.push(239,191,189);continue}if(I+1===x){(h-=3)>-1&&k.push(239,191,189);continue}M=p;continue}if(p<56320){(h-=3)>-1&&k.push(239,191,189),M=p;continue}p=65536+(M-55296<<10|p-56320)}else M&&(h-=3)>-1&&k.push(239,191,189);if(M=null,p<128){if((h-=1)<0)break;k.push(p)}else if(p<2048){if((h-=2)<0)break;k.push(p>>6|192,63&p|128)}else if(p<65536){if((h-=3)<0)break;k.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((h-=4)<0)break;k.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return k}function base64ToBytes(t){return h.toByteArray(function base64clean(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function blitBuffer(t,h,p,x){var M;for(M=0;M<x&&!(M+p>=h.length||M>=t.length);++M)h[M+p]=t[M];return M}function isInstance(t,h){return t instanceof h||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===h.name}function numberIsNaN(t){return t!=t}var te=function(){for(var t="0123456789abcdef",h=new Array(256),p=0;p<16;++p)for(var x=16*p,M=0;M<16;++M)h[x+M]=t[p]+t[M];return h}();function defineBigIntMethod(t){return"undefined"==typeof BigInt?BufferBigIntNotDefined:t}function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}}(p);var te={exports:{}},re={exports:{}};!function(t){function _typeof(h){return t.exports=_typeof="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.exports.__esModule=!0,t.exports.default=t.exports,_typeof(h)}t.exports=_typeof,t.exports.__esModule=!0,t.exports.default=t.exports}(re),function(t){var h=re.exports.default;function _regeneratorRuntime(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
t.exports=_regeneratorRuntime=function _regeneratorRuntime(){return x},t.exports.__esModule=!0,t.exports.default=t.exports;var p,x={},M=Object.prototype,k=M.hasOwnProperty,I=Object.defineProperty||function(t,h,p){t[h]=p.value},N="function"==typeof Symbol?Symbol:{},V=N.iterator||"@@iterator",ee=N.asyncIterator||"@@asyncIterator",te=N.toStringTag||"@@toStringTag";function define(t,h,p){return Object.defineProperty(t,h,{value:p,enumerable:!0,configurable:!0,writable:!0}),t[h]}try{define({},"")}catch(p){define=function define(t,h,p){return t[h]=p}}function wrap(t,h,p,x){var M=h&&h.prototype instanceof Generator?h:Generator,k=Object.create(M.prototype),N=new Context(x||[]);return I(k,"_invoke",{value:makeInvokeMethod(t,p,N)}),k}function tryCatch(t,h,p){try{return{type:"normal",arg:t.call(h,p)}}catch(t){return{type:"throw",arg:t}}}x.wrap=wrap;var re="suspendedStart",ne="suspendedYield",ie="executing",ae="completed",oe={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var se={};define(se,V,(function(){return this}));var ce=Object.getPrototypeOf,le=ce&&ce(ce(values([])));le&&le!==M&&k.call(le,V)&&(se=le);var ue=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(se);function defineIteratorMethods(t){["next","throw","return"].forEach((function(h){define(t,h,(function(t){return this._invoke(h,t)}))}))}function AsyncIterator(t,p){function invoke(x,M,I,N){var V=tryCatch(t[x],t,M);if("throw"!==V.type){var ee=V.arg,te=ee.value;return te&&"object"==h(te)&&k.call(te,"__await")?p.resolve(te.__await).then((function(t){invoke("next",t,I,N)}),(function(t){invoke("throw",t,I,N)})):p.resolve(te).then((function(t){ee.value=t,I(ee)}),(function(t){return invoke("throw",t,I,N)}))}N(V.arg)}var x;I(this,"_invoke",{value:function value(t,h){function callInvokeWithMethodAndArg(){return new p((function(p,x){invoke(t,h,p,x)}))}return x=x?x.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,h,x){var M=re;return function(k,I){if(M===ie)throw new Error("Generator is already running");if(M===ae){if("throw"===k)throw I;return{value:p,done:!0}}for(x.method=k,x.arg=I;;){var N=x.delegate;if(N){var V=maybeInvokeDelegate(N,x);if(V){if(V===oe)continue;return V}}if("next"===x.method)x.sent=x._sent=x.arg;else if("throw"===x.method){if(M===re)throw M=ae,x.arg;x.dispatchException(x.arg)}else"return"===x.method&&x.abrupt("return",x.arg);M=ie;var ee=tryCatch(t,h,x);if("normal"===ee.type){if(M=x.done?ae:ne,ee.arg===oe)continue;return{value:ee.arg,done:x.done}}"throw"===ee.type&&(M=ae,x.method="throw",x.arg=ee.arg)}}}function maybeInvokeDelegate(t,h){var x=h.method,M=t.iterator[x];if(M===p)return h.delegate=null,"throw"===x&&t.iterator.return&&(h.method="return",h.arg=p,maybeInvokeDelegate(t,h),"throw"===h.method)||"return"!==x&&(h.method="throw",h.arg=new TypeError("The iterator does not provide a '"+x+"' method")),oe;var k=tryCatch(M,t.iterator,h.arg);if("throw"===k.type)return h.method="throw",h.arg=k.arg,h.delegate=null,oe;var I=k.arg;return I?I.done?(h[t.resultName]=I.value,h.next=t.nextLoc,"return"!==h.method&&(h.method="next",h.arg=p),h.delegate=null,oe):I:(h.method="throw",h.arg=new TypeError("iterator result is not an object"),h.delegate=null,oe)}function pushTryEntry(t){var h={tryLoc:t[0]};1 in t&&(h.catchLoc=t[1]),2 in t&&(h.finallyLoc=t[2],h.afterLoc=t[3]),this.tryEntries.push(h)}function resetTryEntry(t){var h=t.completion||{};h.type="normal",delete h.arg,t.completion=h}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var x=t[V];if(x)return x.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var M=-1,I=function next(){for(;++M<t.length;)if(k.call(t,M))return next.value=t[M],next.done=!1,next;return next.value=p,next.done=!0,next};return I.next=I}}throw new TypeError(h(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,I(ue,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),I(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,te,"GeneratorFunction"),x.isGeneratorFunction=function(t){var h="function"==typeof t&&t.constructor;return!!h&&(h===GeneratorFunction||"GeneratorFunction"===(h.displayName||h.name))},x.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,te,"GeneratorFunction")),t.prototype=Object.create(ue),t},x.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,ee,(function(){return this})),x.AsyncIterator=AsyncIterator,x.async=function(t,h,p,M,k){void 0===k&&(k=Promise);var I=new AsyncIterator(wrap(t,h,p,M),k);return x.isGeneratorFunction(h)?I:I.next().then((function(t){return t.done?t.value:I.next()}))},defineIteratorMethods(ue),define(ue,te,"Generator"),define(ue,V,(function(){return this})),define(ue,"toString",(function(){return"[object Generator]"})),x.keys=function(t){var h=Object(t),p=[];for(var x in h)p.push(x);return p.reverse(),function next(){for(;p.length;){var t=p.pop();if(t in h)return next.value=t,next.done=!1,next}return next.done=!0,next}},x.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method="next",this.arg=p,this.tryEntries.forEach(resetTryEntry),!t)for(var h in this)"t"===h.charAt(0)&&k.call(this,h)&&!isNaN(+h.slice(1))&&(this[h]=p)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var h=this;function handle(x,M){return I.type="throw",I.arg=t,h.next=x,M&&(h.method="next",h.arg=p),!!M}for(var x=this.tryEntries.length-1;x>=0;--x){var M=this.tryEntries[x],I=M.completion;if("root"===M.tryLoc)return handle("end");if(M.tryLoc<=this.prev){var N=k.call(M,"catchLoc"),V=k.call(M,"finallyLoc");if(N&&V){if(this.prev<M.catchLoc)return handle(M.catchLoc,!0);if(this.prev<M.finallyLoc)return handle(M.finallyLoc)}else if(N){if(this.prev<M.catchLoc)return handle(M.catchLoc,!0)}else{if(!V)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return handle(M.finallyLoc)}}}},abrupt:function abrupt(t,h){for(var p=this.tryEntries.length-1;p>=0;--p){var x=this.tryEntries[p];if(x.tryLoc<=this.prev&&k.call(x,"finallyLoc")&&this.prev<x.finallyLoc){var M=x;break}}M&&("break"===t||"continue"===t)&&M.tryLoc<=h&&h<=M.finallyLoc&&(M=null);var I=M?M.completion:{};return I.type=t,I.arg=h,M?(this.method="next",this.next=M.finallyLoc,oe):this.complete(I)},complete:function complete(t,h){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&h&&(this.next=h),oe},finish:function finish(t){for(var h=this.tryEntries.length-1;h>=0;--h){var p=this.tryEntries[h];if(p.finallyLoc===t)return this.complete(p.completion,p.afterLoc),resetTryEntry(p),oe}},catch:function _catch(t){for(var h=this.tryEntries.length-1;h>=0;--h){var p=this.tryEntries[h];if(p.tryLoc===t){var x=p.completion;if("throw"===x.type){var M=x.arg;resetTryEntry(p)}return M}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,h,x){return this.delegate={iterator:values(t),resultName:h,nextLoc:x},"next"===this.method&&(this.arg=p),oe}},x}t.exports=_regeneratorRuntime,t.exports.__esModule=!0,t.exports.default=t.exports}(te);var ne=te.exports(),ie=ne;try{regeneratorRuntime=ne}catch(Tm){"object"===("undefined"==typeof globalThis?"undefined":_typeof$2(globalThis))?globalThis.regeneratorRuntime=ne:Function("r","regeneratorRuntime = r")(ne)}function b64Encode(t){return btoa(unescape(encodeURIComponent(t)))}function b64Decode(t){return decodeURIComponent(escape(atob(t)))}function crateHexString(t){return Array.from((new TextEncoder).encode(t)).map((function(t){return t.toString(16).padStart(2,"0")})).join("")}function saveAsFileDialog(t){return _saveAsFileDialog.apply(this,arguments)}function _saveAsFileDialog(){return(_saveAsFileDialog=_asyncToGenerator(ie.mark((function _callee3(t){var h,p,x,M,k,I,N,V,ee,te,re;return ie.wrap((function _callee3$(ne){for(;;)switch(ne.prev=ne.next){case 0:if(h=t.blob,p=t.filename,x=void 0===p?"":p,M=t.types,k=void 0===M?[{description:"mxweb File",accept:{"application/octet-stream":[".mxweb"]}}]:M,ne.prev=1,!window.showSaveFilePicker){ne.next=28;break}if(null===(N=window.navigator)||void 0===N||null===(V=N.userActivation)||void 0===V||!V.isActive){ne.next=27;break}if(ne.prev=4,window.showSaveFilePicker){ne.next=7;break}return ne.abrupt("return");case 7:return ne.next=9,window.showSaveFilePicker({suggestedName:x,types:k});case 9:return ee=ne.sent,ne.next=12,ee.createWritable();case 12:return te=ne.sent,ne.next=15,te.write(h);case 15:return ne.next=17,te.close();case 17:return ne.abrupt("return",ee);case 20:if(ne.prev=20,ne.t0=ne.catch(4),"AbortError"!==(null===ne.t0||void 0===ne.t0?void 0:ne.t0.name)){ne.next=24;break}return ne.abrupt("return");case 24:case 25:ne.next=28;break;case 27:case 28:if(null===(I=window.navigator)||void 0===I||!I.msSaveOrOpenBlob){ne.next=31;break}return window.navigator.msSaveOrOpenBlob(h,x),ne.abrupt("return");case 31:(re=document.createElement("a")).href=window.URL.createObjectURL(h),re.download=x,re.style.display="none",document.body.appendChild(re),re.click(),document.body.removeChild(re),"function"==typeof window.URL.revokeObjectURL?window.URL.revokeObjectURL(re.href):void 0!==window.webkitURL&&"function"==typeof window.webkitURL.revokeObjectURL?window.webkitURL.revokeObjectURL(re.href):window.URL.revokeObjectURL(re.href),ne.next=44;break;case 41:ne.prev=41,ne.t1=ne.catch(1);case 44:case"end":return ne.stop()}}),_callee3,null,[[1,41],[4,20]])})))).apply(this,arguments)}function downloadFile(t,h){var p=document.createElement("a");p.href=window.URL.createObjectURL(t),p.download=h,p.click()}function downloadFileFromUrl(t,h){fetch(t).then((function(t){return t.blob()})).then((function(t){var p=document.createElement("a");p.href=window.URL.createObjectURL(t),p.download=h,p.click()}))}var ae=function(){var t=_asyncToGenerator(ie.mark((function _callee(t){return ie.wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:return h.prev=0,h.next=3,fetch(t);case 3:return h.next=5,h.sent.json();case 5:return h.abrupt("return",h.sent);case 8:h.prev=8,h.t0=h.catch(0);case 11:case"end":return h.stop()}}),_callee,null,[[0,8]])})));return function getJsonFromUrl(h){return t.apply(this,arguments)}}(),oe=function(){var t=_asyncToGenerator(ie.mark((function _callee2(t){return ie.wrap((function _callee2$(h){for(;;)switch(h.prev=h.next){case 0:return h.prev=0,h.next=3,fetch(t);case 3:return h.abrupt("return",h.sent);case 6:h.prev=6,h.t0=h.catch(0);case 9:case"end":return h.stop()}}),_callee2,null,[[0,6]])})));return function getFileFromUrl(h){return t.apply(this,arguments)}}();function _ML_String(t,p){return h.MxFun.getLanguageString(t,p)}function IsZero(t){return Math.abs(t)<1e-7}function postMemoryFile(t,h,p,x,M){try{var k=new FormData,I=new Blob([t],{type:"application/octet-stream"});k.append("file",new File([I],p)),M&&k.append("param",M);var N=new XMLHttpRequest;N.open("POST",h),N.send(k),N.onreadystatechange=function(){N.readyState===XMLHttpRequest.DONE&&(200===N.status?x(0,N.responseText):x(4,"server error"))}}catch(V){x(-1,"catch error")}}function postEmscriptenIndexedDBFile(t,h,p,x){var M=window.indexedDB.open("emscripten_filesystem",1);M.onerror=function(){p(1,"open emscripten_filesystem failed")},M.onsuccess=function(M){try{if(null!=M.target){var k=M.target.result.transaction("FILES","readonly").objectStore("FILES").get(t);k.onerror=function(){p(3,"get file error")},k.onsuccess=function(){var t=k.result;if(t){var M=new FormData;M.append("file",t),x&&M.append("param",x);var I=new XMLHttpRequest;I.open("POST",h),I.send(M),I.onreadystatechange=function(){I.readyState===XMLHttpRequest.DONE&&(200===I.status?p(0,I.responseText):p(4,"server error"))}}else p(5,"get file data error")}}else p(2,"event.target == null")}catch(I){p(-1,"catch error")}}}function createCursorHelp(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,p=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],x=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document.createElement("canvas"),k=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"transparent";M.width=M.height=t,M.style.background=k;var I=M.getContext("2d"),N=t%2==0?-.5:0,V=h%2==0?-.5:0;return I.strokeStyle=x,I.lineWidth=0,I.imageSmoothingEnabled=!1,p&&(I.beginPath(),I.moveTo(M.width/2+N,N),I.lineTo(M.width/2+N,M.height+N),I.stroke(),I.beginPath(),I.moveTo(N,M.height/2+N),I.lineTo(M.width+N,M.height/2+N),I.stroke()),I.beginPath(),I.strokeRect(t/2-h/2+V,t/2-h/2+V,h,h),I.stroke(),M.toDataURL("image/png")}function createCursor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#ffffff";return{Rect:"url('".concat(createCursorHelp(t,h,!1,p),"') ").concat(t/2," ").concat(t/2,", auto"),Cross:"url('".concat(createCursorHelp(t,0,!0,p),"') ").concat(t/2," ").concat(t/2," , auto"),Normal:"url('".concat(createCursorHelp(t,h,!0,p),"') ").concat(t/2," ").concat(t/2,", auto")}}var se={b64Encode:b64Encode,b64Decode:b64Decode,saveAsFileDialog:saveAsFileDialog,downloadFile:downloadFile,downloadFileFromUrl:downloadFileFromUrl,getJsonFromUrl:ae,getFileFromUrl:oe,_ML_String:_ML_String,IsZero:IsZero,postEmscriptenIndexedDBFile:postEmscriptenIndexedDBFile,postMemoryFile:postMemoryF