UNPKG

starklink

Version:

> A library of react components for Follow or chat on Web3MQ

11 lines 387 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@web3mq/client"),n=require("react-dom"),r=require("@babel/runtime/helpers/extends");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(e),i=a(t),o=a(n),c=a(r);function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function u(e,t){return e(t={exports:{}},t.exports),t.exports}var A=s(u((function(e){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},e.exports.__esModule=!0,e.exports.default=e.exports}))),d=s(u((function(e){function t(e,t,n,r,a,l,i){try{var o=e[l](i),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,a)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(a,l){var i=e.apply(n,r);function o(e){t(i,a,l,o,c,"next",e)}function c(e){t(i,a,l,o,c,"throw",e)}o(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports}))),f=u((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}));s(f);var m=u((function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l=[],i=!0,o=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(o)throw a}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports}));s(m);var p=u((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports}));s(p);var g=u((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}));s(g);var v=u((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}));s(v);var E=s(u((function(e){e.exports=function(e,t){return f(e)||m(e,t)||g(e,t)||v()},e.exports.__esModule=!0,e.exports.default=e.exports}))),h=u((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));s(h);var C=u((function(e){var t=h.default;function n(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},a=Object.prototype,l=a.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function A(e,t,n,r){var a=t&&t.prototype instanceof m?t:m,l=Object.create(a.prototype),i=new b(r||[]);return l._invoke=function(e,t,n){var r="suspendedStart";return function(a,l){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw l;return L()}for(n.method=a,n.arg=l;;){var i=n.delegate;if(i){var o=w(i,n);if(o){if(o===f)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,i),l}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=A;var f={};function m(){}function p(){}function g(){}var v={};u(v,o,(function(){return this}));var E=Object.getPrototypeOf,h=E&&E(E(B([])));h&&h!==a&&l.call(h,o)&&(v=h);var C=g.prototype=m.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,n){function r(a,i,o,c){var s=d(e[a],e,i);if("throw"!==s.type){var u=s.arg,A=u.value;return A&&"object"==t(A)&&l.call(A,"__await")?n.resolve(A.__await).then((function(e){r("next",e,o,c)}),(function(e){r("throw",e,o,c)})):n.resolve(A).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,c)}))}c(s.arg)}var a;this._invoke=function(e,t){function l(){return new n((function(n,a){r(e,t,n,a)}))}return a=a?a.then(l,l):l()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function B(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=g,u(C,"constructor",g),u(g,"constructor",p),p.displayName=u(g,s,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(C),e},r.awrap=function(e){return{__await:e}},y(x.prototype),u(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,a,l){void 0===l&&(l=Promise);var i=new x(A(e,t,n,a),l);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(C),u(C,s,"Generator"),u(C,o,(function(){return this})),u(C,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},r.values=B,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=l.call(a,"catchLoc"),c=l.call(a,"finallyLoc");if(o&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;k(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:B(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}));s(C);var y=C(),x=y;try{regeneratorRuntime=y}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=y:Function("r","regeneratorRuntime = r")(y)}var w=u((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l.default,r=i.default,a=o.default,s=c.default;function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=u(n),d=u(a),f=u(s);function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e,t){return e(t={exports:{}},t.exports),t.exports}var g=m(p((function(e){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},e.exports.__esModule=!0,e.exports.default=e.exports}))),v=p((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports}));m(v);var E=p((function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,l=[],i=!0,o=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(o)throw a}}return l}},e.exports.__esModule=!0,e.exports.default=e.exports}));m(E);var h=p((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports}));m(h);var C=p((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}));m(C);var y=p((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}));m(y);var x,w=m(p((function(e){e.exports=function(e,t){return v(e)||E(e,t)||C(e,t)||y()},e.exports.__esModule=!0,e.exports.default=e.exports}))),I=p((function(e){ /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var l=typeof a;if("string"===l||"number"===l)e.push(a);else if(Array.isArray(a)){if(a.length){var i=n.apply(null,a);i&&e.push(i)}}else if("object"===l)if(a.toString===Object.prototype.toString)for(var o in a)t.call(a,o)&&a[o]&&e.push(o);else e.push(a.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}));t.AppTypeEnum=void 0,(x=t.AppTypeEnum||(t.AppTypeEnum={})).pc="pc",x.h5="h5",x.mobile="mobile";var k=A.default.createContext(void 0),b=function(e){var t=e.children,n=e.value;return A.default.createElement(k.Provider,{value:n},t)},B=function(e){return n.useContext(k)||(console.warn("The useChatContext hook was called outside of the ChatContext provider. Make sure this hook is called within a child of the Chat component. The errored call is located in the ".concat(e," component.")),{})},L=m(p((function(e){function t(e,t,n,r,a,l,i){try{var o=e[l](i),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,a)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(a,l){var i=e.apply(n,r);function o(e){t(i,a,l,o,c,"next",e)}function c(e){t(i,a,l,o,c,"throw",e)}o(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports}))),S=p((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),R=m(S),M=p((function(e){var t=S.default;function n(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},a=Object.prototype,l=a.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function A(e,t,n,r){var a=t&&t.prototype instanceof m?t:m,l=Object.create(a.prototype),i=new b(r||[]);return l._invoke=function(e,t,n){var r="suspendedStart";return function(a,l){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw l;return{value:void 0,done:!0}}for(n.method=a,n.arg=l;;){var i=n.delegate;if(i){var o=w(i,n);if(o){if(o===f)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=d(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,i),l}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=A;var f={};function m(){}function p(){}function g(){}var v={};u(v,o,(function(){return this}));var E=Object.getPrototypeOf,h=E&&E(E(B([])));h&&h!==a&&l.call(h,o)&&(v=h);var C=g.prototype=m.prototype=Object.create(v);function y(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,n){function r(a,i,o,c){var s=d(e[a],e,i);if("throw"!==s.type){var u=s.arg,A=u.value;return A&&"object"==t(A)&&l.call(A,"__await")?n.resolve(A.__await).then((function(e){r("next",e,o,c)}),(function(e){r("throw",e,o,c)})):n.resolve(A).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,c)}))}c(s.arg)}var a;this._invoke=function(e,t){function l(){return new n((function(n,a){r(e,t,n,a)}))}return a=a?a.then(l,l):l()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function B(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=g,u(C,"constructor",g),u(g,"constructor",p),p.displayName=u(g,s,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(C),e},r.awrap=function(e){return{__await:e}},y(x.prototype),u(x.prototype,c,(function(){return this})),r.AsyncIterator=x,r.async=function(e,t,n,a,l){void 0===l&&(l=Promise);var i=new x(A(e,t,n,a),l);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(C),u(C,s,"Generator"),u(C,o,(function(){return this})),u(C,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},r.values=B,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var o=l.call(a,"catchLoc"),c=l.call(a,"finallyLoc");if(o&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;k(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:B(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}));m(M);var N=M(),T=N;try{regeneratorRuntime=N}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=N:Function("r","regeneratorRuntime = r")(N)}var Q=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then};let P;const O=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];var V=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},j=function(e){return O[e]},J=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},D=function(){return void 0!==P},K=function(e){return P(e)},H=p((function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&void 0!==e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(e){return n}}}));function W(){this.buffer=[],this.length=0}H.L,H.M,H.Q,H.H,H.isValid,W.prototype={get:function(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var F=W;function U(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}U.prototype.set=function(e,t,n,r){const a=e*this.size+t;this.data[a]=n,r&&(this.reservedBit[a]=!0)},U.prototype.get=function(e,t){return this.data[e*this.size+t]},U.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},U.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Z=U,q=p((function(e,t){const n=V;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,r=n(e),a=145===r?26:2*Math.ceil((r-13)/(2*t-2)),l=[r-7];for(let e=1;e<t-1;e++)l[e]=l[e-1]-a;return l.push(6),l.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),a=r.length;for(let e=0;e<a;e++)for(let t=0;t<a;t++)0===e&&0===t||0===e&&t===a-1||e===a-1&&0===t||n.push([r[e],r[t]]);return n}}));q.getRowColCoords,q.getPositions;const X=V;var Y=p((function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function n(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return r%3==0;case t.Patterns.PATTERN011:return(n+r)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case t.Patterns.PATTERN101:return n*r%2+n*r%3==0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let n=0,r=0,a=0,l=null,i=null;for(let o=0;o<t;o++){r=a=0,l=i=null;for(let c=0;c<t;c++){let t=e.get(o,c);t===l?r++:(r>=5&&(n+=r-5+3),l=t,r=1),t=e.get(c,o),t===i?a++:(a>=5&&(n+=a-5+3),i=t,a=1)}r>=5&&(n+=r-5+3),a>=5&&(n+=a-5+3)}return n},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let a=0;a<t-1;a++){const t=e.get(r,a)+e.get(r,a+1)+e.get(r+1,a)+e.get(r+1,a+1);4!==t&&0!==t||n++}return 3*n},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,a=0;for(let l=0;l<t;l++){r=a=0;for(let i=0;i<t;i++)r=r<<1&2047|e.get(l,i),i>=10&&(1488===r||93===r)&&n++,a=a<<1&2047|e.get(i,l),i>=10&&(1488===a||93===a)&&n++}return 40*n},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return 10*Math.abs(Math.ceil(100*t/n/5)-10)},t.applyMask=function(e,t){const r=t.size;for(let a=0;a<r;a++)for(let l=0;l<r;l++)t.isReserved(l,a)||t.xor(l,a,n(e,l,a))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let a=0,l=1/0;for(let i=0;i<r;i++){n(i),t.applyMask(i,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(i,e),r<l&&(l=r,a=i)}return a}}));Y.Patterns,Y.isValid,Y.getPenaltyN1,Y.getPenaltyN2,Y.getPenaltyN3,Y.getPenaltyN4,Y.applyMask,Y.getBestMask;const G=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],z=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];var _=function(e,t){switch(t){case H.L:return z[4*(e-1)+0];case H.M:return z[4*(e-1)+1];case H.Q:return z[4*(e-1)+2];case H.H:return z[4*(e-1)+3];default:return}};const $=new Uint8Array(512),ee=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)$[t]=e,ee[e]=t,e<<=1,256&e&&(e^=285);for(let e=255;e<512;e++)$[e]=$[e-255]}();var te=function(e){return $[e]},ne=function(e,t){return 0===e||0===t?0:$[ee[e]+ee[t]]},re=p((function(e,t){t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let r=0;r<e.length;r++)for(let a=0;a<t.length;a++)n[r+a]^=ne(e[r],t[a]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let r=0;r<t.length;r++)n[r]^=ne(t[r],e);let r=0;for(;r<n.length&&0===n[r];)r++;n=n.slice(r)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let r=0;r<e;r++)n=t.mul(n,new Uint8Array([1,te(r)]));return n}}));function ae(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}re.mul,re.mod,re.generateECPolynomial,ae.prototype.initialize=function(e){this.degree=e,this.genPoly=re.generateECPolynomial(this.degree)},ae.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=re.mod(t,this.genPoly),r=this.degree-n.length;if(r>0){const e=new Uint8Array(this.degree);return e.set(n,r),e}return n};var le=ae,ie=function(e){return!isNaN(e)&&e>=1&&e<=40};let oe="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";oe=oe.replace(/u/g,"\\u");const ce="(?:(?![A-Z0-9 $%*+\\-./:]|"+oe+")(?:.|[\r\n]))+";var se=new RegExp(oe,"g"),ue=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ae=new RegExp(ce,"g"),de=new RegExp("[0-9]+","g"),fe=new RegExp("[A-Z $%*+\\-./:]+","g");const me=new RegExp("^"+oe+"$"),pe=new RegExp("^[0-9]+$"),ge=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");var ve={KANJI:se,BYTE_KANJI:ue,BYTE:Ae,NUMERIC:de,ALPHANUMERIC:fe,testKanji:function(e){return me.test(e)},testNumeric:function(e){return pe.test(e)},testAlphanumeric:function(e){return ge.test(e)}},Ee=p((function(e,t){t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!ie(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return ve.testNumeric(e)?t.NUMERIC:ve.testAlphanumeric(e)?t.ALPHANUMERIC:ve.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(e){return n}}}));Ee.NUMERIC,Ee.ALPHANUMERIC,Ee.BYTE,Ee.KANJI,Ee.MIXED,Ee.getCharCountIndicator,Ee.getBestModeForData,Ee.isValid;var he=p((function(e,t){const n=J(7973);function r(e,t){return Ee.getCharCountIndicator(e,t)+4}function a(e,t){let n=0;return e.forEach((function(e){const a=r(e.mode,t);n+=a+e.getBitsLength()})),n}t.from=function(e,t){return ie(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!ie(e))throw new Error("Invalid QR Code version");void 0===n&&(n=Ee.BYTE);const a=8*(j(e)-_(e,t));if(n===Ee.MIXED)return a;const l=a-r(n,e);switch(n){case Ee.NUMERIC:return Math.floor(l/10*3);case Ee.ALPHANUMERIC:return Math.floor(l/11*2);case Ee.KANJI:return Math.floor(l/13);case Ee.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let r;const l=H.from(n,H.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(a(e,r)<=t.getCapacity(r,n,Ee.MIXED))return r}(e,l);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let a=1;a<=40;a++)if(n<=t.getCapacity(a,r,e))return a}(r.mode,r.getLength(),l)},t.getEncodedBits=function(e){if(!ie(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;J(t)-n>=0;)t^=7973<<J(t)-n;return e<<12|t}}));he.getCapacity,he.getBestVersionForData,he.getEncodedBits;const Ce=J(1335);function ye(e){this.mode=Ee.NUMERIC,this.data=e.toString()}ye.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},ye.prototype.getLength=function(){return this.data.length},ye.prototype.getBitsLength=function(){return ye.getBitsLength(this.data.length)},ye.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const a=this.data.length-t;a>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*a+1))};var xe=ye;const we=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ie(e){this.mode=Ee.ALPHANUMERIC,this.data=e}Ie.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},Ie.prototype.getLength=function(){return this.data.length},Ie.prototype.getBitsLength=function(){return Ie.getBitsLength(this.data.length)},Ie.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*we.indexOf(this.data[t]);n+=we.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(we.indexOf(this.data[t]),6)};var ke=Ie;function be(e){this.mode=Ee.BYTE,"string"==typeof e&&(e=function(e){for(var t=[],n=e.length,r=0;r<n;r++){var a=e.charCodeAt(r);if(a>=55296&&a<=56319&&n>r+1){var l=e.charCodeAt(r+1);l>=56320&&l<=57343&&(a=1024*(a-55296)+l-56320+65536,r+=1)}a<128?t.push(a):a<2048?(t.push(a>>6|192),t.push(63&a|128)):a<55296||a>=57344&&a<65536?(t.push(a>>12|224),t.push(a>>6&63|128),t.push(63&a|128)):a>=65536&&a<=1114111?(t.push(a>>18|240),t.push(a>>12&63|128),t.push(a>>6&63|128),t.push(63&a|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}(e)),this.data=new Uint8Array(e)}be.getBitsLength=function(e){return 8*e},be.prototype.getLength=function(){return this.data.length},be.prototype.getBitsLength=function(){return be.getBitsLength(this.data.length)},be.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var Be=be;function Le(e){this.mode=Ee.KANJI,this.data=e}Le.getBitsLength=function(e){return 13*e},Le.prototype.getLength=function(){return this.data.length},Le.prototype.getBitsLength=function(){return Le.getBitsLength(this.data.length)},Le.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=K(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}};var Se=Le,Re=p((function(e){var t={single_source_shortest_paths:function(e,n,r){var a={},l={};l[n]=0;var i,o,c,s,u,A,d,f=t.PriorityQueue.make();for(f.push(n,0);!f.empty();)for(c in o=(i=f.pop()).value,s=i.cost,u=e[o]||{})u.hasOwnProperty(c)&&(A=s+u[c],d=l[c],(void 0===l[c]||d>A)&&(l[c]=A,f.push(c,A),a[c]=o));if(void 0!==r&&void 0===l[r]){var m=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(m)}return a},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),r=e[r];return n.reverse(),n},find_path:function(e,n,r){var a=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(a,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,a={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(a[n]=r[n]);return a.queue=[],a.sorter=e.sorter||r.default_sorter,a},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t})),Me=p((function(e,t){function n(e){return unescape(encodeURIComponent(e)).length}function r(e,t,n){const r=[];let a;for(;null!==(a=e.exec(n));)r.push({data:a[0],index:a.index,mode:t,length:a[0].length});return r}function a(e){const t=r(ve.NUMERIC,Ee.NUMERIC,e),n=r(ve.ALPHANUMERIC,Ee.ALPHANUMERIC,e);let a,l;return D()?(a=r(ve.BYTE,Ee.BYTE,e),l=r(ve.KANJI,Ee.KANJI,e)):(a=r(ve.BYTE_KANJI,Ee.BYTE,e),l=[]),t.concat(n,a,l).sort((function(e,t){return e.index-t.index})).map((function(e){return{data:e.data,mode:e.mode,length:e.length}}))}function l(e,t){switch(t){case Ee.NUMERIC:return xe.getBitsLength(e);case Ee.ALPHANUMERIC:return ke.getBitsLength(e);case Ee.KANJI:return Se.getBitsLength(e);case Ee.BYTE:return Be.getBitsLength(e)}}function i(e,t){let n;const r=Ee.getBestModeForData(e);if(n=Ee.from(t,r),n!==Ee.BYTE&&n.bit<r.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Ee.toString(n)+".\n Suggested mode is: "+Ee.toString(r));switch(n!==Ee.KANJI||D()||(n=Ee.BYTE),n){case Ee.NUMERIC:return new xe(e);case Ee.ALPHANUMERIC:return new ke(e);case Ee.KANJI:return new Se(e);case Ee.BYTE:return new Be(e)}}t.fromArray=function(e){return e.reduce((function(e,t){return"string"==typeof t?e.push(i(t,null)):t.data&&e.push(i(t.data,t.mode)),e}),[])},t.fromString=function(e,r){const i=function(e){const t=[];for(let r=0;r<e.length;r++){const a=e[r];switch(a.mode){case Ee.NUMERIC:t.push([a,{data:a.data,mode:Ee.ALPHANUMERIC,length:a.length},{data:a.data,mode:Ee.BYTE,length:a.length}]);break;case Ee.ALPHANUMERIC:t.push([a,{data:a.data,mode:Ee.BYTE,length:a.length}]);break;case Ee.KANJI:t.push([a,{data:a.data,mode:Ee.BYTE,length:n(a.data)}]);break;case Ee.BYTE:t.push([{data:a.data,mode:Ee.BYTE,length:n(a.data)}])}}return t}(a(e)),o=function(e,t){const n={},r={start:{}};let a=["start"];for(let i=0;i<e.length;i++){const o=e[i],c=[];for(let e=0;e<o.length;e++){const s=o[e],u=""+i+e;c.push(u),n[u]={node:s,lastCount:0},r[u]={};for(let e=0;e<a.length;e++){const i=a[e];n[i]&&n[i].node.mode===s.mode?(r[i][u]=l(n[i].lastCount+s.length,s.mode)-l(n[i].lastCount,s.mode),n[i].lastCount+=s.length):(n[i]&&(n[i].lastCount=s.length),r[i][u]=l(s.length,s.mode)+4+Ee.getCharCountIndicator(s.mode,t))}}a=c}for(let e=0;e<a.length;e++)r[a[e]].end=0;return{map:r,table:n}}(i,r),c=Re.find_path(o.map,"start","end"),s=[];for(let e=1;e<c.length-1;e++)s.push(o.table[c[e]].node);return t.fromArray(function(e){return e.reduce((function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)}),[])}(s))},t.rawSplit=function(e){return t.fromArray(a(e))}}));function Ne(e,t,n){const r=e.size,a=function(e,t){const n=e.bit<<3|t;let r=n<<10;for(;J(r)-Ce>=0;)r^=1335<<J(r)-Ce;return 21522^(n<<10|r)}(t,n);let l,i;for(l=0;l<15;l++)i=1==(a>>l&1),l<6?e.set(l,8,i,!0):l<8?e.set(l+1,8,i,!0):e.set(r-15+l,8,i,!0),l<8?e.set(8,r-l-1,i,!0):l<9?e.set(8,15-l-1+1,i,!0):e.set(8,15-l-1,i,!0);e.set(r-8,8,1,!0)}function Te(e,t,n){const r=new F;n.forEach((function(t){r.put(t.mode.bit,4),r.put(t.getLength(),Ee.getCharCountIndicator(t.mode,e)),t.write(r)}));const a=8*(j(e)-_(e,t));for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const l=(a-r.getLengthInBits())/8;for(let e=0;e<l;e++)r.put(e%2?17:236,8);return function(e,t,n){const r=j(t),a=r-_(t,n),l=function(e,t){switch(t){case H.L:return G[4*(e-1)+0];case H.M:return G[4*(e-1)+1];case H.Q:return G[4*(e-1)+2];case H.H:return G[4*(e-1)+3];default:return}}(t,n),i=l-r%l,o=Math.floor(r/l),c=Math.floor(a/l),s=c+1,u=o-c,A=new le(u);let d=0;const f=new Array(l),m=new Array(l);let p=0;const g=new Uint8Array(e.buffer);for(let e=0;e<l;e++){const t=e<i?c:s;f[e]=g.slice(d,d+t),m[e]=A.encode(f[e]),d+=t,p=Math.max(p,t)}const v=new Uint8Array(r);let E,h,C=0;for(E=0;E<p;E++)for(h=0;h<l;h++)E<f[h].length&&(v[C++]=f[h][E]);for(E=0;E<u;E++)for(h=0;h<l;h++)v[C++]=m[h][E];return v}(r,e,t)}function Qe(e,t,n,r){let a;if(Array.isArray(e))a=Me.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=Me.rawSplit(e);r=he.getBestVersionForData(t,n)}a=Me.fromString(e,r||40)}}const l=he.getBestVersionForData(a,n);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<l)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+l+".\n")}else t=l;const i=Te(t,n,a),o=V(t),c=new Z(o);return function(e,t){const n=e.size,r=function(e){const t=X(e);return[[0,0],[t-7,0],[0,t-7]]}(t);for(let t=0;t<r.length;t++){const a=r[t][0],l=r[t][1];for(let t=-1;t<=7;t++)if(!(a+t<=-1||n<=a+t))for(let r=-1;r<=7;r++)l+r<=-1||n<=l+r||(t>=0&&t<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===t||6===t)||t>=2&&t<=4&&r>=2&&r<=4?e.set(a+t,l+r,!0,!0):e.set(a+t,l+r,!1,!0))}}(c,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(c),function(e,t){const n=q.getPositions(t);for(let t=0;t<n.length;t++){const r=n[t][0],a=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)-2===t||2===t||-2===n||2===n||0===t&&0===n?e.set(r+t,a+n,!0,!0):e.set(r+t,a+n,!1,!0)}}(c,t),Ne(c,n,0),t>=7&&function(e,t){const n=e.size,r=he.getEncodedBits(t);let a,l,i;for(let t=0;t<18;t++)a=Math.floor(t/3),l=t%3+n-8-3,i=1==(r>>t&1),e.set(a,l,i,!0),e.set(l,a,i,!0)}(c,t),function(e,t){const n=e.size;let r=-1,a=n-1,l=7,i=0;for(let o=n-1;o>0;o-=2)for(6===o&&o--;;){for(let n=0;n<2;n++)if(!e.isReserved(a,o-n)){let r=!1;i<t.length&&(r=1==(t[i]>>>l&1)),e.set(a,o-n,r),l--,-1===l&&(i++,l=7)}if(a+=r,a<0||n<=a){a-=r,r=-r;break}}}(c,i),isNaN(r)&&(r=Y.getBestMask(c,Ne.bind(null,c,n))),Y.applyMask(r,c),Ne(c,n,r),{modules:c,version:t,errorCorrectionLevel:n,maskPattern:r,segments:a}}Me.fromArray,Me.fromString,Me.rawSplit;var Pe=function(e,t){if(void 0===e||""===e)throw new Error("No input text");let n,r,a=H.M;return void 0!==t&&(a=H.from(t.errorCorrectionLevel,H.M),n=he.from(t.version),r=Y.from(t.maskPattern),t.toSJISFunc&&function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');P=e}(t.toSJISFunc)),Qe(e,n,a,r)},Oe=p((function(e,t){function n(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,a=e.scale||4;return{width:r,scale:r?4:a,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const a=n.modules.size,l=n.modules.data,i=t.getScale(a,r),o=Math.floor((a+2*r.margin)*i),c=r.margin*i,s=[r.color.light,r.color.dark];for(let t=0;t<o;t++)for(let n=0;n<o;n++){let u=4*(t*o+n),A=r.color.light;t>=c&&n>=c&&t<o-c&&n<o-c&&(A=s[l[Math.floor((t-c)/i)*a+Math.floor((n-c)/i)]?1:0]),e[u++]=A.r,e[u++]=A.g,e[u++]=A.b,e[u]=A.a}}}));Oe.getOptions,Oe.getScale,Oe.getImageWidth,Oe.qrToImageData;var Ve=p((function(e,t){t.render=function(e,t,n){let r=n,a=t;void 0!==r||t&&t.getContext||(r=t,t=void 0),t||(a=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),r=Oe.getOptions(r);const l=Oe.getImageWidth(e.modules.size,r),i=a.getContext("2d"),o=i.createImageData(l,l);return Oe.qrToImageData(o.data,e,r),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(i,a,l),i.putImageData(o,0,0),a},t.renderToDataURL=function(e,n,r){let a=r;void 0!==a||n&&n.getContext||(a=n,n=void 0),a||(a={});const l=t.render(e,n,a),i=a.type||"image/png",o=a.rendererOpts||{};return l.toDataURL(i,o.quality)}}));function je(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function Je(e,t,n){let r=e+t;return void 0!==n&&(r+=" "+n),r}Ve.render,Ve.renderToDataURL;function De(e,t,n,r,a){const l=[].slice.call(arguments,1),i=l.length,o="function"==typeof l[i-1];if(!o&&!Q())throw new Error("Callback required as last argument");if(!o){if(i<1)throw new Error("Too few arguments provided");return 1===i?(n=t,t=r=void 0):2!==i||t.getContext||(r=n,n=t,t=void 0),new Promise((function(a,l){try{const l=Pe(n,r);a(e(l,t,r))}catch(e){l(e)}}))}if(i<2)throw new Error("Too few arguments provided");2===i?(a=n,n=t,t=r=void 0):3===i&&(t.getContext&&void 0===a?(a=r,r=void 0):(a=r,r=n,n=t,t=void 0));try{const l=Pe(n,r);a(null,e(l,t,r))}catch(e){a(e)}}var Ke={create:Pe,toCanvas:De.bind(null,Ve.render),toDataURL:De.bind(null,Ve.renderToDataURL),toString:De.bind(null,(function(e,t,n){return function(e,t,n){const r=Oe.getOptions(t),a=e.modules.size,l=e.modules.data,i=a+2*r.margin,o=r.color.light.a?"<path "+je(r.color.light,"fill")+' d="M0 0h'+i+"v"+i+'H0z"/>':"",c="<path "+je(r.color.dark,"stroke")+' d="'+function(e,t,n){let r="",a=0,l=!1,i=0;for(let o=0;o<e.length;o++){const c=Math.floor(o%t),s=Math.floor(o/t);c||l||(l=!0),e[o]?(i++,o>0&&c>0&&e[o-1]||(r+=l?Je("M",c+n,.5+s+n):Je("m",a,0),a=0,l=!1),c+1<t&&e[o+1]||(r+=Je("h",i),i=0)):a++}return r}(l,a,r.margin)+'"/>',s='viewBox="0 0 '+i+" "+i+'"',u='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+s+' shape-rendering="crispEdges">'+o+c+"</svg>\n";return"function"==typeof n&&n(null,u),u}(e,n)}))};function He(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=e.length;return e.substring(0,t)+"..."+e.substring(r-n,r)}var We,Fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"base64";return new Promise((function(n){var r=new FileReader;switch(t){case"base64":r.readAsDataURL(e);break;case"buffer":r.readAsArrayBuffer(e);break;default:throw new Error("Woring")}r.onload=function(e){n(e)}}))},Ue=function(e){var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===R(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)},Ze=function(e,t){var n=Ue(e),r=Ue(t),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a},qe=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()},Xe=function(e,t){var n,r=Ue(e),a=Ue(t),l=Ze(r,a),i=Math.abs(function(e,t){var n=Ue(e),r=Ue(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,a));if(i<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-l*i);var o=Ze(r,a)===-l;(function(e){var t=Ue(e);return function(e){var t=Ue(e);return t.setHours(23,59,59,999),t}(t).getTime()===function(e){var t=Ue(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t).getTime()})(Ue(e))&&1===i&&1===Ze(e,a)&&(o=!1),n=l*(i-Number(o))}return 0===n?0:n};!function(e){e[e.Jan=1]="Jan",e[e.Feb=2]="Feb",e[e.Mar=3]="Mar",e[e.Apr=4]="Apr",e[e.May=5]="May",e[e.Jun=6]="Jun",e[e.Jul=7]="Jul",e[e.Aug=8]="Aug",e[e.Sept=9]="Sept",e[e.Oct=10]="Oct",e[e.Nov=11]="Nov",e[e.Dec=12]="Dec"}(We||(We={}));var Ye,Ge,ze=function(e){return"https://cdn.stamp.fyi/avatar/".concat(e,"?s=300")},_e=function(){var e=L(T.mark((function e(t){return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ke.toDataURL(t);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new Error(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}();!function(e){e.PHONE="phone",e.EMAIL="email",e.LENS="lens",e.ENS="ens",e.DOTBIT="dotbit"}(Ye||(Ye={})),function(e){e.PHONE="phone",e.EMAIL="email",e.LENS="lens.xyz",e.DOTBIT="dotbit",e.ENS="ens"}(Ge||(Ge={}));var $e,et=function(){var e=L(T.mark((function e(t){var n,r,a,l,i;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"GET",headers:{accept:"application/json"}},e.next=3,fetch("https://pregod.rss3.dev/v1/profiles/".concat(t),n).then((function(e){return e.json()})).catch((function(e){return console.error(e)}));case 3:if(!((r=e.sent)&&r.result&&r.result.length>0)){e.next=10;break}return a=r.result,l={avatar:"",lensInfo:a.find((function(e){return"Lens"===e.platform})),ensInfo:a.find((function(e){return"ENS Registrar"===e.platform})),csbInfo:a.find((function(e){return"Crossbell"===e.platform}))},(i=l.ensInfo?l.ensInfo:l.lensInfo?l.lensInfo:l.csbInfo?l.csbInfo:null)&&i.profile_uri&&i.profile_uri[0]&&(l.avatar=i.profile_uri[0]),e.abrupt("return",l);case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),tt=function(){var e=L(T.mark((function e(t){var n,r;return T.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={method:"GET",headers:{accept:"application/json"}},e.next=3,fetch("https://pregod.rss3.dev/v1/ns/".concat(t),n).then((function(e){return e.json()})).catch((function(e){return console.error(e)}));case 3:return(r=e.sent).defaultUserName=r.ens?r.ens:r.bit?r.bit:r.lens?r.lens:r.crossbell?r.crossbell:He(r.address||""),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=(g($e={},Ye.LENS,"web3mq:lens.xyz"),g($e,Ye.EMAIL,"web3mq:email:SwapChat"),g($e,Ye.PHONE,"web3mq:sms:SwapChat"),g($e,Ye.ENS,"web3mq:ens:SwapChat"),g($e,Ye.DOTBIT,"web3mq:dotbit:SwapChat"),$e),lt=function(e){var t=n.useState(null),a=w(t,2),l=a[0],i=a[1],o=function(){var t=L(T.mark((function t(n,a){var l,i,o,c,s,u,A,d,f=arguments;return T.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=f.length>2&&void 0!==f[2]&&f[2],t.next=3,r.getUserPublicProfileRequest({did_type:a,did_value:n,timestamp:Date.now(),my_userid:e.keys.userid}).catch((function(e){console.log(e)}));case 3:if(!(i=t.sent)||!i.data){t.next=34;break}return c=i.data,s=rt(rt({},c),{},{address:c.wallet_address,defaultUserName:He(c.wallet_address),defaultUserAvatar:ze(c.wallet_address),didValueMap:(o={},g(o,Ge.LENS,""),g(o,Ge.ENS,""),g(o,Ge.DOTBIT,""),g(o,Ge.PHONE,""),g(o,Ge.EMAIL,""),o)}),c.bind_did_list&&c.bind_did_list.length>0&&c.bind_did_list.forEach((functi