PageSourceSearch

https://www.whiteboard.chat/static/js/85.e181f64d.chunk.js

js whiteboard.chat collected 2026-09-24 19:59:59 UTC 44,675 bytes, 1 lines download raw bytes

1(this.webpackJsonpcollaborate=this.webpackJsonpcollaborate||[]).push([[85],{306:function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return d})),n.d(e,"f",(function(){return h})),n.d(e,"g",(function(){return E})),n.d(e,"h",(function(){return L})),n.d(e,"i",(function(){return T})),n.d(e,"j",(function(){return v})),n.d(e,"k",(function(){return l})),n.d(e,"l",(function(){return p})),n.d(e,"m",(function(){return _})),n.d(e,"n",(function(){return s})),n.d(e,"o",(function(){return a})),n.d(e,"p",(function(){return A})),n.d(e,"q",(function(){return c})),n.d(e,"r",(function(){return i})),n.d(e,"s",(function(){return u})),n.d(e,"t",(function(){return r}));var r="username",o="email",i="code",a="phone",u="password",s="country-dial-code-select",f="+1",c="amplify-auth-source",h="amplify-redirected-from-hosted-ui",l="amplify-authenticator-authState",d="Phone number can not be empty",g="No Auth module found, please ensure @aws-amplify/auth is imported",E="SETUP_TOTP",p="User has not set up software token mfa",_="User has not verified software token mfa",A="SUCCESS",y="auth",T="UI Auth",L="ToastAuthError",v="AuthStateChange"},319:function(t,e,n){"use strict";var r,o,i,a,u;n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return a})),function(t){t.SignUp="signup",t.SignOut="signout",t.SignIn="signin",t.Loading="loading",t.SignedOut="signedout",t.SignedIn="signedin",t.SigningUp="signingup",t.ConfirmSignUp="confirmSignUp",t.confirmingSignUpCustomFlow="confirmsignupcustomflow",t.ConfirmSignIn="confirmSignIn",t.confirmingSignInCustomFlow="confirmingsignincustomflow",t.VerifyingAttributes="verifyingattributes",t.ForgotPassword="forgotpassword",t.ResetPassword="resettingpassword",t.SettingMFA="settingMFA",t.TOTPSetup="TOTPSetup",t.CustomConfirmSignIn="customConfirmSignIn",t.VerifyContact="verifyContact"}(r||(r={})),function(t){t.TOTP="TOTP",t.SMS="SMS",t.NOMFA="NOMFA"}(o||(o={})),function(t){t.SoftwareTokenMFA="SOFTWARE_TOKEN_MFA",t.SMSMFA="SMS_MFA",t.NewPasswordRequired="NEW_PASSWORD_REQUIRED",t.MFASetup="MFA_SETUP",t.CustomChallenge="CUSTOM_CHALLENGE"}(i||(i={})),function(t){t.Password="password"}(a||(a={})),function(t){t.username="username",t.email="email",t.phone_number="phone_number"}(u||(u={}))},320:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.BACK_TO_SIGN_IN="Back to Sign In",t.CHANGE_PASSWORD_ACTION="Change",t.CHANGE_PASSWORD="Change Password",t.CODE_LABEL="Verification code",t.CODE_PLACEHOLDER="Enter code",t.CONFIRM_SIGN_UP_CODE_LABEL="Confirmation Code",t.CONFIRM_SIGN_UP_CODE_PLACEHOLDER="Enter your code",t.CONFIRM_SIGN_UP_HEADER_TEXT="Confirm Sign up",t.CONFIRM_SIGN_UP_LOST_CODE="Lost your code?",t.CONFIRM_SIGN_UP_RESEND_CODE="Resend Code",t.CONFIRM_SIGN_UP_SUBMIT_BUTTON_TEXT="Confirm",t.CONFIRM_SMS_CODE="Confirm SMS Code",t.CONFIRM_TOTP_CODE="Confirm TOTP Code",t.CONFIRM="Confirm",t.CREATE_ACCOUNT_TEXT="Create account",t.EMAIL_LABEL="Email Address *",t.EMAIL_PLACEHOLDER="Enter your email address",t.FORGOT_PASSWORD_TEXT="Forgot your password?",t.LESS_THAN_TWO_MFA_VALUES_MESSAGE="Less than two mfa types available",t.NEW_PASSWORD_LABEL="New password",t.NEW_PASSWORD_PLACEHOLDER="Enter your new password",t.NO_ACCOUNT_TEXT="No account?",t.PASSWORD_LABEL="Password *",t.PASSWORD_PLACEHOLDER="Enter your password",t.PHONE_LABEL="Phone Number *",t.PHONE_PLACEHOLDER="(555) 555-1212",t.QR_CODE_ALT="qrcode",t.RESET_PASSWORD_TEXT="Reset password",t.RESET_YOUR_PASSWORD="Reset your password",t.SELECT_MFA_TYPE_HEADER_TEXT="Select MFA Type",t.SELECT_MFA_TYPE_SUBMIT_BUTTON_TEXT="Verify",t.SEND_CODE="Send Code",t.SETUP_TOTP_REQUIRED="TOTP needs to be configured",t.SIGN_IN_ACTION="Sign In",t.SIGN_IN_HEADER_TEXT="Sign in to your account",t.SIGN_IN_TEXT="Sign in",t.SIGN_IN_WITH_AMAZON="Sign in with Amazon",t.SIGN_IN_WITH_AUTH0="Sign in with Auth0",t.SIGN_IN_WITH_AWS="Sign in with AWS",t.SIGN_IN_WITH_FACEBOOK="Sign in with Facebook",t.SIGN_IN_WITH_GOOGLE="Sign in with Google",t.SIGN_OUT="Sign Out",t.SIGN_UP_EMAIL_PLACEHOLDER="Email",t.SIGN_UP_HAVE_ACCOUNT_TEXT="Have an account?",t.SIGN_UP_HEADER_TEXT="Create a new account",t.SIGN_UP_PASSWORD_PLACEHOLDER="Password",t.SIGN_UP_SUBMIT_BUTTON_TEXT="Create Account",t.SIGN_UP_USERNAME_PLACEHOLDER="Username",t.SUCCESS_MFA_TYPE="Success! Your MFA Type is now:",t.TOTP_HEADER_TEXT="Scan then enter verification code",t.TOTP_LABEL="Enter Security Code:",t.TOTP_SETUP_FAILURE="TOTP Setup has failed",t.TOTP_SUBMIT_BUTTON_TEXT="Verify Security Token",t.TOTP_SUCCESS_MESSAGE="Setup TOTP successfully!",t.UNABLE_TO_SETUP_MFA_AT_THIS_TIME="Failed! Unable to configure MFA at this time",t.USERNAME_LABEL="Username *",t.USERNAME_PLACEHOLDER="Enter your username",t.VERIFY_CONTACT_EMAIL_LABEL="Email",t.VERIFY_CONTACT_HEADER_TEXT="Account recovery requires verified contact information",t.VERIFY_CONTACT_PHONE_LABEL="Phone Number",t.VERIFY_CONTACT_SUBMIT_LABEL="Submit",t.VERIFY_CONTACT_VERIFY_LABEL="Verify",t.ADDRESS_LABEL="Address",t.ADDRESS_PLACEHOLDER="Enter your address",t.NICKNAME_LABEL="Nickname",t.NICKNAME_PLACEHOLDER="Enter your nickname",t.BIRTHDATE_LABEL="Birthday",t.BIRTHDATE_PLACEHOLDER="Enter your birthday",t.PICTURE_LABEL="Picture URL",t.PICTURE_PLACEHOLDER="Enter your picture URL",t.FAMILY_NAME_LABEL="Family Name",t.FAMILY_NAME_PLACEHOLDER="Enter your family name",t.PREFERRED_USERNAME_LABEL="Preferred Username",t.PREFERRED_USERNAME_PLACEHOLDER="Enter your preferred username",t.GENDER_LABEL="Gender",t.GENDER_PLACEHOLDER="Enter your gender",t.PROFILE_LABEL="Profile URL",t.PROFILE_PLACEHOLDER="Enter your profile URL",t.GIVEN_NAME_LABEL="First Name",t.GIVEN_NAME_PLACEHOLDER="Enter your first name",t.ZONEINFO_LABEL="Time zone",t.ZONEINFO_PLACEHOLDER="Enter your time zone",t.LOCALE_LABEL="Locale",t.LOCALE_PLACEHOLDER="Enter your locale",t.UPDATED_AT_LABEL="Updated At",t.UPDATED_AT_PLACEHOLDER="Enter the time the information was last updated",t.MIDDLE_NAME_LABEL="Middle Name",t.MIDDLE_NAME_PLACEHOLDER="Enter your middle name",t.WEBSITE_LABEL="Website",t.WEBSITE_P
1LACEHOLDER="Enter your website",t.NAME_LABEL="Full Name",t.NAME_PLACEHOLDER="Enter your full name"}(r||(r={}))},471:function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return g}));var r=n(1640),o=n(635),i=n(319),a=n(320),u=n(306),s=function(t){return!!t.shadowRoot&&!!t.attachShadow},f=function(t){r.a.dispatch(u.i,{event:u.h,message:t.message})},c=function(t,e){r.a.dispatch(u.i,{event:u.j,message:t,data:e})},h=function(t){if(!t.phoneNumberValue)throw new Error(u.e);var e=t.phoneNumberValue.replace(/[-()\s]/g,"");return""+t.countryDialCodeValue+e},l=function(t){if(!(t in i.d))throw new Error("Invalid username Alias - "+t+". Instead use "+Object.values(i.d))},d=function(t){return!(null===t.hint||"string"===typeof t.hint)},g={address:{label:o.a.get(a.a.ADDRESS_LABEL),placeholder:o.a.get(a.a.ADDRESS_PLACEHOLDER)},nickname:{label:o.a.get(a.a.NICKNAME_LABEL),placeholder:o.a.get(a.a.NICKNAME_PLACEHOLDER)},birthdate:{label:o.a.get(a.a.BIRTHDATE_LABEL),placeholder:o.a.get(a.a.BIRTHDATE_PLACEHOLDER)},phone_number:{label:o.a.get(a.a.PHONE_LABEL),placeholder:o.a.get(a.a.PHONE_PLACEHOLDER)},email:{lable:o.a.get(a.a.EMAIL_LABEL),placeholder:o.a.get(a.a.EMAIL_PLACEHOLDER)},picture:{label:o.a.get(a.a.PICTURE_LABEL),placeholder:o.a.get(a.a.PICTURE_PLACEHOLDER)},family_name:{label:o.a.get(a.a.FAMILY_NAME_LABEL),placeholder:o.a.get(a.a.FAMILY_NAME_PLACEHOLDER)},preferred_username:{label:o.a.get(a.a.PREFERRED_USERNAME_LABEL),placeholder:o.a.get(a.a.PREFERRED_USERNAME_PLACEHOLDER)},gender:{label:o.a.get(a.a.GENDER_LABEL),placeholder:o.a.get(a.a.GENDER_PLACEHOLDER)},profile:{label:o.a.get(a.a.PROFILE_LABEL),placeholder:o.a.get(a.a.PROFILE_PLACEHOLDER)},given_name:{label:o.a.get(a.a.GIVEN_NAME_LABEL),placeholder:o.a.get(a.a.GIVEN_NAME_LABEL)},zoneinfo:{label:o.a.get(a.a.ZONEINFO_LABEL),placeholder:o.a.get(a.a.ZONEINFO_PLACEHOLDER)},locale:{label:o.a.get(a.a.LOCALE_LABEL),placeholder:o.a.get(a.a.LOCALE_PLACEHOLDER)},updated_at:{label:o.a.get(a.a.UPDATED_AT_LABEL),placeholder:o.a.get(a.a.UPDATED_AT_PLACEHOLDER)},middle_name:{label:o.a.get(a.a.MIDDLE_NAME_LABEL),placeholder:o.a.get(a.a.MIDDLE_NAME_PLACEHOLDER)},website:{label:o.a.get(a.a.WEBSITE_LABEL),placeholder:o.a.get(a.a.WEBSITE_PLACEHOLDER)},name:{label:o.a.get(a.a.NAME_LABEL),placeholder:o.a.get(a.a.NAME_PLACEHOLDER)}}},549:function(t,e,n){"use strict";n.r(e),n.d(e,"amplify_radio_button",(function(){return p})),n.d(e,"amplify_totp_setup",(function(){return Wt}));var r=n(261),o=n(2426),i=n(635),a=n(891),u=n(319),s=n(320),f=n(306),c=n(471),h=n(2552),l=n(304),d=n.n(l),g=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(e){i(e)}}function u(t){try{s(r.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}s((r=r.apply(t,e||[])).next())}))},E=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},p=function(){function t(t){Object(r.k)(this,t),this.placeholder="",this.checked=!1,this.disabled=!1}return t.prototype.render=function(){return Object(r.i)("span",{class:"radio-button"},Object(r.i)("input",Object.assign({type:"radio",name:this.name,value:this.value,onInput:this.handleInputChange,placeholder:this.placeholder,id:this.fieldId,checked:this.checked,disabled:this.disabled},this.inputProps)),Object(r.i)("amplify-label",{htmlFor:this.fieldId},this.label))},t}();p.style=":host{--font-family:var(--amplify-font-family)}.radio-button{display:block;width:100%;padding:16px;font-size:var(--amplify-text-sm);font-family:var(--font-family)}.radio-button input{margin-right:12px}";var _=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then},A={}.toString,y=Array.isArray||function(t){return"[object Array]"==A.call(t)};L.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}();var T=L.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function L(t,e,n){return L.TYPED_ARRAY_SUPPORT||this instanceof L?"number"===typeof t?w(this,t):function(t,e,n,r){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');if("undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer)return function(t,e,n,r){if(n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;o=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);L.TYPED_ARRAY_SUPPORT?o.__proto__=L.prototype:o=P(t,o);return o}(t,e,n,r);if("string"===typeof e)return function(t,e){var n=0|C(e),r=m(t,n),o=r.write(e);o!==n&&(r=r.slice(0,o));return r}(t,e);
1return function(t,e){if(L.isBuffer(e)){var n=0|v(e.length),r=m(t,n);return 0===r.length||e.copy(r,0,0,n),r}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(o=e.length)!==o?m(t,0):P(t,e);if("Buffer"===e.type&&Array.isArray(e.data))return P(t,e.data)}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}(this,t,e,n):new L(t,e,n)}function v(t){if(t>=T)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T.toString(16)+" bytes");return 0|t}function m(t,e){var n;return L.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(e)).__proto__=L.prototype:(null===(n=t)&&(n=new L(e)),n.length=e),n}function w(t,e){var n=m(t,e<0?0:0|v(e));if(!L.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)n[r]=0;return n}function P(t,e){for(var n=e.length<0?0:0|v(e.length),r=m(t,n),o=0;o<n;o+=1)r[o]=255&e[o];return r}function R(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function C(t){return L.isBuffer(t)?t.length:"undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!==typeof t&&(t=""+t),0===t.length?0:R(t).length)}L.TYPED_ARRAY_SUPPORT&&(L.prototype.__proto__=Uint8Array.prototype,L.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&L[Symbol.species]===L&&Object.defineProperty(L,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),L.prototype.write=function(t,e,n){void 0===e||void 0===n&&"string"===typeof e?(n=this.length,e=0):isFinite(e)&&(e|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,e,n,r){return function(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}(R(e,t.length-n),t,n,r)}(this,t,e,n)},L.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),L.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=L.prototype;else{var o=e-t;n=new L(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},L.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!L.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},L.prototype.fill=function(t,e,n){if("string"===typeof t){if("string"===typeof e?(e=0,n=this.length):"string"===typeof n&&(n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o<n;++o)this[o]=t;else{var i=L.isBuffer(t)?t:new L(t),a=i.length;for(o=0;o<n-e;++o)this[o+e]=i[o%a]}return this},L.concat=function(t,e){if(!y(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return m(null,0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=w(null,e),o=0;for(n=0;n<t.length;++n){var i=t[n];if(!L.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},L.byteLength=C,L.prototype._isBuffer=!0,L.isBuffer=function(t){return!(null==t||!t._isBuffer)};var I,S=function(t){var e=new L(t);return e.fill(0),e},b=function(t){return new L(t)},N=[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],O=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},B=function(t){return N[t]},M=function(t){for(var e=0;0!==t;)e++,t>>>=1;return e},D=function(t){if("function"!==typeof t)throw new Error('"toSJISFunc" is not a valid function.');I=t},U=function(){return"undefined"!==typeof I},F=function(t){return I(t)};function H(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}
1,n.exports),n.exports}var k=H((function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&"undefined"!==typeof t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(r){return n}}}));function x(){this.buffer=[],this.length=0}x.prototype={get:function(t){var e=Math.floor(t/8);return 1===(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1===(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Y=x;function G(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=S(t*t),this.reservedBit=S(t*t)}G.prototype.set=function(t,e,n,r){var o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},G.prototype.get=function(t,e){return this.data[t*this.size+e]},G.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},G.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var V=G,j=H((function(t,e){var n=O;e.getRowColCoords=function(t){if(1===t)return[];for(var e=Math.floor(t/7)+2,r=n(t),o=145===r?26:2*Math.ceil((r-13)/(2*e-2)),i=[r-7],a=1;a<e-1;a++)i[a]=i[a-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){for(var n=[],r=e.getRowColCoords(t),o=r.length,i=0;i<o;i++)for(var a=0;a<o;a++)0===i&&0===a||0===i&&a===o-1||i===o-1&&0===a||n.push([r[i],r[a]]);return n}})),W=O,z=function(t){var e=W(t);return[[0,0],[e-7,0],[0,e-7]]},K=H((function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var n=3,r=3,o=40,i=10;function a(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return r%3===0;case e.Patterns.PATTERN011:return(n+r)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case e.Patterns.PATTERN101:return n*r%2+n*r%3===0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){for(var e=t.size,r=0,o=0,i=0,a=null,u=null,s=0;s<e;s++){o=i=0,a=u=null;for(var f=0;f<e;f++){var c=t.get(s,f);c===a?o++:(o>=5&&(r+=n+(o-5)),a=c,o=1),(c=t.get(f,s))===u?i++:(i>=5&&(r+=n+(i-5)),u=c,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},e.getPenaltyN2=function(t){for(var e=t.size,n=0,o=0;o<e-1;o++)for(var i=0;i<e-1;i++){var a=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);4!==a&&0!==a||n++}return n*r},e.getPenaltyN3=function(t){for(var e=t.size,n=0,r=0,i=0,a=0;a<e;a++){r=i=0;for(var u=0;u<e;u++)r=r<<1&2047|t.get(a,u),u>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(u,a),u>=10&&(1488===i||93===i)&&n++}return n*o},e.getPenaltyN4=function(t){for(var e=0,n=t.data.length,r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*i},e.applyMask=function(t,e){for(var n=e.size,r=0;r<n;r++)for(var o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,a(t,o,r))},e.getBestMask=function(t,n){for(var r=Object.keys(e.Patterns).length,o=0,i=1/0,a=0;a<r;a++){n(a),e.applyMask(a,t);var u=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),u<i&&(i=u,o=a)}return o}})),q=[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],X=[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,
1192,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],J=function(t,e){switch(e){case k.L:return q[4*(t-1)+0];case k.M:return q[4*(t-1)+1];case k.Q:return q[4*(t-1)+2];case k.H:return q[4*(t-1)+3];default:return}},Q=function(t,e){switch(e){case k.L:return X[4*(t-1)+0];case k.M:return X[4*(t-1)+1];case k.Q:return X[4*(t-1)+2];case k.H:return X[4*(t-1)+3];default:return}},Z=S(512),$=S(256);!function(){for(var t=1,e=0;e<255;e++)Z[e]=t,$[t]=e,256&(t<<=1)&&(t^=285);for(e=255;e<512;e++)Z[e]=Z[e-255]}();var tt=function(t){return Z[t]},et=function(t,e){return 0===t||0===e?0:Z[$[t]+$[e]]},nt=H((function(t,e){e.mul=function(t,e){for(var n=S(t.length+e.length-1),r=0;r<t.length;r++)for(var o=0;o<e.length;o++)n[r+o]^=et(t[r],e[o]);return n},e.mod=function(t,e){for(var n=b(t);n.length-e.length>=0;){for(var r=n[0],o=0;o<e.length;o++)n[o]^=et(e[o],r);for(var i=0;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},e.generateECPolynomial=function(t){for(var n=b([1]),r=0;r<t;r++)n=e.mul(n,[1,tt(r)]);return n}})),rt=d.a.Buffer;function ot(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}ot.prototype.initialize=function(t){this.degree=t,this.genPoly=nt.generateECPolynomial(this.degree)},ot.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var e=S(this.degree),n=rt.concat([t,e],t.length+this.degree),r=nt.mod(n,this.genPoly),o=this.degree-r.length;if(o>0){var i=S(this.degree);return r.copy(i,o),i}return r};var it=ot,at=function(t){return!isNaN(t)&&t>=1&&t<=40},ut="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",st="(?:(?![A-Z0-9 $%*+\\-./:]|"+(ut=ut.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+",ft=new RegExp(ut,"g"),ct=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ht=new RegExp(st,"g"),lt=new RegExp("[0-9]+","g"),dt=new RegExp("[A-Z $%*+\\-./:]+","g"),gt=new RegExp("^"+ut+"$"),Et=new RegExp("^[0-9]+$"),pt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$"),_t={KANJI:ft,BYTE_KANJI:ct,BYTE:ht,NUMERIC:lt,ALPHANUMERIC:dt,testKanji:function(t){return gt.test(t)},testNumeric:function(t){return Et.test(t)},testAlphanumeric:function(t){return pt.test(t)}},At=H((function(t,e){e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!at(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return _t.testNumeric(t)?e.NUMERIC:_t.testAlphanumeric(t)?e.ALPHANUMERIC:_t.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!==typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(r){return n}}})),yt=H((function(t,e){var n=M(7973);function r(t,e){return At.getCharCountIndicator(t,e)+4}function o(t,e){var n=0;return t.forEach((function(t){var o=r(t.mode,e);n+=o+t.getBitsLength()})),n}e.from=function(t,e){return at(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!at(t))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=At.BYTE);var o=8*(B(t)-Q(t,e));if(n===At.MIXED)return o;var i=o-r(n,t);switch(n){case At.NUMERIC:return Math.floor(i/10*3);case At.ALPHANUMERIC:return Math.floor(i/11*2);case At.KANJI:return Math.floor(i/13);case At.BYTE:default:return Math.floor(i/8)}},e.getBestVersionForData=function(t,n){var r,i=k.from(n,k.M);if(y(t)){if(t.length>1)return function(t,n){for(var r=1;r<=40;r++){if(o(t,r)<=e.getCapacity(r,n,At.MIXED))return r}}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(var o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),i)},e.getEncodedBits=function(t){if(!at(t)||t<7)throw new Error("Invalid QR Code version");for(var e=t<<12;M(e)-n>=0;)e^=7973<<M(e)-n;return t<<12|e}}
1)),Tt=M(1335),Lt=function(t,e){for(var n=t.bit<<3|e,r=n<<10;M(r)-Tt>=0;)r^=1335<<M(r)-Tt;return 21522^(n<<10|r)};function vt(t){this.mode=At.NUMERIC,this.data=t.toString()}vt.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},vt.prototype.getLength=function(){return this.data.length},vt.prototype.getBitsLength=function(){return vt.getBitsLength(this.data.length)},vt.prototype.write=function(t){var e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);var o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))};var mt=vt,wt=["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 Pt(t){this.mode=At.ALPHANUMERIC,this.data=t}Pt.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},Pt.prototype.getLength=function(){return this.data.length},Pt.prototype.getBitsLength=function(){return Pt.getBitsLength(this.data.length)},Pt.prototype.write=function(t){var e;for(e=0;e+2<=this.data.length;e+=2){var n=45*wt.indexOf(this.data[e]);n+=wt.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(wt.indexOf(this.data[e]),6)};var Rt=Pt;function Ct(t){this.mode=At.BYTE,this.data=b(t)}Ct.getBitsLength=function(t){return 8*t},Ct.prototype.getLength=function(){return this.data.length},Ct.prototype.getBitsLength=function(){return Ct.getBitsLength(this.data.length)},Ct.prototype.write=function(t){for(var e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var It=Ct;function St(t){this.mode=At.KANJI,this.data=t}St.getBitsLength=function(t){return 13*t},St.prototype.getLength=function(){return this.data.length},St.prototype.getBitsLength=function(){return St.getBitsLength(this.data.length)},St.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var n=F(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}};var bt=St,Nt=H((function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,u,s,f,c,h,l,d=e.PriorityQueue.make();for(d.push(n,0);!d.empty();)for(s in u=(a=d.pop()).value,f=a.cost,c=t[u]||{})c.hasOwnProperty(s)&&(h=f+c[s],l=i[s],("undefined"===typeof i[s]||l>h)&&(i[s]=h,d.push(s,h),o[s]=u));if("undefined"!==typeof r&&"undefined"===typeof i[r]){var g=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(g)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e})),Ot=H((function(t,e){function n(t){return unescape(encodeURIComponent(t)).length}function r(t,e,n){for(var r,o=[];null!==(r=t.exec(n));)o.push({data:r[0],index:r.index,mode:e,length:r[0].length});return o}function o(t){var e,n,o=r(_t.NUMERIC,At.NUMERIC,t),i=r(_t.ALPHANUMERIC,At.ALPHANUMERIC,t);return U()?(e=r(_t.BYTE,At.BYTE,t),n=r(_t.KANJI,At.KANJI,t)):(e=r(_t.BYTE_KANJI,At.BYTE,t),n=[]),o.concat(i,e,n).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function i(t,e){switch(e){case At.NUMERIC:return mt.getBitsLength(t);case At.ALPHANUMERIC:return Rt.getBitsLength(t);case At.KANJI:return bt.getBitsLength(t);case At.BYTE:return It.getBitsLength(t)}}function a(t,e){var n,r=At.getBestModeForData(t);if((n=At.from(e,r))!==At.BYTE&&n.bit<r.bit)throw new Error('"'+t+'" cannot be encoded with mode '+At.toString(n)+".\n Suggested mode is: "+At.toString(r));switch(n!==At.KANJI||U()||(n=At.BYTE),n){case At.NUMERIC:return new mt(t);case At.ALPHANUMERIC:return new Rt(t);case At.KANJI:return new bt(t);case At.BYTE:return new It(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"===typeof e?t.push(a(e,null)):e.data&&t.push(a(e.data,e.mode)),t}),[])},e.fromString=function(t,r){for(var a=function(t,e){for(var n={}
1,r={start:{}},o=["start"],a=0;a<t.length;a++){for(var u=t[a],s=[],f=0;f<u.length;f++){var c=u[f],h=""+a+f;s.push(h),n[h]={node:c,lastCount:0},r[h]={};for(var l=0;l<o.length;l++){var d=o[l];n[d]&&n[d].node.mode===c.mode?(r[d][h]=i(n[d].lastCount+c.length,c.mode)-i(n[d].lastCount,c.mode),n[d].lastCount+=c.length):(n[d]&&(n[d].lastCount=c.length),r[d][h]=i(c.length,c.mode)+4+At.getCharCountIndicator(c.mode,e))}}o=s}for(l=0;l<o.length;l++)r[o[l]].end=0;return{map:r,table:n}}(function(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];switch(o.mode){case At.NUMERIC:e.push([o,{data:o.data,mode:At.ALPHANUMERIC,length:o.length},{data:o.data,mode:At.BYTE,length:o.length}]);break;case At.ALPHANUMERIC:e.push([o,{data:o.data,mode:At.BYTE,length:o.length}]);break;case At.KANJI:e.push([o,{data:o.data,mode:At.BYTE,length:n(o.data)}]);break;case At.BYTE:e.push([{data:o.data,mode:At.BYTE,length:n(o.data)}])}}return e}(o(t,U())),r),u=Nt.find_path(a.map,"start","end"),s=[],f=1;f<u.length-1;f++)s.push(a.table[u[f]].node);return e.fromArray(function(t){return t.reduce((function(t,e){var n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(s))},e.rawSplit=function(t){return e.fromArray(o(t,U()))}}));function Bt(t,e,n){var r,o,i=t.size,a=Lt(e,n);for(r=0;r<15;r++)o=1===(a>>r&1),r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0)}function Mt(t,e,n){var r=new Y;n.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),At.getCharCountIndicator(e.mode,t)),e.write(r)}));var o=8*(B(t)-Q(t,e));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var i=(o-r.getLengthInBits())/8,a=0;a<i;a++)r.put(a%2?17:236,8);return function(t,e,n){for(var r=B(e),o=Q(e,n),i=r-o,a=J(e,n),u=a-r%a,s=Math.floor(r/a),f=Math.floor(i/a),c=f+1,h=s-f,l=new it(h),d=0,g=new Array(a),E=new Array(a),p=0,_=b(t.buffer),A=0;A<a;A++){var y=A<u?f:c;g[A]=_.slice(d,d+y),E[A]=l.encode(g[A]),d+=y,p=Math.max(p,y)}var T,L,v=S(r),m=0;for(T=0;T<p;T++)for(L=0;L<a;L++)T<g[L].length&&(v[m++]=g[L][T]);for(T=0;T<h;T++)for(L=0;L<a;L++)v[m++]=E[L][T];return v}(r,t,e)}function Dt(t,e,n,r){var o;if(y(t))o=Ot.fromArray(t);else{if("string"!==typeof t)throw new Error("Invalid data");var i=e;if(!i){var a=Ot.rawSplit(t);i=yt.getBestVersionForData(a,n)}o=Ot.fromString(t,i||40)}var u=yt.getBestVersionForData(o,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else e=u;var s=Mt(e,n,o),f=O(e),c=new V(f);return function(t,e){for(var n=t.size,r=z(e),o=0;o<r.length;o++)for(var i=r[o][0],a=r[o][1],u=-1;u<=7;u++)if(!(i+u<=-1||n<=i+u))for(var s=-1;s<=7;s++)a+s<=-1||n<=a+s||(u>=0&&u<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===u||6===u)||u>=2&&u<=4&&s>=2&&s<=4?t.set(i+u,a+s,!0,!0):t.set(i+u,a+s,!1,!0))}(c,e),function(t){for(var e=t.size,n=8;n<e-8;n++){var r=n%2===0;t.set(n,6,r,!0),t.set(6,n,r,!0)}}(c),function(t,e){for(var n=j.getPositions(e),r=0;r<n.length;r++)for(var o=n[r][0],i=n[r][1],a=-2;a<=2;a++)for(var u=-2;u<=2;u++)-2===a||2===a||-2===u||2===u||0===a&&0===u?t.set(o+a,i+u,!0,!0):t.set(o+a,i+u,!1,!0)}(c,e),Bt(c,n,0),e>=7&&function(t,e){for(var n,r,o,i=t.size,a=yt.getEncodedBits(e),u=0;u<18;u++)n=Math.floor(u/3),r=u%3+i-8-3,o=1===(a>>u&1),t.set(n,r,o,!0),t.set(r,n,o,!0)}(c,e),function(t,e){for(var n=t.size,r=-1,o=n-1,i=7,a=0,u=n-1;u>0;u-=2)for(6===u&&u--;;){for(var s=0;s<2;s++)if(!t.isReserved(o,u-s)){var f=!1;a<e.length&&(f=1===(e[a]>>>i&1)),t.set(o,u-s,f),-1===--i&&(a++,i=7)}if((o+=r)<0||n<=o){o-=r,r=-r;break}}}(c,s),isNaN(r)&&(r=K.getBestMask(c,Bt.bind(null,c,n))),K.applyMask(r,c),Bt(c,n,r),{modules:c,version:e,errorCorrectionLevel:n,maskPattern:r,segments:o}}var Ut=function(t,e){if("undefined"===typeof t||""===t)throw new Error("No input text");var n,r,o=k.M;return"undefined"!==typeof e&&(o=k.from(e.errorCorrectionLevel,k.M),n=yt.from(e.version),r=K.from(e.maskPattern),e.toSJISFunc&&D(e.toSJISFunc)),Dt(t,n,o,r)},Ft=H((function(t,e){function n(t){if("number"===typeof t&&(t=t.toString()),"string"!==typeof t)throw new Error("Color should be defined as hex string");var e=t.slice().replace("#","").split("");
1if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");var n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});var e="undefined"===typeof t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){var r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){for(var o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),u=Math.floor((o+2*r.margin)*a),s=r.margin*a,f=[r.color.light,r.color.dark],c=0;c<u;c++)for(var h=0;h<u;h++){var l=4*(c*u+h),d=r.color.light;if(c>=s&&h>=s&&c<u-s&&h<u-s)d=f[i[Math.floor((c-s)/a)*o+Math.floor((h-s)/a)]?1:0];t[l++]=d.r,t[l++]=d.g,t[l++]=d.b,t[l]=d.a}}})),Ht=H((function(t,e){e.render=function(t,e,n){var r=n,o=e;"undefined"!==typeof r||e&&e.getContext||(r=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=Ft.getOptions(r);var i=Ft.getImageWidth(t.modules.size,r),a=o.getContext("2d"),u=a.createImageData(i,i);return Ft.qrToImageData(u.data,t,r),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,o,i),a.putImageData(u,0,0),o},e.renderToDataURL=function(t,n,r){var o=r;"undefined"!==typeof o||n&&n.getContext||(o=n,n=void 0),o||(o={});var i=e.render(t,n,o),a=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(a,u.quality)}}));function kt(t,e){var n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function xt(t,e,n){var r=t+e;return"undefined"!==typeof n&&(r+=" "+n),r}var Yt=function(t,e,n){var r=Ft.getOptions(e),o=t.modules.size,i=t.modules.data,a=o+2*r.margin,u=r.color.light.a?"<path "+kt(r.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",s="<path "+kt(r.color.dark,"stroke")+' d="'+function(t,e,n){for(var r="",o=0,i=!1,a=0,u=0;u<t.length;u++){var s=Math.floor(u%e),f=Math.floor(u/e);s||i||(i=!0),t[u]?(a++,u>0&&s>0&&t[u-1]||(r+=i?xt("M",s+n,.5+f+n):xt("m",o,0),o=0,i=!1),s+1<e&&t[u+1]||(r+=xt("h",a),a=0)):o++}return r}(i,o,r.margin)+'"/>',f='viewBox="0 0 '+a+" "+a+'"',c='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+f+' shape-rendering="crispEdges">'+u+s+"</svg>\n";return"function"===typeof n&&n(null,c),c};function Gt(t,e,n,r,o){var i=[].slice.call(arguments,1),a=i.length,u="function"===typeof i[a-1];if(!u&&!_())throw new Error("Callback required as last argument");if(!u){if(a<1)throw new Error("Too few arguments provided");return 1===a?(n=e,e=r=void 0):2!==a||e.getContext||(r=n,n=e,e=void 0),new Promise((function(o,i){try{var a=Ut(n,r);o(t(a,e,r))}catch(u){i(u)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(o=n,n=e,e=r=void 0):3===a&&(e.getContext&&"undefined"===typeof o?(o=r,r=void 0):(o=r,r=n,n=e,e=void 0));try{var s=Ut(n,r);o(null,t(s,e,r))}catch(f){o(f)}}var Vt={create:Ut,toCanvas:Gt.bind(null,Ht.render),toDataURL:Gt.bind(null,Ht.renderToDataURL),toString:Gt.bind(null,(function(t,e,n){return Yt(t,n)}))},jt=new o.a("TOTP"),Wt=function(){function t(t){Object(r.k)(this,t),this.inputProps={autoFocus:!0},this.handleAuthStateChange=c.d,this.headerText=i.a.get(s.a.TOTP_HEADER_TEXT),this.code=null,this.setupMessage=null,this.qrCodeInput=null,this.loading=!1}return t.prototype.componentWillLoad=function(){this.setup()},t.prototype.buildOtpAuthPath=function(t,e,n){return"otpauth://totp/"+e+":"+t.username+"?secret="+n+"&issuer="+e},t.prototype.checkContact=function(t){return g(this,void 0,void 0,(function(){var e,n,r;return E(this,(function(o){switch(o.label){case 0:if(!h.a||"function"!==typeof h.a.verifiedContact)throw new Error(f.d);o.label=1;case 1:return o.trys.push([1,3,,4]),[4,h.a.verifiedContact(t)];case 2:return e=o.sent(),Object(a.b)(e)?(n=Object.assign(t,e),this.handleAuthStateChange(u.a.VerifyContact,n)):this.handleAuthStateChange(u.a.SignedIn,t),[3,4];case 3:return r=o.sent(),Object(c.a)(r),[3,4];case 4:return[2]}}
1))}))},t.prototype.onTOTPEvent=function(t,e,n){jt.debug("on totp event",t,e),t===f.g&&e===f.p&&this.checkContact(n)},t.prototype.handleTotpInputChange=function(t){this.setupMessage=null,this.qrCodeInput=t.target.value},t.prototype.generateQRCode=function(t){return g(this,void 0,void 0,(function(){var e,n;return E(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=this,[4,Vt.toDataURL(t)];case 1:return e.qrCodeImageSource=r.sent(),[3,3];case 2:return n=r.sent(),Object(c.a)(n),[3,3];case 3:return[2]}}))}))},t.prototype.setup=function(){return g(this,void 0,void 0,(function(){var t,e,n;return E(this,(function(r){switch(r.label){case 0:if(this.setupMessage=null,t=encodeURI("AWSCognito"),!h.a||"function"!==typeof h.a.setupTOTP)throw new Error(f.d);this.loading=!0,r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,h.a.setupTOTP(this.user)];case 2:return e=r.sent(),jt.debug("secret key",e),this.code=this.buildOtpAuthPath(this.user,t,e),this.generateQRCode(this.code),[3,5];case 3:return n=r.sent(),Object(c.a)(n),jt.debug(i.a.get(s.a.TOTP_SETUP_FAILURE),n),[3,5];case 4:return this.loading=!1,[7];case 5:return[2]}}
1))}))},t.prototype.verifyTotpToken=function(t){return g(this,void 0,void 0,(function(){var e,n;return E(this,(function(r){switch(r.label){case 0:if(t&&t.preventDefault(),!this.qrCodeInput)return jt.debug("No TOTP Code provided"),[2];if(e=this.user,!h.a||"function"!==typeof h.a.verifyTotpToken||"function"!==typeof h.a.setPreferredMFA)throw new Error(f.d);r.label=1;case 1:return r.trys.push([1,4,,5]),[4,h.a.verifyTotpToken(e,this.qrCodeInput)];case 2:return r.sent(),[4,h.a.setPreferredMFA(e,u.c.TOTP)];case 3:return r.sent(),this.setupMessage=i.a.get(s.a.TOTP_SUCCESS_MESSAGE),jt.debug(i.a.get(s.a.TOTP_SUCCESS_MESSAGE)),this.onTOTPEvent(f.g,f.p,e),[3,5];case 4:return n=r.sent(),this.setupMessage=i.a.get(s.a.TOTP_SETUP_FAILURE),jt.error(n),[3,5];case 5:return[2]}}))}))},t.prototype.render=function(){var t=this;return Object(r.i)("amplify-form-section",{headerText:this.headerText,submitButtonText:i.a.get(s.a.TOTP_SUBMIT_BUTTON_TEXT),handleSubmit:function(e){return t.verifyTotpToken(e)},loading:this.loading},Object(r.i)("div",{class:"totp-setup"},Object(r.i)("img",{src:this.qrCodeImageSource,alt:i.a.get(s.a.QR_CODE_ALT)}),Object(r.i)("amplify-form-field",{label:i.a.get(s.a.TOTP_LABEL),inputProps:this.inputProps,fieldId:"totpCode",name:"totpCode",handleInputChange:function(e){return t.handleTotpInputChange(e)}})))},t}();Wt.style=".totp-setup{text-align:center;margin-bottom:30px}.totp-setup img{height:128px;width:128px}"},635:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(2426),o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},i=new r.a("I18n"),a=function(){function t(t){this._options=null,this._lang=null,this._dict={},this._options=Object.assign({},t),this._lang=this._options.language,!this._lang&&"undefined"!==typeof window&&window&&window.navigator&&(this._lang=window.navigator.language),i.debug(this._lang)}return t.prototype.setLanguage=function(t){this._lang=t},t.prototype.get=function(t,e){if(void 0===e&&(e=void 0),!this._lang)return"undefined"!==typeof e?e:t;var n=this._lang,r=this.getByLanguage(t,n);return r||(n.indexOf("-")>0&&(r=this.getByLanguage(t,n.split("-")[0])),r||("undefined"!==typeof e?e:t))},t.prototype.getByLanguage=function(t,e,n){if(void 0===n&&(n=null),!e)return n;var r=this._dict[e];return r?r[t]:n},t.prototype.putVocabulariesForLanguage=function(t,e){var n=this._dict[t];n||(n=this._dict[t]={}),this._dict[t]=o(o({},n),e)},t.prototype.putVocabularies=function(t){var e=this;Object.keys(t).map((function(n){e.putVocabulariesForLanguage(n,t[n])}))},t}(),u=n(558),s=new r.a("I18n"),f=null,c=null,h=function(){function t(){}return t.configure=function(e){return s.debug("configure I18n"),e?(f=Object.assign({},f,e.I18n||e),t.createInstance(),f):f},t.getModuleName=function(){return"I18n"},t.createInstance=function(){s.debug("create I18n instance"),c||(c=new a(f))},t.setLanguage=function(e){return t.checkConfig(),c.setLanguage(e)},t.get=function(e,n){return t.checkConfig()?c.get(e,n):"undefined"===typeof n?e:n},t.putVocabulariesForLanguage=function(e,n){return t.checkConfig(),c.putVocabulariesForLanguage(e,n)},t.putVocabularies=function(e){return t.checkConfig(),c.putVocabularies(e)},t.checkConfig=function(){return c||(c=new a(f)),!0},t}();u.a.register(h)}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.