ocrcc-chatbox/dist/component.js

36 lines
1.5 MiB
JavaScript
Raw Normal View History

module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=157)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){var r=n(11),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";var r=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.logger=void 0;var i=r(n(262));const o=i.default.getLogger("matrix");t.logger=o,o.setLevel(i.default.levels.DEBUG)},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(86);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=e[s]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";var r=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.encodeParams=function(e){let t="";for(const n in e)e.hasOwnProperty(n)&&(t+="&"+encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.substring(1)},t.encodeUri=function(e,t){for(const n in t)t.hasOwnProperty(n)&&(e=e.replace(n,encodeURIComponent(t[n])));return e},t.map=function(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=t(e[r]);return n},t.filter=function(e,t){const n=[];for(let r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n},t.keys=function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(n);return t},t.values=function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},t.forEach=function(e,t){for(let n=0;n<e.length;n++)t(e[n],n)},t.findElement=
2020-10-15 15:40:12 +00:00
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
2022-04-21 14:56:42 +00:00
var r=n(171),i=n(172),o=n(87);function s(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=f.prototype:(null===e&&(e=new f(t)),e.length=t),e}function f(e,t,n){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);f.TYPED_ARRAY_SUPPORT?(e=t).__proto__=f.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!f.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(f.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(u(t),e=a(e,t<0?0:0|h(t)),!f.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,s=1,a=e.length,f=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())|
2020-10-15 15:40:12 +00:00
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
2020-10-20 23:29:12 +00:00
*/function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var s=n(36),a=Object.prototype.hasOwnProperty,f=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var d=e.exports=y,h=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(s.isFunction(e)){if(c)return e.name;var t=e.toString().match(h);return t&&t[1]}}function g(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(c||!s.isFunction(e))return s.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function _(e,t,n,r,i){throw new d.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function y(e,t){e||_(e,!0,t,"==",d.ok)}function b(e,t,n,r){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(s.isDate(e)&&s.isDate(t))return e.getTime()===t.getTime();if(s.isRegExp(e)&&s.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var a=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==a&&a===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(s.isPrimitive(e)||s.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),o=v(t);if(i&&!o||!i&&o)return!1;if(i)return e=f.call(e),t=f.call(t),b(e,t,n);var a,c,u=E(e),l=E(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),c=u.length-1;c>=0;c--)if(u[c]!==l[c])return!1;for(c=u.length-1;c>=0;c--)if(a=u[c],!b(e[a],t[a],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function A(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&_(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!e&&i&&!n;if((!e&&s.isError(i)&&o&&A(i,n)||a)&&_(i,n,"Got unwanted exception"+r),e&&i&&n&&!A(i,n)||!e&&i)throw i}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(m(e.actual),128)+" "+e.operator+" "+g(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||_;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},s.inherits(d.AssertionError,Error),d.fail=_,d.ok=y,d.equal=function(e,t,n){e!=t&&_(e,t,n,"==",d.equal)},d.notEqual=function(e,t,n){e==t&&_(e,t,n,"!=",d.notEqual)},d.deepEqual=function(e,t,n){b(e,t,!1)||_(e,t,n,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,n){b(e,t,!0)||_(e,t,n,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,n){b(e,t,!1)&&_(e,t,n,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&_(t,n,r,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,n){e!==t&&_(e,t,n,"===",d.strictEqual)},d.notStrictEqual=function(e,t,n){e===t&&_(e,t,n,"!=="
2020-10-15 16:24:59 +00:00
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,f=s(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(f[u]=n[u]);if(r){a=r(n);for(var l=0;l<a.length;l++)o.call(n,a[l])&&(f[a[l]]=n[a[l]])}}return f}},function(e,t,n){t.asyncMap=n(192),t.bindActor=n(92),t.chain=n(193)},function(e,t,n){(function(t){e.exports=function(){var e=Array.prototype.slice.call(arguments),n=e.shift()||[],r=e.pop();if("function"!=typeof r)throw new Error("No callback provided to asyncMap");if(!n)return r(null,[]);Array.isArray(n)||(n=[n]);var i=e.length,o=[],s=null,a=n.length,f=a*i;if(!f)return r(null,[]);function c(u){u&&!s&&(s=u);for(var l=arguments.length,d=1;d<l;d++)void 0!==arguments[d]&&(o[d-1]=(o[d-1]||[]).concat(arguments[d]));if(n.length>a){var h=n.slice(a);f+=(n.length-a)*i,a=n.length,t.nextTick((function(){h.forEach((function(t){e.forEach((function(e){e(t,c)}))}))}))}0==--f&&r.apply(null,[s].concat(o))}n.forEach((function(t){e.forEach((function(e){e(t,c)}))}))}}).call(this,n(13))},function(e,t,n){e.exports=i;var r=n(92);function i(e,t){var n=[];!function o(s,a){return s>=a?t(null,n):(Array.isArray(e[s])&&(e[s]=r.apply(null,e[s].map((function(e){return e===i.first?n[0]:e===i.last?n[n.length-1]:e})))),e[s]?void e[s]((function(e,r){if(e)return t(e,n);void 0!==r&&(n=n.concat(r)),o(s+1,a)})):o(s+1,a))}(0,e.length)}i.first={},i.last={}},function(e,t,n){
2020-10-15 15:40:12 +00:00
/**
* @preserve
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
*
* @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
* @see http://github.com/homebrewing/brauhaus-diff
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
* @see http://github.com/garycourt/murmurhash-js
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
* @see http://sites.google.com/site/murmurhash/
*/
!function(){var t;function n(e,r){var i=this instanceof n?this:t;if(i.reset(r),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}n.prototype.hash=function(e){var t,n,r,i,o;switch(o=e.length,this.len+=o,n=this.k1,r=0,this.rem){case 0:n^=o>r?65535&e.charCodeAt(r++):0;case 1:n^=o>r?(65535&e.charCodeAt(r++))<<8:0;case 2:n^=o>r?(65535&e.charCodeAt(r++))<<16:0;case 3:n^=o>r?(255&e.charCodeAt(r))<<24:0,n^=o>r?(65280&e.charCodeAt(r++))>>8:0}if(this.rem=o+this.rem&3,(o-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=n=13715*(n=(n=11601*n+3432906752*(65535&n)&4294967295)<<15|n>>>17)+461832192*(65535&n)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(r>=o);)n=65535&e.charCodeAt(r++)^(65535&e.charCodeAt(r++))<<8^(65535&e.charCodeAt(r++))<<16,n^=(255&(i=e.charCodeAt(r++)))<<24^(65280&i)>>8;switch(n=0,this.rem){case 3:n^=(65535&e.charCodeAt(r+2))<<16;case 2:n^=(65535&e.charCodeAt(r+1))<<8;case 1:n^=65535&e.charCodeAt(r)}this.h1=t}return this.k1=n,this},n.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},n.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new n,e.exports=n}()},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(22),t.createHash=t.Hash=n(27),t.createHmac=t.Hmac=n(96);var r=n(201),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=n(99);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=n(203);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var f=n(218);t.DiffieHellmanGroup=f.DiffieHellmanGroup,t.createDiffieHellmanGroup=f.createDiffieHellmanGroup,t.getDiffieHellman=f.getDiffieHellman,t.createDiffieHellman=f.createDiffieHellman,t.DiffieHellman=f.DiffieHellman;var c=n(223);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=n(257);var u=n(258);t.publicEncrypt=u.publicEncrypt,t.privateEncrypt=u.privateEncrypt,t.publicDecrypt=u.publicDecrypt,t.privateDecrypt=u.privateDecrypt;var l=n(261);t.randomFill=l.randomFill,t.randomFillSync=l.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,n){var r=n(2),i=n(23),o=n(3).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function f(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}r(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,f=0|this._e,l=0;l<16;++l)n[l]=e.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=r)<<5|t>>>27)+u(h,i,o,a)+f+n[d]+s[h];f=a,a=o,o=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt3
2020-10-15 15:40:12 +00:00
/*!
* content-type
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,i=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,s=/\\([\u000b\u0020-\u00ff])/g,a=/([\\"])/g,f=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function c(e){var t=String(e);if(o.test(t))return t;if(t.length>0&&!i.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(a,"\\$1")+'"'}function u(e){this.parameters=Object.create(null),this.type=e}t.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,n=e.type;if(!n||!f.test(n))throw new TypeError("invalid type");var r=n;if(t&&"object"==typeof t)for(var i,s=Object.keys(t).sort(),a=0;a<s.length;a++){if(i=s[a],!o.test(i))throw new TypeError("invalid parameter name");r+="; "+i+"="+c(t[i])}return r},t.parse=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),i=-1!==n?t.substr(0,n).trim():t.trim();if(!f.test(i))throw new TypeError("invalid media type");var o=new u(i.toLowerCase());if(-1!==n){var a,c,l;for(r.lastIndex=n;c=r.exec(t);){if(c.index!==n)throw new TypeError("invalid parameter format");n+=c[0].length,a=c[1].toLowerCase(),'"'===(l=c[2])[0]&&(l=l.substr(1,l.length-2).replace(s,"$1")),o.parameters[a]=l}if(n!==t.length)throw new TypeError("invalid parameter format")}return o}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.setNow=function(e){a=e||Date.now},t.setTimeout=function(e,t){(t=t||0)<0&&(t=0);const n=Array.prototype.slice.call(arguments,2),r=a()+t,i=o++;const c={runAt:r,func:e,params:n,key:i},l=u(s,(function(e){return e.runAt-r}));return s.splice(l,0,c),f(),i},t.clearTimeout=function(e){if(0===s.length)return;let t;for(t=0;t<s.length;t++){if(s[t].key==e){s.splice(t,1);break}}0===t&&f()};var r=n(4);let i,o=0;const s=[];let a=Date.now;function f(){i&&e.clearTimeout(i);const t=s[0];if(!t)return;const n=a(),r=Math.min(t.runAt-n,1e3);i=e.setTimeout(c,r)}function c(){let t;const n=a(),i=[];for(;;){const e=s[0];if(!e||e.runAt>n)break;t=s.shift(),t.key,i.push(t)}f();for(let n=0;n<i.length;n++){t=i[n];try{t.func.apply(e,t.params)}catch(e){r.logger.error("Uncaught exception in callback function",e.stack||e)}}}function u(e,t){let n=0,r=e.length;for(;n<r;){const i=n+r>>1;t(e[i])>0?r=i:n=i+1}return n}}).call(this,n(6))},function(e,t,n){"use strict";function r(e){this.filter_json=e,this.types=e.types||null,this.not_types=e.not_types||[],this.rooms=e.rooms||null,this.not_rooms=e.not_rooms||[],this.senders=e.senders||null,this.not_senders=e.not_senders||[],this.contains_url=e.contains_url||null}Object.defineProperty(t,"__esModule",{value:!0}),t.FilterComponent=r,r.prototype.check=function(e){return this._checkFields(e.getRoomId(),e.getSender(),e.getType(),!!e.getContent()&&void 0!==e.getContent().url)},r.prototype._checkFields=function(e,t,n,r){const i={rooms:function(t){return e===t},senders:function(e){return t===e},types:function(e){return function(e,t){if(t.endsWith("*")){const n=t.slice(0,-1);return e.substr(0,n.length)===n}return e===t}(n,e)}},o=this;for(let e=0;e<Object.keys(i).length;e++){const t=Object.keys(i)[e],n=i[t];if(o["not_"+t].filter(n).length>0)return!1;const r=o[t];if(r&&!r.map(n))return!1}const s=this.filter_json.contains_url;return void 0===s||s===r},r.prototype.filter=function(e){return e.filter(this.check,this)},r.prototype.limit=function(){return void 0!==this.filter_json.limit?this.filter_json.limit:10}},function(e,t,n){"use strict";(function(e){var r=n(7);Object.defineProperty(t,"__esModule",{value:!0}),t.SyncApi=g;var i=n(44),o=n(12